{
  "resourceType": "StructureDefinition",
  "id": "DataStandardsWales-PSOM-CarePlan",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-CarePlan",
  "name": "DataStandardsWalesPSOMCarePlan",
  "title": "Data Standards Wales PSOM CarePlan",
  "status": "active",
  "publisher": "NHS Wales",
  "contact": [
    {
      "name": "Data Standards",
      "telecom": [
        {
          "system": "email",
          "value": "data.standards@wales.nhs.uk",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The clinical circumstance for PROMs collection. The CarePlan is used to group Collection Events and provide context to the pathway.",
  "purpose": "The CarePlan functions as linking pin of all DSCN metadata relevant for a clinical circumstance.",
  "copyright": "© 2023 NHS Wales.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "PROMs-Metadata-2024004",
      "name": "NHS Wales DSCN Metadata Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CarePlan",
        "path": "CarePlan",
        "short": "Clinical Circumstance"
      },
      {
        "id": "CarePlan.extension",
        "path": "CarePlan.extension",
        "min": 1
      },
      {
        "id": "CarePlan.extension:pathwayLaterality",
        "path": "CarePlan.extension",
        "sliceName": "pathwayLaterality",
        "short": "Laterality of the PSOM pathway",
        "definition": "The laterality is used to capture the anatomical side associated with the healthcare referral / pathway record.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.wales/StructureDefinition/Extension-DataStandardsWales-PSOM-PathwayLaterality"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "comment": "Every PSOM CarePlan SHALL contain exactly one National PSOM Clinical Circumstance Identifier. Additional business identifiers, such as the Referral Identifier or other local identifiers, MAY also be included where required.",
        "min": 1
      },
      {
        "id": "CarePlan.identifier:clinicalCircumstanceIdentifier",
        "path": "CarePlan.identifier",
        "sliceName": "clinicalCircumstanceIdentifier",
        "short": "National PSOM Clinical Circumstance Identifier",
        "definition": "The nationally governed identifier for this Clinical Circumstance, unique across NHS Wales. The value is a standards-compliant UUID (for example UUIDv4) generated by the Health Board/Trust.",
        "comment": "Before assigning a new National PSOM Clinical Circumstance Identifier, the Health Board/Trust SHALL determine whether an identifier already exists for the same Patient, Clinical Circumstance and PROMs Pathway. Where an existing identifier is found, it SHALL be reused and a new UUID SHALL NOT be generated.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-ClinicalCircumstanceIdentifier"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.identifier:referralIdentifier",
        "path": "CarePlan.identifier",
        "sliceName": "referralIdentifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-ReferralIdentifier"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.status",
        "path": "CarePlan.status",
        "comment": "In interactions between the Health Board and the PROMs provider, the CarePlan uses the following statuses:\n\n* Requesting PROMs collection = _active_\r\n* Providing PROMs collection = _active_  \n* Cancelling PROMs collection = _revoked_"
      },
      {
        "id": "CarePlan.intent",
        "path": "CarePlan.intent",
        "comment": "In interactions between the Health Board and the PROMs provider, the CarePlan intent is fixed as:\n\n* Requesting PROMs collection = _order_ \r\n* Providing PROMs collection = _order_\n* Cancelling PROMs collection = _order_"
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "CarePlan.category:treatmentSpecialty",
        "path": "CarePlan.category",
        "sliceName": "treatmentSpecialty",
        "short": "Treatment Specialty Code",
        "definition": "The code for the pathway specialty at the time the PROMs form is generated.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "Identifies the pathway specialty",
          "valueSet": "http://hl7.org/fhir/ValueSet/c80-practice-codes"
        },
        "mapping": [
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MEDPX001X",
            "comment": "Treatment Specialty Code"
          }
        ]
      },
      {
        "id": "CarePlan.category:pathwayType",
        "path": "CarePlan.category",
        "sliceName": "pathwayType",
        "short": "PROMs Pathway Type",
        "definition": "The type of pathway that the PROM is associated to, e.g. lung cancer, heart failure, cataract, etc.",
        "comment": "For local pathways use `.coding.code` _OTH_ and fill the Local PROMs Pathway Type in `.text`.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "Identifies the type of pathway",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-PSOM-PathwayType"
        },
        "mapping": [
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPRPX005X",
            "comment": "PROMs Pathway Type"
          }
        ]
      },
      {
        "id": "CarePlan.category:pathwayType.text",
        "path": "CarePlan.category.text",
        "short": "Local PROMs Pathway Type",
        "definition": "A locally-defined code to identify the PROMs pathway. This type is only required for local pathways.",
        "comment": "For local pathways `.coding.code` SHALL be filled with _OTH_.",
        "mapping": [
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPRPX009X",
            "comment": "Local PROMs Pathway Type"
          }
        ]
      },
      {
        "id": "CarePlan.subject",
        "path": "CarePlan.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX001X",
            "comment": "NHS Number (implicit, main mapping is on Patient.identifier:nhsNumber)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX001A",
            "comment": "NHS Number Status Indicator (implicit, main mapping is on Patient.identifier:nhsNumber.extension:nhsNumberVerificationStatus)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX002A",
            "comment": "Local Person Identifier Origination (implicit, main mapping is on Patient.identifier:[HealthBoard]PasIdentifier.type)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX002X",
            "comment": "Local Person Identifier (implicit, main mapping is on Patient.identifier:[HealthBoard]PasIdentifier.value)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX003X",
            "comment": "Given Name (implicit, main mapping is on Patient.name.given)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX004X",
            "comment": "Family Name (implicit, main mapping is on Patient.name.family)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX005X",
            "comment": "Date of Birth (implicit, main mapping is on Patient.birthDate)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX006X",
            "comment": "Gender Identity (implicit, main mapping is on Patient.gender)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MPDPX007X",
            "comment": "Postcode (implicit, main mapping is on Patient.address.postalCode)"
          }
        ]
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "short": "Reference to Senior Responsible Professional",
        "definition": "Reference to the Senior Responsible Professional, i.e. the professional who has responsibility for the patient within the pathway.",
        "comment": "The Senior Responsible Professional is represented by a Practitioner resource (instance of DataStandardsWales-Practitioner). Sending systems may either reference that Practitioner instance directly, or reference a PractitionerRole instance (DataStandardsWales-PractitionerRole) where the role of the professional is relevant as well. When a PractitionerRole is referenced, the Practitioner is retrieved from `PractitionerRole.practitioner`.\r\n\r\nThe Originating Organisation is no longer derived from this element. It is recorded on `CarePlan.identifier:clinicalCircumstanceIdentifier.assigner`.\r\n\r\nWhile the `.author` element is a good fit for holding the Senior Responsible Professional information, a more elaborate approach could be to use a dedicated CareTeam resource referenced through the `.careTeam` element. However, to reduce implementation workload, we have decided to continue using the `.author` element for this information in the current version.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PractitionerRole"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MEDPX002A",
            "comment": "Senior Responsible Professional Name (implicit, main mapping is on Practitioner.name)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MEDPX002B",
            "comment": "Senior Responsible Professional Identifier Code System (implicit, main mapping is on Practitioner.identifier.system)"
          },
          {
            "identity": "PROMs-Metadata-2024004",
            "map": "MEDPX002C",
            "comment": "Senior Responsible Professional Identifier (implicit, main mapping is on Practitioner.identifier.value)"
          }
        ]
      },
      {
        "id": "CarePlan.activity",
        "path": "CarePlan.activity",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "reference.resolve()"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.activity.outcomeReference",
        "path": "CarePlan.activity.outcomeReference",
        "comment": "The outcome of activities may trigger or lead to re-evaluation of the PROMs collection schedule. For now references to Encounter and Procedure are added because these resources most likely contain information relevant for PROMs collection.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Encounter",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Procedure",
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "comment": "Proposed activities may trigger or lead to re-evaluation of the PROMs collection schedule. For now references to Appointment and ServiceRequest are added because these resources most likely contain information relevant for PROMs collection.\r\n\r\nEach reference to an Appointment or a ServiceRequest represents a planned activity that functions as a trigger for the PROMs provider to re-evaluate the PROMs collection schedule and adjust if necessary.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Appointment",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-ServiceRequest",
              "http://hl7.org/fhir/StructureDefinition/CommunicationRequest",
              "http://hl7.org/fhir/StructureDefinition/DeviceRequest",
              "http://hl7.org/fhir/StructureDefinition/NutritionOrder",
              "http://hl7.org/fhir/StructureDefinition/VisionPrescription",
              "http://hl7.org/fhir/StructureDefinition/RequestGroup",
              "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
              "http://hl7.org/fhir/StructureDefinition/Task"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire",
        "path": "CarePlan.activity",
        "sliceName": "completeQuestionnaire"
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire.outcomeCodeableConcept",
        "path": "CarePlan.activity.outcomeCodeableConcept",
        "max": "0"
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire.outcomeReference",
        "path": "CarePlan.activity.outcomeReference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire.progress",
        "path": "CarePlan.activity.progress",
        "max": "0"
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire.reference",
        "path": "CarePlan.activity.reference",
        "short": "PSOM Task reference",
        "definition": "Each reference to a Task represents a PROMs Tool within a Collection Event. A Collection Event is a trigger to request a patient to fill in a specific PROMs Tool and to receive the scores and answers filled in by the patient.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-PSOM-Task"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity:completeQuestionnaire.detail",
        "path": "CarePlan.activity.detail",
        "max": "0"
      }
    ]
  }
}