<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://capable-project.eu/data/fhir/StructureDefinition/Observation_Profile" />
  <version value="v0.1" />
  <name value="Observation_Profile" />
  <status value="draft" />
  <date value="2021-06-09" />
  <publisher value="Capable team" />
  <description value="Second attempt to profile the Observation resource" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.identifier">
      <path value="Observation.identifier" />
      <max value="1" />
    </element>
    <element id="Observation.identifier.use">
      <path value="Observation.identifier.use" />
      <max value="0" />
    </element>
    <element id="Observation.identifier.type">
      <path value="Observation.identifier.type" />
      <max value="0" />
    </element>
    <element id="Observation.identifier.period">
      <path value="Observation.identifier.period" />
      <max value="0" />
    </element>
    <element id="Observation.identifier.assigner">
      <path value="Observation.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn" />
      <max value="0" />
    </element>
    <element id="Observation.partOf">
      <path value="Observation.partOf" />
      <max value="0" />
    </element>
    <element id="Observation.status">
      <path value="Observation.status" />
      <fixedCode value="final" />
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <max value="0" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <binding>
        <strength value="required" />
        <valueSet value="http://capable-project.eu/data/fhir/ValueSet/observation-codes" />
      </binding>
    </element>
    <element id="Observation.code.coding">
      <path value="Observation.code.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.code.coding.system">
      <path value="Observation.code.coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.code.coding.version">
      <path value="Observation.code.coding.version" />
      <max value="0" />
    </element>
    <element id="Observation.code.coding.code">
      <path value="Observation.code.coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.code.coding.userSelected">
      <path value="Observation.code.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Observation.code.text">
      <path value="Observation.code.text" />
      <max value="0" />
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="Observation.subject.reference">
      <path value="Observation.subject.reference" />
      <min value="1" />
    </element>
    <element id="Observation.subject.type">
      <path value="Observation.subject.type" />
      <max value="0" />
    </element>
    <element id="Observation.subject.identifier">
      <path value="Observation.subject.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.focus">
      <path value="Observation.focus" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" />
      </type>
    </element>
    <element id="Observation.focus.reference">
      <path value="Observation.focus.reference" />
      <min value="1" />
    </element>
    <element id="Observation.focus.type">
      <path value="Observation.focus.type" />
      <max value="0" />
    </element>
    <element id="Observation.focus.identifier">
      <path value="Observation.focus.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.focus.display">
      <path value="Observation.focus.display" />
      <max value="0" />
    </element>
    <element id="Observation.encounter">
      <path value="Observation.encounter" />
      <max value="0" />
    </element>
    <element id="Observation.effective[x]">
      <path value="Observation.effective[x]" />
      <min value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Observation.issued">
      <path value="Observation.issued" />
      <max value="0" />
    </element>
    <element id="Observation.performer">
      <path value="Observation.performer" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
      </type>
    </element>
    <element id="Observation.performer.reference">
      <path value="Observation.performer.reference" />
      <max value="0" />
    </element>
    <element id="Observation.performer.type">
      <path value="Observation.performer.type" />
      <min value="1" />
    </element>
    <element id="Observation.performer.identifier">
      <path value="Observation.performer.identifier" />
      <max value="0" />
    </element>
    <element id="Observation.performer.display">
      <path value="Observation.performer.display" />
      <max value="0" />
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]" />
      <type>
        <code value="Quantity" />
        <profile value="http://capable-project.eu/data/fhir/StructureDefinition/Quantity_Profile" />
      </type>
      <type>
        <code value="CodeableConcept" />
        <profile value="http://capable-project.eu/data/fhir/StructureDefinition/CodeableConcept_Profile" />
      </type>
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Observation.dataAbsentReason">
      <path value="Observation.dataAbsentReason" />
      <max value="0" />
    </element>
    <element id="Observation.interpretation">
      <path value="Observation.interpretation" />
      <max value="1" />
    </element>
    <element id="Observation.interpretation.coding">
      <path value="Observation.interpretation.coding" />
      <max value="0" />
    </element>
    <element id="Observation.interpretation.text">
      <path value="Observation.interpretation.text" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.note">
      <path value="Observation.note" />
      <max value="1" />
    </element>
    <element id="Observation.note.author[x]">
      <path value="Observation.note.author[x]" />
      <max value="0" />
    </element>
    <element id="Observation.note.time">
      <path value="Observation.note.time" />
      <max value="0" />
    </element>
    <element id="Observation.bodySite">
      <path value="Observation.bodySite" />
      <binding>
        <strength value="required" />
        <valueSet value="http://capable-project.eu/data/fhir/ValueSet/body-parts" />
      </binding>
    </element>
    <element id="Observation.bodySite.coding">
      <path value="Observation.bodySite.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.bodySite.coding.system">
      <path value="Observation.bodySite.coding.system" />
      <min value="1" />
    </element>
    <element id="Observation.bodySite.coding.version">
      <path value="Observation.bodySite.coding.version" />
      <max value="0" />
    </element>
    <element id="Observation.bodySite.coding.code">
      <path value="Observation.bodySite.coding.code" />
      <min value="1" />
    </element>
    <element id="Observation.bodySite.coding.userSelected">
      <path value="Observation.bodySite.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Observation.bodySite.text">
      <path value="Observation.bodySite.text" />
      <max value="0" />
    </element>
    <element id="Observation.method">
      <path value="Observation.method" />
      <max value="0" />
    </element>
    <element id="Observation.specimen">
      <path value="Observation.specimen" />
      <max value="0" />
    </element>
    <element id="Observation.device">
      <path value="Observation.device" />
      <max value="0" />
    </element>
    <element id="Observation.referenceRange">
      <path value="Observation.referenceRange" />
      <max value="0" />
    </element>
    <element id="Observation.hasMember">
      <path value="Observation.hasMember" />
      <max value="0" />
    </element>
    <element id="Observation.derivedFrom">
      <path value="Observation.derivedFrom" />
      <max value="0" />
    </element>
    <element id="Observation.component">
      <path value="Observation.component" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>