diff --git a/input/fsh/Alias.fsh b/input/fsh/Alias.fsh index a9c9969..42a534e 100644 --- a/input/fsh/Alias.fsh +++ b/input/fsh/Alias.fsh @@ -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 \ No newline at end of file +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 + diff --git a/input/fsh/Instance-1-minimal.fsh b/input/fsh/Instance-1-minimal.fsh new file mode 100644 index 0000000..b1a6797 --- /dev/null +++ b/input/fsh/Instance-1-minimal.fsh @@ -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 = "
Patienten ses til årskontrol af diabetes. Behandling følges, og pt. angiver ingen hypoglykæmiske episoder.
+ +Objektivt:
+BT 138/82 mmHg. BMI 27,3. Fodstatus u.a.
Paraklinik:
+HbA1c 58 mmol/mol (over mål).
Vurdering/plan: Type 2 diabetes med delvis regulering. Justering af metformin og rådgivning om livsstil. Kontrol om 6 mdr.
+ +Underskrift: Dr. Andersen
+ */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentBundle.fsh b/input/fsh/MedComDocumentBundle.fsh new file mode 100644 index 0000000..7ce0436 --- /dev/null +++ b/input/fsh/MedComDocumentBundle.fsh @@ -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 + */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentComposition.fsh b/input/fsh/MedComDocumentComposition.fsh new file mode 100644 index 0000000..8c34677 --- /dev/null +++ b/input/fsh/MedComDocumentComposition.fsh @@ -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." + */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentObservation.fsh b/input/fsh/MedComDocumentObservation.fsh new file mode 100644 index 0000000..54be572 --- /dev/null +++ b/input/fsh/MedComDocumentObservation.fsh @@ -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 */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentOrganization.fsh b/input/fsh/MedComDocumentOrganization.fsh new file mode 100644 index 0000000..a298397 --- /dev/null +++ b/input/fsh/MedComDocumentOrganization.fsh @@ -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 + + */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentPractitioner.fsh b/input/fsh/MedComDocumentPractitioner.fsh new file mode 100644 index 0000000..ced79f9 --- /dev/null +++ b/input/fsh/MedComDocumentPractitioner.fsh @@ -0,0 +1,11 @@ +/* Profile: MedComDocumentPractitioner +Parent: MedComCorePractitioner +Id: medcom-document-practitioner +Description: "[TEMPORARY] A profile including requirements for a MedCom Document Practitioner" +* 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." +* name 1.. +* name.given 1.. MS +* name.family 1.. MS */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentPractitionerRole.fsh b/input/fsh/MedComDocumentPractitionerRole.fsh new file mode 100644 index 0000000..afd0ee1 --- /dev/null +++ b/input/fsh/MedComDocumentPractitionerRole.fsh @@ -0,0 +1,10 @@ +/* Profile: MedComDocumentPractitionerRole +Parent: MedComCorePractitionerRole +Id: medcom-document-practitionerrole +Description: "[TEMPORARY] Document PractitionerRole resource used to describe the role of a healthcare professional or another actor involved in citizen or patient care." +* 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." +* practitioner only Reference(MedComDocumentPractitioner) +* organization only Reference(MedComDocumentOrganization) */ \ No newline at end of file diff --git a/input/fsh/MedComDocumentSourcePatient.fsh b/input/fsh/MedComDocumentSourcePatient.fsh new file mode 100644 index 0000000..ddb3093 --- /dev/null +++ b/input/fsh/MedComDocumentSourcePatient.fsh @@ -0,0 +1,22 @@ +/* Profile: MedComDocumentPatient +Parent: MedComCorePatient +Id: medcom-document-patient +Description: "[TEMPORARY] A profile including requirements for a MedCom Document Patient." +* id MS +* text MS +* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." +* text.status MS +* text.div MS +* text MS +* identifier 1..1 MS +* identifier[cpr] ^short = "Unique identification number for all citizens in Denmark, called civil person register (CPR-number)." +* identifier[cpr] 1..1 MS +* identifier[cpr].value 1..1 MS SU +* identifier[cpr].system 1..1 MS +* name 1..1 MS +* name[official] 1..1 MS +* name[official].given 1.. MS SU +* name[official].family 1.. MS SU +* birthDate 1.. MS +* gender 1.. MS + */ \ No newline at end of file diff --git a/input/fsh/MedComNotesObservation.fsh b/input/fsh/MedComNotesObservation.fsh index 89e8b52..005df87 100644 --- a/input/fsh/MedComNotesObservation.fsh +++ b/input/fsh/MedComNotesObservation.fsh @@ -10,24 +10,25 @@ Description: "Observation profile intended to be used in MedCom's Notes standard * effective[x] ^short = "The time the note was written" * effectiveDateTime MS * effectiveDateTime ^short = "The time the note was written (Da: Oprettelsestidspunkt for notatet)" -* effectiveDateTime obeys medcom-datetime-has-time-offset-zulu // SKS: skal vi have invarianten med som de har i EKG? * code.coding[LOINC] 1..1 MS * code.coding[LOINC].code MS * code.coding[LOINC].code = #11488-4 (exactly) * code.coding[LOINC].display 1.. MS * code.coding[LOINC].display = "Consult note" (exactly) * code.coding[LOINC].system MS -* subject 1..1 MS -* subject only Reference(MedComDocumentPatient) -* performer ..1 -* performer only Reference(MedComDocumentOrganization or MedComDocumentPractitioner or MedComDocumentPractitionerRole) //SKS: Skal det mon kun være person specifikt eller skal det også kunne være en organization? Det kan vel ikke være et careteam? -* extension[valueAttachment].url MS +* value[x] +* extension contains + MedComObservationValueAttachmentExtension named valueAttachment 1..1 * extension[valueAttachment] 1..1 MS * extension[valueAttachment].valueAttachment 1..1 MS * extension[valueAttachment].valueAttachment.data 1..1 MS -* extension[valueAttachment].valueAttachment.data ^short = "The Note as a Base64 encoded string." +* extension[valueAttachment].valueAttachment.data ^short = "Base64-encoded content of the EKG recording PDF/A document." * extension[valueAttachment].valueAttachment.contentType 1..1 MS -* extension[valueAttachment].valueAttachment.contentType = #text/plain (exactly) //SKS: jeg er i tvivl om dette er rigtigt -* extension[valueAttachment].valueAttachment.contentType ^short = "MIME type of the note." +* extension[valueAttachment].valueAttachment.contentType = #application/xhtml+xml (exactly) +* extension[valueAttachment].valueAttachment.contentType ^short = "MIME type of the attached EKG recording." * extension[valueAttachment].valueAttachment.title 1..1 MS -* extension[valueAttachment].valueAttachment.title ^short = "Title MUST be 'Journalnotat for **CPR-nummer**', if it is not available from the originatng system." +* extension[valueAttachment].valueAttachment.title ^short = "Either the title of the note written by the responsible or 'Journalnotat'." +* subject 1..1 MS +* subject only Reference(MedComDocumentPatient) +* performer ..1 +* performer only Reference(MedComDocumentOrganization or MedComDocumentPractitioner or MedComDocumentPractitionerRole) //SKS: Skal det mon kun være person specifikt eller skal det også kunne være en organization? Det kan vel ikke være et careteam?