<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ext-Context-EpisodeOfCare" />
  <text>
    <status value="empty" />
    <div xmlns="http://www.w3.org/1999/xhtml">No narrative is provided for definitional resources. A human-readable rendering can be found in the implementation guide(s) where this resource is used.</div>
  </text>
  <url value="http://nictiz.nl/fhir/StructureDefinition/ext-Context-EpisodeOfCare" />
  <name value="ExtContextEpisodeOfCare" />
  <title value="ext Context EpisodeOfCare" />
  <status value="draft" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="url" />
      <value value="https://www.nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="`Observation.context` and `MedicationRequest.context` have been renamed and remodeled in R4 to only contain a reference to Encounter. `MedicationStatement.context` and `MedicationAdministration.context` are a `0..1` reference to Encounter|EpisodeOfCare. This extension allows to add a reference to EpisodeOfCare (potentially next to a reference to an Encounter). From R5 onwards, this extension will likely be replaced by an HL7 core extension." />
  <purpose value="This extension provides a generic method to add a reference to an EpisodeOfCare resource." />
  <copyright value="Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="Observation" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationRequest" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationAdministration.context" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationStatement.context" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://nictiz.nl/fhir/StructureDefinition/ext-Context-EpisodeOfCare" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <short value="EpisodeOfCare" />
      <definition value="Identifies the episode(s) of care that this resource is relevant to. Establishes the EpisodeOfCare as a 'grouper' of resources that are relevant to that episode." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-EpisodeOfCare" />
      </type>
    </element>
  </differential>
</StructureDefinition>