<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="0aa38720-bb4e-4f79-9ffc-5a4759e8dab2" />
  <meta>
    <lastUpdated value="2022-12-05T18:40:38.0514577+00:00" />
  </meta>
  <url value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-profile-Patient" />
  <version value="2.0.0" />
  <name value="Patient" />
  <status value="active" />
  <date value="2022-12-05T18:48:04.8910587+00:00" />
  <description value="Demographics and other administrative information about an individual receiving care or other health-related services." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="OLIS-HL7-v2" />
    <name value="OLIS HL7 v2" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient.id">
      <path value="Patient.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.meta">
      <path value="Patient.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.meta.profile">
      <path value="Patient.meta.profile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-lab-profile-Patient|2.0.0" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <short value="An identifier for this patient which can be Ontario HCN or Lab MRN" />
      <definition value="An identifier for this patient. OLIS will return only Ontario Health Card Number and/or lab issued Medical Record Numbers. The assigning authority of the identifier is represented by the system value. &#xD;&#xA;&#xD;&#xA;OLIS HCN: https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-patient-hcn&#xD;&#xA;&#xD;&#xA;Lab MRN: http://ehealthontario.ca/fhir/NamingSystem/lab/patient-id-lab-license-[id]" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Patient Identifier Type supported in OLIS" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-patient-identifier-type" />
      </binding>
    </element>
    <element id="Patient.identifier.type.coding">
      <path value="Patient.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.type.coding.system">
      <path value="Patient.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.type.coding.code">
      <path value="Patient.identifier.type.coding.code" />
      <comment value="&quot;JHN&quot; for HCN. &quot;MR&quot; for MRN, &quot;ANON&quot; for anonymous identifier" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.3.5" />
      </mapping>
    </element>
    <element id="Patient.identifier.type.text">
      <path value="Patient.identifier.type.text" />
      <definition value="For HCN: &quot;Provincial HCN&quot;&#xD;&#xA;For MRN: &quot;OLIS Patient Id&quot;&#xD;&#xA;For ANON: &quot;OLIS Nonnominal identifier&quot;" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.system">
      <path value="Patient.identifier.system" />
      <comment value="See example values below" />
      <min value="1" />
      <example>
        <label value="HCN" />
        <valueUri value="https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-patient-hcn" />
      </example>
      <example>
        <label value="MRN" />
        <valueUri value="http://ehealthontario.ca/fhir/NamingSystem/lab/patient-id-lab-license-[id]" />
      </example>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.3.9.1/PID.3.9.2/PID.3.9.3" />
        <comment value="Either PID.3.9 (assigning Jurisdiction for JHN) or PID.3.4 (assigning authority ie Facility ID of facility that assigned the MR number)... PID.3.4 Assigning Authority field must be empty if PID.3.9 Jurisdiction is not empty, and vice versa" />
      </mapping>
    </element>
    <element id="Patient.identifier.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.3.1" />
      </mapping>
    </element>
    <element id="Patient.identifier.value.extension">
      <path value="Patient.identifier.value.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Patient.identifier.value.extension:healthCardVersionCode">
      <path value="Patient.identifier.value.extension" />
      <sliceName value="healthCardVersionCode" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="http://ehealthontario.ca/fhir/StructureDefinition/ext-id-health-card-version-code" />
      </type>
    </element>
    <element id="Patient.identifier.value.extension:healthCardVersionCode.value[x]">
      <path value="Patient.identifier.value.extension.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.identifier.value.extension:healthCardVersionCode.value[x]:valueString">
      <path value="Patient.identifier.value.extension.value[x]" />
      <sliceName value="valueString" />
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.use">
      <path value="Patient.name.use" />
      <definition value="Identifies the purpose for this name.&#xD;&#xA;OLIS: Fix to the 'official' for all cases except for anonymous.  For anonymous code should be ‘anonymous’." />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.7" />
      </mapping>
    </element>
    <element id="Patient.name.family">
      <path value="Patient.name.family" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.1" />
      </mapping>
    </element>
    <element id="Patient.name.given">
      <path value="Patient.name.given" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="extension.url" />
        </discriminator>
        <description value="Middle name" />
        <rules value="open" />
      </slicing>
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.given.id">
      <path value="Patient.name.given.id" />
      <mustSupport value="false" />
    </element>
    <element id="Patient.name.given:given-first">
      <path value="Patient.name.given" />
      <sliceName value="given-first" />
      <max value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.2" />
      </mapping>
    </element>
    <element id="Patient.name.given:given-middle">
      <path value="Patient.name.given" />
      <sliceName value="given-middle" />
      <max value="1" />
      <fixedString value="MID" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.3" />
      </mapping>
    </element>
    <element id="Patient.name.given:given-middle.extension">
      <path value="Patient.name.given.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Patient.name.given:given-middle.extension:EN-qualifier">
      <path value="Patient.name.given.extension" />
      <sliceName value="EN-qualifier" />
      <definition value="Use on data type: OLIS uses for HumanName.given" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.given:given-middle.extension:EN-qualifier.id">
      <path value="Patient.name.given.extension.id" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.given:given-middle.extension:EN-qualifier.value[x]">
      <path value="Patient.name.given.extension.value[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
      </slicing>
    </element>
    <element id="Patient.name.given:given-middle.extension:EN-qualifier.value[x]:valueCode">
      <path value="Patient.name.given.extension.value[x]" />
      <sliceName value="valueCode" />
      <fixedCode value="MID" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.prefix">
      <path value="Patient.name.prefix" />
      <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.&#xD;&#xA;OLIS will return maximum one prefix" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.5" />
      </mapping>
    </element>
    <element id="Patient.name.suffix">
      <path value="Patient.name.suffix" />
      <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.&#xD;&#xA;OLIS will return maximum one suffix" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.5.4" />
      </mapping>
    </element>
    <element id="Patient.telecom">
      <path value="Patient.telecom" />
      <definition value="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.&#xD;&#xA;&#xD;&#xA;OLIS will return maximum 3 telephone numbers." />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom.system">
      <path value="Patient.telecom.system" />
      <short value="phone | fax | email | pager" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-contact-point-system" />
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.13.3 or PID.14.3" />
      </mapping>
    </element>
    <element id="Patient.telecom.value">
      <path value="Patient.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.13.4-PID.13.8 or  PID.14.4-PID.14.8" />
      </mapping>
    </element>
    <element id="Patient.telecom.use">
      <path value="Patient.telecom.use" />
      <short value="home | work | temp |mobile - purpose of this contact point" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-contact-point-use" />
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.13.2 or PID.14.2" />
      </mapping>
    </element>
    <element id="Patient.gender">
      <path value="Patient.gender" />
      <short value="male | female | unknown" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-administrative-gender" />
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.8" />
      </mapping>
    </element>
    <element id="Patient.birthDate">
      <path value="Patient.birthDate" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.7" />
      </mapping>
    </element>
    <element id="Patient.address">
      <path value="Patient.address" />
      <definition value="Addresses for the individual.&#xD;&#xA;OLIS will return maximum two addresses" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.use">
      <path value="Patient.address.use" />
      <short value="home | work  - purpose of this address" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-address-use" />
      </binding>
    </element>
    <element id="Patient.address.type">
      <path value="Patient.address.type" />
      <short value="postal | physical" />
      <example>
        <label value="General" />
        <valueCode value="physical" />
      </example>
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.7" />
      </mapping>
    </element>
    <element id="Patient.address.line">
      <path value="Patient.address.line" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.1" />
      </mapping>
    </element>
    <element id="Patient.address.city">
      <path value="Patient.address.city" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.3" />
      </mapping>
    </element>
    <element id="Patient.address.state">
      <path value="Patient.address.state" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Codes for provinces, states and territories supported by Ontario Health interfaces" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/province-state-code" />
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.4" />
      </mapping>
    </element>
    <element id="Patient.address.postalCode">
      <path value="Patient.address.postalCode" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.5" />
      </mapping>
    </element>
    <element id="Patient.address.country">
      <path value="Patient.address.country" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="The set of 3-character country codes from the ISO-3166 standard, e.g., CAN, USA used in addresses by Ontario Health interfaces" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/country-code" />
      </binding>
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.11.6" />
      </mapping>
    </element>
    <element id="Patient.contact">
      <path value="Patient.contact" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.relationship">
      <path value="Patient.contact.relationship" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.relationship.coding">
      <path value="Patient.contact.relationship.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.relationship.coding.system">
      <path value="Patient.contact.relationship.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0131" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.relationship.coding.code">
      <path value="Patient.contact.relationship.coding.code" />
      <comment value="Fixed value &quot;emergency&quot;" />
      <min value="1" />
      <fixedCode value="C" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.relationship.coding.display">
      <path value="Patient.contact.relationship.coding.display" />
      <min value="1" />
      <fixedString value="Emergency Contact" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom">
      <path value="Patient.contact.telecom" />
      <short value="Emergency contact number" />
      <definition value="Patient's emergency contact number, which could be home or work." />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID.13 or PID.14 when use = &quot;EMR&quot; (emergency)" />
      </mapping>
    </element>
    <element id="Patient.contact.telecom.system">
      <path value="Patient.contact.telecom.system" />
      <short value="phone | fax | email | pager" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Codes supported by eHealth Ontario differentiating types of contact point systems." />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-contact-point-system" />
      </binding>
    </element>
    <element id="Patient.contact.telecom.value">
      <path value="Patient.contact.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom.use">
      <path value="Patient.contact.telecom.use" />
      <short value="home | work | temp | mobile - purpose of this contact point" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Codes supported by eHealth Ontario differentiating uses of contact points" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-contact-point-use" />
      </binding>
    </element>
    <element id="Patient.contact.address">
      <path value="Patient.contact.address" />
      <short value="address of patient's emergency contact" />
      <definition value="address of patient's emergency contact, not to be confused with patient's address" />
      <mustSupport value="true" />
      <mapping>
        <identity value="OLIS-HL7-v2" />
        <map value="PID-11 when addressType = &quot;E&quot; (emergency contact)" />
      </mapping>
    </element>
    <element id="Patient.contact.address.use">
      <path value="Patient.contact.address.use" />
      <short value="home | work | - purpose of this address" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Codes supported by eHealth Ontario indicating how the patient address is used. This is strict sub-set of the core FHIR value set." />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/ca-on-lab-address-use" />
      </binding>
    </element>
    <element id="Patient.contact.address.type">
      <path value="Patient.contact.address.type" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address.line">
      <path value="Patient.contact.address.line" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address.city">
      <path value="Patient.contact.address.city" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address.state">
      <path value="Patient.contact.address.state" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address.postalCode">
      <path value="Patient.contact.address.postalCode" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.address.country">
      <path value="Patient.contact.address.country" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>