HDREncounter
type: StructureDefinition
node role: treeRoot
id:
  v: HDREncounter
text:
  status:
    v: extensions
  div: Generated Narrative: StructureDefinition HDREncounter Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> HDREncounter 0..* Base A.2.3 - Encounter (eHN) #xD; type 1..1 CodeableConcept A.2.3.1 - Encounter type #xD; note 0..1 string A.2.3.2 - Encounter note #xD; admission 1..1 BackboneElement A.2.3.3 - Admission #xD; urgency 0..1 CodeableConcept A.2.3.3.1 - Admission urgency #xD; date 1..1 dateTime A.2.3.3.2 - Admission date #xD; admitter 0..1 BackboneElement Admitting professional #xD; identifier 0..1 Identifier A.2.3.3.3 - Admitting professional ID #xD; name 0..1 HumanName A.2.3.3.4 - Admitting professional name #xD; organizationID 0..1 Identifier A.2.3.3.5 - Admitting organisation ID #xD; organization 0..1 BackboneElement A.2.3.3.6 - Admitting organisation #xD; source 0..1 CodeableConcept A.2.3.3.7 - Admit Source #xD; referringHP 0..1 BackboneElement Referring professional #xD; identifier 0..1 Identifier A.2.3.3.8 - Referring professional ID #xD; name 0..1 HumanName A.2.3.3.9 - Referring professional name #xD; organizationID 0..1 Identifier A.2.3.3.10 - Referring organisation ID #xD; organization 0..1 BackboneElement A.2.3.3.11 - Referring organisation #xD; admissionReason 1..1 BackboneElement A.2.3.4 - Admission reason #xD; code 0..* CodeableConcept A.2.3.4.1 - Admission reason #xD; comment 0..1 string A.2.3.4.2 - Admission reason comment #xD; <a href="StructureDefinition-HDREncounter-definitions.html#HDREncounter.admissionReason.legalStatus" title="Legal status/situation at admission. The legal status indicates the basis on which the patient is staying in a healthcare organisation. This can be either voluntary or involuntary, however the legal status is always determined by a court. A patient can also receive healthcare based on a forensic status. (voluntary, involuntary, admission by legal authority).">legalStatus 0..1 CodeableConcept A.2.3.4.3 - Admission legal status #xD; discharge 1..1 BackboneElem…
url:
  v: http://hl7.eu/fhir/ig/xpandh/hdr/StructureDefinition/HDREncounter
version:
  v: 0.1.0
name:
  v: HdrEHNEncounter
title:
  v: A.2.3 - Encounter (eHN)
status:
  v: draft
date:
  v: 2025-10-10T16:32:47+00:00
publisher:
  v: XpanDH Project
contact:
  name:
    v: XpanDH Project
  telecom:
    system:
      v: url
    value:
      v: https://xpandh-project.iscte-iul.pt
description:
  v: Hospital Discharge Report - Encounter - A.2.3 eHN Maturity Level: 0 Draft
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 150
    display:
      v: Europe
copyright:
  v: Used by permission of the XpanDH project, all rights reserved Creative Commons License
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: fhir
  uri:
    v: hl7.org/fhir/r4
  name:
    v: Hospital Discharge Report model to FHIR R4 Map
kind:
  v: logical
abstract:
  v: false
type:
  v: http://hl7.eu/fhir/ig/xpandh/hdr/StructureDefinition/HDREncounter
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Base
  link: http://hl7.org/fhir/StructureDefinition/Base
derivation:
  v: specialization
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 4.0.1
  element:
    id:
      v: HDREncounter
    path:
      v: HDREncounter
    short:
      v: A.2.3 - Encounter (eHN)
    definition:
      v: Hospital Discharge Report - Encounter - A.2.3 eHN Maturity Level: 0 Draft
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Base
      min:
        v: 0
      max:
        v: *
    is modifier:
      v: false
    mapping:
      identity:
        v: fhir
      map:
        v: TBD
  element:
    id:
      v: HDREncounter.type
    path:
      v: HDREncounter.type
    short:
      v: A.2.3.1 - Encounter type
    definition:
      v: The type of the encounter whether inpatient or short stay encounter.
    comment:
      v: hl7v3:ActEncounterCode
    min:
      v: 1
    max:
      v: 1
    base:
      path:
        v: HDREncounter.type
      min:
        v: 1
      max:
        v: 1
    type:
      code:
        v: CodeableConcept
    mapping:
      identity:
        v: fhir
      map:
        v: TBD
  element:
    id:
      v: HDREncounter.note
    path:
      v: HDREncounter.note
    short:
      v: A.2.3.2 - Encounter note
    definition:
      v: A narrative description of the encounter course.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: HDREncounter.note
      min:
        v: 0
      max:
        v: 1
    type:
      code:
        v: string
    mapping:
      identity:
        v: fhir
      map:
        v: TBD
  element:
    id:
      v: HDREncounter.admission
    path:
      v: HDREncounter.admission
    short:
      v: A.2.3.3 - Admission
    definition:
      v: Admission
    min:
      v: 1
    max:
      v: 1
    base:
      path:
        v: HDREncounter.admission
      min:
        v: 1
      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
    mapping:
      identity:
        v: fhir
      map:
        v: TBD
  element:
    id:
      v: HDREncounter.admission.id
    path:
      v: HDREncounter.admission.id
    representation:
      v: xmlAttr

v: Unique id for inter-element referencing

v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

v: 0

v: 1

path:
  v: Element.id
min:
  v: 0
max:
  v: 1

extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
  value: url
    v: string
code:
  v: http://hl7.org/fhirpath/System.String

v: false

v: false

identity:
  v: rim
map:
  v: n/a

id:
  v: HDREncounter.admission.extension
path:
  v: HDREncounter.admission.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.admission.modifierExtension
path:
  v: HDREncounter.admission.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: HDREncounter.admission.urgency
path:
  v: HDREncounter.admission.urgency
short:
  v: A.2.3.3.1 - Admission urgency
definition:
  v: Admission type, either emergency or planned
comment:
  v: hl7:v3-xEncounterAdmissionUrgency
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.urgency
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.date
path:
  v: HDREncounter.admission.date
short:
  v: A.2.3.3.2 - Admission date
definition:
  v: Admission date and time.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.date
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: dateTime
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.admitter
path:
  v: HDREncounter.admission.admitter
short:
  v: Admitting professional
definition:
  v: Admitting Healthcare Professional
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.admitter
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.admitter.id
path:
  v: HDREncounter.admission.admitter.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: HDREncounter.admission.admitter.extension
path:
  v: HDREncounter.admission.admitter.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.admission.admitter.modifierExtension
path:
  v: HDREncounter.admission.admitter.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: HDREncounter.admission.admitter.identifier
path:
  v: HDREncounter.admission.admitter.identifier
short:
  v: A.2.3.3.3 - Admitting professional ID
definition:
  v: The health professional identification number. Either an internal identifier assigned by a healthcare provider institution or (preferably) a national health professional ID such as the licence or registration number.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.admitter.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.admitter.name
path:
  v: HDREncounter.admission.admitter.name
short:
  v: A.2.3.3.4 - Admitting professional name
definition:
  v: Person name [the structure of the name will be the same as for the patient (given name, family name / surname)].
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.admitter.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: HumanName
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.admitter.organizationID
path:
  v: HDREncounter.admission.admitter.organizationID
short:
  v: A.2.3.3.5 - Admitting organisation ID
definition:
  v: The healthcare provider organisation identifier.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.admitter.organizationID
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.admitter.organization
path:
  v: HDREncounter.admission.admitter.organization
short:
  v: A.2.3.3.6 - Admitting organisation
definition:
  v: The healthcare provider organisation information.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.admitter.organization
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.source
path:
  v: HDREncounter.admission.source
short:
  v: A.2.3.3.7 - Admit Source
definition:
  v: From where the patient was admitted (e.g. physician referral, transfer).
comment:
  v: Hl7:admit-source
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.source
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP
path:
  v: HDREncounter.admission.referringHP
short:
  v: Referring professional
definition:
  v: Referring Healthcare Professional
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.referringHP
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.id
path:
  v: HDREncounter.admission.referringHP.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: HDREncounter.admission.referringHP.extension
path:
  v: HDREncounter.admission.referringHP.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.admission.referringHP.modifierExtension
path:
  v: HDREncounter.admission.referringHP.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: HDREncounter.admission.referringHP.identifier
path:
  v: HDREncounter.admission.referringHP.identifier
short:
  v: A.2.3.3.8 - Referring professional ID
definition:
  v: The health professional identification number. Either an internal identifier assigned by a healthcare provider institution or (preferably) a national health professional ID such as the licence or registration number.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.referringHP.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.name
path:
  v: HDREncounter.admission.referringHP.name
short:
  v: A.2.3.3.9 - Referring professional name
definition:
  v: Person name [the structure of the name will be the same as for the patient (given name, family name / surname)].
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.referringHP.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: HumanName
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.organizationID
path:
  v: HDREncounter.admission.referringHP.organizationID
short:
  v: A.2.3.3.10 - Referring organisation ID
definition:
  v: The healthcare provider organisation identifier.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.referringHP.organizationID
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.organization
path:
  v: HDREncounter.admission.referringHP.organization
short:
  v: A.2.3.3.11 - Referring organisation
definition:
  v: The healthcare provider organisation information.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admission.referringHP.organization
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason
path:
  v: HDREncounter.admissionReason
short:
  v: A.2.3.4 - Admission reason
definition:
  v: Admission reason
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.admissionReason
  min:
    v: 1
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.id
path:
  v: HDREncounter.admissionReason.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: HDREncounter.admissionReason.extension
path:
  v: HDREncounter.admissionReason.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.admissionReason.modifierExtension
path:
  v: HDREncounter.admissionReason.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: HDREncounter.admissionReason.code
path:
  v: HDREncounter.admissionReason.code
short:
  v: A.2.3.4.1 - Admission reason
definition:
  v: Reason or reasons for admission, e.g. Problem, procedure or finding.
comment:
  v: ICD-10* SNOMED CT Orphacode if rare disease is diagnosed
min:
  v: 0
max:
  v: *
base:
  path:
    v: HDREncounter.admissionReason.code
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.comment
path:
  v: HDREncounter.admissionReason.comment
short:
  v: A.2.3.4.2 - Admission reason comment
definition:
  v: Explanation of the reason for the encounter.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admissionReason.comment
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.legalStatus
path:
  v: HDREncounter.admissionReason.legalStatus
short:
  v: A.2.3.4.3 - Admission legal status
definition:
  v: Legal status/situation at admission. The legal status indicates the basis on which the patient is staying in a healthcare organisation. This can be either voluntary or involuntary, however the legal status is always determined by a court. A patient can also receive healthcare based on a forensic status. (voluntary, involuntary, admission by legal authority).
comment:
  v: SNOMED CT
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.admissionReason.legalStatus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge
path:
  v: HDREncounter.discharge
short:
  v: A.2.3.5 - Discharge
definition:
  v: Discharge
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.discharge
  min:
    v: 1
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.id
path:
  v: HDREncounter.discharge.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: HDREncounter.discharge.extension
path:
  v: HDREncounter.discharge.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.discharge.modifierExtension
path:
  v: HDREncounter.discharge.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: HDREncounter.discharge.date
path:
  v: HDREncounter.discharge.date
short:
  v: A.2.3.5.1 - Discharge date
definition:
  v: Discharge date and time
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.discharge.date
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: dateTime
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.destinationType
path:
  v: HDREncounter.discharge.destinationType
short:
  v: A.2.3.5.2 - Discharge destination type
definition:
  v: Type of location to which the patient will go after the encounter. E.g. home, hospital, nursing home, left against medical advice etc.
comment:
  v: hl7.discharge-disposition
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.discharge.destinationType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.destinationLocation
path:
  v: HDREncounter.discharge.destinationLocation
short:
  v: A.2.3.5.3 - Destination location
definition:
  v: The location/organisation to which the patient will go after the encounter. Name, address and telecommunication contact.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.discharge.destinationLocation
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location
path:
  v: HDREncounter.location
short:
  v: A.2.3.6 - Location - All locations/departments where the patient stayed (was boarded) within the hospital.
definition:
  v: Location - All locations/departments where the patient stayed (was boarded) within the hospital.
min:
  v: 0
max:
  v: *
base:
  path:
    v: HDREncounter.location
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.id
path:
  v: HDREncounter.location.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: HDREncounter.location.extension
path:
  v: HDREncounter.location.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.location.modifierExtension
path:
  v: HDREncounter.location.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: HDREncounter.location.period
path:
  v: HDREncounter.location.period
short:
  v: A.2.3.6.1 - Period
definition:
  v: Time period during which the patient was present at the location
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.location.period
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Period
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization
path:
  v: HDREncounter.location.organization
short:
  v: Organization
definition:
  v: Organization or organization part (hospital department) where the patient was present.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.location.organization
  min:
    v: 1
  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
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.id
path:
  v: HDREncounter.location.organization.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: HDREncounter.location.organization.extension
path:
  v: HDREncounter.location.organization.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
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: HDREncounter.location.organization.modifierExtension
path:
  v: HDREncounter.location.organization.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: HDREncounter.location.organization.identifier
path:
  v: HDREncounter.location.organization.identifier
short:
  v: A.2.3.6.2 - Organisation Part ID
definition:
  v: The organisation’s part identifier.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.location.organization.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.name
path:
  v: HDREncounter.location.organization.name
short:
  v: A.2.3.6.3 - Organisation Part Name
definition:
  v: Full name of the organisation part, e.g. Name of the department
min:
  v: 1
max:
  v: 1
base:
  path:
    v: HDREncounter.location.organization.name
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.details
path:
  v: HDREncounter.location.organization.details
short:
  v: A.2.3.6.4 - Organisation Part Details
definition:
  v: Address, contact names and contact details, specialty of the organisation part.
comment:
  v: SNOMED CT
min:
  v: 0
max:
  v: 1
base:
  path:
    v: HDREncounter.location.organization.details
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

element:
  id:
    v: HDREncounter
  path:
    v: HDREncounter
  short:
    v: A.2.3 - Encounter (eHN)
  definition:
    v: Hospital Discharge Report - Encounter - A.2.3 eHN Maturity Level: 0 Draft
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.type
  path:
    v: HDREncounter.type
  short:
    v: A.2.3.1 - Encounter type
  definition:
    v: The type of the encounter whether inpatient or short stay encounter.
  comment:
    v: hl7v3:ActEncounterCode
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: CodeableConcept
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.note
  path:
    v: HDREncounter.note
  short:
    v: A.2.3.2 - Encounter note
  definition:
    v: A narrative description of the encounter course.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission
  path:
    v: HDREncounter.admission
  short:
    v: A.2.3.3 - Admission
  definition:
    v: Admission
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: BackboneElement
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.urgency
  path:
    v: HDREncounter.admission.urgency
  short:
    v: A.2.3.3.1 - Admission urgency
  definition:
    v: Admission type, either emergency or planned
  comment:
    v: hl7:v3-xEncounterAdmissionUrgency
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: CodeableConcept
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.date
  path:
    v: HDREncounter.admission.date
  short:
    v: A.2.3.3.2 - Admission date
  definition:
    v: Admission date and time.
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: dateTime
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.admitter
  path:
    v: HDREncounter.admission.admitter
  short:
    v: Admitting professional
  definition:
    v: Admitting Healthcare Professional
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: BackboneElement
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.admitter.identifier
  path:
    v: HDREncounter.admission.admitter.identifier
  short:
    v: A.2.3.3.3 - Admitting professional ID
  definition:
    v: The health professional identification number. Either an internal identifier assigned by a healthcare provider institution or (preferably) a national health professional ID such as the licence or registration number.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Identifier
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.admitter.name
  path:
    v: HDREncounter.admission.admitter.name
  short:
    v: A.2.3.3.4 - Admitting professional name
  definition:
    v: Person name [the structure of the name will be the same as for the patient (given name, family name / surname)].
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: HumanName
  mapping:
    identity:
      v: fhir
    map:
      v: TBD
element:
  id:
    v: HDREncounter.admission.admitter.organizationID
  path:
    v: HDREncounter.admission.admitter.organizationID
  short:
    v: A.2.3.3.5 - Admitting organisation ID
  definition:
    v: The healthcare provider organisation identifier.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Identifier

identity:
  v: fhir
map:
  v: TBD

id:
  v: HDREncounter.admission.admitter.organization
path:
  v: HDREncounter.admission.admitter.organization
short:
  v: A.2.3.3.6 - Admitting organisation
definition:
  v: The healthcare provider organisation information.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.source
path:
  v: HDREncounter.admission.source
short:
  v: A.2.3.3.7 - Admit Source
definition:
  v: From where the patient was admitted (e.g. physician referral, transfer).
comment:
  v: Hl7:admit-source
min:
  v: 0
max:
  v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP
path:
  v: HDREncounter.admission.referringHP
short:
  v: Referring professional
definition:
  v: Referring Healthcare Professional
min:
  v: 0
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.identifier
path:
  v: HDREncounter.admission.referringHP.identifier
short:
  v: A.2.3.3.8 - Referring professional ID
definition:
  v: The health professional identification number. Either an internal identifier assigned by a healthcare provider institution or (preferably) a national health professional ID such as the licence or registration number.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.name
path:
  v: HDREncounter.admission.referringHP.name
short:
  v: A.2.3.3.9 - Referring professional name
definition:
  v: Person name [the structure of the name will be the same as for the patient (given name, family name / surname)].
min:
  v: 0
max:
  v: 1
type:
  code:
    v: HumanName
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.organizationID
path:
  v: HDREncounter.admission.referringHP.organizationID
short:
  v: A.2.3.3.10 - Referring organisation ID
definition:
  v: The healthcare provider organisation identifier.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admission.referringHP.organization
path:
  v: HDREncounter.admission.referringHP.organization
short:
  v: A.2.3.3.11 - Referring organisation
definition:
  v: The healthcare provider organisation information.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason
path:
  v: HDREncounter.admissionReason
short:
  v: A.2.3.4 - Admission reason
definition:
  v: Admission reason
min:
  v: 1
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.code
path:
  v: HDREncounter.admissionReason.code
short:
  v: A.2.3.4.1 - Admission reason
definition:
  v: Reason or reasons for admission, e.g. Problem, procedure or finding.
comment:
  v: ICD-10* SNOMED CT Orphacode if rare disease is diagnosed
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.comment
path:
  v: HDREncounter.admissionReason.comment
short:
  v: A.2.3.4.2 - Admission reason comment
definition:
  v: Explanation of the reason for the encounter.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.admissionReason.legalStatus
path:
  v: HDREncounter.admissionReason.legalStatus
short:
  v: A.2.3.4.3 - Admission legal status
definition:
  v: Legal status/situation at admission. The legal status indicates the basis on which the patient is staying in a healthcare organisation. This can be either voluntary or involuntary, however the legal status is always determined by a court. A patient can also receive healthcare based on a forensic status. (voluntary, involuntary, admission by legal authority).
comment:
  v: SNOMED CT
min:
  v: 0
max:
  v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge
path:
  v: HDREncounter.discharge
short:
  v: A.2.3.5 - Discharge
definition:
  v: Discharge
min:
  v: 1
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.date
path:
  v: HDREncounter.discharge.date
short:
  v: A.2.3.5.1 - Discharge date
definition:
  v: Discharge date and time
min:
  v: 1
max:
  v: 1
type:
  code:
    v: dateTime
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.destinationType
path:
  v: HDREncounter.discharge.destinationType
short:
  v: A.2.3.5.2 - Discharge destination type
definition:
  v: Type of location to which the patient will go after the encounter. E.g. home, hospital, nursing home, left against medical advice etc.
comment:
  v: hl7.discharge-disposition
min:
  v: 0
max:
  v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.discharge.destinationLocation
path:
  v: HDREncounter.discharge.destinationLocation
short:
  v: A.2.3.5.3 - Destination location
definition:
  v: The location/organisation to which the patient will go after the encounter. Name, address and telecommunication contact.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: CodeableConcept
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location
path:
  v: HDREncounter.location
short:
  v: A.2.3.6 - Location - All locations/departments where the patient stayed (was boarded) within the hospital.
definition:
  v: Location - All locations/departments where the patient stayed (was boarded) within the hospital.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.period
path:
  v: HDREncounter.location.period
short:
  v: A.2.3.6.1 - Period
definition:
  v: Time period during which the patient was present at the location
min:
  v: 1
max:
  v: 1
type:
  code:
    v: Period
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization
path:
  v: HDREncounter.location.organization
short:
  v: Organization
definition:
  v: Organization or organization part (hospital department) where the patient was present.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.identifier
path:
  v: HDREncounter.location.organization.identifier
short:
  v: A.2.3.6.2 - Organisation Part ID
definition:
  v: The organisation’s part identifier.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Identifier
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.name
path:
  v: HDREncounter.location.organization.name
short:
  v: A.2.3.6.3 - Organisation Part Name
definition:
  v: Full name of the organisation part, e.g. Name of the department
min:
  v: 1
max:
  v: 1
type:
  code:
    v: string
mapping:
  identity:
    v: fhir
  map:
    v: TBD

id:
  v: HDREncounter.location.organization.details
path:
  v: HDREncounter.location.organization.details
short:
  v: A.2.3.6.4 - Organisation Part Details
definition:
  v: Address, contact names and contact details, specialty of the organisation part.
comment:
  v: SNOMED CT
min:
  v: 0
max:
  v: 1
type:
  code:
    v: BackboneElement
mapping:
  identity:
    v: fhir
  map:
    v: TBD