Skip to content

Feature sks cleanup#221

Draft
jkiddo wants to merge 12 commits into
masterfrom
feature-sks-cleanup
Draft

Feature sks cleanup#221
jkiddo wants to merge 12 commits into
masterfrom
feature-sks-cleanup

Conversation

@jkiddo

@jkiddo jkiddo commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to the handling of diagnosis codes in the HL7 Denmark FHIR implementation guide. The main focus is on distinguishing between standard ICD-10 codes and Danish SKS-specific diagnosis code extensions/deviations, ensuring more precise and standards-compliant modeling. Additionally, new value sets are introduced to support this separation, and a utility script is documented to help maintain the mapping between SKS and ICD-10. There are also enhancements to the observation and document reference profiles to use more specific value sets.

Diagnosis coding improvements:

  • Introduced separate elements for ICD10Diagnosis and SKSDeviationDiagnosis in both DkCoreCondition and DkCoreServiceRequest profiles, replacing the previous generic SKS code element. This allows clear distinction between standard ICD-10 and Danish-specific diagnosis codes. Example instances have been updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8]

  • Added new aliases for $icd10 and $sks-icd10-deviations to aliases.fsh for use in profiles and value sets.

  • Defined a new value set DkCoreDiagnosisCodes to include both ICD-10 codes and Danish SKS-specific deviations/extensions, while excluding non-codable ICD-10 groupings.

Observation and document reference enhancements:

  • Introduced DkCoreSksObservationCodes value set, restricting SKS codes for observations to relevant registers only, and updated DkCoreObservation to reference this value set for both main and component SKS codes. [1] [2] [3]

  • Updated DkCoreMinimalDocumentReference to use a new extensible value set DkCoreDocumentEventCodes for context.event, focusing on SKS 'Forløbselement label' codes. [1] [2]

Supporting tooling and documentation:

  • Added a detailed README.md for the scripts directory, documenting the sks_icd10_diff.py utility script. This script maps Danish SKS diagnosis codes to ICD-10, identifies Danish-specific extensions, and generates FHIR CodeSystems and value sets to support the new coding model.

These changes collectively improve the accuracy, maintainability, and clarity of diagnosis coding in the Danish FHIR profiles, aligning them better with both international standards and national requirements.

jkiddo and others added 12 commits June 3, 2026 15:29
Every branch now terminates at a single-letter main-group (hovedgruppe)
root. A/B/F/K/N/R/U/W are real SKS codes already topping their branch;
D/E/Z (which SKS publishes only as deeper codes) get a synthetic root
concept and their former branch roots are reparented under it. M (ATC)
is out of scope; T/V/Y are not hovedgrupper and stay as their own roots.

Adds 3 synthetic concepts (38090 -> 38093). Output stays deterministic
and parent/child references remain internally consistent (0 dangling).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a third generated artifact, CodeSystem-icd10-da.json: a
content=supplement CodeSystem that supplements
http://hl7.org/fhir/sid/icd-10 with the Danish display from the SKS
diagnosis register, for only the codes that actually exist in ICD-10
(SKS rows classified icd10_standard, ~10.5k). Danish text is carried as
both display and a 'da' designation. Danish extensions / Danish-only
blocks are excluded (not ICD-10 codes; they live in
sks-icd10-deviations).

Reuses the existing download + classify pipeline; version/date default
to the SKS source revision date, output is deterministic. Wired into the
quarterly update workflow (regenerate, diff, PR add-paths).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The SKS/ICD-10/ICPC CodeSystems, the ICPC-2->ICD-10 ConceptMap, the generation
scripts, and the quarterly update Action now live in the dk-sks-terminology-
automation repo. They are uploaded to the Nordic terminology server, so DK Core
resolves them by canonical URL at build time and no longer carries them.

Removed: scripts/, .github/workflows/sks-update.yml, and the generated
input/resources/CodeSystem-sks*.json / CodeSystem-icd10-da.json /
ConceptMap-icpc2-icd10.json. Only ValueSets/profiles remain (the $icd10,
$icpc2, $sks-icd10-deviations and $SKS aliases still reference these systems).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant