{
  "resourceType": "StructureDefinition",
  "id": "ca-on-eReferral-profile-Patient",
  "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Patient",
  "version": "1.0.1",
  "name": "EReferralPatient",
  "title": "Patient",
  "status": "draft",
  "description": "The Patient resources contain demographics and other administrative information about the individual who is the subject of the referral.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "https://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.meta",
        "path": "Patient.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.meta.profile",
        "path": "Patient.meta.profile",
        "comment": "#### **_` FOR eREFERRAL USAGE: The meta.profile = http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Patient|1.0.1 `_**\n\nIt is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.meta.security",
        "path": "Patient.meta.security"
      },
      {
        "id": "Patient.meta.security.id",
        "path": "Patient.meta.security.id",
        "max": "0"
      },
      {
        "id": "Patient.meta.security.version",
        "path": "Patient.meta.security.version",
        "max": "0"
      },
      {
        "id": "Patient.meta.security.userSelected",
        "path": "Patient.meta.security.userSelected",
        "max": "0"
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "comment": "Include patient health card number. May also include HCN version code extension.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN",
        "path": "Patient.identifier.extension",
        "sliceName": "ReasonForNoHCN",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-reason-for-no-HCN"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN.value[x]",
        "path": "Patient.identifier.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN.value[x].coding",
        "path": "Patient.identifier.extension.value[x].coding",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN.value[x].coding.system",
        "path": "Patient.identifier.extension.value[x].coding.system",
        "fixedUri": "http://ehealthontario.ca/fhir/CodeSystem/ereferral-Reason-For-No-HCN",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN.value[x].coding.code",
        "path": "Patient.identifier.extension.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:ReasonForNoHCN.value[x].coding.display",
        "path": "Patient.identifier.extension.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:HCNVersionCode",
        "path": "Patient.identifier.extension",
        "sliceName": "HCNVersionCode",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-id-health-card-version-code"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.extension:HCNVersionCode.value[x]",
        "path": "Patient.identifier.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type.coding.system",
        "path": "Patient.identifier.type.coding.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type.coding.code",
        "path": "Patient.identifier.type.coding.code",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type.coding.display",
        "path": "Patient.identifier.type.coding.display",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type.text",
        "path": "Patient.identifier.type.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "comment": "name.family and name.given will only be used. \nMiddle name is supported by using subsequent given names.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.use",
        "path": "Patient.name.use",
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.name.prefix",
        "path": "Patient.name.prefix",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name.suffix",
        "path": "Patient.name.suffix",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.use",
        "path": "Patient.telecom.use",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "mustSupport": true
      },
      {
        "id": "Patient.address.type",
        "path": "Patient.address.type",
        "mustSupport": true
      },
      {
        "id": "Patient.address.text",
        "path": "Patient.address.text",
        "mustSupport": true
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "mustSupport": true
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "mustSupport": true
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "mustSupport": true
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "mustSupport": true
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding",
        "path": "Patient.maritalStatus.coding",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding.system",
        "path": "Patient.maritalStatus.coding.system",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding.code",
        "path": "Patient.maritalStatus.coding.code",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding.display",
        "path": "Patient.maritalStatus.coding.display",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.text",
        "path": "Patient.maritalStatus.text",
        "mustSupport": true
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship",
        "path": "Patient.contact.relationship",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship.coding",
        "path": "Patient.contact.relationship.coding",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship.coding.system",
        "path": "Patient.contact.relationship.coding.system",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship.coding.code",
        "path": "Patient.contact.relationship.coding.code",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship.coding.display",
        "path": "Patient.contact.relationship.coding.display",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name",
        "path": "Patient.contact.name",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom",
        "path": "Patient.contact.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.gender",
        "path": "Patient.contact.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.organization",
        "path": "Patient.contact.organization",
        "mustSupport": true
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.extension:ComunicationBarrier",
        "path": "Patient.communication.extension",
        "sliceName": "ComunicationBarrier",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/cms-ext-CommunicationBarrier"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.communication.extension:ComunicationBarrier.value[x]",
        "path": "Patient.communication.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.extension:ComunicationBarrier.value[x].system",
        "path": "Patient.communication.extension.value[x].system",
        "fixedUri": "https://ehealthontario.ca/fhir/CodeSystem/communication-barrier",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.extension:ComunicationBarrier.value[x].code",
        "path": "Patient.communication.extension.value[x].code",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/communication-barrier"
        }
      },
      {
        "id": "Patient.communication.extension:ComunicationBarrier.value[x].display",
        "path": "Patient.communication.extension.value[x].display",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/human-language"
        }
      },
      {
        "id": "Patient.communication.language.coding",
        "path": "Patient.communication.language.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/human-language"
        }
      },
      {
        "id": "Patient.communication.language.coding.system",
        "path": "Patient.communication.language.coding.system",
        "min": 1,
        "fixedUri": "urn:ietf:bcp:47",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language.coding.code",
        "path": "Patient.communication.language.coding.code",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/human-language"
        }
      },
      {
        "id": "Patient.communication.language.coding.display",
        "path": "Patient.communication.language.coding.display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.communication.preferred",
        "path": "Patient.communication.preferred",
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}