diff --git a/input/fsh/Alias.fsh b/input/fsh/Alias.fsh index 776fb3e..b974f8b 100644 --- a/input/fsh/Alias.fsh +++ b/input/fsh/Alias.fsh @@ -2,6 +2,9 @@ Alias: $ActCodes = http://terminology.hl7.org/CodeSystem/v3-ActCode Alias: $RequestPriority = http://medcomfhir.dk/ig/terminology/ValueSet/medcom-careCommunication-requestPriority */ + +Alias: $obligation = http://hl7.org/fhir/StructureDefinition/obligation + Alias: $QrdTypeCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-dk-ihe-qrd-typecode-VS Alias: $QrdEventCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-dk-ihe-qrd-eventcodelist-VS Alias: $QrdHomeCommunityID = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-qrd-homeCommunityId-VS @@ -48,8 +51,10 @@ Alias: $ContentType = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-co Alias: $Language = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-languagecode-VS //Alias: $FormatCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-apd-formatcode-VS -Alias: $FormatCode = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-formatcode-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: $HomeCommunityID = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-apd-homeCommunityId-VS Alias: $HomeCommunityID = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-homeCommunityId-VS @@ -57,6 +62,7 @@ Alias: $PracticeSetting = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ih Alias: $FacilityType = http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-ihe-core-HealthcareFacilityTypeCode-VS +/* Alias: $DanishiheOID = urn:oid:1.2.208.184.100.9 Alias: $SnomedctOID = urn:oid:2.16.840.1.113883.6.96 Alias: $LoincOID = urn:oid:2.16.840.1.113883.6.1 @@ -67,4 +73,31 @@ Alias: $PROdkOID = urn:oid:1.2.208.176.7.3.1 Alias: $MedComFormatOID = urn:oid:1.2.208.184.100.10 Alias: $DanishxdsOID = urn:oid:1.2.208.176.8.1 Alias: $IANALanguageOID = urn:oid:2.16.840.1.113883.6.121 -Alias: $IANAMediaOID = urn:oid:2.16.840.1.113883.5.79 \ No newline at end of file +Alias: $IANAMediaOID = urn:oid:2.16.840.1.113883.5.79 +*/ +Alias: $v3-ActCode3.0.0 = http://terminology.hl7.org/ValueSet/v3-ActCode|3.0.0 +Alias: $sct = http://snomed.info/sct|http://snomed.info/sct/554471000005108 // Danish version - append e.g. /version/20240331 to get a more specific version + +Alias: $DanishXdsOID = urn:oid:1.2.208.184.100.9 +//Alias: $DanishiheOID = urn:oid:1.2.208.184.100.9 +Alias: $SnomedctOID = http://snomed.info/sct|http://snomed.info/sct/554471000005108 //urn:oid:2.16.840.1.113883.6.96 +Alias: $LoincOID = http://loinc.org //urn:oid:2.16.840.1.113883.6.1 +//Alias: $MedComOID = urn:oid:1.2.208.184.100.1 +Alias: $SKSOID = urn:oid:1.2.208.176.2.4 +//Alias: $SKSOID = https://www.esundhed.dk/Registre/Landspatientregisteret +//Alias: $SKSOID = http://dk.ehealth.sundhed.fhir.ig.core1 +Alias: $NPUOID = urn:oid:1.2.208.176.2.1 +Alias: $PROdkOID = urn:oid:1.2.208.176.7.3.1 +Alias: $MedComFormatOID = urn:oid:1.2.208.184.100.10 +Alias: $DanishHomeCommunityOID = urn:oid:1.2.208.176.8.1 +//Alias: $IANALanguageOID = urn:oid:2.16.840.1.113883.6.121 +//Alias: $IANALanguageOID = https://www.iana.org/assignments/language-subtag-registry +Alias: $IANALanguageOID = urn:ietf:bcp:47 //urn:oid:2.16.840.1.113883.6.121 +Alias: $IANAMediaOID = urn:ietf:bcp:13 //http://terminology.hl7.org/CodeSystem/v3-mediaType //urn:oid:2.16.840.1.113883.5.79 +Alias: $HL7 = http://terminology.hl7.org/CodeSystem/v3-Confidentiality //urn:oid:2.16.840.1.113883.5.25 +Alias: $hoer = urn:ad:dk:medcom:noah:action-categories +Alias: $DanishPrimaryHealthcareDomainOID = urn:oid:1.2.208.193.100 + +Alias: $IHEClassCodeTEMP = http://medcomfhir.dk/ig/document/CodeSystem/MedCom-ihe-classcode-CS-TEMP +Alias: $IHEMessageCodesTEMP = http://medcomfhir.dk/ig/document/CodeSystem/MedCom-message-codes-CS-TEMP +Alias: $IHEFormatCodeTEMP = http://medcomfhir.dk/ig/document/CodeSystem/MedCom-ihe-formatcode-CS-TEMP \ No newline at end of file diff --git a/input/fsh/Helpers/Obligations.fsh b/input/fsh/Helpers/Obligations.fsh new file mode 100644 index 0000000..f58c24a --- /dev/null +++ b/input/fsh/Helpers/Obligations.fsh @@ -0,0 +1,11 @@ +RuleSet: ProducerShallPutInNarrative(elementName) +* {elementName} ^extension[$obligation][+].extension[code].valueCode = #SHALL:in-narrative +* {elementName} ^extension[$obligation][=].extension[actor].valueCanonical = Canonical(ProducerActor) + +Instance: ProducerActor +InstanceOf: ActorDefinition +* name = "Producer of FHIR resources" +* title = "Producer of FHIR resources" +* status = #active +* type = #system +* description = "The system that creates the FHIR resources" \ No newline at end of file diff --git a/input/fsh/Instances.fsh b/input/fsh/Instances.fsh index 638464a..91b6a77 100644 --- a/input/fsh/Instances.fsh +++ b/input/fsh/Instances.fsh @@ -5,9 +5,11 @@ Description: "Instance of an author person" Usage: #example * name.given = "Sidsel" * name.family = "Andersen" +* identifier.system = "urn:uuid" +* identifier.value = "ce6f5308-d71b-4ee8-bc41-cc9ddcc15366" Instance: 8fa7df76-bec2-4fe2-9a44-750030a0eda0 -InstanceOf: DkCoreOrganization +InstanceOf: MedComCoreOrganization Title: "Author Organization" Description: "Instance of an author organization" Usage: #example diff --git a/input/fsh/MedComContainedDocumentReference.fsh b/input/fsh/MedComContainedDocumentReference.fsh new file mode 100644 index 0000000..3d0a05f --- /dev/null +++ b/input/fsh/MedComContainedDocumentReference.fsh @@ -0,0 +1,168 @@ +Profile: MedComContainedDocumentReference +Parent: DkCoreMinimalDocumentReference +Id: medcom-contained-documentreference +Description: "A profile stating the rules, when exchanging a FHIR document in the Danish Healthcare sector using IHE MHD and IHE XDS based document sharing." +* id 1.. MS +* text 1.. MS +* text ^short = "The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle." +* text.status MS +* text.div MS + +// uniqueId +* masterIdentifier 1..1 MS +* masterIdentifier.value 1..1 MS +* masterIdentifier ^short = "[DocumentEntry.uniqueId] Master Version Specific Identifier" + +// entryUUID +* identifier[entryUUID] 1..1 MS +* identifier[entryUUID].value 1..1 MS +* identifier[entryUUID].system 1..1 MS //https://profiles.ihe.net/ITI/MHD/4.2.2/StructureDefinition-IHE.MHD.EntryUUID.Identifier.html +* identifier[entryUUID] ^short = "[DocumentEntry.entryUUID] Identifier for the document" +* identifier[entryUUID].value obeys medcom-uuid +* status MS +* status ^short = "[DocumentEntry.availabilityStatus] current = active | superseded = deprecated" +// TypeCode +* type 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 MedCom-ihe-core-typecode-VS-TEMP (required) //Must be changed back to XDS metadata IG when ValueSet is fixed +* authenticator 0..1 MS +* authenticator ^short = "[DocumentEntry.legalAuthenticator] Who authenticated the document." +* authenticator only Reference(MedComDocumentPractitioner) +* authenticator ^type.aggregation = #contained +// ClassCode +* category 1..1 MS +* category from MedCom-ihe-core-classcode-VS-TEMP (extensible) //Must be changed back to XDS metadata IG when ValueSet is fixed +* category.coding.code 1.. MS +* category.coding.system 1.. MS +* category.coding.display 1.. MS +* category ^short = "[DocumentEntry.classCode] Categorization of document" +* 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 +* securityLabel 1..1 MS +* securityLabel.coding 1..1 MS +* securityLabel.coding.system 1.. MS +* securityLabel.coding.code 1.. MS +* securityLabel ^short = "[DocumentEntry.confidentialityCode] Document security-tags" +* subject MS +* subject only Reference(MedComDocumentPatient) +* subject ^type.aggregation = #contained +* subject ^short = "[DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId] Who/what is the subject of the document" +* content.attachment.creation ^short = "[DocumentEntry.creationTime] Date attachment was first created" +* content.attachment.creation 1.. MS +* content.attachment.creation obeys medcom-datetime-has-time-zulu +* content MS +* content.attachment.contentType ^short = "[DocumentEntry.mimeType] Mime type of the content, with charset etc." +* content.attachment.contentType 1.. MS +* content.attachment.contentType from MedCom-ihe-core-mimetype-VS-TEMP //Must be changed back to XDS metadata IG when ValueSet is fixed +* content.attachment MS +* content.attachment.language ^short = "[DocumentEntry.languageCode] Human language of the content" +* content.attachment.language 1.. MS +* content.attachment.language from MedCom-ihe-core-languagecode-VS-TEMP (extensible) //Must be changed back to XDS metadata IG when ValueSet is fixed +* content.attachment.hash 0.. MS +* content.attachment.hash ^short = "[DocumentEntry.hash] Hash of the data (sha-1)" +* content.format ^short = "[DocumentEntry.formatCode] Format/content rules for the document" +* content.format 1.. MS +* content.format.system 1.. MS +* content.format.code 1.. MS +* content.format.display 1.. MS +* content.format from MedCom-ihe-core-formatcode-VS-TEMP (required) //Must be changed back to XDS metadata IG when ValueSet is fixed +* content.attachment.size 0.. MS +* content.attachment.title 1.. MS +* content.attachment.url MS +* content.attachment.size ^short = "[DocumentEntry.size] Number of bytes of content." +* content.attachment.title ^short = "[DocumentEntry.title] The readable title of the document." +* content.attachment.url ^short = "[DocumentEntry.URI] URI where the data can be found." +* context 1.. MS +* context.event 0.. MS +* context.event.coding.code 1.. MS +* context.event.coding.system 1.. MS +* context.event ^short = "[DocumentEntry.eventCodeList] Main clinical acts documented." +* context.period MS +* context.period.start 1.. MS +* context.period.end MS +* context.period ^short = "[DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime] Time of service that is being documented." +* context.facilityType 1.. MS +* context.facilityType.coding 1..1 MS +* context.facilityType.coding.code 1.. MS +* context.facilityType.coding.system 1.. MS +* context.facilityType.coding.display 1.. MS +* context.facilityType from MedCom-ihe-core-HealthcareFacilityTypeCode-VS-TEMP (required) //Must be changed back to XDS metadata IG when ValueSet is fixed +* context.facilityType ^short = "[DocumentEntry.healthcareFacilityTypeCode] Kind of facility where patient was seen." +* context.practiceSetting 1.. MS +* context.practiceSetting.coding 1..1 MS +* context.practiceSetting.coding.code 1.. MS +* context.practiceSetting.coding.system 1.. MS +* context.practiceSetting.coding.display 1.. MS +* context.practiceSetting from MedCom-ihe-core-PracticeSettingCode-VS-TEMP (required) +* context.practiceSetting ^short = "[DocumentEntry.practiceSettingCode] Additional details about where the content was created (e.g. clinical specialty)." +* context.related 0..* MS +* context.related ^short = "[DocumentEntry.referenceIdList] Related identifiers or resources." +* context.sourcePatientInfo 1..1 MS +* context.sourcePatientInfo.reference 1.. MS +* context.sourcePatientInfo.identifier 1.. MS +* context.sourcePatientInfo ^short = "[DocumentEntry.sourcePatientId and DocumentEntry.sourcePatientInfo] Patient demographics from source. Must be the same reference as in DocumentReference.subject." +* context.sourcePatientInfo only Reference(MedComDocumentPatient) +* extension MS +* extension contains + medcom-document-homecommunityid-extension named homeCommunityid 0..1 MS +* extension[homeCommunityid] ^short = "[DocumentEntry.homeCommunityId] A unique identifier for a community where the DocumentEntry and document can be accessed." +* extension[homeCommunityid].url MS +* extension[versionid] MS +* extension[versionid] ^short = "Specifies the version of the DocumentReference profile for a standard." + +* insert ProducerShallPutInNarrative(id) +* insert ProducerShallPutInNarrative(author[institution]) +* insert ProducerShallPutInNarrative(author) +* insert ProducerShallPutInNarrative(subject) +* insert ProducerShallPutInNarrative(status) +* insert ProducerShallPutInNarrative(type.coding.system) +* insert ProducerShallPutInNarrative(type.coding.code) +* insert ProducerShallPutInNarrative(type.coding.display) +* insert ProducerShallPutInNarrative(authenticator) +* insert ProducerShallPutInNarrative(category.coding.code) +* insert ProducerShallPutInNarrative(category.coding.system) +* insert ProducerShallPutInNarrative(category.coding.display) +* insert ProducerShallPutInNarrative(identifier[entryUUID].value) +* insert ProducerShallPutInNarrative(identifier[entryUUID].system) +* insert ProducerShallPutInNarrative(securityLabel.coding.code) +* insert ProducerShallPutInNarrative(securityLabel.coding.system) +* insert ProducerShallPutInNarrative(content.attachment.creation) +* insert ProducerShallPutInNarrative(content.attachment.contentType) +* insert ProducerShallPutInNarrative(content.attachment.language) +* insert ProducerShallPutInNarrative(content.format.system) +* insert ProducerShallPutInNarrative(content.format.code) +* insert ProducerShallPutInNarrative(content.format.display) +* insert ProducerShallPutInNarrative(content.attachment.size) +* insert ProducerShallPutInNarrative(content.attachment.title) +* insert ProducerShallPutInNarrative(content.attachment.url) +* insert ProducerShallPutInNarrative(context.event.coding.code) +* insert ProducerShallPutInNarrative(context.event.coding.system) +* insert ProducerShallPutInNarrative(context.period.start) +* insert ProducerShallPutInNarrative(context.period.end) +* insert ProducerShallPutInNarrative(context.facilityType.coding.code) +* insert ProducerShallPutInNarrative(context.facilityType.coding.system) +* insert ProducerShallPutInNarrative(context.facilityType.coding.display) +* insert ProducerShallPutInNarrative(context.practiceSetting.coding.code) +* insert ProducerShallPutInNarrative(context.practiceSetting.coding.system) +* insert ProducerShallPutInNarrative(context.practiceSetting.coding.display) +* insert ProducerShallPutInNarrative(context.related) +* insert ProducerShallPutInNarrative(context.sourcePatientInfo.reference) +* insert ProducerShallPutInNarrative(context.sourcePatientInfo.identifier) +* insert ProducerShallPutInNarrative(extension[homeCommunityid].valueCoding.system) +* insert ProducerShallPutInNarrative(extension[homeCommunityid].valueCoding.code) +* insert ProducerShallPutInNarrative(extension[versionid]) diff --git a/input/fsh/MedComDocumentBundle.fsh b/input/fsh/MedComDocumentBundle.fsh index 5a4f8fb..89212c2 100644 --- a/input/fsh/MedComDocumentBundle.fsh +++ b/input/fsh/MedComDocumentBundle.fsh @@ -1,17 +1,17 @@ -// This is a simple example of a FSH file. -// This file can be renamed, and additional FSH files can be added. -// SUSHI will look for definitions in any file using the .fsh ending. Profile: MedComDocumentBundle Parent: Bundle Id: medcom-document-bundle Description: "The Bundle profile for a document" -* id 1.. +* id 1.. * id MS +* id obeys medcom-document-bundle-id-uuid * identifier 1..1 MS * type MS * type = #document * type ^short = "Always a document" -* timestamp 1..1 MS +* timestamp 1..1 MS +* timestamp obeys medcom-datetime-has-time-offset-zulu +* 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 diff --git a/input/fsh/MedComDocumentCareTeam.fsh b/input/fsh/MedComDocumentCareTeam.fsh new file mode 100644 index 0000000..301bbab --- /dev/null +++ b/input/fsh/MedComDocumentCareTeam.fsh @@ -0,0 +1,9 @@ +Profile: MedComDocumentCareTeam +Parent: MedComCoreCareTeam +Id: medcom-document-careteam +Description: "Careteam participating in the care of a patient." +* 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." +* managingOrganization only Reference(MedComDocumentOrganization) \ No newline at end of file diff --git a/input/fsh/MedComDocumentComposition.fsh b/input/fsh/MedComDocumentComposition.fsh index a034867..ec69b36 100644 --- a/input/fsh/MedComDocumentComposition.fsh +++ b/input/fsh/MedComDocumentComposition.fsh @@ -1,6 +1,3 @@ -// This is a simple example of a FSH file. -// This file can be renamed, and additional FSH files can be added. -// SUSHI will look for definitions in any file using the .fsh ending. 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 @@ -10,44 +7,102 @@ Profile: MedComDocumentComposition Parent: Composition Id: medcom-document-composition Description: "The profile of the MedCom Document Composition containing the minimum allowed content." -//* meta.language 0..1 MS +* id 1.. MS +* text 1.. 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 obeys medcom-uuid +* identifier.value ^short = "[DocumentEntry.uniqueId] UUID." +* identifier ^short = "The Composition identifier" +* date MS * confidentiality 1..1 MS -* text 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 MedCom-ihe-core-typecode-VS-TEMP (required) //Must be changed back to XDS metadata IG when ValueSet is fixed +* category ..1 MS +* category from MedCom-ihe-core-classcode-VS-TEMP (extensible) //Must be changed back to XDS metadata IG when ValueSet is fixed +* 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 -* date 1..1 MS -* event 0..1 MS -* event.code 0..1 MS -* event.period.start 0..1 MS +* 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 -* author ^slicing.discriminator.type = #type - * ^slicing.discriminator.path = "$this.resolve()" - * ^slicing.rules = #closed +* 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 and - person 0..1 MS + 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[person] only Reference(MedComDocumentPractitioner) -* author[person] ^short = "The person who authored the document" +* 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 MedCom-ihe-core-languagecode-VS-TEMP (extensible) //Must be changed back to XDS metadata IG when ValueSet is fixed +* language ^short = "[DocumentEntry.languageCode] Human language of the content" * section 1.. MS -* section.text MS +* section.text MS //RCH MANGLER AFKLARING * section.entry MS +* meta 1.. MS +* meta.profile obeys medcom-canonical-semver +* meta.profile ^short = "[DocumentEntry.formatCode] Indicates the FHIR Composition profile canonical, including an explicit version `|x.y.z`. The value does not map 1:1 to XDS DocumentEntry.formatCode and SHALL be mapped." +* insert ProducerShallPutInNarrative(id) +* insert ProducerShallPutInNarrative(confidentiality) +* insert ProducerShallPutInNarrative(status) +* insert ProducerShallPutInNarrative(type.coding.system) +* insert ProducerShallPutInNarrative(type.coding.code) +* insert ProducerShallPutInNarrative(type.coding.display) +* insert ProducerShallPutInNarrative(category.coding.code) +* insert ProducerShallPutInNarrative(category.coding.system) +* insert ProducerShallPutInNarrative(category.coding.display) +* insert ProducerShallPutInNarrative(subject) +* insert ProducerShallPutInNarrative(event.code) +* insert ProducerShallPutInNarrative(event.period.start) +* insert ProducerShallPutInNarrative(event.period.end) +* insert ProducerShallPutInNarrative(date) +* insert ProducerShallPutInNarrative(event.detail) +* insert ProducerShallPutInNarrative(author[institution]) +* insert ProducerShallPutInNarrative(author) +* insert ProducerShallPutInNarrative(attester.mode) +* insert ProducerShallPutInNarrative(attester.party) +* insert ProducerShallPutInNarrative(title) +* insert ProducerShallPutInNarrative(language) +* insert ProducerShallPutInNarrative(section.entry) +* insert ProducerShallPutInNarrative(meta.profile) /* Instance: CompositionExample InstanceOf: MedComDocumentComposition @@ -56,7 +111,7 @@ Usage: #example // * identifier.value = "1" // ? -The portion of the identifier typically relevant to the user and which is unique within the context of the system. * meta.profile = "1.0" * status = #final -* type = $loinc#11488-4 "Consult note" +* code = $loinc#11488-4 "Consult note" // * category = $loinc#LP173421-1 "Report" * subject = Reference(69e475df-20c8-4f54-8cea-9843568205fd) // * encounter = Reference(Encounter/xcda) diff --git a/input/fsh/MedComDocumentObservation.fsh b/input/fsh/MedComDocumentObservation.fsh new file mode 100644 index 0000000..87093b2 --- /dev/null +++ b/input/fsh/MedComDocumentObservation.fsh @@ -0,0 +1,11 @@ +Profile: MedComDocumentObservation +Parent: MedComCoreObservation +Id: medcom-document-observation +Title: "MedComDocumentObservation" +Description: "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 MedComDocumentPractitionerRole or MedComDocumentCareTeam or MedComDocumentPatient or DkCoreRelatedPerson) diff --git a/input/fsh/MedComDocumentPractitioner.fsh b/input/fsh/MedComDocumentPractitioner.fsh index d4c9df0..bbeebdd 100644 --- a/input/fsh/MedComDocumentPractitioner.fsh +++ b/input/fsh/MedComDocumentPractitioner.fsh @@ -2,6 +2,10 @@ Profile: MedComDocumentPractitioner Parent: MedComCorePractitioner Id: medcom-document-practitioner Description: "A profile including requirements for a MedCom Document Practitioner" -* name 1.. MS +* 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..9ba50cd --- /dev/null +++ b/input/fsh/MedComDocumentPractitionerRole.fsh @@ -0,0 +1,10 @@ +Profile: MedComDocumentPractitionerRole +Parent: MedComCorePractitionerRole +Id: medcom-document-practitionerrole +Description: "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/MedComDocumentReference.fsh b/input/fsh/MedComDocumentReference.fsh deleted file mode 100644 index 766496f..0000000 --- a/input/fsh/MedComDocumentReference.fsh +++ /dev/null @@ -1,112 +0,0 @@ -Profile: MedComDocumentReference -Parent: DocumentReference -Id: medcom-documentreference -Description: "A profile stating the rules, when exchanging a FHIR document." -* masterIdentifier 1..1 MS -* masterIdentifier.value 1..1 MS -* masterIdentifier ^short = "[DocumentEntry.uniqueId] Master Version Specific Identifier" -* identifier 1..1 MS -* identifier.value 1..1 MS -* identifier ^short = "[DocumentEntry.entryUUID] Identifier for the document" -* identifier obeys uuid -* status MS -* status ^short = "[DocumentEntry.availabilityStatus] current = active | superseded = deprecated" -// TypeCode -* type 1.. MS -* type ^short = "[DocumentEntry.typeCode] Kind of document" -* type.coding.system 1.. MS -* type.coding.code 1.. MS -* authenticator 0..1 MS -* authenticator ^short = "[DocumentEntry.legalAuthenticator] Who authenticated the document" -* authenticator only Reference(MedComDocumentPractitioner) -* authenticator ^type.aggregation = #contained -// ClassCode -* category 1..1 MS -* category from $ClassCode (extensible) -* category.coding.code 1.. MS -* category.coding.system 1.. MS -* category ^short = "[DocumentEntry.class] Categorization of document" -* author 1..2 MS -* author ^type.aggregation = #contained -* author ^short = "[DocumentEntry.author] Who and/or what authored the document" -* author ^slicing.discriminator.type = #type - * ^slicing.discriminator.path = "$this.resolve()" - * ^slicing.rules = #closed -* author contains - institution 1..1 and - person 0..1 -* author[institution] MS -* author[institution] only Reference(MedComDocumentOrganization) -* author[institution] ^short = "[DocumentEntry.author.authorInstitution] The organization who authored the document" -* author[person] MS -* author[person] only Reference(MedComDocumentPractitioner) -* author[person] ^short = "[DocumentEntry.author.authorPerson] The person who authored the document" -* securityLabel 1.. MS -* securityLabel ^short = "[DocumentEntry.confidentialityCode] Document security-tags" -* subject 1..1 MS -* subject only Reference(MedComDocumentPatient) -* subject ^type.aggregation = #contained -* subject ^short = "[DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId] Who/what is the subject of the document" -* content MS -* content.attachment.contentType ^short = "[DocumentEntry.mimeType] Mime type of the content, with charset etc." -* content.attachment.contentType 1.. MS -* content.attachment.contentType from $ContentType -* content.attachment.language ^short = "[DocumentEntry.languageCode] Human language of the content" -* content.attachment.language 1.. MS -* content.attachment.language from $Language (extensible) -* content.attachment.creation ^short = "[DocumentEntry.creationTime] Date attachment was first created" -* content.attachment.creation 1.. MS -* content.attachment.hash 0.. MS -* content.attachment.hash ^short = "[DocumentEntry.hash] Hash of the data (sha-1)" -* content.format ^short = "[DocumentEntry.formatCode] Format/content rules for the document" -* content.format 1.. MS -/* * content.format.coding.code 1.. MS -* content.format.coding.system 1.. MS */ -* content.attachment.size 0.. MS -* content.attachment.title 1.. MS -* content.attachment.url 0.. MS -* content.attachment.size ^short = "[DocumentEntry.size] Number of bytes of content" -* content.attachment.title ^short = "[DocumentEntry.title] Label to display in place of the data" -* content.attachment.url ^short = "[DocumentEntry.URI] Uri where the data can be found" -* context 1.. MS -* context.event 0..1 MS -* context.event.coding.code 1.. MS -* context.event.coding.system 1.. MS -* context.event ^short = "[DocumentEntry.eventCodeList] Main clinical acts documented" -* context.period MS -* context.period.start MS -* context.period.end MS -* context.period ^short = "[DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime] Time of service that is being documented" -* context.facilityType 1.. MS -* context.facilityType.coding.code 1.. MS -* context.facilityType.coding.system 1.. MS -* context.facilityType.coding.system from $FacilityType (extensible) -* context.facilityType ^short = "[DocumentEntry.healthcareFacilityTypeCode] Kind of facility where patient was seen" -* context.practiceSetting 1.. MS -* context.practiceSetting.coding.code 1.. MS -* context.practiceSetting.coding.system 1.. MS -* context.practiceSetting.coding.system from $PracticeSetting (extensible) -* context.practiceSetting ^short = "[DocumentEntry.practiceSettingCode] Additional details about where the content was created (e.g. clinical specialty)" -* context.related 0..* MS -* context.related ^short = "[DocumentEntry.referenceIdList] Related identifiers or resources" -* context.sourcePatientInfo 1..1 MS -* context.sourcePatientInfo ^short = "[DocumentEntry.sourcePatientId and DocumentEntry.sourcePatientInfo] Patient demographics from source. Must be the same reference as in DocumentReference.subject." -* extension contains - medcom-document-homecommunityid-extension named homeCommunityid 1..1 MS and - medcom-document-version-id-extension named versionid 1..1 MS -* extension[homeCommunityid] ^short = "[DocumentEntry.homeCommunityId] A unique identifier for a community where the DocumentEntry and document can be accessed" -* extension[versionid] ^short = "Specifies the version of the DocumentReference for a standard." - - - -/* Invariant: apd-dk-rule-1 -Description: "Where formatCode is 'urn:ad:dk:medcom:appointmentsummary:full', the eventCode must be 'ALAL01' (hjertesygdomme)" -Severity: #error -Expression: "where(type.coding.where(system = 'http://medcomfhir.dk/ig/xdsmetadata/CodeSystem/dk-ihe-typecode-de-regenstrief').code = '56446-8').context.event.coding.code = 'ALAL01'" -*/ - -Invariant: uuid -Description: "General UUID expression" -Severity: #error -Expression: "value.matches('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')" - diff --git a/input/fsh/MedComDocumentSourcePatient.fsh b/input/fsh/MedComDocumentSourcePatient.fsh index a0912f8..9144651 100644 --- a/input/fsh/MedComDocumentSourcePatient.fsh +++ b/input/fsh/MedComDocumentSourcePatient.fsh @@ -1,16 +1,19 @@ Profile: MedComDocumentPatient -Parent: DkCorePatient +Parent: MedComCorePatient Id: medcom-document-patient Description: "A profile including requirements for a MedCom Document Patient." -* 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].value 1..1 MS * 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 +* identifier[x-ecpr] 0..0 +* identifier[d-ecpr] 0..0 +* name ..1 +* name[official] ..1 +* name[official].given 1.. +* name[official].family 1.. * birthDate 1.. MS -* gender 1.. MS \ No newline at end of file +* gender 1.. MS +* insert ProducerShallPutInNarrative(birthDate) +* insert ProducerShallPutInNarrative(gender) \ No newline at end of file diff --git a/input/fsh/MedComDocumentVersionIDExtension.fsh b/input/fsh/MedComDocumentVersionIDExtension.fsh index dc2c893..a8b5c1d 100644 --- a/input/fsh/MedComDocumentVersionIDExtension.fsh +++ b/input/fsh/MedComDocumentVersionIDExtension.fsh @@ -3,3 +3,5 @@ Id: medcom-document-version-id-extension Title: "MedCom XDS Version ID extension" Description: "Extension containing information about the version of the DocumentReference for a specific standard. The version is included in the R5 version of the resource." * valueString 1..1 MS + +* insert ProducerShallPutInNarrative(valueString) diff --git a/input/fsh/MedComMinimalDocumentReference.fsh b/input/fsh/MedComMinimalDocumentReference.fsh new file mode 100644 index 0000000..da38698 --- /dev/null +++ b/input/fsh/MedComMinimalDocumentReference.fsh @@ -0,0 +1,17 @@ +/*Profile: MedComMinimalDocumentReference //OBS: Er erstattet af afhængighed til DkCore v 3.5.0 +Parent: MinimalDocumentReference +Id: medcom-minimal-documentreference +Title: "A replication of HL7 Denmark DK Core MinimalDocumentReference Profile" +Description: "A replication of DK Core MinimalDocumentReference" +* extension contains http://hl7.org/fhir/5.0/StructureDefinition/extension-DocumentReference.version named versionid 1..1 +* extension[versionid] ^short = "Specifies the version of the DocumentReference profile for a standard." +* context.facilityType from SorOrganizationType (extensible) +* context.practiceSetting from MedComSorPracticeSettingCode (extensible) +* context.event from $v3-ActCode3.0.0 (example) +* author 1..* +* author only Reference(DkCorePatient or DkCorePractitioner or DkCorePractitionerRole or DkCoreRelatedPerson or DkCoreOrganization or Device) +* authenticator only Reference(DkCorePractitioner or DkCorePractitionerRole or DkCoreOrganization) +* subject 1..1 +* subject only Reference(DkCorePatient) +* context.sourcePatientInfo only Reference(DkCorePatient) +*/ \ No newline at end of file diff --git a/input/fsh/ValueSets.fsh b/input/fsh/ValueSets.fsh new file mode 100644 index 0000000..b758101 --- /dev/null +++ b/input/fsh/ValueSets.fsh @@ -0,0 +1,457 @@ +//Valuesets: +ValueSet: MedComIHE_CoreHealthcareFacilityTypeCode_TEMP +Id: MedCom-ihe-core-HealthcareFacilityTypeCode-VS-TEMP +Title: "IHE HealthcareFacilityTypeCode_TEMP" +Description: "_TEMP Value set for healthcare facility type code represents the type of organizational setting of the clinical encounter during which the documented act occurred." +* ^experimental = false +* ^version = "1.0.2" +* ^status = #active +* ^date = "2024-01-19" +* $SnomedctOID#557511000005107 "akupunkturklinik" +* $SnomedctOID#550871000005101 "akutmodtageenhed" +* $SnomedctOID#394761003 "almen lægepraksis" +* $SnomedctOID#264372000 "apotek" +* $SnomedctOID#557501000005109 "apoteksfilial" +* $SnomedctOID#554851000005102 "asylcenter" +* $SnomedctOID#557531000005103 "bandagistklinik" +* $SnomedctOID#20078004 "behandlingscenter for stofmisbrugere" +* $SnomedctOID#722173008 "behandlingsenhed i fængsel eller arresthus" +* $SnomedctOID#309964003 "billeddiagnostisk enhed" +* $SnomedctOID#554221000005108 "bosted" +* $SnomedctOID#56781000005109 "center for misbrugsbehandling" +* $SnomedctOID#557881000005104 "COVID-19-testenhed" +* $SnomedctOID#554031000005103 "diætistklinik" +* $SnomedctOID#557891000005101 "enhed for aktivitetstilbud" +* $SnomedctOID#546821000005103 "ergoterapiklinik" +* $SnomedctOID#702871004 "fertilitetsklinik" +* $SnomedctOID#554061000005105 "fodterapeutklinik" +* $SnomedctOID#557901000005102 "forebyggende hjemmebesøgsenhed" +* $SnomedctOID#550861000005106 "fysioterapi- og ergoterapiklinik" +* $SnomedctOID#547011000005103 "fysioterapiklinik" +* $SnomedctOID#546811000005109 "genoptræningsenhed" +* $SnomedctOID#554881000005108 "handicap- og psykiatrienhed" +* $SnomedctOID#554861000005100 "handicapenhed" +* $SnomedctOID#554821000005109 "hjemmeplejeenhed" +* $SnomedctOID#550621000005101 "hjemmesygeplejeenhed" +* $SnomedctOID#284546000 "hospice" +* $SnomedctOID#22232009 "hospital" +* $SnomedctOID#702824005 "hørecenter" +* $SnomedctOID#309904001 "intensivenhed" +* $SnomedctOID#557591000005104 "internetbaseret sundhedsydelse" +* $SnomedctOID#554411000005101 "jobcenter" +* $SnomedctOID#550631000005103 "jordemoderklinik" +* $SnomedctOID#550641000005106 "kiropraktorklinik" +* $SnomedctOID#557521000005101 "klinik for alternativ behandling" +* $SnomedctOID#550851000005109 "klinisk enhed" +* $SnomedctOID#547211000005108 "kommune" +* $SnomedctOID#557561000005105 "konsulentvirksomhed" +* $SnomedctOID#557541000005106 "kosmetisk klinik" +* $SnomedctOID#550651000005108 "lægelaboratorium" +* $SnomedctOID#550661000005105 "lægevagt" +* $SnomedctOID#551611000005102 "operationsgang" +* $SnomedctOID#557581000005102 "optikervirksomhed" +* $SnomedctOID#557671000005101 "osteopatiklinik" +* $SnomedctOID#309939001 "palliativ enhed" +* $SnomedctOID#42665001 "plejehjem" +* $SnomedctOID#550891000005100 "privat" +* $SnomedctOID#554211000005102 "præhospitalsenhed" +* $SnomedctOID#554871000005105 "psykiatrienhed" +* $SnomedctOID#550711000005101 "psykologisk rådgivningsklinik" +* $SnomedctOID#556841000005105 "pædagogisk psykologisk rådgivning (PPR)" +* $SnomedctOID#702916001 "rehabiliteringsenhed" +* $SnomedctOID#225728007 "skadestue" +* $SnomedctOID#550671000005100 "speciallægepraksis" +* $SnomedctOID#264361005 "sundhedscenter" +* $SnomedctOID#554041000005106 "sundhedsforvaltning" +* $SnomedctOID#554021000005101 "sundhedsplejen" +* $SnomedctOID#554071000005100 "sygehusapotek" +* $SnomedctOID#703069008 "sygeplejeklinik" +* $SnomedctOID#550681000005102 "tandlægepraksis" +* $SnomedctOID#550691000005104 "tandplejeklinik" +* $SnomedctOID#550701000005104 "tandteknisk klinik" +* $SnomedctOID#554231000005106 "vaccinationsklinik" +* $SnomedctOID#554051000005108 "zoneterapiklinik" +* $SnomedctOID#550811000005108 "administrativ enhed" + +ValueSet: MedComIHE_CorePracticeSettingCode_TEMP +Id: MedCom-ihe-core-PracticeSettingCode-VS-TEMP +Title: "IHE PracticeSettingCode_TEMP" +Description: "_TEMP Values used for the document metadata attribute practiceSettingCode, which is an attribute specifying the clinical specialty where the act that resulted in the document was performed (e.g., Family Practice, Laboratory, Radiology). The value set is based on a subset of the code list from the SOR lookup table 'SOR-Kliniske specialer' (https://sor.sum.dsdn.dk/lookupdata/#clinical_speciality, accessable on Sundhedsdatanettet (SDN)), which is based on SNOMED codes. " +* ^experimental = false +* ^version = "1.0.1" +* ^status = #active +* ^date = "2024-06-20" +* $SnomedctOID#773568002 "akutmedicin" +* $SnomedctOID#408443003 "almen medicin" +* $SnomedctOID#394577000 "anæstesiologi" +* $SnomedctOID#394821009 "arbejdsmedicin" +* $SnomedctOID#394588006 "børne_ og ungdomspsykiatri" +* $SnomedctOID#394582007 "dermato_venerologi" +* $SnomedctOID#394914008 "diagnostisk radiologi" +* $SnomedctOID#394583002 "endokrinologi" +* $SnomedctOID#394811001 "geriatri" +* $SnomedctOID#394585009 "gynækologi og obstetrik" +* $SnomedctOID#408472002 "hepatologi" +* $SnomedctOID#394803006 "hæmatologi" +* $SnomedctOID#394807007 "infektionsmedicin" +* $SnomedctOID#419192003 "intern medicin" +* $SnomedctOID#394579002 "kardiologi" +* $SnomedctOID#408463005 "karkirurgi" +* $SnomedctOID#394609007 "kirurgi" +* $SnomedctOID#551411000005104 "kirurgisk gastroenterologi" +* $SnomedctOID#394596001 "klinisk biokemi" +* $SnomedctOID#394600006 "klinisk farmakologi" +* $SnomedctOID#394601005 "klinisk fysiologi og nuklearmedicin (snomed: klinisk fysiologi)" +* $SnomedctOID#394580004 "klinisk genetik" +* $SnomedctOID#421661004 "klinisk immunologi" +* $SnomedctOID#408454008 "klinisk mikrobiologi" +* $SnomedctOID#394809005 "klinisk neurofysiologi" +* $SnomedctOID#394592004 "klinisk onkologi" +* $SnomedctOID#418112009 "lungesygdomme" +* $SnomedctOID#394805004 "medicinsk allergologi" +* $SnomedctOID#394584008 "medicinsk gastroenterologi" +* $SnomedctOID#394589003 "nefrologi" +* $SnomedctOID#394610002 "neurokirurgi" +* $SnomedctOID#394591006 "neurologi" +* $SnomedctOID#394812008 "odontologi (snomed: odontologiske specialer)" +* $SnomedctOID#394594003 "oftalmologi" +* $SnomedctOID#394608004 "ortodonti" +* $SnomedctOID#394801008 "ortopædisk kirurgi" +* $SnomedctOID#394604002 "oto_rhino_laryngologi" +* $SnomedctOID#394915009 "patologisk anatomi og cytologi" +* $SnomedctOID#394611003 "plastikkirurgi" +* $SnomedctOID#394587001 "psykiatri" +* $SnomedctOID#394537008 "pædiatri" +* $SnomedctOID#394810000 "reumatologi" +* $SnomedctOID#394581000 "samfundsmedicin" +* $SnomedctOID#394605001 "tand_, mund_ og kæbekirurgi" +* $SnomedctOID#394603008 "thoraxkirurgi" +* $SnomedctOID#408448007 "tropemedicin" +* $SnomedctOID#394612005 "urologi" +* $SnomedctOID#658171000005102 "hjemmepleje" +* $SnomedctOID#658161000005107 "hjemmesygepleje" +* $SnomedctOID#658151000005105 "sundhedsfremme og forebyggelse" +* $SnomedctOID#658191000005101 "sundhedspleje" +* $SnomedctOID#658201000005103 "kommunal tandpleje" +* $SnomedctOID#658141000005108 "genoptræning efter hospitalsophold" +* $SnomedctOID#658181000005104 "hjælpemiddelområdet" + +ValueSet: MedComIHE_CoreTypeCode_TEMP +Id: MedCom-ihe-core-typecode-VS-TEMP +Title: "IHE TypeCode_TEMP" +Description: "_TEMP ValueSet containing TypeCode." +* ^experimental = false +* ^version = "1.1.0" +* ^status = #active +* ^date = "2026-01-01" +* $LoincOID#53576-5 "Personal health monitoring report Document" +* $LoincOID#74468-0 "Questionnaire Form Definition Document" +* $LoincOID#56446-8 "Appointment Summary Document" +* $LoincOID#39289-4 "Follow-up (referred to) provider /specialist, appointment date CPHS" +* $LoincOID#39290-2 "Follow-up (referred to) program, appointment date CPHS" +* $LoincOID#103140-0 "Personal health attachment Document" +* $LoincOID#74465-6 "Questionnaire Response Document" +* $LoincOID#11450-4 "Problem list - Reported" +//* $LoincOID#81215-6 "Care plan - recommended C-CDA R2.0 & R2.1 sections" +* $LoincOID#81215-6 "Care plan - recommended C-CDA R2.0 and R2.1 sections" +* $LoincOID#11502-2 "Laboratory report" +* $LoincOID#57059-8 "Pregnancy visit summary note Narrative" +* $LoincOID#28615-3 "Audiology Study" +* $LoincOID#11524-6 "EKG Study" +* $IHEMessageCodesTEMP#CMR "Clinical Mesurement Report" +* $IHEMessageCodesTEMP#PDC "Stamkort" +* $IHEMessageCodesTEMP#MADC "MADC" +* $IHEMessageCodesTEMP#PRF "Pregnancy Referral Form" +* $IHEMessageCodesTEMP#PSCR "Pregnancy Shared Care Report" +* $IHEMessageCodesTEMP#PMR "Pregnancy Measurement Report" +/* * #CMR from system $IHEMessageCodesTEMP +* #PDC from system $IHEMessageCodesTEMP +* #MADC from system $IHEMessageCodesTEMP +* #PRF from system $IHEMessageCodesTEMP +* #PSCR from system $IHEMessageCodesTEMP +* #PMR from system $IHEMessageCodesTEMP */ + +ValueSet: MedComIHE_CoreMimeType_TEMP +Id: MedCom-ihe-core-mimetype-VS-TEMP +Title: "IHE MimeType_TEMP" +Description: "_TEMP Values for the document metadata attribute mimeType" +* ^experimental = false +* ^version = "1.0.2" +* ^status = #active +* ^date = "2015-01-04" +* $IANAMediaOID#text/xml "text/xml" +* $IANAMediaOID#application/fhir+json "application/fhir+json" +* $IANAMediaOID#application/fhir+xml "application/fhir+xml" + +ValueSet: MedComIHE_CoreLanguageCode_TEMP +Id: MedCom-ihe-core-languagecode-VS-TEMP +Title: "IHE LanguageCode_TEMP" +Description: "_TEMP Tags for the Identification of Languages (RFC 3066)" +* ^experimental = false +* ^version = "1.0.2" +* ^status = #active +* ^date = "2015-01-01" +* $IANALanguageOID#da-DK "Danish (Denmark)" +* $IANALanguageOID#da "Danish" + +ValueSet: MedComIHE_CoreConfidentialityCode_TEMP +Id: MedCom-ihe-core-confidentialitycode-VS-TEMP +Title: "IHE ConfidentialityCode_TEMP" +Description: "_TEMP Confidentiality code used in Danish Document sharing." +* ^experimental = false +* ^version = "1.0.2" +* ^status = #active +* ^date = "2015-01-01" +* $HL7#N "normal" + +ValueSet: MedComIHE_CoreFormatCode_VS_TEMP +Id: MedCom-ihe-core-formatcode-VS-TEMP +Title: "IHE FormatCode_TEMP" +Description: "_TEMP ValueSet containing FormatCodes defines by MedCom." +* ^experimental = false +* ^version = "1.1.0" +* ^status = #active +* ^date = "2026-01-01" +* include codes from system $IHEFormatCodeTEMP + +ValueSet: MedComIHE_CoreClassCode_TEMP +Id: MedCom-ihe-core-classcode-VS-TEMP +Title: "IHE ClassCode_TEMP" +Description: "_TEMP Value set for the classCode attribute. classCode used in DK IHE Document sharing" +* ^experimental = false +* ^version = "1.1.0" +* ^status = #active +* ^date = "2022-01-26" //1.2.208.184.100.9 +//* $DanishXdsOID#001 "Klinisk rapport" +//* $DanishXdsOID#006 "Workflow" +* #001 from system $IHEClassCodeTEMP +//* #006 from system MedCom-ihe-classcode-CS + + +//Code systems: + +CodeSystem: MedComIHE_FormatCode_TEMP +Id: MedCom-ihe-formatcode-CS-TEMP +Title: "DK IHE FormatCode_TEMP" +Description: "_TEMP Danish Integrating the Healthcare Enterprise (IHE) metadata format codes" +* ^experimental = false +* ^version = "1.1.0" +* ^status = #active +* ^date = "2026-01-01" +* ^caseSensitive = false +* ^identifier.value = "1.2.208.184.100.10" +//* ^url = "urn:oid:1.2.208.184.100.10" +/* * ^property[+].code = #effectiveDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#effectiveDate" +* ^property[=].description = "The date from which the concept is considered valid/active." +* ^property[=].type = #dateTime*/ +* ^property[+].code = #deprecationDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#deprecationDate" +* ^property[=].description = "The date from which the concept is considered deprecated." +* ^property[=].type = #dateTime + +* #urn:ad:dk:medcom:apd-v2.0.1:full "DK APD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2020-05-12" */ + +* #urn:ad:dk:medcom:appointmentsummary:full "DK Appointment Summary Document schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2016-06-08" */ + +* #urn:ad:dk:medcom:cmr-v1.0:full "DK CMR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2021-09-01" */ + +* #urn:ad:dk:medcom:cpd-v1.0.1:full "DK CPD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2018-11-29" */ + +* #urn:ad:dk:medcom:sds:cpd-v1.0.1:maternity "DK CPD schema for maternity" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2022-02-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2023-12-31" + +* #urn:ad:dk:medcom:labreports:svareksponeringsservice "Laboratoriesvar (samling af svar)" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2016-09-01" */ + +* #urn:ad:dk:medcom:pdc-v2.0:full "DK PDC schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2019-11-30" */ + +* #urn:ad:dk:medcom:phmr-v1.3:full "DK PHMR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2014-03-31" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2025-05-13" + +* #urn:ad:dk:medcom:prvs-v1.0:full "DK PRVS schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2021-09-01" */ + +* #urn:ad:dk:medcom:qfdd-v1.1:full "DK QFDD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2015-05-19" */ + +* #urn:ad:dk:medcom:qfdd-v1.2:full "DK QFDD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2022-02-11" */ + +* #urn:ad:dk:medcom:qrd-v1.1:full "DK QRD schema" + +* #urn:ad:dk:medcom:qrd-v1.2:full "DK QRD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2015-05-19" */ + +* #urn:ad:dk:medcom:qrd-v1.3:full "DK QRD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2022-02-11" */ + +* #urn:ad:dk:medcom:pdc-v3.0:full "DK PDC schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2023-07-01" */ + +* #urn:ad:dk:medcom:cpd-v2.0:full "DK CPD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2024-01-01" */ + +* #urn:ad:dk:medcom:phad-v1.0:full "DK PHAD schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2024-01-01" */ + +* #urn:ad:dk:medcom:plr-v1.0:full "DK PLR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-03-01" */ + +* #urn:ad:dk:medcom:nauf-v500:full "Noah Audiogram format 500" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ + +* #urn:ad:dk:medcom:nauf-v502:full "Noah Audiogram format 502" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ + +* #urn:ad:dk:medcom:nimf-v500:full "Noah Impedance format 500" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ + +* #urn:ad:dk:medcom:nadf-v501:full "Noah Admittance format 501" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ + +* #urn:ad:dk:medcom:nhisf-v500:full "Noah Hearing Instrument Selection format 500" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ + +* #urn:ad:dk:medcom:prf-v1.0:full "DK PRF schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2025-12-01" + +* #urn:ad:dk:medcom:pscr-v1.0:full "DK PSCR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2025-12-01" + +* #urn:ad:dk:medcom:pmr-v1.0:full "DK PMR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2025-12-01" + +* #urn:ad:dk:medcom:prf-v2.0:full "DK PRF schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2025-12-01" + +* #urn:ad:dk:medcom:pscr-v2.0:full "DK PSCR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + +* #urn:ad:dk:medcom:pmr-v2.0:full "DK PMR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + +* #urn:ad:dk:medcom:phmr-v2.1:full "DK PHMR schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-05-13" */ + +* #urn:ad:dk:medcom:prf-v3.0:full "DK PRF schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ + +* #urn:ad:dk:medcom:ekg-v1.0:full "DK EKG schema" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2026-01-01" */ + + +CodeSystem: MedComIHE_ClassCode_TEMP +Id: MedCom-ihe-classcode-CS-TEMP +Title: "DK IHE ClassCode_TEMP" +Description: "_TEMP Danish Integrating the Healthcare Enterprise (IHE) metadata class codes" +//* ^url = "urn:oid:1.2.208.184.100.9" +* ^experimental = false +* ^version = "1.1.0" +* ^status = #active +* ^date = "2022-01-26" +* ^caseSensitive = false +* ^identifier.value = "1.2.208.184.100.9" +/* * ^property[+].code = #effectiveDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#effectiveDate" +* ^property[=].description = "The date from which the concept is considered valid/active." +* ^property[=].type = #dateTime +* ^property[+].code = #deprecationDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#deprecationDate" +* ^property[=].description = "The date from which the concept is considered deprecated." +* ^property[=].type = #dateTime */ +* #001 "Klinisk rapport" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-01" */ +/* * #006 "Workflow" + * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-01-26" */ + +CodeSystem: MedCom_Message_Codes_TEMP +Id: MedCom-message-codes-CS-TEMP +Title: "MedCom Message Codes_TEMP" +Description: "_TEMP MedCom Message Codes, which includes document type codes (Danish)." +* ^experimental = false +* ^version = "1.0.2" +* ^status = #active +* ^date = "2026-01-01" +* ^caseSensitive = false +//* ^url = "urn:oid:1.2.208.184.100.1" +//* ^identifier.system = "urn:ietf:rfc:3986" +* ^identifier.value = "urn:oid:1.2.208.184.100.1" +/* * ^property[+].code = #effectiveDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#effectiveDate" +* ^property[=].description = "The date from which the concept is considered valid/active." +* ^property[=].type = #dateTime */ +* ^property[+].code = #deprecationDate +* ^property[=].uri = "http://hl7.org/fhir/concept-properties#deprecationDate" +* ^property[=].description = "The date from which the concept is considered deprecated." +* ^property[=].type = #dateTime +* #CMR "Clinical Mesurement Report" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2021-09-01" */ +* #PDC "Stamkort" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2021-09-01" */ +* #MADC "MADC" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2021-09-01" */ + * ^property[+].code = #deprecationDate + * ^property[=].valueDateTime = "2022-12-31" +* #PRF "Pregnancy Referral Form" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ +* #PSCR "Pregnancy Shared Care Report" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ +* #PMR "Pregnancy Measurement Report" +/* * ^property[+].code = #effectiveDate + * ^property[=].valueDateTime = "2025-12-01" */ \ No newline at end of file diff --git a/input/fsh/invariants.fsh b/input/fsh/invariants.fsh new file mode 100644 index 0000000..e9e0227 --- /dev/null +++ b/input/fsh/invariants.fsh @@ -0,0 +1,27 @@ +Invariant: medcom-uuid +Description: "The value shall correspond to the structure of an UUID" +Severity: #error +Expression: "$this.matches('(?i)^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[45][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$')" + +Invariant: medcom-document-bundle-id-uuid +Description: "The value shall correspond to the structure of an UUID" +Severity: #error +Expression: "$this.matches('(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[45][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$')" + +Invariant: medcom-datetime-has-time-offset-zulu +//"2025-11-27T13:34:56+01:00" = "2025-11-27T12:34:56.789Z" +//"2025-06-27T14:34:56+02:00" = "2025-06-27T12:34:56.789Z" +Description: "dateTime must include date, time, and time zone." +Severity: #error +Expression: "$this.toString().matches('^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})$')" + +Invariant: medcom-datetime-has-time-zulu +//"2025-11-27T12:34:56.789Z" +Description: "dateTime must include date, time, and time zone." +Severity: #error +Expression: "$this.toString().matches('^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]+)?Z$')" + +Invariant: medcom-canonical-semver +Description: "The canonical SHALL include an explicit semantic version (semver) with optional prerelease (-...) and build metadata (+...)." +Severity: #error +Expression: "matches('^.*[|][0-9]+[.][0-9]+([.][0-9]+)?(-[0-9A-Za-z-]+([.][0-9A-Za-z-]+)*)?([+][0-9A-Za-z-]+([.][0-9A-Za-z-]+)*)?$')" diff --git a/input/ignoreWarnings.txt b/input/ignoreWarnings.txt index d03142b..5e1e4f5 100644 --- a/input/ignoreWarnings.txt +++ b/input/ignoreWarnings.txt @@ -2,4 +2,7 @@ # Add warning and/or information messages here after you've confirmed that they aren't really a problem # (And include comments like this justifying why) -# See https://github.com/FHIR/sample-ig/blob/master/input/ignoreWarnings.txt for examples \ No newline at end of file +# See https://github.com/FHIR/sample-ig/blob/master/input/ignoreWarnings.txt for examples + +# We are aware of this information and it is not a problem. +%This element does not match any known slice defined in the profile http://hl7.org/fhir/StructureDefinition/obligation|5.2.0 (this may not be a problem, but you should check that it's not intended to match a slice)% \ No newline at end of file diff --git a/input/images/DocumentModel.svg b/input/images/DocumentModel.svg index f7b7612..846fe80 100644 --- a/input/images/DocumentModel.svg +++ b/input/images/DocumentModel.svg @@ -1 +1 @@ -MedComDocumentBundleMedComDocumentComposition«MedComCoreOrganization»MedComDocumentOrganization«MedComCorePractitioner»MedComDocumentPractitioner«DkCorePatient»MedComDocumentPatient*use case specific content*entryauthorInstitutionauthorPersonsubjectsection.entry \ No newline at end of file +«Bundle»MedComDocumentBundle«Composition»MedComDocumentComposition«MedComCoreOrganization»MedComDocumentOrganization«MedComCorePractitioner»MedComDocumentPractitioner«MedComCorePractitionerRole»MedComDocumentPractitionerRole«DkCorePatient»MedComDocumentPatient«RelatedPerson»DkCoreRelatedPersonDevice'Use case specific content'AuthorPersonentryauthor:personauthor:organizationsubjectsection.entrypractitionerorganization \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-contained-documentreference-intro.md b/input/pagecontent/StructureDefinition-medcom-contained-documentreference-intro.md new file mode 100644 index 0000000..d02855c --- /dev/null +++ b/input/pagecontent/StructureDefinition-medcom-contained-documentreference-intro.md @@ -0,0 +1,22 @@ +### Scope and usage + +The MedComContainedDocumentReference profile is not intented to be exchanged until the infrastructure is ready to receive it, but can be used for validation of metadata associated with a document. This profile provides metadata about a document, this can be CDA, FHIR or PDF. It holds the required metadata from the IHE XDS metadata standard, and a [mapping between the two can be found on GitHub pages](https://medcomdk.github.io/dk-medcom-document/assets/documents/Mapping_from_IHE-XDS_metadata_to_FHIR.html). + +#### Rationale of the MedComContainedDocumentReference + +This mapping has been developed to enable the future use of FHIR within the Danish document-sharing infrastructure, which currently relies on IHE XDS metadata. By aligning the Danish XDS metadata requirements with a profiled FHIR DocumentReference, the use of DocumentReference can be adopted seamlessly once the national infrastructure transitions towards FHIR-based exchange. + +In the interim, mapping from IHE XDS to DocumentReference can already be used to support validation and quality assurance. Implementers can map the metadata they populate in the IHE XDS format to the corresponding elements in the relevant MedCom FHIR DocumentReference profile. Using FHIR’s native validation tooling, it is possible to verify that the supplied metadata conforms to the expected structure and constraints defined by the profile. This provides an immediate benefit, allowing organisations to prepare for a gradual migration to FHIR while maintaining compatibility with the existing XDS-based infrastructure. + +Find the [mapping from IHE XDS metadata to FHIR DocumentReference here](https://medcomdk.github.io/dk-medcom-document/assets/documents/Mapping_from_IHE-XDS_metadata_to_FHIR.html). + +#### Contained resources + +This profile includes `contained` as part of its name because referenced resources **MUST** be contained inside the DocumentReference instance. The current Danish infrastructure is not designed to store or manage multiple separate FHIR resources, and containment ensures that all necessary metadata is delivered as a single, self-contained unit consistent with the existing XDS-based workflow. + +#### Author institution and author person +The author element allows up to two references and must always include exactly one author organization and optionally one author person. + +**Author institution:** The slice author:institution is mandatory and restricts the reference to a MedComDocumentOrganization. This ensures that every document has one clear author organization responsible for its creation. + +**Author person:** An additional author element that does not match the institutional slice is interpreted as an author person. If used, it MUST reference exactly one resource of the allowed types: MedComDocumentPractitioner, MedComDocumentPractitionerRole, MedComDocumentPatient, DkCoreRelatedPerson, or Device. diff --git a/input/pagecontent/StructureDefinition-medcom-document-bundle-intro.md b/input/pagecontent/StructureDefinition-medcom-document-bundle-intro.md index b996424..3ad2176 100644 --- a/input/pagecontent/StructureDefinition-medcom-document-bundle-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-document-bundle-intro.md @@ -1,3 +1,6 @@ ### Scope and usage The MedComDocumentBundle profile describes the Bundle resource that shall be used in all MedCom FHIR Documents. MedComDocumentBundle is the container for the content in a document. As this profile is the used in a document, the element type shall always be 'document'. This entails that the first resource in the entry element shall be a MedComDocumentComposition. + +#### Mapping from IHE-XDS metadata to FHIR Bundle +MedCom has developed a mapping. Find the [mapping from IHE XDS metadata to FHIR Bundle here](https://medcomdk.github.io/dk-medcom-document/assets/documents/Mapping_from_IHE-XDS_metadata_to_FHIR.html). \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-document-careteam-intro.md b/input/pagecontent/StructureDefinition-medcom-document-careteam-intro.md new file mode 100644 index 0000000..0333651 --- /dev/null +++ b/input/pagecontent/StructureDefinition-medcom-document-careteam-intro.md @@ -0,0 +1,4 @@ +### Scope and usage + +The MedComDocumentPractitionerRole profile describes the resource that shall be used in MedCom FHIR Documents containing PractitionerRoles. It is interited from the [MedComCoreCareTeam](https://medcomfhir.dk/ig/core/StructureDefinition-medcom-core-careteam.html) profile, and has narrowed down which profile that can be referenced. + diff --git a/input/pagecontent/StructureDefinition-medcom-document-composition-intro.md b/input/pagecontent/StructureDefinition-medcom-document-composition-intro.md index 210a2d2..3025593 100644 --- a/input/pagecontent/StructureDefinition-medcom-document-composition-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-document-composition-intro.md @@ -1,3 +1,16 @@ ### Scope and usage +The MedComDocumentComposition profile defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document - the Composition must be the first `entry` in a Bundle where `Bundle.type = document`. Any other resources referenced from Composition must be included as subsequent entries in the Bundle. -The MedComDocumentComposition profile defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle. The Composition resource organizes clinical and administrative content into sections, each of which contains a narrative, and references other resources for supporting data. +The Composition resource organizes clinical and administrative content into sections, each of which contains a narrative, and references other resources for supporting data. + +Several elements in this profile map directly to IHE XDS DocumentEntry metadata to ensure compatibility with existing national and international document exchange infrastructures. + +#### Author institution and author person +The author element allows up to two references and must always include exactly one author organization and optionally one author person. + +**Author institution:** The slice author:institution is mandatory and restricts the reference to a MedComDocumentOrganization. This ensures that every document has one clear author organization responsible for its creation. + +**Author person:** An additional author element that does not match the institutional slice is interpreted as an author person. If used, it MUST reference exactly one resource of the allowed types: MedComDocumentPractitioner, MedComDocumentPractitionerRole, MedComDocumentPatient, DkCoreRelatedPerson, or Device. + +#### Mapping from IHE-XDS metadata to FHIR Composition +MedCom has developed a mapping. Find the [mapping from IHE XDS metadata to FHIR Composition here](https://medcomdk.github.io/dk-medcom-document/assets/documents/Mapping_from_IHE-XDS_metadata_to_FHIR.html). \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-document-observation-intro.md b/input/pagecontent/StructureDefinition-medcom-document-observation-intro.md new file mode 100644 index 0000000..1433568 --- /dev/null +++ b/input/pagecontent/StructureDefinition-medcom-document-observation-intro.md @@ -0,0 +1,3 @@ +### Scope and usage + +The MedComDocumentObservation profile describes the resource that shall be used in MedCom FHIR Documents containing Observations. It is interited from the [MedComCoreObservation](https://medcomfhir.dk/ig/document/StructureDefinition-medcom-document-organization.html) profile, and has narrowed down which profiles can be referenced. diff --git a/input/pagecontent/StructureDefinition-medcom-document-patient-intro.md b/input/pagecontent/StructureDefinition-medcom-document-patient-intro.md index 72d3e50..ecc6827 100644 --- a/input/pagecontent/StructureDefinition-medcom-document-patient-intro.md +++ b/input/pagecontent/StructureDefinition-medcom-document-patient-intro.md @@ -1,10 +1,12 @@ ### Scope and usage -The MedComDocumentPatient profile describes information about a patient or citizen used in a MedComs Document standard. -The MedComDocumentPatient is inherited from the [DkCorePatient](https://hl7.dk/fhir/core/3.2.0/StructureDefinition-dk-core-patient.html) profile defined by HL7 Denmark. It does not inherit from MedComCorePatient, as more elements, than desired for this purpose, are marked with MustSupport. +The MedComDocumentPatient profile describes information about a patient or citizen used in a MedComs Document standard. +The MedComDocumentPatient is inherited from the [DkCorePatient](https://hl7.dk/fhir/core/3.2.0/StructureDefinition-dk-core-patient.html) profile defined by HL7 Denmark. It does not inherit from MedComCorePatient, as more elements, than desired for this purpose, are marked with MustSupport. #### Required information -There are certain requirements to which data must be present in a FHIR document. These requirements come from the IHE XDS metadata standard (sourcePatientInfo attribute) that requires for a Danish CPR-number (unique identifier), given and family name, birthdate and gender to be present. Therefore, this information has a minimum cardinality of 1. +There are certain requirements to which data **MUST** be present in a FHIR document. These requirements come from the IHE XDS metadata standard (sourcePatientInfo attribute) that requires for a Danish CPR-number (unique identifier), given and family name, birthdate and gender to be present. Therefore, this information has a minimum cardinality of 1. + +If the document source lacks data for either the patient's given name or family name, the missing field(s) **MUST** be populated with `ADRESSEBESKYTTET`. This approach ensures that unavailable name components are replaced, as the absence of a given or family name often results from name and address protection (Da: Navne- og adressebeskyttelse). It is not allowed to add a replacement-CPR (Danish: erstatningsCPR), as this is not supported in the infrastructure. \ No newline at end of file diff --git a/input/pagecontent/StructureDefinition-medcom-document-practitionerrole-intro.md b/input/pagecontent/StructureDefinition-medcom-document-practitionerrole-intro.md new file mode 100644 index 0000000..6b00eb3 --- /dev/null +++ b/input/pagecontent/StructureDefinition-medcom-document-practitionerrole-intro.md @@ -0,0 +1,4 @@ +### Scope and usage + +The MedComDocumentCareTeam profile describes the resource that shall be used in MedCom FHIR Documents containing CareTeams. It is interited from the [MedComCorePractitionerRole](https://medcomfhir.dk/ig/core/StructureDefinition-medcom-core-practitionerrole.html) profile, and has narrowed down which profile that can be referenced. + diff --git a/input/pagecontent/StructureDefinition-medcom-documentreference-intro.md b/input/pagecontent/StructureDefinition-medcom-documentreference-intro.md deleted file mode 100644 index e2f3d6c..0000000 --- a/input/pagecontent/StructureDefinition-medcom-documentreference-intro.md +++ /dev/null @@ -1,4 +0,0 @@ -### Scope and usage - -The MedComDocumentReference profile is not intented to be exchanges, but can be used for internal validation of metadata associated with a document. This profile provides metadata about a document, this can be CDA, FHIR or PDF. It holds the required metadata from the IHE XDS metadata standard, and a [mapping between the two can be found on GitHub pages](https://medcomdk.github.io/dk-medcom-document/assets/documents/Mapping_from_IHE-XDS_metadata_to_FHIR.html). - diff --git a/input/pagecontent/dependencies.xml b/input/pagecontent/dependencies.xml new file mode 100644 index 0000000..4f07022 --- /dev/null +++ b/input/pagecontent/dependencies.xml @@ -0,0 +1,9 @@ +
+
+ {% include dependency-table.xhtml %} +
+
+ {% include globals-table.xhtml %} +
+
\ No newline at end of file diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md index bcf0579..d26d87b 100644 --- a/input/pagecontent/index.md +++ b/input/pagecontent/index.md @@ -2,67 +2,54 @@ This Implementation Guide (IG) is provided by MedCom to describe the use of FHIR ®© in document based exchange of data in Danish healthcare. -The IG contains profiles which are used to define a general model for FHIR documents. The use case specific profiles, such as [ConditionList](http://medcomfhir.dk/ig/conditionlist), are maintained in an individuel IG. +The IG contains profiles which are used to define a general model for MedCom FHIR documents. The use case specific profiles are maintained in individual IGs. The profiles builds upon the knowledge obtained through the use of CDA in Denmark and the work around [FHIR documents from HL7 International](https://hl7.org/fhir/R4/documents.html). #### General Document Model -The figure below illustrates a general document model, which all MedCom document will comply to. Document profiles are all prefixed "MedComDocument". Beside the profiles on the figure, a MedCom document will also include some MedComCore profiles and profiles made to support a specific use case. All together they constitute the actual content of a MedCom document. The following sections describe the overall purpose of each document profile. +The figure below illustrates a general document model, which all MedCom documents will comply to. Document profiles in this IG are all prefixed "MedComDocument". Beside the profiles on the figure, a MedCom document can also include some MedCom Core profiles and profiles made to support a specific use case. All together they constitute the actual content of a MedCom FHIR document. The following sections describe the overall purpose of each document profile. -Shows the general MedCom document model. Each document must at least contain the following resources: Bundle, Composition, Organization, Patient and use case specific resources. +Shows the general MedCom document model. Structural overview of a MedCom Document Bundle, illustrating the relationships between Bundle, Composition, author (person and organization), subject (patient), and referenced resources such as Practitioner, PractitionerRole, Organization, RelatedPerson, Device, and use-case–specific content. -##### MedComDocumentBundle +The figure shows the general MedCom document model. It is a structural overview of a MedCom Document Bundle, illustrating the relationships between Bundle, Composition, authorPerson, subject (patient), and referenced resources such as Practitioner, PractitionerRole, Organization, RelatedPerson, Device, and use-case–specific content. -[MedComDocumentBundle](./StructureDefinition-medcom-document-bundle.html) is a Bundle resource defined to be of the type 'document'. All profiles included in a message shall be referenced from the entry element in the profile, with a Composition as the first resource. +##### MedComDocument Profiles +You will find a list of all MedCom Document profiles in the "Profiles" tab in the menu. -__Note:__ Be aware that entries in a document in general are unordered. +##### Resource Identifiers in MedCom FHIR Documents -##### MedComDocumentCompostition +In FHIR, `Resource.identifier` is intended to capture business identifiers that remain constant across system boundaries, which differs from `Resource.id`, the internal technical identifier used within a single FHIR Bundle. +All resources included in a MedCom FHIR document **MUST** carry an `identifier` element consisting of both a `system` and a `value`. The identifier SHALL be globally unique, persistent, and stable over time. This means that the identifier **MUST NOT** change as long as the resource represents the same underlying real-world entity or dataset. For example, a Patient resource will always carry the same civil registration number (CPR) as its identifier. -When the Bundle is of the type 'document', the [MedComDocumentCompostition](./StructureDefinition-medcom-document-composition.html) resource must be the first resource. The resource creates the structure for the document and references the relevant clinical information. +**Global uniqueness:** To ensure global uniqueness, implementations may for example use UUIDv4 or UUIDv5. Use authoritative identifiers when available, such as CPR number or SOR codes. -##### MedComDocumentOrganization - -The [MedComDocumentOrganization](./StructureDefinition-medcom-document-organization.html) profile inherits from MedComCoreOrganization and is used to describe author organization. The resource constrains the MedComCoreOrganization profile to contain a SOR identifier and a name. - -##### MedComDocumentPatient - -The [MedComDocumentPatient](./StructureDefinition-medcom-document-patient.html) profile desribes the basic requirements for information about citizens and patients when exhancging a document. The profile inherits from DkCorePatient and furhter limit the requirements, e.g. may documents only be exchanged for patients with a CPR-number. To limit the MustSupport elements, this profiles does not inherit from MedComCorePatient. - -##### MedComDocumentPractitioner - -The [MedComDocumentPractitioner](./StructureDefinition-medcom-document-practitioner.html) profile inherits from MedComCorePractitioner and further requires a given and family name to be present. - -##### MedComDocumentReference - -The [MedComDocumentReference](./StructureDefinition-medcom-documentreference.html) profile should not be exchanged, but can be used for internal validation of the metadata associated with a document, as the DocumentReference contains the same information as the IHE XDS metadata standard. - -#### General document assumptions +**Persistence across snapshots:** Even if a document is re-created or updated, resources representing the same entity (e.g., Patient, Practitioner, Organization, Encounter) **MUST** retain their identifier. **Bundle.identifier:** Once a document is assembled into a Bundle, the document is immutable, meaning its content cannot be changed, and the document id (Bundle.identifier) can never be reused. +##### XML and JSON **XML and JSON:** Note that the document may be represented in either XML or JSON and interconverted between these or have its character encoding changed, all the while remaining the same document. -**Narrative:** It is a key element in documents that they contain a narrative text. The requirements concerning the narrative text, follows the [recommendations from HL7 for narrative text](https://hl7.org/fhir/R4/documents.html#presentation). This states that there must be narrative text included in the subject resource, which is the Patient resource in this IG, the Composition resource and for each Composition.section.text. +#### Terminology IG and metadata IG +In [MedCom Terminology IG](http://medcomfhir.dk/ig/terminology/) all referenced MedCom Terminology CodeSystems and ValueSets developed by MedCom can be found. -#### Terminology -On [MedCom Terminology IG](http://medcomfhir.dk/ig/terminology/) all referenced CodeSystem and ValueSets developed by MedCom can be found. +In MedCom [Dk Terminology for XDS Metadata](https://medcomfhir.dk/ig/xdsmetadata/) all MedCom CodeSystems and ValueSets related to metadata. #### Dependencies -This IG has a dependency to the [MedComCore IG](http://medcomfhir.dk/ig/core/) and [DK-core](https://hl7.dk/fhir/core/) v. 3.2.0, defined by [HL7 Denmark](https://hl7.dk/). +Besides Terminology and metadata IGs, this IG has a dependency to the [MedComCore IG](http://medcomfhir.dk/ig/core/), [DK-core](https://hl7.dk/fhir/core/), defined by [HL7 Denmark](https://hl7.dk/) and [IHE MHD](https://profiles.ihe.net/ITI/MHD/). **Note** that the IG versions linked may be newer than the versions used as dependencies in this implementation guide. For the exact dependency versions applied, see the **Dependencies** tab in the top menu under **More**. ### Documentation +[More information about MedCom Document](https://medcomdk.github.io/dk-medcom-document/) can be found here. MedCom document profiles does not alone constitute a standard. -[More information about MedCom Document](https://medcomdk.github.io/dk-medcom-document/) can be found here. MedCom document profiles does not alone constitute a standard, why the documentation is limited. - -### Governance +### Governance and guidance +FHIR profiles are managed under MedCom: [Source code](https://github.com/medcomdk/dk-medcom-document). -FHIR profiles are managed under MedCom: [Source code](https://github.com/medcomdk/dk-medcom-document). +A description of governance and guidance for MedCom's FHIR standards, can be found on the [MedCom Landing Page](https://medcomdk.github.io/MedComLandingPage). -#### Quality Assurance Report +The MedCom FHIR landing page provides a overview of governance requirements that apply to MedCom’s FHIR standards. This includes fx the mandatory rules for interpreting MustSupport, the formal validation requirements that implementers must follow, the expectations for producing narrative texts and governance for how MedCom Terminology is versioned. In addition, the governance section outlines the rules for MedCom FHIR Messaging and Document Sharing, including requirements for fx message flow and envelope usage. -In the Quality Assurance report (QA-report) for this IG, there is an error with the following description: *Reference is remote which isn’t supported by the specified aggregation mode(s) for the reference (bundled)*. The error occurs when creating instances of the profiles and is due to some elements having a Bundled flag {b}, however the referenced profile is not included in a Bundle in an instance, since the instance only represents a part of the entire message. This should not influence the implementation by IT-vendors. +The landing page also offers help to developers to understand how to work with MedCom’s FHIR standards. This includes a guide of how to read an Implementation Guide. Users will also find instructions on how to use some of the required tools, such as validation setup and how to use Touchstone. ### Contact diff --git a/input/sushi-ignoreErrors.txt b/input/sushi-ignoreErrors.txt new file mode 100644 index 0000000..5f41dc5 --- /dev/null +++ b/input/sushi-ignoreErrors.txt @@ -0,0 +1,14 @@ +== Suppressed errors == +# Link to sushi desciption: https://fshschool.org/docs/sushi/project/#using-the-hl7-ig-publisher-and-auto-builder +# Suppresses this error as IG Publisher autogenerates narratives after SUSHI has run. +Element Patient.text has minimum cardinality 1 but occurs 0 time(s). +Element CareTeam.text has minimum cardinality 1 but occurs 0 time(s). +Element DiagnosticReport.text has minimum cardinality 1 but occurs 0 time(s). +Element Encounter.text has minimum cardinality 1 but occurs 0 time(s). +Element Media.text has minimum cardinality 1 but occurs 0 time(s). +Element Observation.text has minimum cardinality 1 but occurs 0 time(s). +Element Organization.text has minimum cardinality 1 but occurs 0 time(s). +Element Practitioner.text has minimum cardinality 1 but occurs 0 time(s). +Element PractitionerRole.text has minimum cardinality 1 but occurs 0 time(s). +Element DocumentReference.text has minimum cardinality 1 but occurs 0 time(s). +Element Composition.text has minimum cardinality 1 but occurs 0 time(s). diff --git a/out/puml/MedComDocument/DocumentModel.svg b/out/puml/MedComDocument/DocumentModel.svg new file mode 100644 index 0000000..846fe80 --- /dev/null +++ b/out/puml/MedComDocument/DocumentModel.svg @@ -0,0 +1 @@ +«Bundle»MedComDocumentBundle«Composition»MedComDocumentComposition«MedComCoreOrganization»MedComDocumentOrganization«MedComCorePractitioner»MedComDocumentPractitioner«MedComCorePractitionerRole»MedComDocumentPractitionerRole«DkCorePatient»MedComDocumentPatient«RelatedPerson»DkCoreRelatedPersonDevice'Use case specific content'AuthorPersonentryauthor:personauthor:organizationsubjectsection.entrypractitionerorganization \ No newline at end of file diff --git a/puml/MedComDocument.puml b/puml/MedComDocument.puml index ba382f2..3b39173 100644 --- a/puml/MedComDocument.puml +++ b/puml/MedComDocument.puml @@ -2,18 +2,38 @@ hide empty members -class "MedComDocumentBundle" as document -class "MedComDocumentComposition" as composition +class "MedComDocumentBundle" as document <> +class "MedComDocumentComposition" as composition <> + class "MedComDocumentOrganization" as organization <> class "MedComDocumentPractitioner" as practitioner <> +class "MedComDocumentPractitionerRole" as practitionerrole <> class "MedComDocumentPatient" as patient <> -class "*use case specific content*" as clinical +class "DkCoreRelatedPerson" as relatedperson <> +class "Device" as device +class "'Use case specific content'" as content + +' Fælles abstraktion for alle, der kan være author:person +interface "AuthorPerson" as authorPerson +' --- Struktur på dokumentet --- document -- composition : "entry" -composition -- organization : "authorInstitution" -composition -- practitioner : "authorPerson" + +' Composition peger på den fælles type +composition -- authorPerson : "author:person" +composition -- organization : "author:organization" composition -- patient : "subject" -composition -- clinical : "section.entry" +composition -- content : "section.entry" + +' PractitionerRole’s egne relationer bevares +practitionerrole -- practitioner : "practitioner" +practitionerrole -- organization : "organization" +' Hvilke typer kan være author:person? +authorPerson <|.. practitioner +authorPerson <|.. practitionerrole +authorPerson <|.. patient +authorPerson <|.. relatedperson +authorPerson <|.. device -@enduml \ No newline at end of file +@enduml diff --git a/sushi-config.yaml b/sushi-config.yaml index 852e7db..eb7635d 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -26,8 +26,12 @@ publisher: # dependencies: medcom.fhir.dk.xdsmetadata: 1.0.1 - medcom.fhir.dk.core: 2.4.0 - hl7.fhir.dk.core: 3.2.0 + medcom.fhir.dk.terminology: 2.0.2 + medcom.fhir.dk.core: dev + #medcom.fhir.dk.core: 3.0.1 + hl7.fhir.dk.core: 3.5.0 + hl7.fhir.extensions.r5: 4.0.1 + ihe.iti.mhd: 4.2.3 # # # The pages property corresponds to IG.definition.page. SUSHI can @@ -73,12 +77,15 @@ dependencies: # │ property below. │ # ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ menu: - Table of Contents: toc.html Home: index.html Profiles: profiles.html Extensions: extensions.html Artifacts: artifacts.html - Downloads: downloads.html + More: + Table of Contents: toc.html + Downloads: downloads.html + Dependencies: dependencies.html + # ╭───────────────────────────Less Common Implementation Guide Properties──────────────────────────╮ # │ Uncomment the properties below to configure additional properties on the ImplementationGuide │