Release 5 Draft Ballot

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions


Clinical Decision Support Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Not linked to any defined compartments

This is the narrative for the resource. See also the XML, JSON or Turtle format.



The official URL for this operation definition is:

The apply operation applies a PlanDefinition to a given context

URL: [base]/PlanDefinition/$apply

URL: [base]/PlanDefinition/[id]/$apply



The plan definition to be applied. If the operation is invoked at the instance level, this parameter is not allowed; if the operation is invoked at the type level, this parameter is required


The subject(s) that is/are the target of the plan to be applied. The subject may be a Patient, Practitioner, Organization, Location, Device, or Group. Subjects provided in this parameter will be resolved as the subject of the PlanDefinition based on the type of the subject. If multiple subjects of the same type are provided, the behavior is implementation-defined


The encounter in context, if any


The practitioner applying the plan definition


The organization applying the plan definition


The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)


Preferred language of the person using the system


The 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


The current setting of the request (inpatient, outpatient, etc.)


Additional detail about the setting of the request, if any


Determines whether the apply should produce a CarePlan with a RequestGroup as an Activity (the default), or just a RequestGroup


The Resource (CarePlan or RequestGroup) that is the result of applying the plan definition

The result of this operation is a CarePlan or RequestGroup resource. The RequestGroup will have actions for each of the applicable actions in the plan based on evaluating the applicability condition in context. For each applicable action, the definition is applied as described in the $apply operation of the ActivityDefinition resource, and the resulting resource is added as an activity to the CarePlan. If the ActivityDefinition includes library references, those libraries will be available to the evaluated expressions. If those libraries have parameters, those parameters will be bound by name to the parameters given to the operation. In addition, parameters to the $apply operation are available within dynamicValue expressions as context variables, accessible by the name of the parameter, prefixed with a percent (%) symbol. For a more detailed description, refer to the PlanDefinition and ActivityDefinition resource documentation. Note that result of this operation is transient (i.e. none of the resources created by the operation are persisted in the server, they are all returned as contained resources in the result). The result effectively represents a proposed set of activities, and it is up to the caller to determine whether and how those activities are actually carried out.



Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.