Skip to content

Commit

Permalink
Related person (#117)
Browse files Browse the repository at this point in the history
* Updated info on CPR-kontoret, which is now placed under a new department

* Added ProducentId to organization

* Related person - work in progress

* added example for RelatedPerson

* Updated after feedback from SIG

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

#114

* Fixed typos

* Fixed typo

* Added RelatedPerson example

* Fixed typo

* Updated example

* Removed misplaced link

* Renamed PatientRelationshipValues to PatientRelationshipType

* Added documentation

* Aligned namings

* Update SORIdentifier.fsh

* States that Producent identifier is maintained by MedCom

* documentation about cpr status and civilstand added to resolve issue #70

* Added example of regional diagnosis that are problem-list-items #97

* Fixed broken link, updated examples with official MedCom test persons

* Patient link.other now refer to DkCorePatient or DkCoreRelatedPerson

* Added missing link

* Made danish translations a codesystem supplement

* Updated documentation after review

* Added code value for 'family member'

* Handling of errors in QA

* Naming and casing

* Handling of comments in PR

---------

Co-authored-by: Christian Gasser <[email protected]>
Co-authored-by: hagensen-software <[email protected]>
Co-authored-by: tmsMedcom <[email protected]>
Co-authored-by: kirstinerosenbeck <[email protected]>
  • Loading branch information
5 people authored May 3, 2024
1 parent 20c407a commit 2817d12
Show file tree
Hide file tree
Showing 19 changed files with 307 additions and 49 deletions.
30 changes: 15 additions & 15 deletions input/fsh/DkCoreBasicParameter.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,21 @@ Description: "An example of TOBS (Danish: Tidlig opsporing af begyndende sygdom)
Usage: #example
* type = #collection
* timestamp = "2023-09-12T17:45:00.000Z"
* entry[+].fullUrl = "Patient/else"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Patient/else"
* entry[=].resource = else
* entry[+].fullUrl = "Observation/ElseConsciousness"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElseConsciousness"
* entry[=].resource = ElseConsciousness
* entry[+].fullUrl = "Observation/ElseBloodPressure"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElseBloodPressure"
* entry[=].resource = ElseBloodPressure
* entry[+].fullUrl = "Observation/ElseBodyTemperature"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElseBodyTemperature"
* entry[=].resource = ElseBodyTemperature
* entry[+].fullUrl = "Observation/ElseHeartRate"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElseHeartRate"
* entry[=].resource = ElseHeartRate
* entry[+].fullUrl = "Observation/ElseRespirationRate"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElseRespirationRate"
* entry[=].resource = ElseRespirationRate
* entry[+].fullUrl = "Observation/ElsesTOBSscore"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/ElsesTOBSscore"
* entry[=].resource = ElsesTOBSscore
* entry[+].fullUrl = "Practitioner/SidselSygeplejerske"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Practitioner/SidselSygeplejerske"
* entry[=].resource = SidselSygeplejerske

/* **************
Expand Down Expand Up @@ -293,19 +293,19 @@ Description: "An example of TOBS (Danish: Tidlig opsporing af begyndende sygdom)
Usage: #example
* type = #collection
* timestamp = "2023-08-08T13:30:00.000Z"
* entry[+].fullUrl = "Patient/Max"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Patient/Max"
* entry[=].resource = Max
* entry[+].fullUrl = "Observation/MaxConsciousness"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxConsciousness"
* entry[=].resource = MaxConsciousness
* entry[+].fullUrl = "Observation/MaxBloodPressure"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxBloodPressure"
* entry[=].resource = MaxBloodPressure
* entry[+].fullUrl = "Observation/MaxBodyTemperature"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxBodyTemperature"
* entry[=].resource = MaxBodyTemperature
* entry[+].fullUrl = "Observation/MaxHeartRate"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxHeartRate"
* entry[=].resource = MaxHeartRate
* entry[+].fullUrl = "Observation/MaxRespirationRate"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxRespirationRate"
* entry[=].resource = MaxRespirationRate
* entry[+].fullUrl = "Observation/MaxGlasgowComaScale"
* entry[+].fullUrl = "http://hl7.dk/fhir/core/Observation/MaxGlasgowComaScale"
* entry[=].resource = MaxGlasgowComaScale

/* **************
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/DkCoreCondition.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Description: "HL7 Denmark core profile for professionally asserted conditions, a
* system 1..
* system = "urn:oid:1.2.208.176.2.31"
* subject only Reference(DkCorePatient)
* recorder only Reference(DkCorePractitioner or PractitionerRole or DkCorePatient or RelatedPerson)
* recorder only Reference(DkCorePractitioner or PractitionerRole or DkCorePatient or DkCoreRelatedPerson)
* asserter only Reference(DkCorePractitioner or PractitionerRole)

Instance: ConditionPressureUlcer
Expand Down
18 changes: 9 additions & 9 deletions input/fsh/DkCoreObservation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Description: "HL7 Denmark core profile for observations"
* code 1..
* subject only Reference(DkCorePatient or Group or Location or Device)
* subject 1..
* performer only Reference(DkCorePractitioner or DkCoreOrganization or DkCorePatient or PractitionerRole or CareTeam or RelatedPerson)
* performer only Reference(DkCorePractitioner or DkCoreOrganization or DkCorePatient or PractitionerRole or CareTeam or DkCoreRelatedPerson)
* device ^short = "The device used for the measurement. It is recommended that when information about the device is sent, it is contained in the same Bundle as the Observation the device measured."
* valueQuantity.system = $ucum
* component.code.coding ^slicing.discriminator.type = #value
Expand Down Expand Up @@ -626,54 +626,54 @@ Description: """
Usage: #example
* type = #transaction
* entry[+]
* fullUrl = "Patient/Poul"
* fullUrl = "http://hl7.dk/fhir/core/Patient/Poul"
* request
* method = #POST
* url = "Patient"
* ifNoneExist = "identifier=urn:oid:1.2.208.176.1.2|3001749995"
* resource = Poul
* entry[+]
* fullUrl = "Device/Telma.FEEDDADADEADBEEF"
* fullUrl = "http://hl7.dk/fhir/core/Device/Telma.FEEDDADADEADBEEF"
* request
* method = #POST
* url = "Device"
* ifNoneExist = "identifier=urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680|FE-ED-DA-DA-DE-AD-BE-EF"
* resource = Telma.FEEDDADADEADBEEF
* entry[+]
* fullUrl = "Device/BPMonitor.C4F312FFFE53F2C9"
* fullUrl = "http://hl7.dk/fhir/core/Device/BPMonitor.C4F312FFFE53F2C9"
* request
* method = #POST
* url = "Device"
* ifNoneExist = "identifier=urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680|C4-F3-12-FF-FE-53-F2-C9"
* resource = BPMonitor.C4F312FFFE53F2C9
* entry[+]
* fullUrl = "Observation/BatteryLevel.0944"
* fullUrl = "http://hl7.dk/fhir/core/Observation/BatteryLevel.0944"
* request
* method = #POST
* url = "Observation"
* resource = BatteryLevel.0944
* entry[+]
* fullUrl = "Observation/CoincidentTimeStamp.0222"
* fullUrl = "http://hl7.dk/fhir/core/Observation/CoincidentTimeStamp.0222"
* request
* method = #POST
* url = "Observation"
* resource = CoincidentTimeStamp.0222
* entry[+]
* fullUrl = "Observation/BloodPressure.Poul.643992"
* fullUrl = "http://hl7.dk/fhir/core/Observation/BloodPressure.Poul.643992"
* request
* method = #POST
* url = "Observation"
* ifNoneExist = "identifier=C4F312FFFE53F2C9-3001749995-urn:oid:1.2.208.176.1.2-150020-118-266016-87-266016-99-266016-20230223T102408.00"
* resource = BloodPressure.Poul.643992
* entry[+]
* fullUrl = "Observation/HeartRate.Poul.1974654"
* fullUrl = "http://hl7.dk/fhir/core/Observation/HeartRate.Poul.1974654"
* request
* method = #POST
* url = "Observation"
* ifNoneExist = "identifier=C4F312FFFE53F2C9-3001749995-urn:oid:1.2.208.176.1.2-149546-93-{beat}/min-20230223T102408.00"
* resource = HeartRate.Poul.1974654
* entry[+]
* fullUrl = "Observation/BloodPressureStatus.Poul.133527"
* fullUrl = "http://hl7.dk/fhir/core/Observation/BloodPressureStatus.Poul.133527"
* request
* method = #POST
* url = "Observation"
Expand Down
18 changes: 16 additions & 2 deletions input/fsh/DkCoreOrganization.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Description: "HL7 Denmark core profile for a danish health organization"
Ydernummer 0..1 and
CVR-ID 0..1 and
Kommunekode 0..1 and
Regionskode 0..1
Regionskode 0..1 and
ProducentID 0..1
* identifier[EAN-ID] only GLNIdentifier
* ^short = "GLN identifier, [DA] EAN-nummer"
* identifier[SOR-ID] only SORIdentifier
Expand All @@ -37,6 +38,8 @@ Description: "HL7 Denmark core profile for a danish health organization"
* system 1..
* system = "http://hl7.dk/fhir/core/CodeSystem/dk-core-regional-subdivision-codes" (exactly)
* value 1..
* identifier[ProducentID] only ProducentId
* ^short = "[DA] Producent Id"
* type from $sor-organization-type (preferred)

Instance: CenterForDiabetes
Expand Down Expand Up @@ -115,7 +118,18 @@ Usage: #example
* identifier[=].value = "urn:uuid:a107fd1e-9f35-422c-9d1e-add097bbf4a6"
* type = $sct#264372000

Instance: 154b8c96-a061-45bf-9ce4-1947c7c3c283
InstanceOf: DkCoreOrganization
Title: "Producer Test Organization"
Description: "Producer of Lab Results Test Organization"
Usage: #example
* identifier[0].system = "urn:oid:1.2.208.176.1.1"
* identifier[=].value = "12345678901"
* identifier[+].system = "http://medcomfhir.dk/ig/terminology/CodeSystem/MedComProducentID"
* identifier[=].value = "KAF"
* type = $sct#264361005

Invariant: dk-core-organization-mandatory-identifier
Description: "Minimum one identifier shall be of type SOR-ID, KOMBIT-ORG-ID or CVR-ID"
Severity: #error
Expression: "identifier.where(system='urn:oid:1.2.208.176.1.1' or system='https://kombit.dk/sts/organisation' or system='urn:oid:2.16.840.1.113883.2.24.1.1').exists()"
Expression: "identifier.where(system='urn:oid:1.2.208.176.1.1' or system='https://kombit.dk/sts/organisation' or system='urn:oid:2.16.840.1.113883.2.24.1.1').exists()"
6 changes: 4 additions & 2 deletions input/fsh/DkCorePatient.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Description: "HL7 Denmark core profile for a patient"
* generalPractitioner contains referencedSORUnit 0..*
* generalPractitioner[referencedSORUnit] ^short = "[DA] Praktiserende læges SOR-id på sundhedsinstistutionsniveau"
* identifier only SORIdentifier
* contact.relationship from RelatedPersonRelationshipTypes (extensible)
* link.other only Reference(DkCorePatient or DkCoreRelatedPerson)

Instance: 283
InstanceOf: DkCorePatient
Expand Down Expand Up @@ -71,8 +73,8 @@ Usage: #example

Instance: Confidential
InstanceOf: DkCorePatient
Title: "Example of a patient with confidential adress and name"
Description: "Example of a patient with confidential adress and name"
Title: "Example of a patient with confidential address and name"
Description: "Example of a patient with confidential address and name"
Usage: #example
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">This instance is an example of a Danish citizen who has requested name and address protection (Navne- og adressebeskyttelse), why the instance is marked with a security label. Only personnel using systems in public/official affairs are allowed to see name and address for the citizen, why these information are included in the profile.<p></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource \"Confidential\"</p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-dk-core-patient.html\">Danish Core Patient Profile</a></p><p style=\"margin-bottom: 0px\">Security Labels: <span title=\"{http://terminology.hl7.org/CodeSystem/v3-Confidentiality http://terminology.hl7.org/CodeSystem/v3-Confidentiality}\">http://terminology.hl7.org/CodeSystem/v3-Confidentiality</span></p></div><p><b>identifier</b>: id: 1502779995</p><p><b>name</b>: Hans Hansen (OFFICIAL)</p><p><b>gender</b>: male</p><p><b>birthDate</b>: 1976-08-09</p><p><b>address</b>: Julianevej 22 6000 Kolding (HOME)</p></div>"
* text.status = #additional
Expand Down
65 changes: 65 additions & 0 deletions input/fsh/DkCoreRelatedPerson.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Profile: DkCoreRelatedPerson
Parent: RelatedPerson
Id: dk-core-related-person
Title: "Danish Core Related Person Profile"
Description: "HL7 Denmark core profile for a related person"

// Allow CPR and eCPR numbers as identifiers
* identifier 0..
* ^slicing.discriminator.type = #value
* ^slicing.discriminator.path = "system"
* ^slicing.rules = #open
* identifier contains
cpr 0..1 and
x-ecpr 0..1 and
d-ecpr 0..1
* identifier[cpr] only DkCoreCprIdentifier
* ^short = "[DA] cpr-nummer, som det fremgår af CPR registeret"
* identifier[x-ecpr] only DkCoreXeCprIdentifier
* ^short = "[DA] X-eCPR, tildelt fra den nationale eCPR service"
* identifier[d-ecpr] only DkCoreDeCprIdentifier
* ^short = "[DA] D-eCPR, decentral eCPR"

* patient only Reference(DkCorePatient)

* name ^slicing.discriminator.type = #value
* ^slicing.discriminator.path = "use"
* ^slicing.rules = #open
* name contains official 0..1
* name[official] ^short = "[DA] Officielt navn, som det fremgår af CPR registeret"
* use 1..
* use = #official (exactly)
* family 1..

* relationship from RelatedPersonRelationshipTypes (extensible)

Instance: Child
InstanceOf: DkCoreRelatedPerson
Title: "Example of child as related person"
Description: "Example of child as related person"
Usage: #example
* identifier.system = "urn:oid:1.2.208.176.1.2"
* identifier.value = "1502799995"
* name.use = #official
* name.family = "Mosebryggersen"
* name.given = "Odd Haugen Test"
* gender = #male
* birthDate = "1979-02-15"
* patient.reference = "Patient/283"
* relationship = $v3-RoleCode#CHILD

Instance: TwoRelations
InstanceOf: DkCoreRelatedPerson
Title: "Example of a related person with two relations"
Description: "Example of a person that has relations as both neighbor and primary caretaker"
Usage: #example
* identifier.system = "urn:oid:1.2.208.176.1.2"
* identifier.value = "0201919996"
* name.use = #official
* name.family = "Lauridsen"
* name.given = "Ellen Louise Test"
* gender = #female
* birthDate = "1991-01-02"
* patient.reference = "Patient/283"
* relationship[0] = $v3-RoleCode#NBOR
* relationship[1] = DkRelatedPersonRelationshipCodes#PRICARE
2 changes: 1 addition & 1 deletion input/fsh/KombitOrgIdentifier.fsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Profile: KombitOrgIdentifier
Parent: Identifier
Id: dk-core-kombit-org-identifier
Title: "Kombit Org Identifier"
Title: "Kombit Organsation Identifier"
Description: "Identifier holding the organization code issued by KOMBIT"
* use = #official (exactly)
* system 1..
Expand Down
9 changes: 9 additions & 0 deletions input/fsh/ProducentId.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Profile: ProducentId
Parent: Identifier
Id: dk-core-producent-id
Title: "Producent Id"
Description: "Offical MedCom code describing the producer of lab results"
* use = #official (exactly)
* system 1..
* system = "http://medcomfhir.dk/ig/terminology/CodeSystem/MedComProducentID" (exactly)
* value 1..
4 changes: 2 additions & 2 deletions input/fsh/SORIdentifier.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description: "Identifier holding the official SOR identifier for a danish health
* obeys min-digits-sor

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"
Description: "SOR Identifiers are at minimum 11 digits long. See https://sundhedsdatastyrelsen.dk/da/rammer-og-retningslinjer/organisationsregistrering"
Severity: #error
Expression: "matches('^([0-9]){11,}$')"
* requirements = "SOR Identifiers are at minimum 11 digits long"
* requirements = "SOR Identifiers are at minimum 11 digits long"
3 changes: 2 additions & 1 deletion input/fsh/aliases.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Alias: $observation-bodyweight = http://hl7.org/fhir/StructureDefinition/bodywei
Alias: $observation-heartrate = http://hl7.org/fhir/StructureDefinition/heartrate
Alias: $observation-bp = http://hl7.org/fhir/StructureDefinition/bp
Alias: $LOINC-vitalsigns = http://hl7.org/fhir/ValueSet/observation-vitalsignresult
Alias: $v3-Confidentiality = http://terminology.hl7.org/CodeSystem/v3-Confidentiality
Alias: $v3-Confidentiality = http://terminology.hl7.org/CodeSystem/v3-Confidentiality
Alias: $v3-RoleCode = http://terminology.hl7.org/CodeSystem/v3-RoleCode
83 changes: 82 additions & 1 deletion input/fsh/codeSystems.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -716,4 +716,85 @@ Description: "DK "
* #urn:oid:1.2.208.176.1.6.1.3.179 "D-eCPR fra Region Nordjylland"
* #urn:oid:1.2.208.176.1.6.1.3.181 "D-eCPR fra Region Midtjylland"
* #urn:oid:1.2.208.176.1.6.1.3.183 "D-eCPR fra Region Syddanmark"
* #urn:oid:1.2.208.176.1.6.1.3.187 "D-eCPR fra Region Hovedstaden"
* #urn:oid:1.2.208.176.1.6.1.3.187 "D-eCPR fra Region Hovedstaden"

CodeSystem: RoleCodeDkSupplement
Id: role-code-dk-supplement
Description: "CodeSystem supplement with danish translations for RoleCode"
Title: "DK Role Code"
* ^experimental = false
* ^content = #supplement
* ^supplements = "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
* #FAMMEMB
* ^designation.language = #da
* ^designation.value = "Familiemedlem"
* #CHILD
* ^designation.language = #da
* ^designation.value = "Barn"
* #DAUC
* ^designation.language = #da
* ^designation.value = "Datter"
* #SONC
* ^designation.language = #da
* ^designation.value = "Søn"
* #GRNDCHILD
* ^designation.language = #da
* ^designation.value = "Barnebarn"
* #CHLDINLAW
* ^designation.language = #da
* ^designation.value = "Svigerbarn"
* #PRN
* ^designation.language = #da
* ^designation.value = "Forælder"
* #FTH
* ^designation.language = #da
* ^designation.value = "Far"
* #MTH
* ^designation.language = #da
* ^designation.value = "Mor"
* #SIB
* ^designation.language = #da
* ^designation.value = "Søskende"
* #DOMPART
* ^designation.language = #da
* ^designation.value = "Registreret partner"
* #SPS
* ^designation.language = #da
* ^designation.value = "Ægtefælle"
* #FRND
* ^designation.language = #da
* ^designation.value = "Ven (ikke-beslægtet)"
* #NBOR
* ^designation.language = #da
* ^designation.value = "Nabo"
* #ROOM
* ^designation.language = #da
* ^designation.value = "Samboende"
* #GUARD
* ^designation.language = #da
* ^designation.value = "Værge"
* #NOK
* ^designation.language = #da
* ^designation.value = "Pårørende"
* #POWATT
* ^designation.language = #da
* ^designation.value = "Fuldmagtshaver"

CodeSystem: DkRelatedPersonRelationshipCodes
Id: dk-relatedperson-relationshipcodes
Title: "DK Related Person Relationship Codes"
Description: "DK Related Person Relationship Codes"
* ^experimental = false
* ^url = "http://hl7.dk/fhir/core/CodeSystem/dk-relatedperson-relationshipcodes"
* ^name = "DkRelatedPersonRelationshipCodes"
* ^caseSensitive = false
* ^status = #active
* ^content = #complete
* #PARAUTH "Parental authority"
* ^definition = "The player of the role holds parental authority over the scoping person."
* ^designation.language = #da
* ^designation.value = "Forældremyndighedsindehaver"
* #PRICARE "Primary caretaker"
* ^definition = "The player of the role is the primary caretaker of the scoping person."
* ^designation.language = #da
* ^designation.value = "Primær omsorgsperson"
Loading

0 comments on commit 2817d12

Please sign in to comment.