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.xdsdocuments derivation: constraint name: MedComContainedDocumentReference type: DocumentReference elements: category: short: '[DocumentEntry.classCode] Categorization of document.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-classcode-VS'} index: 26 elements: coding: mustSupport: true index: 27 elements: system: {mustSupport: true, index: 28} code: {mustSupport: true, index: 29} display: {mustSupport: true, index: 30} required: [display, system, code] required: [coding] content: mustSupport: true index: 40 elements: attachment: mustSupport: true index: 41 elements: contentType: short: '[DocumentEntry.mimeType] Mime type of the content, with charset etc.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-mimetype-fhir-VS'} mustSupport: true index: 42 language: short: '[DocumentEntry.languageCode] Human language of the content.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-languagecode-VS'} index: 43 url: {short: '[DocumentEntry.URI] URI where the data can be found.', mustSupport: true, index: 44} size: {short: '[DocumentEntry.size] Number of bytes of content.', mustSupport: true, index: 45} hash: {short: '[DocumentEntry.hash] Hash of the data (sha-1).', mustSupport: true, index: 46} title: {short: '[DocumentEntry.title] The readable title of the document.', mustSupport: true, index: 47} 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/xdsdocuments/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: 48 required: [title, language, creation] format: short: '[DocumentEntry.formatCode] Format/content rules for the document.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-formatcode-VS'} index: 49 elements: system: {mustSupport: true, index: 50} code: {mustSupport: true, index: 51} display: {mustSupport: true, index: 52} required: [display, system, code] required: [format] type: short: '[DocumentEntry.typeCode] Kind of document.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-typecode-VS'} 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|3.6.0', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-organization', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-patient', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-practitioner', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-practitionerrole'] array: true max: 2 index: 32 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/xdsdocuments/StructureDefinition/medcom-document-organization'] type: Reference mustSupport: true _required: true index: 33 min: 1 max: 1 person: match: {} schema: short: A person/role/patient/device author of the document. refers: ['http://hl7.dk/fhir/core/StructureDefinition/dk-core-related-person|3.6.0', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-practitioner', 'http://medcomfhir.dk/ig/xdsdocuments/StructureDefinition/medcom-document-practitionerrole'] type: Reference mustSupport: true index: 34 min: 0 max: 1 extension: mustSupport: true index: 4 slicing: slices: versionid: match: {} schema: {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/xdsdocuments/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/xdsdocuments/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: 53 elements: event: short: '[DocumentEntry.eventCodeList] Main clinical acts documented.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsmetadata/ValueSet/MedCom-xds-eventcodelist-VS'} mustSupport: true index: 54 elements: coding: elements: system: {mustSupport: true, index: 55} code: {mustSupport: true, index: 56} required: [system, code] period: short: '[DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime] Time of service that is being documented.' index: 57 elements: start: {mustSupport: true, index: 58} end: {mustSupport: true, index: 59} required: [start] facilityType: short: '[DocumentEntry.healthcareFacilityTypeCode] Kind of facility where patient was seen.' binding: {strength: required, valueSet: 'http://medcomfhir.dk/ig/xdsdocuments/ValueSet/MedCom-xds-HealthcareFacilityTypeCode-VS-local'} index: 60 elements: coding: mustSupport: true index: 61 elements: system: {mustSupport: true, index: 62} code: {mustSupport: true, index: 63} display: {mustSupport: true, index: 64} 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/xdsdocuments/ValueSet/MedCom-xds-PracticeSettingCode-VS-local'} index: 65 elements: coding: mustSupport: true index: 66 elements: system: {mustSupport: true, index: 67} code: {mustSupport: true, index: 68} display: {mustSupport: true, index: 69} 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/xdsdocuments/StructureDefinition/medcom-document-patient'] index: 70 elements: reference: {mustSupport: true, index: 71} identifier: {mustSupport: true, index: 72} required: [identifier, reference] related: {short: '[DocumentEntry.referenceIdList] Related identifiers or resources.', mustSupport: true, index: 73} required: [practiceSetting, sourcePatientInfo, period, facilityType] securityLabel: short: '[DocumentEntry.confidentialityCode] Document security-tags.' index: 36 elements: coding: mustSupport: true index: 37 elements: system: {mustSupport: true, index: 38} code: {mustSupport: true, index: 39} 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/xdsdocuments/StructureDefinition/medcom-document-patient'] index: 31 authenticator: type: Reference short: '[DocumentEntry.legalAuthenticator] Who authenticated the document.' mustSupport: true refers: ['http://hl7.dk/fhir/core/StructureDefinition/dk-core-organization|3.6.0', 'http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner-role|3.6.0', 'http://hl7.dk/fhir/core/StructureDefinition/dk-core-practitioner|3.6.0'] index: 35 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: 1.0.0-trial-use-1 extensions: versionid: {url: null, index: 5} homeCommunityid: url: http://medcomfhir.dk/ig/xdsdocuments/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/xdsdocuments/StructureDefinition/medcom-contained-documentreference base: http://hl7.dk/fhir/core/StructureDefinition/dk-core-minimaldocumentreference|3.6.0 version: 1.0.0-trial-use-1 required: [securityLabel, id, context, text, identifier, type, category]