Skip to content

Commit

Permalink
V.3.0.0 rc1 (#107)
Browse files Browse the repository at this point in the history
* Updated Observation.coding.system

#94 and #85

* Condition-instance with SKS Tillægskode added #100

* fixing DkCoreCondition - handling of unconfirmed conditions #98

* Update DkCoreObservation.fsh

#94

* Update StructureDefinition-dk-core-observation-intro.md

#95 and #96 are handled

* Solved warnings associated with extension, that could be used anywhere

* Update sushi-config.yaml

* Fixed QA-errors, updated template

Invariant on Observation and ^constraint.requirement = "link"

* Technical FHIRPath correction value. and Observation.

#104

* Updated Observation-instances due to publisher update

* Update release-notes.md

---------

Co-authored-by: kirstinerosenbeck <[email protected]>
  • Loading branch information
tmsMedcom and Kirstinerosenbeck authored Nov 30, 2023
1 parent af8c9ec commit 325453f
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 69 deletions.
4 changes: 2 additions & 2 deletions ig.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[IG]
ig = fsh-generated/resources/ImplementationGuide-hl7.fhir.dk.core.json
;template = https://github.com/hl7dk/dk-ig-template
template = fhir.base.template#current
template = https://github.com/hl7dk/dk-ig-template
;template = fhir.base.template#current
9 changes: 3 additions & 6 deletions input/fsh/AuthorizationIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ Description: "Identifier holding the official [authorization identifier](https:/
* value 1..
* obeys authorization-id-format
* ^maxLength = 5
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.source = "https://stps.dk/da/autorisation/om-autorisationer/autorisations-id/"


Invariant: authorization-id-format
Description: "Authorization ID consists of exactly 5 consonants and Y and or numbers in any order"
Description: "Authorization ID consists of exactly 5 consonants and Y and or numbers in any order. See https://stps.dk/da/autorisation/om-autorisationer/autorisations-id/"
Severity: #error
Expression: "matches('^([b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z0-9]){5}$')"
Expression: "matches('^([b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z0-9]){5}$')"
4 changes: 2 additions & 2 deletions input/fsh/CVRIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Description: "Identifier holding a danish [CVR](https://datacvr.virk.dk/data/) n
Invariant: CVR-length
Description: "CVR must be exactly 8 numeric characters long"
Severity: #error
Expression: "value.matches('^[0-9]{8}$')"
Expression: "matches('^[0-9]{8}$')"

Invariant: CVR-modulus-11
Description: "CVR must pass the modulus 11 check"
Severity: #error
Expression: "((\n (value.substring(0,1).toInteger()*2)+\n (value.substring(1,1).toInteger()*7)+\n (value.substring(2,1).toInteger()*6)+\n (value.substring(3,1).toInteger()*5)+\n (value.substring(4,1).toInteger()*4)+\n (value.substring(5,1).toInteger()*3)+\n (value.substring(6,1).toInteger()*2)+\n (value.substring(7,1).toInteger()*1)) mod(11)=0)"
Expression: "((\n (substring(0,1).toInteger()*2)+\n (substring(1,1).toInteger()*7)+\n (substring(2,1).toInteger()*6)+\n (substring(3,1).toInteger()*5)+\n (substring(4,1).toInteger()*4)+\n (substring(5,1).toInteger()*3)+\n (substring(6,1).toInteger()*2)+\n (substring(7,1).toInteger()*1)) mod(11)=0)"
16 changes: 16 additions & 0 deletions input/fsh/DkCoreCondition.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ Usage: #example
* clinicalStatus = $condition-clinical#active
* verificationStatus = $condition-ver-status#confirmed

Instance: JohnFracture
InstanceOf: DkCoreCondition
Title: "John fraktur"
Description: "Johns fraktur-diagnose, udskrivningsdiagnose fra hospitalet med tillægskode"
Usage: #example
* code.coding[SKS-D] = urn:oid:1.2.208.176.2.4.12#DS721+TUL1 "Pertrokantær femurfraktur, højresidig"
* subject.reference = "Patient/john"
* asserter.reference = "Practitioner/AbrahamLaege"
* recorder.reference = "Practitioner/AbrahamLaege"
* category = $condition-category#encounter-diagnosis
* onsetDateTime = "2022-04-26"
* recordedDate = "2022-04-27"
* clinicalStatus = $condition-clinical#active
* verificationStatus = $condition-ver-status#confirmed


Instance: JohnMelanoma
InstanceOf: DkCoreCondition
Title: "John mistanke om Modermærkekræft"
Expand Down
11 changes: 3 additions & 8 deletions input/fsh/DkCoreCprIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ Description: "This structure holds the danish [CPR](https://cpr.dk/) identifier"
* value 1..
* obeys cpr
* ^maxLength = 10
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.source = "https://cpr.dk/cpr-systemet/opbygning-af-cpr-nummeret/#:~:text=5%20%2D%206%20position%20angiver%20personens,i%20personnummeret%20angiver%20personens%20k%C3%B8n."
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.requirements = "Requirement of danish civil registration numbers"
* ^mustSupport = false

Invariant: cpr
Description: "Requirement of danish civil registration numbers"
Description: "Requirement of danish civil registration numbers. See https://cpr.dk/cpr-systemet/opbygning-af-cpr-nummeret/#:~:text=5%20%2D%206%20position%20angiver%20personens,i%20personnummeret%20angiver%20personens%20k%C3%B8n."
Severity: #error
Expression: "value.matches('^((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})$')"
Expression: "matches('^((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})$')"
* requirements = "Requirement of danish civil registration numbers"
17 changes: 10 additions & 7 deletions input/fsh/DkCoreObservation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description: "HL7 Denmark core profile for observations"
* code.coding[SNOMEDCT]
* ^short = "SNOMED CT code for the observation"
* system 1..
* system = "https://www.snomed.org/" (exactly)
* system = "http://snomed.info/sct" (exactly)
* code 1..
* code.coding[NPU]
* ^short = "NPU code for the observation. NPU codes are administred by the Danish Health Data Authority."
Expand Down Expand Up @@ -67,7 +67,7 @@ Description: "HL7 Denmark core profile for observations"
* component.code.coding[SNOMEDCT]
* ^short = "SNOMED CT code for the observation"
* system 1..
* system = "https://www.snomed.org/" (exactly)
* system = "http://snomed.info/sct" (exactly)
* code 1..
* component.code.coding[NPU]
* ^short = "NPU code for the observation. NPU codes are administred by the Danish Health Data Authority."
Expand Down Expand Up @@ -102,7 +102,7 @@ Description: "HL7 Denmark core profile for observations"
Invariant: dk-core-observation-mandatory-units
Description: "If value is specified then unit and/or code must be specified"
Severity: #error
Expression: "Observation.valueQuantity.value.exists() implies Observation.valueQuantity.unit.exists() or Observation.valueQuantity.code.exists()"
Expression: "value.ofType(Quantity).value.exists() implies value.ofType(Quantity).unit.exists() or value.ofType(Quantity).code.exists()"



Expand Down Expand Up @@ -166,13 +166,14 @@ Instance: ObservationRespiratoryVitalSigns
InstanceOf: DkCoreObservation
Title: "John's Respiratory rate measurement, Vital Signs"
Usage: #example
* category = #vital-signs
* category = $observation-category#vital-signs
* status = #final
* code.coding[LOINC] = $LOINC#9279-1 "Respiratory rate"
* valueQuantity.value = 50
* valueQuantity.code = #{Breaths}/min
* valueQuantity.code = #/min
* valueQuantity.system = $ucum
* valueQuantity.unit = "Breaths / minute"
* effectiveDateTime = 2023-11-01T12:00:00+01:00
* subject = Reference(john)
* performer = Reference(AbrahamLaege)

Expand All @@ -183,22 +184,24 @@ Usage: #inline
* status = #final
* code.coding = $NPU#NPU03011 "Iltmætning"
* valueQuantity.value = 0.97
* valueQuantity.code = #{1}
* valueQuantity.code = #1
* valueQuantity.system = $ucum
* effectiveDateTime = 2023-11-01T12:00:00+01:00
* subject = Reference(john)
* performer = Reference(AbrahamLaege)

Instance: ObservationOxySatVitalSigns
InstanceOf: DkCoreObservation
Title: "John's oxygen saturation measurement, Vital Signs"
Usage: #example
* category = #vital-signs
* category = $observation-category#vital-signs
* status = #final
* code.coding[LOINC] = $LOINC#2708-6 "Oxygen saturation in Arterial blood"
* valueQuantity.value = 97.0
* valueQuantity.code = #%
* valueQuantity.system = $ucum
* valueQuantity.unit = "%"
* effectiveDateTime = 2023-11-01T12:00:00+01:00
* subject = Reference(john)
* performer = Reference(AbrahamLaege)
* contained[0] = ObservationOxySat
Expand Down
11 changes: 3 additions & 8 deletions input/fsh/DkCorePatient.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ Id: dk-core-patient
Title: "Danish Core Patient Profile"
Description: "HL7 Denmark core profile for a patient"
* obeys marital-status-unknown-usage
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* . ^constraint.source = "https://cpr.dk/borgere/hvad-staar-der-om-mig-i-cpr-registerindsigt/hvad-og-hvem-er-registreret-i-cpr-og-hvem-opdaterer-oplysninger-om-dig-i-cpr/"
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.requirements = "Marital status is legally unknown in Denmark"
* identifier 1..
* ^slicing.discriminator.type = #value
* ^slicing.discriminator.path = "system"
Expand Down Expand Up @@ -151,6 +145,7 @@ Usage: #example
* birthDate = "1983-06-07"

Invariant: marital-status-unknown-usage
Description: "Status in maritalStatus is unknown in a danish context. Consider mapping the value to UNK"
Description: "Status in maritalStatus is unknown in a danish context. Consider mapping the value to UNK. See https://cpr.dk/borgere/hvad-staar-der-om-mig-i-cpr-registerindsigt/hvad-og-hvem-er-registreret-i-cpr-og-hvem-opdaterer-oplysninger-om-dig-i-cpr/"
Severity: #warning
Expression: "maritalStatus.coding.where(code = 'P' and system = 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus').empty() or maritalStatus.coding.where(code = 'A' and system = 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus').empty()"
Expression: "maritalStatus.coding.where(code = 'P' and system = 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus').empty() or maritalStatus.coding.where(code = 'A' and system = 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus').empty()"
* requirements = "Marital status is legally unknown in Denmark"
4 changes: 2 additions & 2 deletions input/fsh/GLNIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Description: "Identifier holding a 13 digit GLN"
Invariant: gln-length
Description: "GLN must be exactly 13 characters long"
Severity: #error
Expression: "value.matches('^[0-9]{13}$')"
Expression: "matches('^[0-9]{13}$')"

Invariant: gln-modulus-10
Description: "GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually"
Severity: #error
Expression: "((\n(10-((value.substring(0,1).toInteger()*1)+\n(value.substring(1,1).toInteger()*3)+\n(value.substring(2,1).toInteger()*1)+\n(value.substring(3,1).toInteger()*3)+\n(value.substring(4,1).toInteger()*1)\n+(value.substring(5,1).toInteger()*3)\n+(value.substring(6,1).toInteger()*1)\n+(value.substring(7,1).toInteger()*3)\n+(value.substring(8,1).toInteger()*1)\n+(value.substring(9,1).toInteger()*3)\n+(value.substring(10,1).toInteger()*1)\n+(value.substring(11,1).toInteger()*3))mod(10))mod(10))=value.substring(12,1).toInteger())"
Expression: "((\n(10-((substring(0,1).toInteger()*1)+\n(substring(1,1).toInteger()*3)+\n(substring(2,1).toInteger()*1)+\n(substring(3,1).toInteger()*3)+\n(substring(4,1).toInteger()*1)\n+(substring(5,1).toInteger()*3)\n+(substring(6,1).toInteger()*1)\n+(substring(7,1).toInteger()*3)\n+(substring(8,1).toInteger()*1)\n+(substring(9,1).toInteger()*3)\n+(substring(10,1).toInteger()*1)\n+(substring(11,1).toInteger()*3))mod(10))mod(10))=substring(12,1).toInteger())"
2 changes: 1 addition & 1 deletion input/fsh/KombitOrgIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Description: "Identifier holding the organization code issued by KOMBIT"
Invariant: uuid
Description: "General UUID expression"
Severity: #error
Expression: "value.matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')"
Expression: "matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')"
13 changes: 5 additions & 8 deletions input/fsh/Lpr3Identifier.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Profile: Lpr3Identifier
/* Profile: Lpr3Identifier
Parent: Identifier
Id: lpr3-Identifier
Title: "LPR3 Identifier"
Expand All @@ -7,14 +7,11 @@ Description: "Identifier holding a LPR3 identifier for an organization"
* system = "https://www.esundhed.dk/Registre/Landspatientsregisteret" (exactly)
* value 1..
* obeys uuidv5
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.source = "https://scandihealth.github.io/lpr3-docs/"
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.requirements = "LPR3 episode of care identifiers must conform to a UUIDv5"
Invariant: uuidv5
Description: "LPR3 episode of care identifiers must conform to a UUIDv5"
Severity: #error
Expression: "value.matches('urn:uuid:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}')"
Expression: "matches('urn:uuid:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}')"
* requirements = "LPR3 episode of care identifiers must conform to a UUIDv5"
* source = "https://scandihealth.github.io/lpr3-docs/"
*/
6 changes: 2 additions & 4 deletions input/fsh/SORIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ Description: "Identifier holding the official SOR identifier for a danish health
* system = "urn:oid:1.2.208.176.1.1" (exactly)
* value 1..
* obeys min-digits-sor
// WARNING: The constraint index in the following rule (e.g., constraint[0]) may be incorrect.
// Please compare with the constraint array in the original definition's snapshot and adjust as necessary.
* ^constraint.requirements = "SOR Identifiers are at minimum 11 digits long"

Invariant: min-digits-sor
Description: "SOR Identifiers are at minimum 11 digits long. See https://sundhedsdatastyrelsen.dk/-/media/sds/filer/rammer-og-retningslinjer/organisationsregistrering/adgang-til-sor/info-om-opbygningen-af-sor-ider.pdf"
Severity: #error
Expression: "matches('^([0-9]){11,}$')"
Expression: "matches('^([0-9]){11,}$')"
* requirements = "SOR Identifiers are at minimum 11 digits long"
2 changes: 1 addition & 1 deletion input/fsh/aliases.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Alias: $sor-organization-type = http://hl7.dk/fhir/core/ValueSet/sor-organizatio
Alias: $dk-marital-status_1 = http://hl7.dk/fhir/core/ValueSet/dk-marital-status
Alias: $ucum = http://unitsofmeasure.org
Alias: $NPU = urn:oid:1.2.208.176.2.1
Alias: $Medcom = https://terminology.medcom.dk/fhir/observation-code
Alias: $Medcom = http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-observation-codes
Alias: $SKS = urn:oid:1.2.208.176.2.4
Alias: $LOINC = http://loinc.org
Alias: $IEEEx73 = urn:iso:std:iso:11073:10101
Expand Down
5 changes: 4 additions & 1 deletion input/fsh/extensions.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Extension: ConditionLastAssertedDate
Id: ConditionLastAssertedDate
Title: "ConditionLastAssertedDate"
Description: "Extension for the last date a Condition-instance was confirmed valid in its current state. E.g. with its current clinical- and verification status, stage and severity. Typically the last performed follow-up"

* . ^short = "ConditionLastAssertedDate"
* ^definition = "Extension for the last date a Condition-instance was confirmed valid in its current state. E.g. with its current clinical- and verification status, stage and severity. Typically the last performed follow-up"
* value[x] only dateTime
* ^context.type = http://hl7.org/fhir/extension-context-type#element
* ^context.expression = "Condition"

Extension: NotFollowedAnymore
Id: NotFollowedAnymore
Expand All @@ -14,6 +15,8 @@ Description: "Extension for the date where a condition lost focus in a specific
* . ^short = "NotFollowedAnymore"
* ^definition = "Extension for the date where a condition lost focus in a specific clinical context"
* value[x] only dateTime
* ^context.type = http://hl7.org/fhir/extension-context-type#element
* ^context.expression = "Condition"

Extension: RegionalSubDivisionCodes
Id: dk-core-RegionalSubDivisionCodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ Given that we have a condition, which is a problem-list-item, ending the conditi
* The Condition.category looses its "problem-list-item" flag. The idea is to state that from a patient viewpoint the condition has not changed, but in this professional context it is no longer in focus.
* The Condition.extension.NotFollowedAnymore is populated with the date that it lost focus in a specific professional context.

The Condition profile cover both primary sector, secondary sector (medical specialists ([DA] speciallæger) and hospitals) and municipality cases. As such the profile should be usable in most Danish contexts.
The status attributes controls the context of a condition. clinicalStatus should be populated with the value “active” if the patient has the condition, and inactive if the patient no longer have the condition. Condition.verificationStatus should be set to “confirmed” if the condition have been established as true by someone with authority (e.g. a diagnosis is confirmed by a doctor). A condition is “unconfirmed”, if the patient is suspected of having a condition, and "refuted" if it has been confirmed that the condition is not present. An example of an unconfirmed condition can be found here [John Melanoma](Condition-JohnMelanoma.html)https://hl7.dk/fhir/core/.

Note that "unconfirmed" is not the same as a risk of developing a condition. The risk of developing a certain condition may be recorded in (at least) two ways in FHIR i.e. as a familyMemberHistory or by populating Condition.code with a code that expresses a risk e.g. the SNOMED CT code ´395112001 At increased risk for cardiovascular event (finding)´. The first would typically be used if recording a family history, the second, if you want to use an increased risk as the reason for starting a prophylactic treatment.

Condition profile cover both primary sector, secondary sector (medical specialists ([DA] speciallæger) and hospitals) and municipality cases. As such the profile should be usable in most Danish contexts.
Loading

0 comments on commit 325453f

Please sign in to comment.