<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="patient-ca-ps-test" />
  <url value="http://example.org/fhir/StructureDefinition/patient-ca-ps-test" />
  <name value="PatientPSCA" />
  <title value="Patient (PS-CA)" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2023-11-06T00:00:00-08:00" />
  <description value="This profile represents the constraints applied to the Patient resource by the PS-CA project to represent the minimum expectations for the Patient resource when used in the PS-CA composition profile or in one of the referred resources. It is informed by the constraints of the [Patient IPS-UV profile](http://hl7.org/fhir/uv/ips/StructureDefinition-Patient-uv-ips.html) and the [Canadian Baseline Profile](http://build.fhir.org/ig/HL7-Canada/ca-baseline/branches/master/StructureDefinition-profile-patient.html)" />
  <copyright value="Copyright © 2021,2022 Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy)." />
  <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.extension:individual-recordedSexOrGender">
      <path value="Patient.extension" />
      <sliceName value="individual-recordedSexOrGender" />
      <short value="Extension for representing an individuals recorded sex or gender." />
      <definition value="Recorded sex or gender (RSG) information includes the various sex and gender concepts that are often used in existing systems but are known NOT to represent a gender identity, sex parameter for clinical use, or attributes related to sexuality, such as sexual orientation, sexual activity, or sexual attraction. Examples of recorded sex or gender concepts include administrative gender, administrative sex, and sex assigned at birth. When exchanging this concept, refer to the guidance in the Gender Harmony Implementation Guide" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/individual-recordedSexOrGender" />
      </type>
    </element>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="This element employs the constraints on identifier put forth in the CA Baseline using a profiled data type." />
      <type>
        <code value="Identifier" />
        <profile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-identifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Patient.identifier.type">
      <path value="Patient.identifier.type" />
      <comment value="The slices provided below are examples of identifier types used by jurisdictions for patient summary. These are not required, and the slicing is open meaning that other types can be provided and used in an implementation." />
    </element>
    <element id="Patient.identifier.system">
      <path value="Patient.identifier.system" />
      <min value="1" />
    </element>
    <element id="Patient.identifier.value">
      <path value="Patient.identifier.value" />
      <short value="The value that is unique within the system." />
      <min value="1" />
    </element>
    <element id="Patient.identifier:JHN">
      <path value="Patient.identifier" />
      <sliceName value="JHN" />
      <short value="Jurisdictional Health Number" />
      <definition value="Federal patient and person health numbers used by all jurisdictions across Canada" />
    </element>
    <element id="Patient.identifier:JHN.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="JHN" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Patient.identifier:JHN.system">
      <path value="Patient.identifier.system" />
      <short value="A Health Number Naming System from the Canadian URI Registry" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:JHN.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:MRN">
      <path value="Patient.identifier" />
      <sliceName value="MRN" />
      <short value="Medical Record Number" />
      <definition value="A local patient identifier from the submitting PoS System" />
      <comment value="Some jurisdictions may consider the MRN identifier type to be an alternative to the JHN identifier type under certain scenarios. These business rules are outside the scope of this profile, however the slice is socialized to prepare implementers for potential use of this pattern within certain jurisdictions" />
    </element>
    <element id="Patient.identifier:MRN.type">
      <path value="Patient.identifier.type" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="MR" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Patient.identifier:MRN.system">
      <path value="Patient.identifier.system" />
      <short value="An identifier for the system supplying the MRN" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:MRN.value">
      <path value="Patient.identifier.value" />
      <min value="1" />
    </element>
    <element id="Patient.name">
      <path value="Patient.name" />
      <requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name.&#xD;&#xA;The Alphabetic representation of the name SHALL be always provided" />
      <min value="1" />
      <constraint>
        <key value="cabaseline-pat-1" />
        <severity value="error" />
        <human value="Patient.name.given or Patient.name.family or both SHALL be present" />
        <expression value="family.exists() or given.exists()" />
        <xpath value="f:given or f:family" />
      </constraint>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>