<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PatientPSABfshreslice" />
  <url value="https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSABfshreslice" />
  <name value="PatientPSABfshreslice" />
  <title value="Patient (PS-AB FSH Re-Slice)" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/patient-ca-ps" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient">
      <path value="Patient" />
      <comment value="Patient resources included in Alberta Patient Summary Document Bundles SHALL NOT contain any of the following Patient details: text, active, name.period, address.text, maritalStatus, multipleBirth, photo, contact.address, contact.gender, contact.organization, contact.period, communication, generalPractitioner, managingOrganization. These rules are mechanically enforced through invariants at the PS-AB Bundle level." />
    </element>
    <element id="Patient.extension">
      <path value="Patient.extension" />
      <min value="1" />
    </element>
    <element id="Patient.identifier">
      <path value="Patient.identifier" />
      <min value="1" />
    </element>
    <element id="Patient.identifier:JHN">
      <path value="Patient.identifier" />
      <sliceName value="JHN" />
      <sliceIsConstraining value="true" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Patient.identifier:JHN/ULI">
      <path value="Patient.identifier" />
      <sliceName value="JHN/ULI" />
      <short value="Jurisdictional Health Number - ULI" />
      <min value="1" />
      <max value="*" />
    </element>
    <element id="Patient.identifier:JHN/ULI.system">
      <path value="Patient.identifier.system" />
      <fixedUri value="https://fhir.infoway-inforoute.ca/NamingSystem/ca-ab-patient-healthcare-id" />
    </element>
    <element id="Patient.name.text">
      <path value="Patient.name.text" />
      <comment value="Mandatory String: Max Character length: 200" />
      <min value="1" />
    </element>
    <element id="Patient.name.family">
      <path value="Patient.name.family" />
      <min value="1" />
    </element>
    <element id="Patient.telecom">
      <path value="Patient.telecom" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Patient.telecom:Phone">
      <path value="Patient.telecom" />
      <sliceName value="Phone" />
      <min value="1" />
      <max value="*" />
    </element>
    <element id="Patient.telecom:Phone.system">
      <path value="Patient.telecom.system" />
      <min value="1" />
      <fixedCode value="phone" />
    </element>
    <element id="Patient.gender.extension">
      <path value="Patient.gender.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Patient.gender.extension:data-absent-reason">
      <path value="Patient.gender.extension" />
      <sliceName value="data-absent-reason" />
      <short value="element absence reason" />
      <definition value="Provides a reason why the element is missing." />
      <comment value="Alberta Patient Summaries are not permitted to have a value outside of data absent reason for the gender element, given that recorded gender is to be conveyed in the individual-recordedSexOrGender extension to account for additional values in use in Alberta. Implementers are expected to demonstrate they can supply a 'not-permitted' value for this context" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" />
      </type>
      <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" />
      <comment value="Assumed to be current home address if Address is present but no Use value is provided" />
    </element>
    <element id="Patient.address.type">
      <path value="Patient.address.type" />
      <comment value="Valid values: postal / physical / both. Assumed to be 'both' if no value is provided" />
    </element>
    <element id="Patient.address.line">
      <path value="Patient.address.line" />
      <min value="1" />
    </element>
    <element id="Patient.address.city">
      <path value="Patient.address.city" />
      <min value="1" />
    </element>
    <element id="Patient.address.state">
      <path value="Patient.address.state" />
      <min value="1" />
    </element>
    <element id="Patient.address.postalCode">
      <path value="Patient.address.postalCode" />
      <min value="1" />
    </element>
    <element id="Patient.contact.name">
      <path value="Patient.contact.name" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>