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. package_name: medcom.fhir.dk.document derivation: constraint name: MedComContainedDocumentReference type: DocumentReference elements: category: short: '[DocumentEntry.classCode] Categorization of document.' binding: {strength: extensible, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-classcode-VS-TEMP'} index: 26 elements: coding: elements: system: {mustSupport: true, index: 27} code: {mustSupport: true, index: 28} display: {mustSupport: true, index: 29} required: [display, system, code] content: mustSupport: true index: 38 elements: attachment: mustSupport: true index: 39 elements: contentType: short: '[DocumentEntry.mimeType] Mime type of the content, with charset etc.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-mimetype-VS-TEMP'} mustSupport: true index: 40 language: short: '[DocumentEntry.languageCode] Human language of the content.' binding: {strength: extensible, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-languagecode-VS-TEMP'} index: 41 url: {short: '[DocumentEntry.URI] URI where the data can be found.', mustSupport: true, index: 42} size: {short: '[DocumentEntry.size] Number of bytes of content.', mustSupport: true, index: 43} hash: {short: '[DocumentEntry.hash] Hash of the data (sha-1).', mustSupport: true, index: 44} title: {short: '[DocumentEntry.title] The readable title of the document.', mustSupport: true, index: 45} creation: short: '[DocumentEntry.creationTime] Date attachment was first created.' constraint: medcom-datetime-has-time-offset-zulu: {human: 'dateTime must include date, time, and time zone.', source: 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-contained-documentreference', 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})$'')'} index: 46 required: [title, language, creation] format: short: '[DocumentEntry.formatCode] Format/content rules for the document.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-formatcode-VS-TEMP'} index: 47 elements: system: {mustSupport: true, index: 48} code: {mustSupport: true, index: 49} display: {mustSupport: true, index: 50} required: [display, system, code] required: [format] type: short: '[DocumentEntry.typeCode] Kind of document.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-typecode-VS-TEMP'} index: 21 elements: coding: mustSupport: true index: 22 elements: system: {mustSupport: true, index: 23} code: {mustSupport: true, index: 24} display: {mustSupport: true, index: 25} required: [display, system, code] required: [coding] author: type: Reference 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. refers: ['http://hl7.dk/fhir/core/StructureDefinition/dk-core-related-person', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-organization', 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-patient', 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-practitioner', 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-practitionerrole'] array: true max: 2 index: 31 slicing: rules: open discriminator: - {path: $this.resolve(), type: profile} min: null max: 2 slices: institution: match: {} schema: short: The organization who authored the document. refers: ['http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-organization'] type: Reference mustSupport: true _required: true index: 32 min: 1 max: 1 extension: mustSupport: true index: 4 slicing: slices: versionid: match: {} schema: {mustSupport: true, index: 5} homeCommunityid: match: {} schema: type: Extension short: '[DocumentEntry.homeCommunityId] A unique identifier for a community where the DocumentEntry and document can be accessed.' mustSupport: true url: http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-homecommunityid-extension index: 6 elements: url: {mustSupport: true, index: 7} value: choices: [valueCoding] index: 9 slicing: slices: valueCoding: match: {} schema: choices: [valueCoding] index: 9 valueCoding: type: Coding choiceOf: value index: 10 slicing: slices: valueCoding: match: {} schema: {type: Coding, choiceOf: value, index: 10} value[x]: elements: system: {index: 11} code: {index: 12} masterIdentifier: short: '[DocumentEntry.uniqueId] Master Version Specific Identifier' mustSupport: true index: 13 elements: system: {mustSupport: true, index: 14} value: {mustSupport: true, index: 15} status: {short: '[DocumentEntry.availabilityStatus] current = active | superseded = deprecated.', mustSupport: true, index: 20} id: {mustSupport: true, index: 0} identifier: index: 16 slicing: slices: entryUUID: match: {} schema: short: '[DocumentEntry.entryUUID] Identifier for the document.' _required: true index: 17 elements: system: {mustSupport: true, index: 18} value: constraint: medcom-uuid: {human: The value shall correspond to the structure of an UUID, source: 'http://medcomfhir.dk/ig/document/StructureDefinition/medcom-contained-documentreference', 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}$'')'} mustSupport: true index: 19 context: mustSupport: true index: 51 elements: event: short: '[DocumentEntry.eventCodeList] Main clinical acts documented.' mustSupport: true index: 52 elements: coding: elements: system: {mustSupport: true, index: 53} code: {mustSupport: true, index: 54} required: [system, code] period: short: '[DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime] Time of service that is being documented.' index: 55 elements: start: {mustSupport: true, index: 56} end: {mustSupport: true, index: 57} required: [start] facilityType: short: '[DocumentEntry.healthcareFacilityTypeCode] Kind of facility where patient was seen.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-HealthcareFacilityTypeCode-VS-TEMP'} index: 58 elements: coding: mustSupport: true index: 59 elements: system: {mustSupport: true, index: 60} code: {mustSupport: true, index: 61} display: {mustSupport: true, index: 62} required: [display, system, code] required: [coding] practiceSetting: short: '[DocumentEntry.practiceSettingCode] Additional details about where the content was created (e.g. clinical specialty).' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/document/ValueSet/MedCom-ihe-core-PracticeSettingCode-VS-TEMP'} index: 63 elements: coding: mustSupport: true index: 64 elements: system: {mustSupport: true, index: 65} code: {mustSupport: true, index: 66} display: {mustSupport: true, index: 67} required: [display, system, code] required: [coding] sourcePatientInfo: type: Reference short: '[DocumentEntry.sourcePatientId and DocumentEntry.sourcePatientInfo] Patient demographics from source. Must be the same reference as in DocumentReference.subject.' refers: ['http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-patient'] index: 68 elements: reference: {mustSupport: true, index: 69} identifier: {mustSupport: true, index: 70} required: [identifier, reference] related: {short: '[DocumentEntry.referenceIdList] Related identifiers or resources.', mustSupport: true, index: 71} required: [practiceSetting, sourcePatientInfo, facilityType] securityLabel: short: '[DocumentEntry.confidentialityCode] Document security-tags.' index: 34 elements: coding: mustSupport: true index: 35 elements: system: {mustSupport: true, index: 36} code: {mustSupport: true, index: 37} required: [system, code] required: [coding] subject: type: Reference short: '[DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId] Who/what is the subject of the document.' refers: ['http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-patient'] index: 30 authenticator: type: Reference short: '[DocumentEntry.legalAuthenticator] Who authenticated the document.' mustSupport: true refers: ['http://hl7.dk/fhir/core/StructureDefinition/dk-core-organization', 'http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner', 'http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner-role'] index: 33 text: short: The narrative text SHALL always be included when exchanging a MedCom FHIR Bundle. mustSupport: true index: 1 elements: status: {mustSupport: true, index: 2} div: {mustSupport: true, index: 3} package_version: 2.0.0 extensions: versionid: {url: null, mustSupport: true, index: 5} homeCommunityid: url: http://medcomfhir.dk/ig/document/StructureDefinition/medcom-document-homecommunityid-extension type: Extension short: '[DocumentEntry.homeCommunityId] A unique identifier for a community where the DocumentEntry and document can be accessed.' mustSupport: true index: 6 elements: url: {mustSupport: true, index: 7} value: choices: [valueCoding] index: 9 slicing: slices: valueCoding: match: {} schema: choices: [valueCoding] index: 9 valueCoding: type: Coding choiceOf: value index: 10 slicing: slices: valueCoding: match: {} schema: {type: Coding, choiceOf: value, index: 10} value[x]: elements: system: {index: 11} code: {index: 12} class: profile kind: resource url: http://medcomfhir.dk/ig/document/StructureDefinition/medcom-contained-documentreference base: http://hl7.dk/fhir/core/StructureDefinition/dk-core-minimaldocumentreference version: 2.0.0 required: [securityLabel, id, context, text, identifier, type, category]