{
  "resourceType": "StructureDefinition",
  "id": "9f5ea3c6-c884-4e67-8498-c80319910abd",
  "meta": {
    "lastUpdated": "2021-10-20T20:32:07.244+00:00"
  },
  "url": "http://fhir.healthbc.org/StructureDefinition/ca-bc-careconnect-encounter",
  "version": "1.0",
  "name": "ca-bc-careconnect-encounter",
  "status": "active",
  "date": "2021-10-20T20:28:45.7020549+00:00",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "Encounter",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Encounter",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Encounter.id",
        "path": "Encounter.id",
        "min": 1,
        "meaningWhenMissing": "Always supplied"
      },
      {
        "id": "Encounter.meta",
        "path": "Encounter.meta"
      },
      {
        "id": "Encounter.meta.id",
        "path": "Encounter.meta.id",
        "max": "0"
      },
      {
        "id": "Encounter.meta.versionId",
        "path": "Encounter.meta.versionId",
        "max": "0"
      },
      {
        "id": "Encounter.meta.lastUpdated",
        "path": "Encounter.meta.lastUpdated",
        "comment": "This value is always populated and is the last modification date ."
      },
      {
        "id": "Encounter.meta.profile",
        "path": "Encounter.meta.profile",
        "max": "0"
      },
      {
        "id": "Encounter.meta.security",
        "path": "Encounter.meta.security",
        "max": "0"
      },
      {
        "id": "Encounter.meta.tag",
        "path": "Encounter.meta.tag",
        "max": "0"
      },
      {
        "id": "Encounter.implicitRules",
        "path": "Encounter.implicitRules",
        "max": "0"
      },
      {
        "id": "Encounter.language",
        "path": "Encounter.language",
        "max": "0"
      },
      {
        "id": "Encounter.text",
        "path": "Encounter.text",
        "max": "0"
      },
      {
        "id": "Encounter.extension",
        "path": "Encounter.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Encounter.extension:linkedPatient",
        "path": "Encounter.extension",
        "sliceName": "linkedPatient",
        "comment": "This is the patient's identifier associated to the resource.",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": "http://fhir.healthbc.org/StructureDefinition/ca-bc-careconnect-linked-patient-extension"
          }
        ]
      },
      {
        "id": "Encounter.extension:linkedPatient.valueIdentifier:valueIdentifier",
        "path": "Encounter.extension.valueIdentifier",
        "sliceName": "valueIdentifier",
        "comment": "Patient's MRN that's associated to the clinical record in repository."
      },
      {
        "id": "Encounter.extension:linkedPatient.valueIdentifier:valueIdentifier.system",
        "path": "Encounter.extension.valueIdentifier.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs",
        "min": 1
      },
      {
        "id": "Encounter.extension:serviceType",
        "path": "Encounter.extension",
        "sliceName": "serviceType",
        "comment": "This is the type of service in the care facility that the encounter is associated to.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://fhir.healthbc.org/StructureDefinition/ca-bc-careconnect-service-type-extension"
          }
        ]
      },
      {
        "id": "Encounter.extension:serviceType.valueCodeableConcept:valueCodeableConcept.coding.system",
        "path": "Encounter.extension.valueCodeableConcept.coding.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs",
        "min": 1
      },
      {
        "id": "Encounter.extension:serviceType.valueCodeableConcept:valueCodeableConcept.coding.code",
        "path": "Encounter.extension.valueCodeableConcept.coding.code",
        "meaningWhenMissing": "No code is available but there is text to encapsulate the concept."
      },
      {
        "id": "Encounter.extension:encounterReason",
        "path": "Encounter.extension",
        "sliceName": "encounterReason",
        "comment": "This Encounter Reason extension overwrites the resource.reason for reasons that 1. it lacks support for reason type, and 2. our data is sent from various source system and is unable to be mapped to the FHIR encounter reason codes which is a list from SNOMET CT.",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": "http://fhir.healthbc.org/StructureDefinition/ca-bc-careconnect-encounter-reason-extension"
          }
        ]
      },
      {
        "id": "Encounter.extension:encounterReason.extension",
        "path": "Encounter.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reasonType",
        "path": "Encounter.extension.extension",
        "sliceName": "reasonType",
        "definition": "Encounter reason type has two values in the value set: \r\nADMReason - Admission reason\r\nDISCHReason - Discharge reason",
        "min": 0
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reasonType.valueCodeableConcept:valueCodeableConcept.coding.system",
        "path": "Encounter.extension.extension.valueCodeableConcept.coding.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs",
        "min": 1
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reasonType.valueCodeableConcept:valueCodeableConcept.coding.code",
        "path": "Encounter.extension.extension.valueCodeableConcept.coding.code",
        "meaningWhenMissing": "No code is available but there is text to encapsulate the concept."
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reason",
        "path": "Encounter.extension.extension",
        "sliceName": "reason",
        "min": 1
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reason.valueCodeableConcept:valueCodeableConcept.coding.id",
        "path": "Encounter.extension.extension.valueCodeableConcept.coding.id",
        "max": "0"
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reason.valueCodeableConcept:valueCodeableConcept.coding.system",
        "path": "Encounter.extension.extension.valueCodeableConcept.coding.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs",
        "min": 1
      },
      {
        "id": "Encounter.extension:encounterReason.extension:reason.valueCodeableConcept:valueCodeableConcept.coding.code",
        "path": "Encounter.extension.extension.valueCodeableConcept.coding.code",
        "meaningWhenMissing": "No code is available but there is text to encapsulate the concept."
      },
      {
        "id": "Encounter.identifier",
        "path": "Encounter.identifier",
        "comment": "The current version supports one identifier which is the clinical encounter number.",
        "min": 1
      },
      {
        "id": "Encounter.identifier.id",
        "path": "Encounter.identifier.id",
        "max": "0"
      },
      {
        "id": "Encounter.identifier.use",
        "path": "Encounter.identifier.use",
        "max": "0"
      },
      {
        "id": "Encounter.identifier.type",
        "path": "Encounter.identifier.type",
        "max": "0"
      },
      {
        "id": "Encounter.identifier.system",
        "path": "Encounter.identifier.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs.",
        "min": 1
      },
      {
        "id": "Encounter.identifier.period",
        "path": "Encounter.identifier.period",
        "max": "0"
      },
      {
        "id": "Encounter.identifier.assigner",
        "path": "Encounter.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Encounter.status",
        "path": "Encounter.status",
        "comment": "Status of encounter is not supported in the data repository.  We have excluded all cancelled encounters and assumed the remaining are active with unknown status.",
        "fixedCode": "unknown"
      },
      {
        "id": "Encounter.statusHistory",
        "path": "Encounter.statusHistory",
        "max": "0"
      },
      {
        "id": "Encounter.class",
        "path": "Encounter.class",
        "meaningWhenMissing": "Class could be missing if source system did not provide this value."
      },
      {
        "id": "Encounter.class.id",
        "path": "Encounter.class.id",
        "max": "0"
      },
      {
        "id": "Encounter.class.system",
        "path": "Encounter.class.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs."
      },
      {
        "id": "Encounter.class.version",
        "path": "Encounter.class.version",
        "max": "0"
      },
      {
        "id": "Encounter.class.userSelected",
        "path": "Encounter.class.userSelected",
        "max": "0"
      },
      {
        "id": "Encounter.classHistory",
        "path": "Encounter.classHistory",
        "max": "0"
      },
      {
        "id": "Encounter.type",
        "path": "Encounter.type",
        "max": "0"
      },
      {
        "id": "Encounter.priority",
        "path": "Encounter.priority",
        "max": "0"
      },
      {
        "id": "Encounter.subject",
        "path": "Encounter.subject",
        "short": "The patient present at the encounter",
        "definition": "The patient present at the encounter.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://fhir.healthbc.org/StructureDefinition/ca-bc-careconnect-patient",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Encounter.subject.id",
        "path": "Encounter.subject.id",
        "max": "0"
      },
      {
        "id": "Encounter.subject.reference",
        "path": "Encounter.subject.reference",
        "comment": "Relative reference to the Patient resource."
      },
      {
        "id": "Encounter.subject.identifier",
        "path": "Encounter.subject.identifier",
        "max": "0"
      },
      {
        "id": "Encounter.subject.display",
        "path": "Encounter.subject.display",
        "max": "0"
      },
      {
        "id": "Encounter.episodeOfCare",
        "path": "Encounter.episodeOfCare",
        "max": "0"
      },
      {
        "id": "Encounter.incomingReferral",
        "path": "Encounter.incomingReferral",
        "max": "0"
      },
      {
        "id": "Encounter.participant.id",
        "path": "Encounter.participant.id",
        "max": "0"
      },
      {
        "id": "Encounter.participant.type.id",
        "path": "Encounter.participant.type.id",
        "max": "0"
      },
      {
        "id": "Encounter.participant.type.coding.id",
        "path": "Encounter.participant.type.coding.id",
        "max": "0"
      },
      {
        "id": "Encounter.participant.type.coding.system",
        "path": "Encounter.participant.type.coding.system",
        "comment": "For a list of system URIs, refer to https://simplifier.net/guide/phsa-ehealth-api-implementation-guide/SystemURIs."
      },
      {
        "id": "Encounter.participant.type.coding.version",
        "path": "Encounter.participant.type.coding.version",
        "max": "0"
      },
      {
        "id": "Encounter.participant.type.coding.userSelected",
        "path": "Encounter.participant.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Encounter.participant.period",
        "path": "Encounter.participant.period",
        "max": "0"
      },
      {
        "id": "Encounter.participant.individual",
        "path": "Encounter.participant.individual",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.healthbc.org/StructureDefinition/ca-bc-careconnect-practitioner",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Encounter.participant.individual.id",
        "path": "Encounter.participant.individual.id",
        "max": "0"
      },
      {
        "id": "Encounter.participant.individual.reference",
        "path": "Encounter.participant.individual.reference",
        "comment": "Internal reference to the contained Practitioner resource."
      },
      {
        "id": "Encounter.participant.individual.identifier",
        "path": "Encounter.participant.individual.identifier",
        "max": "0"
      },
      {
        "id": "Encounter.participant.individual.display",
        "path": "Encounter.participant.individual.display",
        "max": "0"
      },
      {
        "id": "Encounter.appointment",
        "path": "Encounter.appointment",
        "max": "0"
      },
      {
        "id": "Encounter.period",
        "path": "Encounter.period",
        "comment": "The start of the Period may be the pre-admission date.\r\nIf not (yet) known, the end of the Period may be omitted."
      },
      {
        "id": "Encounter.period.id",
        "path": "Encounter.period.id",
        "max": "0"
      },
      {
        "id": "Encounter.length",
        "path": "Encounter.length",
        "max": "0"
      },
      {
        "id": "Encounter.reason",
        "path": "Encounter.reason",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.id",
        "path": "Encounter.diagnosis.id",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.condition",
        "path": "Encounter.diagnosis.condition",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.healthbc.org/StructureDefinition/ca-bc-careconnect-condition",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Encounter.diagnosis.condition.id",
        "path": "Encounter.diagnosis.condition.id",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.condition.reference",
        "path": "Encounter.diagnosis.condition.reference",
        "comment": "Internal reference to the contained Condition resource."
      },
      {
        "id": "Encounter.diagnosis.condition.identifier",
        "path": "Encounter.diagnosis.condition.identifier",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.condition.display",
        "path": "Encounter.diagnosis.condition.display",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.role.id",
        "path": "Encounter.diagnosis.role.id",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.role.coding.id",
        "path": "Encounter.diagnosis.role.coding.id",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.role.coding.version",
        "path": "Encounter.diagnosis.role.coding.version",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.role.coding.userSelected",
        "path": "Encounter.diagnosis.role.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Encounter.diagnosis.rank",
        "path": "Encounter.diagnosis.rank",
        "max": "0"
      },
      {
        "id": "Encounter.account",
        "path": "Encounter.account",
        "max": "0"
      },
      {
        "id": "Encounter.hospitalization",
        "path": "Encounter.hospitalization",
        "max": "0"
      },
      {
        "id": "Encounter.location.id",
        "path": "Encounter.location.id",
        "max": "0"
      },
      {
        "id": "Encounter.location.location",
        "path": "Encounter.location.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.healthbc.org/StructureDefinition/ca-bc-careconnect-location",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Encounter.location.location.id",
        "path": "Encounter.location.location.id",
        "max": "0"
      },
      {
        "id": "Encounter.location.location.reference",
        "path": "Encounter.location.location.reference",
        "comment": "Internal reference to the contained location resource."
      },
      {
        "id": "Encounter.location.location.identifier",
        "path": "Encounter.location.location.identifier",
        "max": "0"
      },
      {
        "id": "Encounter.location.location.display",
        "path": "Encounter.location.location.display",
        "max": "0"
      },
      {
        "id": "Encounter.location.status",
        "path": "Encounter.location.status",
        "max": "0"
      },
      {
        "id": "Encounter.location.period",
        "path": "Encounter.location.period",
        "max": "0"
      },
      {
        "id": "Encounter.serviceProvider",
        "path": "Encounter.serviceProvider",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.healthbc.org/StructureDefinition/ca-bc-organization",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "Encounter.serviceProvider.id",
        "path": "Encounter.serviceProvider.id",
        "max": "0"
      },
      {
        "id": "Encounter.serviceProvider.reference",
        "path": "Encounter.serviceProvider.reference",
        "comment": "Internal reference to the contained Organization resource."
      },
      {
        "id": "Encounter.serviceProvider.identifier",
        "path": "Encounter.serviceProvider.identifier",
        "max": "0"
      },
      {
        "id": "Encounter.serviceProvider.display",
        "path": "Encounter.serviceProvider.display",
        "max": "0"
      },
      {
        "id": "Encounter.partOf",
        "path": "Encounter.partOf",
        "max": "0"
      },
      {
        "id": "Encounter.contained",
        "path": "Encounter.contained",
        "type": [
          {
            "code": "Resource"
          },
          {
            "code": "Practitioner"
          }
        ]
      }
    ]
  }
}