<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="d7c57452-28fd-4123-80cf-e314833f2d3a" />
  <meta>
    <lastUpdated value="2021-08-04T08:30:38.477+00:00" />
  </meta>
  <text>
    <status value="extensions" />
    <div xmlns="http://www.w3.org/1999/xhtml" />
  </text>
  <url value="http://pbme.solutions/fhir/StructureDefinition/PBMEncounter" />
  <name value="PBMEncounter" />
  <status value="draft" />
  <date value="2021-04-14T13:26:33.0729005+00:00" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Encounter" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Encounter" />
  <derivation value="constraint" />
  <differential>
    <element id="Encounter.identifier">
      <path value="Encounter.identifier" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.identifier.system">
      <path value="Encounter.identifier.system" />
      <comment value="Identifier.system is always case sensitive.&#xD;&#xA;&#xD;&#xA;For PBMe.Solutions, it shall be consistent in this format: &#xD;&#xA;http://pbme.solutions/[localHospitalName]/fhir/" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.identifier.value">
      <path value="Encounter.identifier.value" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.status">
      <path value="Encounter.status" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class">
      <path value="Encounter.class" />
      <comment value="Use a Code from here: https://terminology.hl7.org/2.1.0/ValueSet-v3-ActEncounterCode.html&#xD;&#xA;&#xD;&#xA;Relevant for PBMe.Solutions is IMP (impatient encounter)" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class.system">
      <path value="Encounter.class.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/ValueSet/v3-ActEncounterCode" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.class.code">
      <path value="Encounter.class.code" />
      <comment value="Use a Code from here: https://terminology.hl7.org/2.1.0/ValueSet-v3-ActEncounterCode.html&#xD;&#xA;&#xD;&#xA;Relevant for PBMe.Solutions is IMP (impatient encounter)" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType">
      <path value="Encounter.serviceType" />
      <comment value="The department code is a designation of the billing-oriented classification of the organization based on the corresponding services.&#xD;&#xA;This is the relevant code to define the filterable department in the solution.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Der Fachabteilungschlüssel ist eine Bezeichnung der abrechnungsorientierten Einteilung der Organisation auf Basis der entsprechenden Leistungen.&#xD;&#xA;Nach diesem Code wird die Auswahl der Fachabteilung in der Lösung bestimmt" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType.coding">
      <path value="Encounter.serviceType.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType.coding.system">
      <path value="Encounter.serviceType.coding.system" />
      <fixedUri value="https://www.medizininformatik-initiative.de/fhir/core/modul-fall/CodeSystem/Fachabteilungsschluessel" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.serviceType.coding.code">
      <path value="Encounter.serviceType.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject">
      <path value="Encounter.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject.reference">
      <path value="Encounter.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.subject.type">
      <path value="Encounter.subject.type" />
      <fixedUri value="Patient" />
    </element>
    <element id="Encounter.episodeOfCare">
      <path value="Encounter.episodeOfCare" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.episodeOfCare.reference">
      <path value="Encounter.episodeOfCare.reference" />
      <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.&#xD;&#xA;&#xD;&#xA;To be able to allow delta changes etc. use PUT for transfer an use references like this:&#xD;&#xA;&#xD;&#xA;EpisodeOfCare?identifier=localHospitalName|episodeOfCareID" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period">
      <path value="Encounter.period" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period.start">
      <path value="Encounter.period.start" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.period.end">
      <path value="Encounter.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis">
      <path value="Encounter.diagnosis" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.condition">
      <path value="Encounter.diagnosis.condition" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.condition.reference">
      <path value="Encounter.diagnosis.condition.reference" />
      <comment value="To be able to allow delta changes etc. use PUT for transfer an use references like this:&#xD;&#xA;&#xD;&#xA;Condition?identifier=localHospitalName|conditionID" />
      <min value="1" />
    </element>
    <element id="Encounter.diagnosis.use">
      <path value="Encounter.diagnosis.use" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.diagnosis.use.coding">
      <path value="Encounter.diagnosis.use.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Encounter.diagnosis.use.coding.system">
      <path value="Encounter.diagnosis.use.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/diagnosis-role" />
    </element>
    <element id="Encounter.diagnosis.use.coding.code">
      <path value="Encounter.diagnosis.use.coding.code" />
      <comment value="Please use one of the following:&#xD;&#xA;&#xD;&#xA;AD - Admission diagnosis&#xD;&#xA;DD - Discharge diagnosis&#xD;&#xA;CC - Chief complaint&#xD;&#xA;CM - Comorbidity diagnosis&#xD;&#xA;pre-op - pre-op diagnosis&#xD;&#xA;post- - post-op diagnosis" />
      <min value="1" />
    </element>
    <element id="Encounter.diagnosis.rank">
      <path value="Encounter.diagnosis.rank" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.hospitalization.reAdmission">
      <path value="Encounter.hospitalization.reAdmission" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.hospitalization.reAdmission.coding.system">
      <path value="Encounter.hospitalization.reAdmission.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0092" />
    </element>
    <element id="Encounter.hospitalization.reAdmission.coding.code">
      <path value="Encounter.hospitalization.reAdmission.coding.code" />
      <fixedCode value="R" />
    </element>
    <element id="Encounter.location">
      <path value="Encounter.location" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location">
      <path value="Encounter.location.location" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location.identifier.system">
      <path value="Encounter.location.location.identifier.system" />
      <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique.&#xD;&#xA;&#xD;&#xA;Either use http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel &#xD;&#xA;or&#xD;&#xA;http://snomed.info/sct (with entry below 309912009 | Medical department (environment) |)" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location.identifier.value">
      <path value="Encounter.location.location.identifier.value" />
      <comment value="Use one of the following codes:&#xD;&#xA;&#xD;&#xA;https://simplifier.net/packages/de.basisprofil.r4/1.0.0-alpha9/files/342446&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;http://snomed.info/sct (with entry under 309912009 | Medical department (environment) |)" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location.identifier.period">
      <path value="Encounter.location.location.identifier.period" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location.identifier.period.start">
      <path value="Encounter.location.location.identifier.period.start" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.location.identifier.period.end">
      <path value="Encounter.location.location.identifier.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.status">
      <path value="Encounter.location.status" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.period">
      <path value="Encounter.location.period" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.period.start">
      <path value="Encounter.location.period.start" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Encounter.location.period.end">
      <path value="Encounter.location.period.end" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>