<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="CA-eReC-Patient" />
  <url value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient" />
  <name value="Patient" />
  <status value="draft" />
  <description value="The Patient resources contain demographics and other administrative information about the individual who is the subject of the referral." />
  <fhirVersion value="4.0.1" />
  <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" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.extension:HealthCardNumberVersionCode">
      <path value="Patient.identifier.extension" />
      <sliceName value="HealthCardNumberVersionCode" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-HCNV-code-EXT" />
      </type>
    </element>
    <element id="Patient.identifier.extension:ReasonForNoHCN">
      <path value="Patient.identifier.extension" />
      <sliceName value="ReasonForNoHCN" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-reason-for-no-HCN-EXT" />
      </type>
    </element>
    <element id="Patient.identifier.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
      <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" />
      <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" />
      <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" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.gender">
      <path value="Patient.gender" />
      <comment value="The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female.  Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.).  Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects.  For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a &quot;hard&quot; error." />
      <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.text">
      <path value="Patient.address.text" />
      <mustSupport value="true" />
    </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" />
    </element>
    <element id="Patient.maritalStatus">
      <path value="Patient.maritalStatus" />
      <comment value="MAY be used to identify the maritalStatus of the patient" />
    </element>
    <element id="Patient.contact">
      <path value="Patient.contact" />
      <comment value="MAY be used to identify alternate contacts for the patient" />
    </element>
    <element id="Patient.contact.relationship">
      <path value="Patient.contact.relationship" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://fhir.infoway-inforoute.ca/io/CA-eReC/ValueSet/patient-contact-relationship" />
      </binding>
    </element>
    <element id="Patient.contact.name">
      <path value="Patient.contact.name" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.contact.telecom">
      <path value="Patient.contact.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication">
      <path value="Patient.communication" />
      <comment value="where applicable, SHOULD be used to identify the preferred communication language for the patient" />
    </element>
    <element id="Patient.communication.extension">
      <path value="Patient.communication.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.communication.extension:CommunicationBarrier">
      <path value="Patient.communication.extension" />
      <sliceName value="CommunicationBarrier" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ext-CommunicationBarrier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Patient.communication.extension:CommunicationBarrier.value[x]">
      <path value="Patient.communication.extension.value[x]" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://fhir.infoway-inforoute.ca/io/CA-eReC/ValueSet/communication-barrier" />
      </binding>
    </element>
    <element id="Patient.communication.extension:CommunicationBarrier.value[x].code">
      <path value="Patient.communication.extension.value[x].code" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Contains codes required to identify if the patient speaks/understands an offical language (english/french), or if she/he does not and an interpretor is required." />
        <valueSet value="http://fhir.infoway-inforoute.ca/io/CA-eReC/ValueSet/communication-barrier" />
      </binding>
    </element>
    <element id="Patient.communication.language">
      <path value="Patient.communication.language" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="http://fhir.infoway-inforoute.ca/io/CA-eReC/ValueSet/human-language" />
      </binding>
    </element>
    <element id="Patient.communication.preferred">
      <path value="Patient.communication.preferred" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.generalPractitioner">
      <path value="Patient.generalPractitioner" />
      <comment value="where applicable, SHOULD be used to identify patients primary care provider" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Practitioner" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Organization" />
      </type>
    </element>
    <element id="Patient.generalPractitioner.reference">
      <path value="Patient.generalPractitioner.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.generalPractitioner.identifier">
      <path value="Patient.generalPractitioner.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.generalPractitioner.identifier.system">
      <path value="Patient.generalPractitioner.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.generalPractitioner.identifier.value">
      <path value="Patient.generalPractitioner.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>