{
  "resourceType": "StructureDefinition",
  "id": "PatientABeOrderLab",
  "url": "https://www.alberta.ca/fhir/ab-eorder-lab/StructureDefinition/PatientABeOrderLab",
  "version": "1.1.0",
  "name": "PatientABeOrderLab",
  "title": "Patient (AB:eOrder-Lab)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR Patient resource for use in Alberta eOrder Laboratory (AB:eOrder-Lab). It re-profiles the CA-eReC Patient profile and it includes constraints that represent the minimum expectations for the Patient resource when used in the AB:eOrder-Lab.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "comment": "Patient resources included in Alberta eOrder Laboratory Bundles have rules that certain attributes are not to be contained in Patient resources. These are mechanically enforced through invariants at the AB:eOrder-Lab Bundle level."
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "min": 1
      },
      {
        "id": "Patient.extension:individual-recordedSexOrGender",
        "path": "Patient.extension",
        "sliceName": "individual-recordedSexOrGender",
        "short": "Extension for representing an individuals recorded sex or gender.",
        "definition": "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",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/individual-recordedSexOrGender"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:individual-recordedSexOrGender.extension:value",
        "path": "Patient.extension.extension",
        "sliceName": "value"
      },
      {
        "id": "Patient.extension:individual-recordedSexOrGender.extension:value.value[x]",
        "path": "Patient.extension.extension.value[x]",
        "binding": {
          "strength": "required",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/administrative-gender-ab"
        }
      },
      {
        "id": "Patient.extension:individual-recordedSexOrGender.extension:type",
        "path": "Patient.extension.extension",
        "sliceName": "type"
      },
      {
        "id": "Patient.extension:individual-recordedSexOrGender.extension:type.value[x]",
        "path": "Patient.extension.extension.value[x]",
        "binding": {
          "strength": "required",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/recorded-sex-or-gender-type-AB"
        }
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "min": 1
      },
      {
        "id": "Patient.identifier:JHN",
        "path": "Patient.identifier",
        "sliceName": "JHN",
        "comment": "Patients must have at least an AB ULI identifier or another provincial JHN identifier. Implementers supplying ULIs shall use identifier.system of https://fhir.infoway-inforoute.ca/NamingSystem/ca-ab-patient-healthcare-id",
        "min": 1
      },
      {
        "id": "Patient.identifier:JHN.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:JHN.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:JHN.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name.text",
        "path": "Patient.name.text",
        "comment": "Mandatory String: Max Character length: 200",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:Phone",
        "path": "Patient.telecom",
        "sliceName": "Phone",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:Phone.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "fixedCode": "phone"
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "comment": "Assumed to be current home address if Address is present but no Use value is provided"
      },
      {
        "id": "Patient.address.type",
        "path": "Patient.address.type",
        "comment": "Valid values: postal / physical / both. Assumed to be 'both' if no value is provided"
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "min": 1
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "min": 1
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "min": 1
      },
      {
        "id": "Patient.contact.name",
        "path": "Patient.contact.name",
        "min": 1
      }
    ]
  }
}