{
  "resourceType": "StructureDefinition",
  "id": "profile-patient",
  "meta": {
    "lastUpdated": "2021-02-03T17:33:27.427+00:00"
  },
  "url": "http://hl7.org/fhir/ca/core/StructureDefinition/profile-patient",
  "version": "0.1.1",
  "name": "CdssPatientProfileCB",
  "title": "Patient Profile",
  "status": "draft",
  "date": "2021-01-05T21:34:19.3777944+00:00",
  "publisher": "OntarioMD",
  "description": "Proposed constraints and extensions on the Patient Resource",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "cdss51",
      "uri": "https://ontariomd.com",
      "name": "CDS-S 5.1",
      "comment": "Test"
    },
    {
      "identity": "cdss6x",
      "uri": "https://ontariomd.com",
      "name": "CDS-S 6.x"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "short": "Patient Profile",
        "definition": "The Patient Profile is based upon the core FHIR Patient Resource",
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "min": 1,
        "example": [
          {
            "label": "Pattern",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "MR"
                }
              ]
            }
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "The value that is unique within the system.",
        "min": 1,
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.identifier:PPN",
        "path": "Patient.identifier",
        "sliceName": "PPN",
        "short": "Canada Passport Number",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:PPN.type",
        "path": "Patient.identifier.type",
        "short": "Passport number identifier type",
        "min": 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,
        "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
      },
      {
        "id": "Patient.identifier:JPID",
        "path": "Patient.identifier",
        "sliceName": "JPID",
        "short": "Jurisdictional Person Identification",
        "definition": "Federal patient and person identifiers used by all jurisdictions across Canada",
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:JPID.type",
        "path": "Patient.identifier.type",
        "short": "Jurisdictional Person Identification",
        "min": 1,
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
              "code": "JPID"
            }
          ]
        }
      },
      {
        "id": "Patient.identifier:JPID.system",
        "path": "Patient.identifier.system",
        "short": "Jurisdictional Person identification Naming System from the Canadian URI Registry",
        "min": 1
      },
      {
        "id": "Patient.identifier:JPID.value",
        "path": "Patient.identifier.value",
        "short": "Jurisdictional Person identification number",
        "min": 1,
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.024 SIN",
            "comment": "Test"
          }
        ]
      },
      {
        "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/core/StructureDefinition/ext-identifierversion"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier:JHN.extension:versionCode.url",
        "path": "Patient.identifier.extension.url",
        "fixedUri": "http://hl7.org/fhir/ca/core/StructureDefinition/ext-identifierversion"
      },
      {
        "id": "Patient.identifier:JHN.extension:versionCode.value[x]",
        "path": "Patient.identifier.extension.value[x]",
        "mapping": [
          {
            "identity": "cds",
            "map": "DE01.009 Health Card Version Code"
          }
        ]
      },
      {
        "id": "Patient.identifier:JHN.type",
        "path": "Patient.identifier.type",
        "min": 1,
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
              "code": "JHN"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "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,
        "mapping": [
          {
            "identity": "cdss51",
            "map": "DE01.008 Health Card Number"
          },
          {
            "identity": "cdss6x",
            "map": "DE01.008 Health Card Number"
          }
        ]
      },
      {
        "id": "Patient.identifier:JHN.period.end",
        "path": "Patient.identifier.period.end",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.011 Health Card Expiry Date"
          }
        ]
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.016 Patient Status",
            "comment": "Used to indicate active and inactive. For deceased, see Patient.deceased"
          }
        ]
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "constraint": [
          {
            "key": "ca-core-name",
            "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",
            "source": "http://hl7.org/fhir/ca/core/StructureDefinition/profile-patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.002 Last Name"
          }
        ]
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.003 First Name",
            "comment": "Patient.name.given[0] maps to DE01.003 First Name"
          },
          {
            "identity": "cdss6x",
            "map": "DE01.004 Middle Name",
            "comment": "Patient.name.given[1..*] maps DE01.004 Middle Name"
          }
        ]
      },
      {
        "id": "Patient.name.prefix",
        "path": "Patient.name.prefix",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.001 Prefix"
          }
        ]
      },
      {
        "id": "Patient.name.suffix",
        "path": "Patient.name.suffix",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.005 Name Suffix"
          }
        ]
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "min": 1
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.006 Gender"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.007 Date of Birth"
          }
        ]
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.016 Patient Status",
            "comment": "Used for indicating if a patient is deceased"
          }
        ]
      },
      {
        "id": "Patient.address.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.address.extension:preferred",
        "path": "Patient.address.extension",
        "sliceName": "preferred",
        "short": "HL7 Preferred Address Flag extension",
        "definition": "Flag denoting whether parent address item is preferred",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/iso21090-preferred"
            ]
          }
        ]
      },
      {
        "id": "Patient.address.extension:noFixedAddress",
        "path": "Patient.address.extension",
        "sliceName": "noFixedAddress",
        "short": "No Fixed Address indicator",
        "definition": "Flag indicating that there is an assertion that there is no fixed address",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/core/StructureDefinition/ext-nofixedaddress"
            ]
          }
        ]
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.013 Preferred Official Language"
          }
        ]
      },
      {
        "id": "Patient.communication.preferred",
        "path": "Patient.communication.preferred",
        "mapping": [
          {
            "identity": "cdss6x",
            "map": "DE01.014 Preferred Spoken Language"
          }
        ]
      },
      {
        "id": "Patient.generalPractitioner.identifier.value",
        "path": "Patient.generalPractitioner.identifier.value",
        "mapping": [
          {
            "identity": "cds",
            "map": "DE01.015 Primary Physician",
            "comment": "Use Patient.generalPractitioner.identifier.value to express an identifier for the primary physician"
          }
        ]
      },
      {
        "id": "Patient.generalPractitioner.display",
        "path": "Patient.generalPractitioner.display",
        "mapping": [
          {
            "identity": "cds",
            "map": "DE01.015 Primary Physician",
            "comment": "Use Patient.generalPractitioner.display to express a free text version of the physician's name"
          }
        ]
      }
    ]
  }
}