ehealth-transformation-documentreference
type: StructureDefinition
node role: treeRoot
id:
  v: ehealth-transformation-documentreference
text:
  status:
    v: extensions
  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…
url:
  v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-transformation-documentreference
version:
  v: 6.0.0
name:
  v: ehealth-transformation-documentreference
status:
  v: active
date:
  v: 2025-10-23T10:15:36+00:00
publisher:
  v: Den telemedicinske infrastruktur (eHealth Infrastructure)
contact:
  name:
    v: Den telemedicinske infrastruktur (eHealth Infrastructure)
  telecom:
    system:
      v: url
    value:
      v: http://ehealth.sundhed.dk
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: DK
    display:
      v: Denmark
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: fhircomposition
  uri:
    v: http://hl7.org/fhir/composition
  name:
    v: FHIR Composition
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: cda
  uri:
    v: http://hl7.org/v3/cda
  name:
    v: CDA (R2)
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: xds
  uri:
    v: http://ihe.net/xds
  name:
    v: XDS metadata equivalent
kind:
  v: resource
abstract:
  v: false
type:
  v: DocumentReference
base definition:
  v: http://hl7.org/fhir/StructureDefinition/DocumentReference
  link: http://hl7.org/fhir/StructureDefinition/DocumentReference
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 4.0.1
  element:
    id:
      v: DocumentReference
    path:
      v: DocumentReference
    short:
      v: A reference to a document
    definition:
      v: 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.
    comment:
      v: Usually, this is used for documents other than those defined by FHIR.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: DocumentReference
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: 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
      expression:
        v: 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()
      xpath:
        v: 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='#'])]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-5
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a security label
      expression:
        v: contained.meta.security.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      extension:
        value: boolean
      extension:
        value: markdown
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    is modifier:
      v: false

boolean
v: true

markdown
v: 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.

v: false

identity:
  v: rim
map:
  v: Entity. Role, or Act

identity:
  v: workflow
map:
  v: Event

identity:
  v: fhircomposition
map:
  v: when describing a Composition

identity:
  v: rim
map:
  v: Document[classCode="DOC" and moodCode="EVN"]

identity:
  v: cda
map:
  v: when describing a CDA

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

id:
  v: DocumentReference.meta
path:
  v: DocumentReference.meta
short:
  v: Metadata about the resource
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: DocumentReference.implicitRules
path:
  v: DocumentReference.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: true
is modifier reason:
  v: 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
is summary:
  v: true

id:
  v: DocumentReference.language
path:
  v: DocumentReference.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: 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).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    value: canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages|4.0.1
    link: 4.0
    link: .1

id:
  v: DocumentReference.text
path:
  v: DocumentReference.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: DocumentReference.contained
path:
  v: DocumentReference.contained
short:
  v: Contained, inline Resources
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

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

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

id:
  v: DocumentReference.modifierExtension
path:
  v: DocumentReference.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: DocumentReference.masterIdentifier
path:
  v: DocumentReference.masterIdentifier
short:
  v: Master Version Specific Identifier
definition:
  v: 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.
comment:
  v: CDA Document Id extension and root.
requirements:
  v: 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.).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.masterIdentifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.identifier
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.identifier
mapping:
  identity:
    v: v2
  map:
    v: TXA-12
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.uniqueId
mapping:
  identity:
    v: cda
  map:
    v: ClinicalDocument/id

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

id:
  v: DocumentReference.status
path:
  v: DocumentReference.status
short:
  v: current | superseded | entered-in-error
definition:
  v: The status of this document reference.
comment:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: DocumentReference.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: true
is modifier reason:
  v: 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
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: DocumentReferenceStatus
  strength:
    v: required
  description:
    v: The status of the document reference.
  value set:
    v: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: workflow
  map:
    v: Event.status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: v2
  map:
    v: TXA-19
mapping:
  identity:
    v: rim
  map:
    v: 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"
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.availabilityStatus

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

id:
  v: DocumentReference.type
path:
  v: DocumentReference.type
short:
  v: Kind of document (LOINC if possible)
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/document-type
    link: http://ehealth.sundhed.dk/vs/document-type
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.type
mapping:
  identity:
    v: v2
  map:
    v: TXA-2
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.type
mapping:
  identity:
    v: cda
  map:
    v: 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.

id:
  v: DocumentReference.category
path:
  v: DocumentReference.category
short:
  v: Categorization of document
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: claxs
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/document-class
    link: http://ehealth.sundhed.dk/vs/document-class
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.class
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.class
mapping:
  identity:
    v: cda
  map:
    v: 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

id:
  v: DocumentReference.subject
path:
  v: DocumentReference.subject
short:
  v: Who/what is the subject of the document
definition:
  v: 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).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.subject
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    link: http://hl7.org/fhir/StructureDefinition/Group
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
  aggregation:
    v: referenced
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.subject
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.subject
mapping:
  identity:
    v: v2
  map:
    v: PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="SBJ"].role[typeCode="PAT"]
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.patientId
mapping:
  identity:
    v: cda
  map:
    v: ClinicalDocument/recordTarget/
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

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

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

id:
  v: DocumentReference.authenticator
path:
  v: DocumentReference.authenticator
short:
  v: Who/what authenticated the document
definition:
  v: Which person or organization authenticates that this document is valid.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.authenticator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
  aggregation:
    v: referenced
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.actor
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.attester
mapping:
  identity:
    v: v2
  map:
    v: TXA-10
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.legalAuthenticator
mapping:
  identity:
    v: cda
  map:
    v: ClinicalDocument/legalAuthenticator

id:
  v: DocumentReference.custodian
path:
  v: DocumentReference.custodian
short:
  v: Organization which maintains the document
definition:
  v: Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.
comment:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DocumentReference.custodian
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
  aggregation:
    v: referenced
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.actor
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.custodian
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]

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

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

id:
  v: DocumentReference.relatesTo.extension
path:
  v: DocumentReference.relatesTo.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: DocumentReference.relatesTo.modifierExtension
path:
  v: DocumentReference.relatesTo.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

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

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

id:
  v: DocumentReference.securityLabel
path:
  v: DocumentReference.securityLabel
short:
  v: Document security-tags
definition:
  v: 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.
comment:
  v: 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.
requirements:
  v: Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DocumentReference.securityLabel
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SecurityLabels
  strength:
    v: extensible
  description:
    v: Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-labels|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.confidentiality, Composition.meta.security
mapping:
  identity:
    v: v2
  map:
    v: TXA-18
mapping:
  identity:
    v: rim
  map:
    v: .confidentialityCode
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.confidentialityCode
mapping:
  identity:
    v: cda
  map:
    v: ClinicalDocument/confidentialityCode/@code

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

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

id:
  v: DocumentReference.content.extension
path:
  v: DocumentReference.content.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: DocumentReference.content.modifierExtension
path:
  v: DocumentReference.content.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

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

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

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

id:
  v: DocumentReference.context.extension
path:
  v: DocumentReference.context.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: DocumentReference.context.modifierExtension
path:
  v: DocumentReference.context.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

id:
  v: DocumentReference.context.event
path:
  v: DocumentReference.context.event
short:
  v: Main clinical acts documented
definition:
  v: 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.
comment:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DocumentReference.context.event
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: required
  value set:
    v: http://ehealth.sundhed.dk/vs/event-type-codes
    link: http://ehealth.sundhed.dk/vs/event-type-codes
mapping:
  identity:
    v: fhircomposition
  map:
    v: Composition.event.code
mapping:
  identity:
    v: rim
  map:
    v: .code
mapping:
  identity:
    v: xds
  map:
    v: DocumentEntry.eventCodeList

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

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

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

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

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

element:
  id:
    v: DocumentReference
  path:
    v: DocumentReference
element:
  id:
    v: DocumentReference.extension
  path:
    v: DocumentReference.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
element:
  id:
    v: DocumentReference.extension:manuallyDeprecated
  path:
    v: DocumentReference.extension
  slice name:
    v: manuallyDeprecated
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-manuallydeprecated-type
element:
  id:
    v: DocumentReference.extension:documentSharingState
  path:
    v: DocumentReference.extension
  slice name:
    v: documentSharingState
  min:
    v: 0
  max:
    v: *
  type:
    code:
      v: Extension
    profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-document-sharing-state
element:
  id:
    v: DocumentReference.type
  path:
    v: DocumentReference.type
  binding:
    strength:
      v: required
    value set:
      v: http://ehealth.sundhed.dk/vs/document-type
      link: http://ehealth.sundhed.dk/vs/document-type
element:
  id:
    v: DocumentReference.category
  path:
    v: DocumentReference.category
  max:
    v: 1
  binding:
    strength:
      v: required
    value set:
      v: http://ehealth.sundhed.dk/vs/document-class
      link: http://ehealth.sundhed.dk/vs/document-class
element:
  id:
    v: DocumentReference.subject
  path:
    v: DocumentReference.subject
  type:
    code:
      v: Reference
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Group
      link: http://hl7.org/fhir/StructureDefinition/Group
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    aggregation:
      v: referenced
element:
  id:
    v: DocumentReference.author
  path:
    v: DocumentReference.author
  type:
    code:
      v: Reference
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-relatedperson
    aggregation:
      v: referenced
element:
  id:
    v: DocumentReference.authenticator
  path:
    v: DocumentReference.authenticator
  type:
    code:
      v: Reference
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-practitioner
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    aggregation:
      v: referenced
element:
  id:
    v: DocumentReference.custodian
  path:
    v: DocumentReference.custodian
  type:
    code:
      v: Reference
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-organization
    aggregation:
      v: referenced
element:
  id:
    v: DocumentReference.relatesTo.target
  path:
    v: DocumentReference.relatesTo.target
  type:
    code:
      v: Reference
    target profile:
      v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference
      link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-documentreference
element:
  id:
    v: DocumentReference.content.format
  path:
    v: DocumentReference.content.format
  binding:
    strength:
      v: required
    value set:
      v: http://ehealth.sundhed.dk/vs/format-codes
      link: http://ehealth.sundhed.dk/vs/format-codes
element:
  id:
    v: DocumentReference.context.event
  path:
    v: DocumentReference.context.event
  binding:
    strength:
      v: required
    value set:
      v: http://ehealth.sundhed.dk/vs/event-type-codes
      link: http://ehealth.sundhed.dk/vs/event-type-codes
element:
  id:
    v: DocumentReference.context.facilityType
  path:
    v: DocumentReference.context.facilityType
  binding:
    strength:
      v: required
    value set:
      v: http://ehealth.sundhed.dk/vs/facility-type-codes
      link: http://ehealth.sundhed.dk/vs/facility-type-codes
element:
  id:
    v: DocumentReference.context.practiceSetting

v: DocumentReference.context.practiceSetting

strength:
  v: required
value set:
  v: http://ehealth.sundhed.dk/vs/practice-setting-codes
  link: http://ehealth.sundhed.dk/vs/practice-setting-codes

id:
  v: DocumentReference.context.sourcePatientInfo
path:
  v: DocumentReference.context.sourcePatientInfo
type:
  code:
    v: Reference
  target profile:
    v: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient
    link: http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-patient