{
  "resourceType": "StructureDefinition",
  "id": "CareConnect-LLR-EpisodeOfCare-1",
  "meta": {
    "lastUpdated": "2020-02-07T10:21:29.145+00:00"
  },
  "url": "https://fhir.llr.nhs.uk/STU3/StructureDefinition/CareConnect-LLR-EpisodeOfCare-1",
  "version": "0.0.1",
  "name": "CareConnect-LLR-EpisodeOfCare-1",
  "status": "draft",
  "date": "2022-04-01T09:18:05.6133871+00:00",
  "description": "Constrained version of CareConnect-EpisodeOfCare-1 Profile (v1.1.0) to to support the LLR Care Record. The CareConnect-LLR-EpisodeOfCare-1 resource is intitially being used to share details of Social Care Packages that have been commissoned by the three Local Authorities in the LLR region",
  "copyright": "Copyright © LLR Care Record 2022",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "EpisodeOfCare",
  "baseDefinition": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-EpisodeOfCare-1",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "EpisodeOfCare.id",
        "path": "EpisodeOfCare.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.status",
        "path": "EpisodeOfCare.status",
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.statusHistory",
        "path": "EpisodeOfCare.statusHistory",
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.type",
        "path": "EpisodeOfCare.type",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            },
            {
              "type": "value",
              "path": "coding.code"
            }
          ],
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageName",
        "path": "EpisodeOfCare.type",
        "sliceName": "socialCarePackageName",
        "short": "Name of Service/Package being provided",
        "definition": "Name of specific type of package being provided (e.g. Reablement, Home Based Care XYZ, etc)",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageName.coding",
        "path": "EpisodeOfCare.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageName.coding.system",
        "path": "EpisodeOfCare.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.llr.nhs.uk/STU3/codesystem/LLR-SocialCarePackageDetailCategory"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageName.coding.code",
        "path": "EpisodeOfCare.type.coding.code",
        "min": 1,
        "fixedCode": "package-name"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageName.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "EpisodeOfCare.type.text",
        "comment": "Name of the specific Social Care Package, as per the local system (e.g. Reablement)",
        "min": 1
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageType",
        "path": "EpisodeOfCare.type",
        "sliceName": "socialCarePackageType",
        "short": "Category/class of Service/Package being provided",
        "definition": "Higher level categorisation of package type, e.g. Adults Home Support",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageType.coding",
        "path": "EpisodeOfCare.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageType.coding.system",
        "path": "EpisodeOfCare.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.llr.nhs.uk/STU3/codesystem/LLR-SocialCarePackageDetailCategory"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageType.coding.code",
        "path": "EpisodeOfCare.type.coding.code",
        "min": 1,
        "fixedCode": "package-type"
      },
      {
        "id": "EpisodeOfCare.type:socialCarePackageType.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "EpisodeOfCare.type.text",
        "comment": "Type/Category of the Social Care Package as defined by the local system (e.g. Adults Home Support)",
        "min": 1
      },
      {
        "id": "EpisodeOfCare.patient",
        "path": "EpisodeOfCare.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.llr.nhs.uk/STU3/StructureDefinition/CareConnect-LLR-Patient-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.managingOrganization",
        "path": "EpisodeOfCare.managingOrganization",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.llr.nhs.uk/STU3/StructureDefinition/CareConnect-LLR-Organization-1"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.period",
        "path": "EpisodeOfCare.period",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "EpisodeOfCare.period.start",
        "path": "EpisodeOfCare.period.start",
        "min": 1
      }
    ]
  }
}