ehealth-transformation-documentreference
type: StructureDefinition
node role: treeRoot
resource.id:
  value: ehealth-transformation-documentreference
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Generated Narrative: StructureDefinition ehealth-transformation-documentreference Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> DocumentReference 0..* DocumentReference A reference to a document #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:manuallyDeprecated 0..1 boolean Ehealth Document manually deprecated URL: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type #xD; extension:documentSharingState 0..* Coding Where in the sharing process the document is, and the reason why URL: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state Binding: Document Sharing State (required) #xD; type 0..1 CodeableConcept Kind of document (LOINC if possible) Binding: Document Type (required) #xD; category 0..1 CodeableConcept Categorization of document Binding: Document Class (required) #xD; subject 0..1 Reference(ehealth-patient | ehealth-practitioner | Group | ehealth-device) {r} Who/what is the subject of the document #xD; author 0..* Reference(ehealth-practitioner | ehealth-organization | ehealth-device | ehealth-patient | ehealth-relatedperson) {r} Who and/or what authored the document #xD; authenticator 0..1 Reference(ehealth-practitioner | ehealth-organization) {r} Who/what authenticated the document #xD; custodian 0..1 Reference(ehealth-organization) {r} Organization which maintains the document #xD; relatesTo #xD; target 1..1 Reference(ehealth-documentreference) Target of the relationship #xD; content #xD; format 0..1 Coding Format/content rules for the document Binding: FormatCodes (required) #xD; context #xD; event 0..* CodeableConcept Main clinical acts documented Binding: Event Type Codes (required) #xD; facilityType 0..1 CodeableConcept Kind of facility where patient was seen Binding: Facility Type Codes (required) #xD; practiceSetting 0..1 CodeableConcept Additional details about where th…
structure definition.url:
  value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-transformation-documentreference
structure definition.version:
  value: 10.0.0
structure definition.name:
  value: ehealth-transformation-documentreference
structure definition.status:
  value: active
structure definition.date:
  value: 2026-08-06T13:17:54+00:00
structure definition.publisher:
  value: Den telemedicinske infrastruktur (eHealth Infrastructure)
structure definition.contact:
  index: 0
  contact detail.name:
    value: Den telemedicinske infrastruktur (eHealth Infrastructure)
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: http://ehealth.sundhed.dk
structure definition.jurisdiction:
  index: 0
  codeable concept.coding:
    index: 0
    coding.system:
      value: urn:iso:std:iso:3166
    coding.code:
      value: DK
    coding.display:
      value: Denmark
structure definition.fhir version:
  value: 4.0.1
structure definition.mapping:
  index: 0
  structure definition.mapping.identity:
    value: workflow
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/workflow
  structure definition.mapping.name:
    value: Workflow Pattern
structure definition.mapping:
  index: 1
  structure definition.mapping.identity:
    value: fhircomposition
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/composition
  structure definition.mapping.name:
    value: FHIR Composition
structure definition.mapping:
  index: 2
  structure definition.mapping.identity:
    value: rim
  structure definition.mapping.uri:
    value: http://hl7.org/v3
  structure definition.mapping.name:
    value: RIM Mapping
structure definition.mapping:
  index: 3
  structure definition.mapping.identity:
    value: cda
  structure definition.mapping.uri:
    value: http://hl7.org/v3/cda
  structure definition.mapping.name:
    value: CDA (R2)
structure definition.mapping:
  index: 4
  structure definition.mapping.identity:
    value: w5
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/fivews
  structure definition.mapping.name:
    value: FiveWs Pattern Mapping
structure definition.mapping:
  index: 5
  structure definition.mapping.identity:
    value: v2
  structure definition.mapping.uri:
    value: http://hl7.org/v2
  structure definition.mapping.name:
    value: HL7 v2 Mapping
structure definition.mapping:
  index: 6
  structure definition.mapping.identity:
    value: xds
  structure definition.mapping.uri:
    value: http://ihe.net/xds
  structure definition.mapping.name:
    value: XDS metadata equivalent
structure definition.kind:
  value: resource
structure definition.abstract:
  value: false
structure definition.type:
  value: DocumentReference
structure definition.base definition:
  value: http://hl7.org/fhir/StructureDefinition/DocumentReference
  link: http://hl7.org/fhir/StructureDefinition/DocumentReference
structure definition.derivation:
  value: constraint
structure definition.snapshot:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    extension.value string:
      value: 4.0.1
  structure definition.snapshot.element:
    index: 0
    element.id:
      value: DocumentReference
    element definition.path:
      value: DocumentReference
    element definition.short:
      value: A reference to a document
    element definition.definition:
      value: A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
    element definition.comment:
      value: Usually, this is used for documents other than those defined by FHIR.
    element definition.min:
      value: 0
    element definition.max:
      value: *
    element definition.base:
      element definition.base.path:
        value: DocumentReference
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: *
    element definition.constraint:
      index: 0
      element definition.constraint.key:
        value: dom-2
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      element definition.constraint.expression:
        value: contained.contained.empty()
      element definition.constraint.xpath:
        value: not(parent::f:contained and f:contained)
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 1
      element definition.constraint.key:
        value: dom-3
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
      element definition.constraint.expression:
        value: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      element definition.constraint.xpath:
        value: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 2
      element definition.constraint.key:
        value: dom-4
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      element definition.constraint.expression:
        value: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 3
      element definition.constraint.key:
        value: dom-5
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a security label
      element definition.constraint.expression:
        value: contained.meta.security.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:security))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 4
      element.extension:
        index: 0

value: true

index: 1
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation
extension.value markdown:
  value: When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.

value: dom-6

value: warning

value: A resource should have narrative for robust management

value: text.`div`.exists()

value: exists(f:text/h:div)

value: false

value: false

index: 0
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Entity. Role, or Act

index: 1
element definition.mapping.identity:
  value: workflow
element definition.mapping.map:
  value: Event

index: 2
element definition.mapping.identity:
  value: fhircomposition
element definition.mapping.map:
  value: when describing a Composition

index: 3
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Document[classCode="DOC" and moodCode="EVN"]

index: 4
element definition.mapping.identity:
  value: cda
element definition.mapping.map:
  value: when describing a CDA

index: 1
element.id:
  value: DocumentReference.id
element definition.path:
  value: DocumentReference.id
element definition.short:
  value: Logical id of this artifact
element definition.definition:
  value: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
element definition.comment:
  value: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: id
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: true

index: 2
element.id:
  value: DocumentReference.meta
element definition.path:
  value: DocumentReference.meta
element definition.short:
  value: Metadata about the resource
element definition.definition:
  value: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.meta
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Meta
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true

index: 3
element.id:
  value: DocumentReference.implicitRules
element definition.path:
  value: DocumentReference.implicitRules
element definition.short:
  value: A set of rules under which this content was created
element definition.definition:
  value: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
element definition.comment:
  value: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.implicitRules
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: uri
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
element definition.is summary:
  value: true

index: 4
element.id:
  value: DocumentReference.language
element definition.path:
  value: DocumentReference.language
element definition.short:
  value: Language of the resource content
element definition.definition:
  value: The base language in which the resource is written.
element definition.comment:
  value: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.language
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    extension.value canonical:
      value: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  element.extension:
    index: 1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: Language
  element definition.binding.strength:
    value: preferred
  element definition.binding.description:
    value: A human language.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/languages|4.0.1
    link: 4.0
    link: .1

index: 5
element.id:
  value: DocumentReference.text
element definition.path:
  value: DocumentReference.text
element definition.short:
  value: Text summary of the resource, for human interpretation
element definition.definition:
  value: A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
element definition.comment:
  value: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
element definition.alias:
  value: narrative
  index: 0
element definition.alias:
  value: html
  index: 1
element definition.alias:
  value: xhtml
  index: 2
element definition.alias:
  value: display
  index: 3
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DomainResource.text
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Narrative
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: Act.text?

index: 6
element.id:
  value: DocumentReference.contained
element definition.path:
  value: DocumentReference.contained
element definition.short:
  value: Contained, inline Resources
element definition.definition:
  value: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
element definition.comment:
  value: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
element definition.alias:
  value: inline resources
  index: 0
element definition.alias:
  value: anonymous resources
  index: 1
element definition.alias:
  value: contained resources
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.contained
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Resource
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 7
element.id:
  value: DocumentReference.extension
element definition.path:
  value: DocumentReference.extension
element definition.slicing:
  element definition.slicing.discriminator:
    index: 0
    element definition.slicing.discriminator.type:
      value: value
    element definition.slicing.discriminator.path:
      value: url
  element definition.slicing.ordered:
    value: false
  element definition.slicing.rules:
    value: open
element definition.short:
  value: Extension
element definition.definition:
  value: An Extension
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false

index: 8
element.id:
  value: DocumentReference.extension:manuallyDeprecated
element definition.path:
  value: DocumentReference.extension
element definition.slice name:
  value: manuallyDeprecated
element definition.short:
  value: Ehealth Document manually deprecated
element definition.definition:
  value: Ehealth Document manually deprecated
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DomainResource.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
  element definition.type.profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false

index: 9
element.id:
  value: DocumentReference.extension:documentSharingState
element definition.path:
  value: DocumentReference.extension
element definition.slice name:
  value: documentSharingState
element definition.short:
  value: Where in the sharing process the document is, and the reason why
element definition.definition:
  value: Where in the sharing process the document is, and the reason why
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
  element definition.type.profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false

index: 10
element.id:
  value: DocumentReference.modifierExtension
element definition.path:
  value: DocumentReference.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 11
element.id:
  value: DocumentReference.masterIdentifier
element definition.path:
  value: DocumentReference.masterIdentifier
element definition.short:
  value: Master Version Specific Identifier
element definition.definition:
  value: Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.
element definition.comment:
  value: CDA Document Id extension and root.
element definition.requirements:
  value: The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.masterIdentifier
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Identifier
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.identifier
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.identifier
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.identifier
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-12
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .id
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.uniqueId
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/id

index: 12
element.id:
  value: DocumentReference.identifier
element definition.path:
  value: DocumentReference.identifier
element definition.short:
  value: Other identifiers for the document
element definition.definition:
  value: Other identifiers associated with the document, including version independent identifiers.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.identifier
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Identifier
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.identifier
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.identifier
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-16?
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .id / .setId
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.entryUUID

index: 13
element.id:
  value: DocumentReference.status
element definition.path:
  value: DocumentReference.status
element definition.short:
  value: current | superseded | entered-in-error
element definition.definition:
  value: The status of this document reference.
element definition.comment:
  value: This is the status of the DocumentReference object, which might be independent from the docStatus element. This element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.status
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentReferenceStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: The status of the document reference.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.status
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.status
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-19
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: interim: .completionCode="IN" & ./statusCode[isNormalDatatype()]="active"; final: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and not(./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument", code) and isNormalAct()]); amended: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument", code) and isNormalAct() and statusCode="completed"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete"
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.availabilityStatus

index: 14
element.id:
  value: DocumentReference.docStatus
element definition.path:
  value: DocumentReference.docStatus
element definition.short:
  value: preliminary | final | amended | entered-in-error
element definition.definition:
  value: The status of the underlying document.
element definition.comment:
  value: The document that is pointed to might be in various lifecycle states.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.docStatus
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: ReferredDocumentStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: Status of the underlying document.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/composition-status|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.status
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.status
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-17
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .statusCode

index: 15
element.id:
  value: DocumentReference.type
element definition.path:
  value: DocumentReference.type
element definition.short:
  value: Kind of document (LOINC if possible)
element definition.definition:
  value: Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.
element definition.comment:
  value: Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.type
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/document-type
    link: http://ehealth.sundhed.dk/vs/document-type
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.code
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.class
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.type
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-2
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./code
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.type
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/code/@code The typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted.

index: 16
element.id:
  value: DocumentReference.category
element definition.path:
  value: DocumentReference.category
element definition.short:
  value: Categorization of document
element definition.definition:
  value: A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.
element definition.comment:
  value: Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching.
element definition.alias:
  value: claxs
  index: 0
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.category
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/document-class
    link: http://ehealth.sundhed.dk/vs/document-class
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.class
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.class
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.class
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code

index: 17
element.id:
  value: DocumentReference.subject
element definition.path:
  value: DocumentReference.subject
element definition.short:
  value: Who/what is the subject of the document
element definition.definition:
  value: Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.subject
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    index: 1
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/Group
    index: 2
    link: http://hl7.org/fhir/StructureDefinition/Group
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    index: 3
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
  element definition.type.aggregation:
    value: referenced
    index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.subject
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.subject
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="SBJ"].role[typeCode="PAT"]
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.patientId
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/recordTarget/
element definition.mapping:
  index: 7
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 18
element.id:
  value: DocumentReference.date
element definition.path:
  value: DocumentReference.date
element definition.short:
  value: When this document reference was created
element definition.definition:
  value: When the document reference was created.
element definition.comment:
  value: Referencing/indexing time is used for tracking, organizing versions and searching.
element definition.alias:
  value: indexed
  index: 0
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.date
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: instant
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.occurrence[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.recorded
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.date
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .availabilityTime[type="TS"]

index: 19
element.id:
  value: DocumentReference.author
element definition.path:
  value: DocumentReference.author
element definition.short:
  value: Who and/or what authored the document
element definition.definition:
  value: Identifies who is responsible for adding the information to the document.
element definition.comment:
  value: Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.author
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    index: 1
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    index: 2
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    index: 3
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
    index: 4
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
  element definition.type.aggregation:
    value: referenced
    index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.author
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.author
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/author

index: 20
element.id:
  value: DocumentReference.authenticator
element definition.path:
  value: DocumentReference.authenticator
element definition.short:
  value: Who/what authenticated the document
element definition.definition:
  value: Which person or organization authenticates that this document is valid.
element definition.comment:
  value: Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.authenticator
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    index: 1
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
  element definition.type.aggregation:
    value: referenced
    index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.witness
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.attester
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-10
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.legalAuthenticator
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/legalAuthenticator

index: 21
element.id:
  value: DocumentReference.custodian
element definition.path:
  value: DocumentReference.custodian
element definition.short:
  value: Organization which maintains the document
element definition.definition:
  value: Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.
element definition.comment:
  value: Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.custodian
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
  element definition.type.aggregation:
    value: referenced
    index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.custodian
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]

index: 22
element.id:
  value: DocumentReference.relatesTo
element definition.path:
  value: DocumentReference.relatesTo
element definition.short:
  value: Relationships to other documents
element definition.definition:
  value: Relationships that this document has with other document references that already exist.
element definition.comment:
  value: This element is labeled as a modifier because documents that append to other documents are incomplete on their own.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations

index: 23
element.id:
  value: DocumentReference.relatesTo.id
element definition.path:
  value: DocumentReference.relatesTo.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 24
element.id:
  value: DocumentReference.relatesTo.extension
element definition.path:
  value: DocumentReference.relatesTo.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 25
element.id:
  value: DocumentReference.relatesTo.modifierExtension
element definition.path:
  value: DocumentReference.relatesTo.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 26
element.id:
  value: DocumentReference.relatesTo.code
element definition.path:
  value: DocumentReference.relatesTo.code
element definition.short:
  value: replaces | transforms | signs | appends
element definition.definition:
  value: The type of relationship that this document has with anther document.
element definition.comment:
  value: If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo.code
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentRelationshipType
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: The type of relationship between documents.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo.code
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship.typeCode
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations type

index: 27
element.id:
  value: DocumentReference.relatesTo.target
element definition.path:
  value: DocumentReference.relatesTo.target
element definition.short:
  value: Target of the relationship
element definition.definition:
  value: The target document of this relationship.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo.target
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo.target
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .target[classCode="DOC", moodCode="EVN"].id
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations reference

index: 28
element.id:
  value: DocumentReference.description
element definition.path:
  value: DocumentReference.description
element definition.short:
  value: Human-readable description
element definition.definition:
  value: Human-readable description of the source document.
element definition.comment:
  value: What the document is about, a terse summary of the document.
element definition.requirements:
  value: Helps humans to assess whether the document is of interest.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.description
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: string
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-25
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship[typeCode="SUBJ"].target.text
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.comments

index: 29
element.id:
  value: DocumentReference.securityLabel
element definition.path:
  value: DocumentReference.securityLabel
element definition.short:
  value: Document security-tags
element definition.definition:
  value: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.
element definition.comment:
  value: The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce. In the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.
element definition.requirements:
  value: Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.securityLabel
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: SecurityLabels
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: Security Labels from the Healthcare Privacy and Security Classification System.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/security-labels|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.confidentiality, Composition.meta.security
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-18
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .confidentialityCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.confidentialityCode
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/confidentialityCode/@code

index: 30
element.id:
  value: DocumentReference.content
element definition.path:
  value: DocumentReference.content
element definition.short:
  value: Document referenced
element definition.definition:
  value: The document and format referenced. There may be multiple content element repetitions, each with a different format.
element definition.min:
  value: 1
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.content
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Bundle(Composition+*)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text

index: 31
element.id:
  value: DocumentReference.content.id
element definition.path:
  value: DocumentReference.content.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 32
element.id:
  value: DocumentReference.content.extension
element definition.path:
  value: DocumentReference.content.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 33
element.id:
  value: DocumentReference.content.modifierExtension
element definition.path:
  value: DocumentReference.content.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 34
element.id:
  value: DocumentReference.content.attachment
element definition.path:
  value: DocumentReference.content.attachment
element definition.short:
  value: Where to access the document
element definition.definition:
  value: The document or URL of the document along with critical metadata to prove content has integrity.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.content.attachment
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Attachment
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.language, Composition.title, Composition.date
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-3 for mime type
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date

index: 35
element.id:
  value: DocumentReference.content.format
element definition.path:
  value: DocumentReference.content.format
element definition.short:
  value: Format/content rules for the document
element definition.definition:
  value: An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.
element definition.comment:
  value: Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.content.format
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Coding
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/format-codes
    link: http://ehealth.sundhed.dk/vs/format-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.meta.profile
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.formatCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: derived from the IHE Profile or Implementation Guide templateID

index: 36
element.id:
  value: DocumentReference.context
element definition.path:
  value: DocumentReference.context
element definition.short:
  value: Clinical context of document
element definition.definition:
  value: The clinical context in which the document was prepared.
element definition.comment:
  value: These values are primarily added to help with searching for interesting/relevant documents.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: outboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']

index: 37
element.id:
  value: DocumentReference.context.id
element definition.path:
  value: DocumentReference.context.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 38
element.id:
  value: DocumentReference.context.extension
element definition.path:
  value: DocumentReference.context.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 39
element.id:
  value: DocumentReference.context.modifierExtension
element definition.path:
  value: DocumentReference.context.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 40
element.id:
  value: DocumentReference.context.encounter
element definition.path:
  value: DocumentReference.context.encounter
element definition.short:
  value: Context of the document content
element definition.definition:
  value: Describes the clinical encounter or type of care that the document content is associated with.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.encounter
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1
    index: 0
    link: 4.0
    link: .1
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare|4.0.1
    index: 1
    link: 4.0
    link: .1
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.context
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.context
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.encounter
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()], priorityNumber)/target[moodCode="EVN" and classCode=("ENC", "PCPR") and isNormalAct])

index: 41
element.id:
  value: DocumentReference.context.event
element definition.path:
  value: DocumentReference.context.event
element definition.short:
  value: Main clinical acts documented
element definition.definition:
  value: This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.
element definition.comment:
  value: An event can further specialize the act inherent in the type, such as where it is simply "Procedure Report" and the procedure was a "colonoscopy". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.event
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/event-type-codes
    link: http://ehealth.sundhed.dk/vs/event-type-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.event.code
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .code
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.eventCodeList

index: 42
element.id:
  value: DocumentReference.context.period
element definition.path:
  value: DocumentReference.context.period
element definition.short:
  value: Time of service that is being documented
element definition.definition:
  value: The time period over which the service that is described by the document was provided.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.period
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Period
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.event.period
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .effectiveTime
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/low/ @value --> ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/high/ @value

index: 43
element.id:
  value: DocumentReference.context.facilityType
element definition.path:
  value: DocumentReference.context.facilityType
element definition.short:
  value: Kind of facility where patient was seen
element definition.definition:
  value: The kind of facility where the patient was seen.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.facilityType
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/facility-type-codes
    link: http://ehealth.sundhed.dk/vs/facility-type-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: usually from a mapping to a local ValueSet
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="LOC"].role[classCode="DSDLOC"].code
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.healthcareFacilityTypeCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code

index: 44
element.id:
  value: DocumentReference.context.practiceSetting
element definition.path:
  value: DocumentReference.context.practiceSetting
element definition.short:
  value: Additional details about where the content was created (e.g. clinical specialty)
element definition.definition:
  value: This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.
element definition.comment:
  value: This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.
element definition.requirements:
  value: This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.practiceSetting
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/practice-setting-codes
    link: http://ehealth.sundhed.dk/vs/practice-setting-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: usually from a mapping to a local ValueSet
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="LOC"].role[classCode="DSDLOC"].code
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.practiceSettingCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: usually from a mapping to a local ValueSet

index: 45
element.id:
  value: DocumentReference.context.sourcePatientInfo
element definition.path:
  value: DocumentReference.context.sourcePatientInfo
element definition.short:
  value: Patient demographics from source
element definition.definition:
  value: The Patient Information as known when the document was published. May be a reference to a version specific, or contained.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.sourcePatientInfo
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.subject
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="SBJ"].role[typeCode="PAT"]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/recordTarget/

index: 46
element.id:
  value: DocumentReference.context.related
element definition.path:
  value: DocumentReference.context.related
element definition.short:
  value: Related identifiers or resources
element definition.definition:
  value: Related identifiers or resources associated with the DocumentReference.
element definition.comment:
  value: May be identifiers or resources that caused the DocumentReference or referenced Document to be created.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.related
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    index: 0
    link: 4.0
    link: .1
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.event.detail
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./outboundRelationship[typeCode="PERT" and isNormalActRelationship()] / target[isNormalAct]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.referenceIdList
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/relatedDocument

structure definition.differential.element:
  index: 0
  element.id:
    value: DocumentReference
  element definition.path:
    value: DocumentReference
structure definition.differential.element:
  index: 1
  element.id:
    value: DocumentReference.extension
  element definition.path:
    value: DocumentReference.extension
  element definition.slicing:
    element definition.slicing.discriminator:
      index: 0
      element definition.slicing.discriminator.type:
        value: value
      element definition.slicing.discriminator.path:
        value: url
    element definition.slicing.ordered:
      value: false
    element definition.slicing.rules:
      value: open
structure definition.differential.element:
  index: 2
  element.id:
    value: DocumentReference.extension:manuallyDeprecated
  element definition.path:
    value: DocumentReference.extension
  element definition.slice name:
    value: manuallyDeprecated
  element definition.min:
    value: 0
  element definition.max:
    value: 1
  element definition.type:
    index: 0
    element definition.type.code:
      value: Extension
    element definition.type.profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
structure definition.differential.element:
  index: 3
  element.id:
    value: DocumentReference.extension:documentSharingState
  element definition.path:
    value: DocumentReference.extension
  element definition.slice name:
    value: documentSharingState
  element definition.min:
    value: 0
  element definition.max:
    value: *
  element definition.type:
    index: 0
    element definition.type.code:
      value: Extension
    element definition.type.profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
structure definition.differential.element:
  index: 4
  element.id:
    value: DocumentReference.type
  element definition.path:
    value: DocumentReference.type
  element definition.binding:
    element definition.binding.strength:
      value: required
    element definition.binding.value set:
      value: http://ehealth.sundhed.dk/vs/document-type
      link: http://ehealth.sundhed.dk/vs/document-type
structure definition.differential.element:
  index: 5
  element.id:
    value: DocumentReference.category
  element definition.path:
    value: DocumentReference.category
  element definition.max:
    value: 1
  element definition.binding:
    element definition.binding.strength:
      value: required
    element definition.binding.value set:
      value: http://ehealth.sundhed.dk/vs/document-class
      link: http://ehealth.sundhed.dk/vs/document-class
structure definition.differential.element:
  index: 6
  element.id:
    value: DocumentReference.subject
  element definition.path:
    value: DocumentReference.subject
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      index: 1
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    element definition.type.target profile:
      value: http://hl7.org/fhir/StructureDefinition/Group
      index: 2
      link: http://hl7.org/fhir/StructureDefinition/Group
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
      index: 3
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    element definition.type.aggregation:
      value: referenced
      index: 0
structure definition.differential.element:
  index: 7
  element.id:
    value: DocumentReference.author
  element definition.path:
    value: DocumentReference.author
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      index: 1
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
      index: 2
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
      index: 3
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
      index: 4
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
    element definition.type.aggregation:
      value: referenced
      index: 0
structure definition.differential.element:
  index: 8
  element.id:
    value: DocumentReference.authenticator
  element definition.path:
    value: DocumentReference.authenticator
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      index: 1
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    element definition.type.aggregation:
      value: referenced
      index: 0
structure definition.differential.element:
  index: 9
  element.id:
    value: DocumentReference.custodian
  element definition.path:
    value: DocumentReference.custodian
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    element definition.type.aggregation:
      value: referenced
      index: 0
structure definition.differential.element:
  index: 10
  element.id:
    value: DocumentReference.relatesTo.target
  element definition.path:
    value: DocumentReference.relatesTo.target
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference
      index: 0
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference

index: 11
element.id:
  value: DocumentReference.content.format
element definition.path:
  value: DocumentReference.content.format
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/format-codes
    link: http://ehealth.sundhed.dk/vs/format-codes

index: 12
element.id:
  value: DocumentReference.context.event
element definition.path:
  value: DocumentReference.context.event
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/event-type-codes
    link: http://ehealth.sundhed.dk/vs/event-type-codes

index: 13
element.id:
  value: DocumentReference.context.facilityType
element definition.path:
  value: DocumentReference.context.facilityType
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/facility-type-codes
    link: http://ehealth.sundhed.dk/vs/facility-type-codes

index: 14
element.id:
  value: DocumentReference.context.practiceSetting
element definition.path:
  value: DocumentReference.context.practiceSetting
element definition.binding:
  element definition.binding.strength:
    value: required
  element definition.binding.value set:
    value: http://ehealth.sundhed.dk/vs/practice-setting-codes
    link: http://ehealth.sundhed.dk/vs/practice-setting-codes

index: 15
element.id:
  value: DocumentReference.context.sourcePatientInfo
element definition.path:
  value: DocumentReference.context.sourcePatientInfo
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    index: 0
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient