{
  "resourceType": "StructureDefinition",
  "id": "patientExample",
  "url": "http://examplefhir.org/StructureDefinition/patient-ca-ps",
  "name": "PatientExample",
  "title": "Patient Example",
  "status": "draft",
  "experimental": false,
  "date": "2022-01-12T00:00:00+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "comment": "This element employs the constraints on identifier put forth in the CA Baseline using a profiled data type. ",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-identifier"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "example": [
          {
            "label": "Pattern",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "MR"
                }
              ]
            }
          }
        ]
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "The value that is unique within the system.",
        "min": 1
      },
      {
        "id": "Patient.identifier:PPN",
        "path": "Patient.identifier",
        "sliceName": "PPN",
        "short": "Canada Passport Number"
      },
      {
        "id": "Patient.identifier:PPN.type",
        "path": "Patient.identifier.type",
        "short": "Passport number identifier type",
        "min": 1,
        "max": "1",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
              "code": "PPN"
            }
          ]
        }
      },
      {
        "id": "Patient.identifier:PPN.system",
        "path": "Patient.identifier.system",
        "short": "A Canadian passport number Naming System from the Canadian URI Registry",
        "min": 1,
        "max": "1",
        "fixedUri": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-passport-number"
      },
      {
        "id": "Patient.identifier:PPN.value",
        "path": "Patient.identifier.value",
        "short": "A Canadian passport number",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:JPID",
        "path": "Patient.identifier",
        "sliceName": "JPID",
        "short": "Jurisdictional Person Identification",
        "definition": "A jurisdictionally assigned identifier that is distinct from a Jurisdictional Health Number",
        "comment": "One example of a JPID is an identifier assigned to a patient by a jurisdictional health record (e.g., myHealthNB)"
      },
      {
        "id": "Patient.identifier:JPID.type",
        "path": "Patient.identifier.type",
        "short": "Jurisdictional Person Identification",
        "min": 1,
        "max": "1",
        "fixedCodeableConcept": {
          "coding": [
            {
              "code": "JPID"
            }
          ]
        },
        "comment": "This identifier type has been requested to be added to the HL7 v2 0204 Identifier Type Table. The system will be updated after the value has been added by the appropriate HL7 Working Group"
      },
      {
        "id": "Patient.identifier:JPID.system",
        "path": "Patient.identifier.system",
        "short": "Jurisdictional Person identification Naming System from the Canadian URI Registry",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:JPID.value",
        "path": "Patient.identifier.value",
        "short": "Jurisdictional Person identification number",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:JHN",
        "path": "Patient.identifier",
        "sliceName": "JHN",
        "short": "Jurisdictional Health Number",
        "definition": "Federal patient and person health numbers used by all jurisdictions across Canada"
      },
      {
        "id": "Patient.identifier:JHN.extension",
        "path": "Patient.identifier.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.identifier:JHN.extension:versionCode",
        "path": "Patient.identifier.extension",
        "sliceName": "versionCode",
        "short": "Health Number Version Code",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-identifierversion"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:JHN.type",
        "path": "Patient.identifier.type",
        "min": 1,
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
              "code": "JHN"
            }
          ]
        }
      },
      {
        "id": "Patient.identifier:JHN.system",
        "path": "Patient.identifier.system",
        "short": "A Health Number Naming System from the Canadian URI Registry",
        "min": 1
      },
      {
        "id": "Patient.identifier:JHN.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.\r\nThe Alphabetic representation of the name SHALL be always provided",
        "min": 1,
        "constraint": [
          {
            "key": "cabaseline-pat-1",
            "severity": "error",
            "human": "Patient.name.given or Patient.name.family or both SHALL be present",
            "expression": "family.exists() or given.exists()",
            "xpath": "f:given or f:family"
          }
        ],
        "mustSupport": true
      }
    ]
  }
}