{
  "resourceType": "StructureDefinition",
  "id": "00782a71-f322-4a44-94b9-734a6e4db41f",
  "meta": {
    "versionId": "7",
    "lastUpdated": "2023-01-10T02:28:06.0325314+00:00"
  },
  "url": "http://ehealth.bc.ca/fhir/StructureDefinition/CarePlan",
  "name": "CarePlan",
  "status": "draft",
  "date": "2022-03-04T22:33:55.2668635+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CarePlan.id",
        "path": "CarePlan.id",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "CAREPLAN_IDENTIFIER.VALUE"
          }
        ]
      },
      {
        "id": "CarePlan.meta",
        "path": "CarePlan.meta"
      },
      {
        "id": "CarePlan.meta.versionId",
        "path": "CarePlan.meta.versionId",
        "comment": "Cardinality of activity updated to \"1..1\"",
        "fixedId": "2022.02"
      },
      {
        "id": "CarePlan.meta.profile",
        "path": "CarePlan.meta.profile",
        "comment": "Apply \"http://ehealth.bc.ca/fhir/StructureDefinition/CarePlan\"",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.implicitRules",
        "path": "CarePlan.implicitRules",
        "max": "0"
      },
      {
        "id": "CarePlan.language",
        "path": "CarePlan.language",
        "max": "0"
      },
      {
        "id": "CarePlan.text",
        "path": "CarePlan.text",
        "max": "0"
      },
      {
        "id": "CarePlan.contained",
        "path": "CarePlan.contained",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "Condition",
              "Location"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.contained.meta",
        "path": "CarePlan.contained.meta",
        "type": [
          {
            "code": "Meta",
            "profile": [
              "Condition",
              "Location"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.contained.meta.profile",
        "path": "CarePlan.contained.meta.profile",
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://ehealth.bc.ca/fhir/StructureDefinition/Condition",
              "http://ehealth.bc.ca/fhir/StructureDefinition/Location"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.identifier.id",
        "path": "CarePlan.identifier.id",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier.use",
        "path": "CarePlan.identifier.use",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier.type",
        "path": "CarePlan.identifier.type",
        "min": 1
      },
      {
        "id": "CarePlan.identifier.type.id",
        "path": "CarePlan.identifier.type.id",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier.type.coding",
        "path": "CarePlan.identifier.type.coding",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier.type.text",
        "path": "CarePlan.identifier.type.text",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-fha",
            "map": "\"FHAPARISSC\""
          },
          {
            "identity": "source-vcha",
            "map": "\"VCHPARISSC\""
          },
          {
            "identity": "source-nha",
            "map": "\"NHACEDARSC\""
          },
          {
            "identity": "source-eForm",
            "map": "\"EFORMSC\""
          }
        ]
      },
      {
        "id": "CarePlan.identifier.system",
        "path": "CarePlan.identifier.system",
        "min": 1,
        "mapping": [
          {
            "identity": "source-fha",
            "map": "\"https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-fha\""
          },
          {
            "identity": "source-nha",
            "map": "\"https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-nha\""
          },
          {
            "identity": "source-vcha",
            "map": "\"https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-vcha\""
          },
          {
            "identity": "source-eForm",
            "map": "\"https://ehealth.bc.ca/NamingSystem/ca-bc-eForm\""
          }
        ]
      },
      {
        "id": "CarePlan.identifier.value",
        "path": "CarePlan.identifier.value",
        "min": 1
      },
      {
        "id": "CarePlan.identifier.period",
        "path": "CarePlan.identifier.period",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier.assigner",
        "path": "CarePlan.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CarePlan.instantiatesCanonical",
        "path": "CarePlan.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "CarePlan.instantiatesUri",
        "path": "CarePlan.instantiatesUri",
        "max": "0"
      },
      {
        "id": "CarePlan.basedOn",
        "path": "CarePlan.basedOn",
        "max": "0"
      },
      {
        "id": "CarePlan.replaces",
        "path": "CarePlan.replaces",
        "max": "0"
      },
      {
        "id": "CarePlan.partOf",
        "path": "CarePlan.partOf",
        "max": "0"
      },
      {
        "id": "CarePlan.status",
        "path": "CarePlan.status",
        "comment": "Apply \"completed\""
      },
      {
        "id": "CarePlan.intent",
        "path": "CarePlan.intent",
        "comment": "Apply \"order\""
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "max": "0"
      },
      {
        "id": "CarePlan.title",
        "path": "CarePlan.title",
        "max": "0"
      },
      {
        "id": "CarePlan.description",
        "path": "CarePlan.description",
        "max": "0"
      },
      {
        "id": "CarePlan.subject.id",
        "path": "CarePlan.subject.id",
        "max": "0"
      },
      {
        "id": "CarePlan.subject.reference",
        "path": "CarePlan.subject.reference",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "\"Patient/Patient1\""
          },
          {
            "identity": "source-eForm",
            "map": "fullURL + \"Patient/\" + (Patient ID)",
            "comment": "http://ehealth.bc.ca/eForm/fhir/"
          },
          {
            "identity": "source-HA-2022",
            "map": "fullURL + \"Patient/\" + (Patient ID)"
          }
        ]
      },
      {
        "id": "CarePlan.subject.type",
        "path": "CarePlan.subject.type",
        "max": "0"
      },
      {
        "id": "CarePlan.subject.identifier",
        "path": "CarePlan.subject.identifier",
        "max": "0"
      },
      {
        "id": "CarePlan.subject.display",
        "path": "CarePlan.subject.display",
        "max": "0"
      },
      {
        "id": "CarePlan.encounter",
        "path": "CarePlan.encounter",
        "max": "0"
      },
      {
        "id": "CarePlan.period",
        "path": "CarePlan.period",
        "min": 1
      },
      {
        "id": "CarePlan.period.id",
        "path": "CarePlan.period.id",
        "max": "0"
      },
      {
        "id": "CarePlan.period.start",
        "path": "CarePlan.period.start",
        "min": 1
      },
      {
        "id": "CarePlan.created",
        "path": "CarePlan.created",
        "max": "0"
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "max": "0"
      },
      {
        "id": "CarePlan.contributor",
        "path": "CarePlan.contributor",
        "max": "0"
      },
      {
        "id": "CarePlan.careTeam",
        "path": "CarePlan.careTeam",
        "max": "0"
      },
      {
        "id": "CarePlan.addresses",
        "path": "CarePlan.addresses",
        "max": "0"
      },
      {
        "id": "CarePlan.supportingInfo",
        "path": "CarePlan.supportingInfo",
        "max": "0"
      },
      {
        "id": "CarePlan.goal",
        "path": "CarePlan.goal",
        "max": "0"
      },
      {
        "id": "CarePlan.activity",
        "path": "CarePlan.activity",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.activity.id",
        "path": "CarePlan.activity.id",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.outcomeCodeableConcept",
        "path": "CarePlan.activity.outcomeCodeableConcept",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.outcomeReference",
        "path": "CarePlan.activity.outcomeReference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.progress",
        "path": "CarePlan.activity.progress",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail",
        "path": "CarePlan.activity.detail",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.id",
        "path": "CarePlan.activity.detail.id",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.kind",
        "path": "CarePlan.activity.detail.kind",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesCanonical",
        "path": "CarePlan.activity.detail.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesUri",
        "path": "CarePlan.activity.detail.instantiatesUri",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.code",
        "path": "CarePlan.activity.detail.code",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonCode",
        "path": "CarePlan.activity.detail.reasonCode",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonReference",
        "path": "CarePlan.activity.detail.reasonReference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.activity.detail.reasonReference.reference",
        "path": "CarePlan.activity.detail.reasonReference.reference",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "\"#Condition\"+ <HA SC external ID>"
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.reasonReference.type",
        "path": "CarePlan.activity.detail.reasonReference.type",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonReference.identifier",
        "path": "CarePlan.activity.detail.reasonReference.identifier",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonReference.display",
        "path": "CarePlan.activity.detail.reasonReference.display",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.goal",
        "path": "CarePlan.activity.detail.goal",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.status",
        "path": "CarePlan.activity.detail.status",
        "comment": "Apply \"completed\""
      },
      {
        "id": "CarePlan.activity.detail.statusReason",
        "path": "CarePlan.activity.detail.statusReason",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.doNotPerform",
        "path": "CarePlan.activity.detail.doNotPerform",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.scheduled[x]",
        "path": "CarePlan.activity.detail.scheduled[x]",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.location",
        "path": "CarePlan.activity.detail.location",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.location.reference",
        "path": "CarePlan.activity.detail.location.reference",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "\"#Location/\"(SDL_ID)+\"org\"+(BRANCH_ID)"
          },
          {
            "identity": "source-eForm",
            "map": "fullURL+\"Location/\"+(SDL_ID)+\"org\"+(BRANCH_ID)",
            "comment": "http://ehealth.bc.ca/eform/fhir"
          },
          {
            "identity": "source-HA-suppData",
            "map": "\"#Location\" + (SDL ID)"
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.location.type",
        "path": "CarePlan.activity.detail.location.type",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.location.identifier",
        "path": "CarePlan.activity.detail.location.identifier",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.location.display",
        "path": "CarePlan.activity.detail.location.display",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.performer",
        "path": "CarePlan.activity.detail.performer",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x]",
        "path": "CarePlan.activity.detail.product[x]",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.product[x].id",
        "path": "CarePlan.activity.detail.product[x].id",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding",
        "path": "CarePlan.activity.detail.product[x].coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.id",
        "path": "CarePlan.activity.detail.product[x].coding.id",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.system",
        "path": "CarePlan.activity.detail.product[x].coding.system",
        "code": [
          {
            "system": "http://snomed.info/sct"
          }
        ],
        "comment": "See Code",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.version",
        "path": "CarePlan.activity.detail.product[x].coding.version",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.code",
        "path": "CarePlan.activity.detail.product[x].coding.code",
        "comment": "SNOMED code of vaccine",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.display",
        "path": "CarePlan.activity.detail.product[x].coding.display",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.product[x].coding.userSelected",
        "path": "CarePlan.activity.detail.product[x].coding.userSelected",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x].text",
        "path": "CarePlan.activity.detail.product[x].text",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.dailyAmount",
        "path": "CarePlan.activity.detail.dailyAmount",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.quantity",
        "path": "CarePlan.activity.detail.quantity",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.description",
        "path": "CarePlan.activity.detail.description",
        "max": "0"
      },
      {
        "id": "CarePlan.note",
        "path": "CarePlan.note",
        "max": "0"
      }
    ]
  }
}