11.4.1PlanDefinition

 

11.4.1.1Introduction

The FHIR Clinical Reasoning Module defines the PlanDefinition resource and several associated operations. A plan definition is a pre-defined group of actions to be taken in particular circumstances, often including conditional elements, options, and other decision points. The resource is flexible enough to be used to represent a variety of workflows, as well as clinical decision support and quality improvement assets, including order sets, protocols, and decision support rules.

PlanDefinitions can contain hierarchical groups of action definitions, where each action definition describes an activity to be performed (often in terms of an ActivityDefinition resource), and each group defines additional behavior, relationships, and applicable conditions between the actions in the overall definition.

In addition to describing what should take place, each action in a plan definition can specify when and whether the action should take place. For when the action should be taken, the trigger element specifies the action should be taken in response to some trigger occurring (such as a particular point in a workflow being reached, or as the result of a prescription being ordered). For whether the action should be taken, the condition element can be used to provide an expression that evaluates to true or false to indicate the applicability of the action to the specific context.

The process of applying a PlanDefinition to a particular context typically produces request resources representing the actions that should be performed, grouped within a RequestOrchestration to capture relationships between the resulting request resources.

Each ActivityDefinition is used to construct a specific resource, based on the definition of the activity and combined with contextual information for the particular patient that the plan definition is being applied to.

{
   "resourceType": "PlanDefinition",
   "id": "opioidcds-04",
   "url": "http://hl7.org/fhir/ig/opioid-cds/PlanDefinition/opioidcds-04",
   "identifier": [
      {
         "system": "urn:ietf:rfc:3986",
         "value": "urn:oid:2.16.840.1.113883.4.642.11.4"
      },
      {
         "use": "official",
         "value": "cdc-opioid-guidance"
      }
   ],
   "version": "0.1.0",
   "name": "Cdcopioid04",
   "title": "CDC Opioid Prescribing Guideline Recommendation #4",
   "type": {
      "coding": [
         {
            "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type",
            "code": "eca-rule",
            "display": "ECA Rule"
         }
      ]
   },
   "status": "draft",
   "date": "2018-03-19",
   "publisher": "Centers for Disease Control and Prevention (CDC)",
   "description": "When starting opioid therapy for chronic pain, clinicians should prescribe immediate-release opioids instead of extended-release/long-acting (ER/LA) opioids.",
   "useContext": [
      {
         "code": {
            "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
            "code": "focus",
            "display": "Clinical Focus"
         },
         "valueCodeableConcept": {
            "coding": [
               {
                  "system": "http://snomed.info/sct",
                  "code": "182888003",
                  "display": "Medication requested (situation)"
               }
            ]
         }
      },
      {
         "code": {
            "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
            "code": "focus",
            "display": "Clinical Focus"
         },
         "valueCodeableConcept": {
            "coding": [
               {
                  "system": "http://snomed.info/sct",
                  "code": "82423001",
                  "display": "Chronic pain (finding)"
               }
            ]
         }
      }
   ],
   "jurisdiction": [
      {
         "coding": [
            {
               "system": "urn:iso:std:iso:3166",
               "code": "US",
               "display": "United States of America"
            }
         ]
      }
   ],
   "purpose": "CDC’s Guideline for Prescribing Opioids for Chronic Pain is intended to improve communication between providers and patients about the risks and benefits of opioid therapy for chronic pain, improve the safety and effectiveness of pain treatment, and reduce the risks associated with long-term opioid therapy, including opioid use disorder and overdose. The Guideline is not intended for patients who are in active cancer treatment, palliative care, or end-of-life care.",
   "usage": "Providers should use caution when prescribing extended-release/long-acting (ER/LA) opioids as they carry a higher risk and negligible benefit compared to immediate-release opioids.",
   "copyright": "© CDC 2016+.",
   "topic": [
      {
         "text": "Opioid Prescribing"
      }
   ],
   "author": [
      {
         "name": "Kensaku Kawamoto, MD, PhD, MHS"
      },
      {
         "name": "Bryn Rhodes"
      },
      {
         "name": "Floyd Eisenberg, MD, MPH"
      },
      {
         "name": "Robert McClure, MD, MPH"
      }
   ],
   "relatedArtifact": [
      {
         "type": "documentation",
         "display": "CDC guideline for prescribing opioids for chronic pain",
         "document": {
            "url": "https://guidelines.gov/summaries/summary/50153/cdc-guideline-for-prescribing-opioids-for-chronic-pain---united-states-2016#420"
         }
      },
      {
         "type": "documentation",
         "display": "MME Conversion Tables",
         "document": {
            "url": "https://www.cdc.gov/drugoverdose/pdf/calculating_total_daily_dose-a.pdf"
         }
      }
   ],
   "library": [
      "http://example.org/fhir/Library/opioidcds-recommendation-04"
   ],
   "action": [
      {
         "title": "Extended-release opioid prescription triggered.",
         "description": "Checking if the trigger prescription meets the inclusion criteria for recommendation #4 workflow.",
         "documentation": [
            {
               "type": "documentation",
               "document": {
                  "extension": [
                     {
                        "url": "http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation",
                        "valueCodeableConcept": {
                           "coding": [
                              {
                                 "system": "http://terminology.hl7.org/CodeSystem/recommendation-strength",
                                 "code": "strong",
                                 "display": "Strong"
                              }
                           ]
                        }
                     },
                     {
                        "url": "http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence",
                        "valueCodeableConcept": {
                           "coding": [
                              {
                                 "system": "http://terminology.hl7.org/CodeSystem/evidence-quality",
                                 "code": "low",
                                 "display": "Low quality"
                              }
                           ]
                        }
                     }
                  ]
               }
            }
         ],
         "trigger": [
            {
               "type": "named-event",
               "name": "medication-prescribe"
            }
         ],
         "condition": [
            {
               "kind": "applicability",
               "expression": {
                  "description": "Check whether the opioid prescription for the existing patient is extended-release without any opioids-with-abuse-potential prescribed in the past 90 days.",
                  "language": "text/cql-identifier",
                  "expression": "Inclusion Criteria"
               }
            }
         ],
         "groupingBehavior": "visual-group",
         "selectionBehavior": "exactly-one",
         "dynamicValue": [
            {
               "path": "action.title",
               "expression": {
                  "language": "text/cql-identifier",
                  "expression": "Get Summary"
               }
            },
            {
               "path": "action.description",
               "expression": {
                  "language": "text/cql-identifier",
                  "expression": "Get Detail"
               }
            },
            {
               "path": "activity.extension",
               "expression": {
                  "language": "text/cql-identifier",
                  "expression": "Get Indicator"
               }
            }
         ],
         "action": [
            {
               "description": "Will prescribe immediate release"
            },
            {
               "description": "Risk of overdose carefully considered and outweighed by benefit; snooze 3 mo"
            },
            {
               "description": "N/A - see comment; snooze 3 mo"
            }
         ]
      }
   ]
}

11.4.1.2Operations

HAPI implements the $apply operation. Support for additional operations is planned.

11.4.1.3Apply

The $apply operation applies a PlanDefinition to a given context. This implementation follows the FHIR Specification and supports the FHIR Clinical Guidelines IG. In addition, an R5 version of apply is made available for R4 instances. This will cause $apply to return a Bundle of resources instead of a CarePlan. This can be invoked with $r5.apply.

11.4.1.3.1Example PlanDefinition

Some example PlanDefinition workflows are available in the opioid-cds-r4 IG. Full Bundles with all the required supporting resources are available here. You can download a Bundle and load it on your server as a transaction:

POST http://your-server-base/fhir opioidcds-10-patient-view-bundle.json

These Bundles do not include example Patient clinical data. Applying a PlanDefinition can be invoked with:

GET http://your-server-base/fhir/PlanDefinition/opioidcds-10-patient-view/$apply?subject=Patient/patientId&encounter=Encounter/encounterId&practitioner=Practitioner/practitionerId

11.4.1.3.2Additional Parameters

The following additional parameters are supported for the $apply and $r5.apply operation:

ParameterTypeDescription
organizationStringThe organization in context
userTypeStringThe type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)
userLanguageStringPreferred language of the person using the system
userTaskContextStringThe task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources
settingStringThe current setting of the request (inpatient, outpatient, etc.)
settingContextStringAdditional detail about the setting of the request, if any
parametersParametersAny input parameters defined in libraries referenced by the PlanDefinition.
dataBundleData to be made available to the PlanDefinition evaluation.
dataEndpointEndpointAn endpoint to use to access data referenced by retrieve operations in libraries referenced by the PlanDefinition.
contentEndpointEndpointAn endpoint to use to access content (i.e. libraries) referenced by the PlanDefinition.
terminologyEndpointEndpointAn endpoint to use to access terminology (i.e. valuesets, codesystems, and membership testing) referenced by the PlanDefinition.

11.4.1.4Package

The package operation for PlanDefinition will generate a Bundle of resources that includes the PlanDefinition as well as any related resources which can then be shared. This implementation follows the CRMI IG guidance for packaging artifacts.