<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-mi-profile-patient" />
  <url value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-patient" />
  <version value="1.0.0" />
  <name value="MIPatient" />
  <title value="MI Patient Profile (Submission)" />
  <status value="active" />
  <date value="2024-04-19T02:20:56.4940505+00:00" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="cda" />
    <uri value="http://hl7.org/v3/cda" />
    <name value="CDA (R2)" />
  </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>
  <mapping>
    <identity value="loinc" />
    <uri value="http://loinc.org" />
    <name value="LOINC code for the element" />
  </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.identifier">
      <path value="Patient.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type.coding.code" />
        </discriminator>
        <description value="must contain at least one repetition of an identifier type code of MR (MRN).&#xD;&#xA;If the HSP assigns any local secondary identifiers (such as alternate MRNs, clinic patient numbers, etc.) these should be provided if it is convenient to do so.&#xD;&#xA;If the HSP collects a provincial health number (e.g. OHIP number or other province health card number) this must be sent.&#xD;&#xA;If the HSP collects other types of identifiers which might be useful in identifying the patient, these should be sent if it is convenient to do so." />
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN">
      <path value="Patient.identifier" />
      <sliceName value="MRN" />
      <short value="patient's MRN" />
      <definition value="patient's medical record number" />
      <comment value="If the HSP assigns any local secondary identifiers (such as alternate MRNs, clinic patient numbers, etc.) these should be provided if it is convenient to do so." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ontariohealth.ca/fhir/ValueSet/identifier-type" />
      </binding>
    </element>
    <element id="Patient.identifier:MRN.type.coding">
      <path value="Patient.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Patient.identifier:MRN.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:MRN.type.coding.code">
      <path value="Patient.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="MR" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN.system">
      <path value="Patient.identifier.system" />
      <definition value="Must be a valid URI describing the patient's MRN assigning authority. This should come from Ontario Health" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN.period.start">
      <path value="Patient.identifier.period.start" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:MRN.period.end">
      <path value="Patient.identifier.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN">
      <path value="Patient.identifier" />
      <sliceName value="JHN" />
      <comment value="If the HSP collects a provincial health number (e.g. OHIP number or other province health card number) this must be sent." />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ontariohealth.ca/fhir/ValueSet/identifier-type" />
      </binding>
    </element>
    <element id="Patient.identifier:JHN.type.coding">
      <path value="Patient.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Patient.identifier:JHN.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:JHN.type.coding.code">
      <path value="Patient.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="JHN" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN.value.extension:ext-HealthCardVersionCode">
      <path value="Patient.identifier.value.extension" />
      <sliceName value="ext-HealthCardVersionCode" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ext-id-health-card-version-code" />
      </type>
    </element>
    <element id="Patient.identifier:JHN.period.start">
      <path value="Patient.identifier.period.start" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier:JHN.period.end">
      <path value="Patient.identifier.period.end" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.family">
      <path value="Patient.name.family" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.given">
      <path value="Patient.name.given" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.prefix">
      <path value="Patient.name.prefix" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.name.suffix">
      <path value="Patient.name.suffix" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom">
      <path value="Patient.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom.system">
      <path value="Patient.telecom.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom.value">
      <path value="Patient.telecom.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom.use">
      <path value="Patient.telecom.use" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.gender">
      <path value="Patient.gender" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.birthDate">
      <path value="Patient.birthDate" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address">
      <path value="Patient.address" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.use">
      <path value="Patient.address.use" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.type">
      <path value="Patient.address.type" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.line">
      <path value="Patient.address.line" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.city">
      <path value="Patient.address.city" />
      <mustSupport value="true" />
    </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>
    </element>
    <element id="Patient.address.postalCode">
      <path value="Patient.address.postalCode" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.address.country">
      <path value="Patient.address.country" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="3-character ISO country codes for use in addresses by Ontario Health" />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/country-code" />
      </binding>
    </element>
    <element id="Patient.communication">
      <path value="Patient.communication" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication.language">
      <path value="Patient.communication.language" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Languages understood or supported by Ontario clients, practitioners and organizations. This value set represents the subset of all ISO living languages as of April 22, 2020." />
        <valueSet value="http://ehealthontario.ca/fhir/ValueSet/human-language" />
      </binding>
    </element>
    <element id="Patient.communication.language.coding">
      <path value="Patient.communication.language.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication.language.coding.system">
      <path value="Patient.communication.language.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication.language.coding.code">
      <path value="Patient.communication.language.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication.language.coding.display">
      <path value="Patient.communication.language.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.generalPractitioner">
      <path value="Patient.generalPractitioner" />
      <comment value="miCDR only supports one primary care provider per patient." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>