Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion input/fsh/Alias.fsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Alias: $Loinc = http://loinc.org

Alias: $ClassCodeCS = http://medcomfhir.dk/ig/xdsmetadata/CodeSystem/MedCom-ihe-classcode-CS //skal måske ikke bruges alligevel
Alias: $ClassCodeCS = http://medcomfhir.dk/ig/xdsmetadata/CodeSystem/MedCom-ihe-classcode-CS //skal måske ikke bruges alligevel
Alias: $ObsStatusCodeSystem = http://hl7.org/fhir/observation-status
Alias: $MedComObsExtValueAttachment = http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension
Alias: $PractitionerRole = http://medcomfhir.dk/ig/terminology/CodeSystem/medcom-core-PractitionerRolesSKSadministrativ
Alias: $Language = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-languagecode-VS
Alias: $FormatCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-formatcode-VS
Alias: $TypeCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-typecode-VS
Alias: $ClassCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-classcode-VS

93 changes: 93 additions & 0 deletions input/fsh/Instance-1-minimal.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Instance: 9521a7f0-bad4-4a46-8c51-cd8378b24106
InstanceOf: MedComNotesBundle
Usage: #example
Title: "Bundle instance"
Description: "Bundle instance"
* type = #document
* timestamp = 2026-12-10T10:18:00+01:00
* identifier.system = "urn:ietf:rfc:3986"
* identifier.value = "urn:uuid:8a471893-0cc2-4695-ba67-8638d4fcbe2f"
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Composition/43fe2ddc-fd31-443b-bef0-e29c030d6572"
* entry[=].resource = 43fe2ddc-fd31-443b-bef0-e29c030d6572
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Observation/d2c9d517-3abd-450e-a3c2-18f18da6fd88"
* entry[=].resource = d2c9d517-3abd-450e-a3c2-18f18da6fd88
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Patient/b3b07166-24d7-462b-acb3-1a29269c4740"
* entry[=].resource = b3b07166-24d7-462b-acb3-1a29269c4740
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Organization/b3860fb8-4b1d-4be5-8290-e6a026d10555"
* entry[=].resource = b3860fb8-4b1d-4be5-8290-e6a026d10555

Instance: 43fe2ddc-fd31-443b-bef0-e29c030d6572
InstanceOf: MedComNotesComposition
Description: "Composition example for consultation note"
Usage: #example
//* meta.profile = "1.0" //Indsæt formatcode?
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note example</div>"
* identifier.system = "urn:ietf:rfc:3986"
* identifier.value = "urn:uuid:07585abe-9862-489d-8fa6-0a64e2eaccb0"
* status = #final
* type.coding.system = "http://loinc.org"
* type.coding.code = #11488-4
* type.coding.display = "Consult note"
* category.coding.system = $ClassCodeCS
* category.coding.code = #001
* category.coding.display = "Klinisk rapport"
* subject = Reference(b3b07166-24d7-462b-acb3-1a29269c4740)
* author[institution] = Reference(b3860fb8-4b1d-4be5-8290-e6a026d10555)
* title = "Journalnotat for 3001749995"
* confidentiality = #N
* event.period.start = "2026-12-10T10:00:00+01:00"
* section[0].entry[0] = Reference(d2c9d517-3abd-450e-a3c2-18f18da6fd88)
* date = "2026-12-10T10:15:00+01:00"
* language = #da "Danish"


Instance: b3b07166-24d7-462b-acb3-1a29269c4740
InstanceOf: MedComDocumentPatient
Title: "Patient instance - 2nd ConditionList"
Description: "Patient instance - 2nd ConditionList - Niels Test Vendelboe"
* identifier[cpr].system = "urn:oid:1.2.208.176.1.2"
* identifier[cpr].value = "3001749995"
* name[official].use = #official
* name[official].family = "Vendelboe"
* name[official].given[0] = "Niels"
* name[official].given[1] = "Test"
* birthDate = "1974-01-30"
* gender = #male


Instance: b3860fb8-4b1d-4be5-8290-e6a026d10555
InstanceOf: MedComDocumentOrganization
Title: "Organization"
Description: "Instance of an author organization"
Usage: #example
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note example</div>"
* identifier[SOR-ID].value = "61741000016007"
* identifier[SOR-ID].system = "urn:oid:1.2.208.176.1.1"
* name = "Lægerne Hasseris Bymidte"


Instance: d2c9d517-3abd-450e-a3c2-18f18da6fd88
InstanceOf: MedComNotesObservation
Title: "Observation"
Description: "Observation Journalnote"
Usage: #example
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Example of consultation note</div>"
* identifier.system = "urn:uuid"
* identifier.value = "3e4907e4-a5f9-4403-b0a0-9b3201a97074"
* status = $ObsStatusCodeSystem#final
* code.coding[LOINC].system = "http://loinc.org"
* code.coding[LOINC].code = #11488-4
* code.coding[LOINC].display = "Consult note"
* subject = Reference(b3b07166-24d7-462b-acb3-1a29269c4740)
* effectiveDateTime = "2026-12-10"
* performer = Reference(b3860fb8-4b1d-4be5-8290-e6a026d10555)
* extension[valueAttachment].url = $MedComObsExtValueAttachment
* extension[valueAttachment].valueAttachment.contentType = #application/xhtml+xml
* extension[valueAttachment].valueAttachment.title = "Journalnotat"
* extension[valueAttachment].valueAttachment.data = "w6Vyc2tvbnRyb2w6IEJUIDEzOC84MiBtbUhn"

/*Notat:
årskontrol: BT 138/82 mmHg */
135 changes: 135 additions & 0 deletions input/fsh/Instance-2-maximum.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
Instance: ba7d908a-0134-4f28-b5f5-0fcaf088e60b
InstanceOf: MedComNotesBundle
Usage: #example
Title: "Bundle instance"
Description: "Bundle instance"
* type = #document
* timestamp = 2026-12-12T10:05:00+01:00
* identifier.system = "urn:ietf:rfc:3986"
* identifier.value = "urn:uuid:cf5a0508-063d-4200-9c53-7317ee1a69e4"
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Composition/cff723a9-fae7-4fc6-8db2-6e49cbbc928a"
* entry[=].resource = cff723a9-fae7-4fc6-8db2-6e49cbbc928a
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Observation/if810168-ee7c-4f34-8012-9aff6c1d86e7"
* entry[=].resource = if810168-ee7c-4f34-8012-9aff6c1d86e7
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Patient/d65cd8db-4520-4264-87be-a5fd01fb9762"
* entry[=].resource = d65cd8db-4520-4264-87be-a5fd01fb9762
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Organization/f8d0eb07-5336-4005-9081-b065f9a82663"
* entry[=].resource = f8d0eb07-5336-4005-9081-b065f9a82663
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/Practitioner/48ed6310-3095-44da-9e34-d1cd6bd830c9"
* entry[=].resource = 48ed6310-3095-44da-9e34-d1cd6bd830c9
* entry[+].fullUrl = "http://medcomfhir.dk/ig/dk-medcom-notes/PractitionerRole/bb6fa4e1-f8b1-4bf4-b77e-bb03b2cc9820"
* entry[=].resource = bb6fa4e1-f8b1-4bf4-b77e-bb03b2cc9820

Instance: cff723a9-fae7-4fc6-8db2-6e49cbbc928a
InstanceOf: MedComNotesComposition
Description: "Composition example for consultation note"
Usage: #example
//* meta.profile = "1.0" //Indsæt formatcode?
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note example</div>"
* identifier.system = "urn:ietf:rfc:3986"
* identifier.value = "urn:uuid:47ef2e1b-5f14-42ca-bd8f-feafb4154240"
* status = #final
* type.coding.system = "http://loinc.org"
* type.coding.code = #11488-4
* type.coding.display = "Consult note"
* category.coding.system = $ClassCodeCS
* category.coding.code = #001
* category.coding.display = "Klinisk rapport"
* subject = Reference(d65cd8db-4520-4264-87be-a5fd01fb9762)
* author[institution] = Reference(f8d0eb07-5336-4005-9081-b065f9a82663)
* author[+] = Reference(48ed6310-3095-44da-9e34-d1cd6bd830c9)
* title = "Journalnotat for 3001749995"
* confidentiality = #N
* event.period.start = "2026-12-12T10:05:00+01:00"
* section[0].entry[0] = Reference(if810168-ee7c-4f34-8012-9aff6c1d86e7)
* date = "2026-12-12T10:05:00+01:00"
* language = #da "Danish"


Instance: d65cd8db-4520-4264-87be-a5fd01fb9762
InstanceOf: MedComDocumentPatient
Title: "Patient instance - 2nd ConditionList"
Description: "Patient instance - 2nd ConditionList - Niels Test Vendelboe"
* identifier[cpr].system = "urn:oid:1.2.208.176.1.2"
* identifier[cpr].value = "3001749995"
* name[official].use = #official
* name[official].family = "Vendelboe"
* name[official].given[0] = "Niels"
* name[official].given[1] = "Test"
* birthDate = "1974-01-30"
* gender = #male


Instance: bb6fa4e1-f8b1-4bf4-b77e-bb03b2cc9820
InstanceOf: MedComDocumentPractitionerRole
Title: "PractitionerRole"
Description: "PractitionerRole with a role and reference to a practitioner and an organization"
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note PractitionerRole example</div>"
* practitioner = Reference(48ed6310-3095-44da-9e34-d1cd6bd830c9)
* code = $PractitionerRole#speciallaegeipraksis
* identifier.system = "urn:uuid"
* identifier.value = "9a6fb982-ba4a-41d0-ac09-f04cc51c8f38"
* organization = Reference(f8d0eb07-5336-4005-9081-b065f9a82663)

Instance: 48ed6310-3095-44da-9e34-d1cd6bd830c9
InstanceOf: MedComDocumentPractitioner
Title: "Practitioner"
Description: "Instance of a practitioner"
Usage: #example
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note Practitioner example</div>"
* name.given = "Sidsel"
* name.family = "Andersen"
* identifier.system = "urn:uuid"
* identifier.value = "0ee2db70-d972-4497-a156-0a8109aaa771"

Instance: f8d0eb07-5336-4005-9081-b065f9a82663
InstanceOf: MedComDocumentOrganization
Title: "Organization"
Description: "Instance of an author organization"
Usage: #example
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Consultation note Organization example</div>"
* identifier[SOR-ID].value = "61741000016007"
* identifier[SOR-ID].system = "urn:oid:1.2.208.176.1.1"
* identifier[Ydernummer].value = "77410"
* identifier[Ydernummer].system = "urn:oid:1.2.208.176.1.4"
* name = "Lægerne Hasseris Bymidte"


Instance: if810168-ee7c-4f34-8012-9aff6c1d86e7
InstanceOf: MedComNotesObservation
Title: "Observation"
Description: "Observation Journalnote"
Usage: #example
* text.status = #generated
* text.div = "<div xmlns=\"http://www.w3.org/1999/xhtml\">Example of consultation note</div>"
* identifier.system = "urn:uuid"
* identifier.value = "3e4907e4-a5f9-4403-b0a0-9b3201a97074"
* status = $ObsStatusCodeSystem#final
* code.coding[LOINC].system = "http://loinc.org"
* code.coding[LOINC].code = #11488-4
* code.coding[LOINC].display = "Consult note"
* subject = Reference(d65cd8db-4520-4264-87be-a5fd01fb9762)
* effectiveDateTime = "2026-12-12T10:05:00+01:00"
* performer = Reference(48ed6310-3095-44da-9e34-d1cd6bd830c9)
* extension[valueAttachment].url = $MedComObsExtValueAttachment
* extension[valueAttachment].valueAttachment.contentType = #application/xhtml+xml
* extension[valueAttachment].valueAttachment.title = "Årskontrol af diabetes"
* extension[valueAttachment].valueAttachment.data = "IDxwPlBhdGllbnRlbiBzZXMgdGlsIDxiPsOlcnNrb250cm9sIGFmIGRpYWJldGVzPC9iPi4gQmVoYW5kbGluZyBmw7hsZ2VzLCBvZyBwdC4gYW5naXZlciBpbmdlbiBoeXBvZ2x5a8OmbWlza2UgZXBpc29kZXIuPC9wPgoKPHA+T2JqZWt0aXZ0Ojxici8+CkJUIDEzOC84MiBtbUhnLiBCTUkgPGk+MjcsMzwvaT4uIEZvZHN0YXR1cyB1LmEuPC9wPgoKPHA+UGFyYWtsaW5pazo8YnIvPgpIYkExYyA1OCBtbW9sL21vbCAoPGVtPm92ZXIgbcOlbDwvZW0+KS48L3A+Cgo8cD5WdXJkZXJpbmcvcGxhbjogPGI+VHlwZSAyIGRpYWJldGVzPC9iPiBtZWQgZGVsdmlzIHJlZ3VsZXJpbmcuIEp1c3RlcmluZyBhZiBtZXRmb3JtaW4gb2cgcsOlZGdpdm5pbmcgb20gbGl2c3N0aWwuIEtvbnRyb2wgb20gNiBtZHIuPC9wPgoKPHA+VW5kZXJza3JpZnQ6IERyLiA8dHQ+QW5kZXJzZW48L3R0PjwvcD4="


/* <p>Patienten ses til <b>årskontrol af diabetes</b>. Behandling følges, og pt. angiver ingen hypoglykæmiske episoder.</p>

<p>Objektivt:<br/>
BT 138/82 mmHg. BMI <i>27,3</i>. Fodstatus u.a.</p>

<p>Paraklinik:<br/>
HbA1c 58 mmol/mol (<em>over mål</em>).</p>

<p>Vurdering/plan: <b>Type 2 diabetes</b> med delvis regulering. Justering af metformin og rådgivning om livsstil. Kontrol om 6 mdr.</p>

<p>Underskrift: Dr. <tt>Andersen</tt></p>
*/
26 changes: 26 additions & 0 deletions input/fsh/MedComDocumentBundle.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Profile: MedComDocumentBundle
Parent: Bundle
Id: medcom-document-bundle
Description: "[TEMPORARY] The Bundle profile for a document"
* id 1..
* id MS
* identifier 1..1 MS
* type MS
* type = #document
* type ^short = "Always a document"
* timestamp 1..1 MS
* timestamp ^short = "[DocumentEntry.creationTime] Date and time that the FHIR Document is created."
* entry 1.. MS
* entry.fullUrl 1..1 MS
* entry.resource 1.. MS

/*
Instance: document
InstanceOf: MedComDocumentBundle
Usage: #example
* type = #document
* timestamp = 2024-05-01T12:00:00+01:00
* identifier.value = "7c596b9a-112e-4386-ae71-5ecdd3ed7c50"
* entry[+].fullUrl = "https://medcomfhir.dk/ig/carecommunication/MessageHeader/CompositionExample"
* entry[=].resource = CompositionExample
*/
80 changes: 80 additions & 0 deletions input/fsh/MedComDocumentComposition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/* Alias: $loinc = http://loinc.org
Alias: $v3-ActCode = http://terminology.hl7.org/CodeSystem/v3-ActCode
Alias: $list-order = http://terminology.hl7.org/CodeSystem/list-order
Alias: $list-empty-reason = http://terminology.hl7.org/CodeSystem/list-empty-reason

Profile: MedComDocumentComposition
Parent: Composition
Id: medcom-document-composition
Description: "[TEMPORARY] The profile of the MedCom Document Composition containing the minimum allowed content."
* id 1.. MS
* text MS
* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle."
* text.status MS
* text.div MS
* meta.profile 1..1 MS
* identifier 1.. MS
* identifier.system 1.. MS
* identifier.system ^short = "[DocumentEntry.uniqueId] Sender organization OID (Object Identifier). Example: 1.2.208.184 (MedCom OID)."
* identifier.value 1.. MS
* identifier.value ^short = "[DocumentEntry.uniqueId] UUID."
* identifier ^short = "The Composition identifier"
* date MS
* confidentiality 1..1 MS
* status = #final
* status MS
* type 1..1 MS
* type ^short = "[DocumentEntry.typeCode] Kind of document"
* type.coding 1.. MS
* type.coding.system 1.. MS
* type.coding.code 1.. MS
* type.coding.display 1.. MS
* type from $TypeCode (required)
* category ..1 MS
* category from $ClassCode (extensible)
* category.coding 1..1 MS
* category.coding.code 1.. MS
* category.coding.system 1.. MS
* category.coding.display 1.. MS
* category ^short = "[DocumentEntry.classCode] Categorization of document"
* subject 1.. MS
* subject only Reference(MedComDocumentPatient)
* subject ^type.aggregation = #bundled
* event 1..1 MS
* event.code MS
* event.period 1..1 MS
* event.period ^short = "[DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime] Time of service that is being documented."
* event.period.start 1..1 MS
* event.period.end 0..1 MS
* event.detail 0..* MS
* event.detail ^short = "[DocumentEntry.referenceIdList] Related identifiers or resources"
* author ..2 MS
* author only Reference(MedComDocumentOrganization or MedComDocumentPractitionerRole or MedComDocumentPractitioner or MedComDocumentPatient or DkCoreRelatedPerson or Device)
* author ^slicing.discriminator[0].type = #profile
* ^slicing.discriminator[0].path = "$this.resolve()"
* ^slicing.rules = #open
* author contains
institution 1..1 MS
* author ^short = "[DocumentEntry.author] The slice author:institution ensures one mandatory organizational author.
Any author element that does not match this slice is interpreted
as an author person."
* author[institution] only Reference(MedComDocumentOrganization)
* author[institution] ^short = "The organization who authored the document."
* author ^type.aggregation = #bundled
* attester 0..1 MS
* attester.party 0..1 MS
* attester.mode MS
* attester.party only Reference(MedComDocumentPractitioner)
* attester.party ^short = "[DocumentEntry.legalAuthenticator] Who authenticated the document."
* attester.party ^type.aggregation = #bundled
* title MS
* title ^short = "[DocumentEntry.title] The readable title of the document."
* language 1..1 MS
* language from $Language (extensible)
* language ^short = "[DocumentEntry.languageCode] Human language of the content"
* section 1.. MS
* section.text MS //RCH: Hvad er dette felt til? Det er med fra tidligere, men jeg ved ikke hvad vi bruger det til. Skal det fjernes?
* section.entry MS
* meta 1.. MS
* meta.profile ^short = "[DocumentEntry.formatCode] Indicates the FHIR Composition profile name used as the formatCode in the DocumentEntry for the individual MedCom FHIR Document standards."
*/
31 changes: 31 additions & 0 deletions input/fsh/MedComDocumentObservation.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Profile: MedComDocumentObservation
Parent: MedComCoreObservation
Id: medcom-document-observation
Title: "MedComDocumentObservation"
Description: "[TEMPORARY] Observation profile to be used in MedCom FHIR Documents."
* identifier 1..1 MS
* identifier.value 1..1 MS
* identifier.system 1..1 MS
* identifier ^short = "Globally unique, stable identifier for this resource. The same identifier SHALL be used when this resource is recreated from the same source data."
* subject only Reference(MedComDocumentPatient)
* performer only Reference(MedComDocumentOrganization or MedComDocumentPractitioner or MedComDocumentPatient or DkCoreRelatedPerson)

Profile: MedComObservationValueAttachmentExtension
Parent: Extension
Id: medcom-observation-value-attachment-extension
Title: "MedCom Observation ValueAttachment Extension"
Description: "[TEMPORARY] Generic extension for Observation value as Attachment type."

// Canonical URL for extensionen
* ^url = "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension"
* ^status = #active

// Hvor extensionen må bruges
* ^context[0].type = #element
* ^context[0].expression = "Observation"
* ^context[+].type = #element
* ^context[=].expression = "Observation.extension"
* . ^short = "Observation value as attachment."
* url 1..1
* url = "http://medcomfhir.dk/ig/core/StructureDefinition/medcom-observation-value-attachment-extension" (exactly)
* value[x] only Attachment */
7 changes: 7 additions & 0 deletions input/fsh/MedComDocumentOrganization.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Profile: MedComDocumentOrganization
Parent: MedComCoreOrganization
Id: medcom-document-organization
Description: "[TEMPORARY] A profile including requirements for a MedCom Document Organization resource"
* name 1.. MS

*/
Loading
Loading