{
  "resourceType": "StructureDefinition",
  "id": "profile-patient",
  "meta": {
    "lastUpdated": "2021-03-24T21:20:44.957+00:00"
  },
  "url": "https://fhir.infoway-inforoute.ca/StructureDefinition/profile-patient-DataConnector",
  "version": "0.1.1",
  "name": "DCPatientProfile",
  "title": "Patient Profile",
  "status": "draft",
  "date": "2021-02-05T18:57:01.4075744+00:00",
  "publisher": "Canada Health Infoway",
  "description": "Proposed constraints and extensions on the Patient Resource for New Brunswick",
  "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 draft core Canadian Baseline Patient Profile",
        "constraint": [
          {
            "key": "mds-1",
            "severity": "error",
            "human": "Must have [identifier of type JHN] or [address and phone]",
            "expression": "(identifier.where(type.coding.code='JHN').exists()) or ((address.exists()) and (telecom.exists()))",
            "source": "http://hl7.org/fhir/ca/core/StructureDefinition/profile-patient-DataConnector"
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "comment": "NB expects to support:\r\nHealth Card Number (JHN - called PHN or HCN by NB)\r\nMedicare Number (possibly JPID or MC (from HL7 terminology\r\nmyHealthNB number (called DID by NB, not sure what it maps to from HL7 terminology).",
        "min": 1,
        "mustSupport": true
      },
      {
        "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: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,
        "example": [
          {
            "label": "DID - myHealthNB Number",
            "valueUri": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-nb-did-id"
          }
        ]
      },
      {
        "id": "Patient.identifier:JPID.value",
        "path": "Patient.identifier.value",
        "short": "Jurisdictional Person identification number",
        "min": 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"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.system",
        "path": "Patient.identifier.system",
        "short": "A Health Number Naming System from the Canadian URI Registry",
        "min": 1,
        "example": [
          {
            "label": "NB Health Card",
            "valueUri": "https://simplifier.net/canadianuriregistry/ca-nb-patient-healthcare-id"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "example": [
          {
            "label": "NB Health Card",
            "valueString": "111222333"
          }
        ]
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "constraint": [
          {
            "key": "ca-core-name",
            "severity": "error",
            "human": "One of Patient.name.given or Patient.name.family 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": "v2-PID",
            "map": "PID-5.1"
          }
        ]
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mapping": [
          {
            "identity": "v2-PID",
            "map": "PID-2 + PID-3"
          }
        ]
      },
      {
        "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",
        "comment": "The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female.  Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.)  However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice.  Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects.  For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a \"hard\" error.  See the Patient Gender and Sex section for additional information about communicating patient gender and sex.\r\n\r\n\r\nImplementation note:  Set as mandatory.  If no value is available from a client registry, the value should be sent as Unknown.",
        "min": 1
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "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",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-nofixedaddress"
            ]
          }
        ]
      },
      {
        "id": "Patient.address.extension:noFixedAddress.value[x]",
        "path": "Patient.address.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "min": 1
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "min": 1
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "mustSupport": true
      }
    ]
  }
}