This page is part of the FHIR Specification (v5.0.0-ballot: FHIR R5 Ballot Preview). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3
Clinical Decision Support Work Group | Maturity Level: N/A | Standards Status: Informative |
Raw JSON (canonical form + also see JSON Format Specification)
Operation Definition
{ "resourceType" : "OperationDefinition", "id" : "PlanDefinition-apply", "text" : { "status" : "extensions", "div" : "<div>!-- Snipped for Brevity --></div>" }, "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", "valueInteger" : 3 }, { "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", "valueCode" : "trial-use" }], "url" : "http://hl7.org/fhir/OperationDefinition/PlanDefinition-apply", "version" : "5.0.0-ballot", "name" : "Apply", "title" : "Apply", "status" : "draft", "kind" : "operation", "experimental" : false, "date" : "2022-09-07T10:58:29+10:00", "publisher" : "HL7 (FHIR Project)", "contact" : [{ "telecom" : [{ "system" : "url", "value" : "http://hl7.org/fhir" }, { "system" : "email", "value" : "fhir@lists.hl7.org" }] }], "description" : "The apply operation applies a PlanDefinition to a given subject", "affectsState" : false, "code" : "apply", "comment" : "The result of this operation is a Bundle for each subject, where the Bundle contains as its first entry a RequestOrchestration that is the direct result of applying the PlanDefinition to that subject, and any subsequent entries in the Bundle are resources that were created or updated as part of that process. The RequestOrchestration 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 entry to the Bundle. 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 entries in the result Bundle(s)). 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 and/or persisted.", "resource" : ["PlanDefinition"], "system" : false, "type" : true, "instance" : true, "parameter" : [{ "name" : "planDefinition", "use" : "in", "min" : 0, "max" : "1", "documentation" : "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, or a url (and optionally version) must be supplied", "type" : "PlanDefinition" }, { "name" : "url", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The url of 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 (and optionally the version), or the planDefinition parameter must be supplied", "type" : "canonical", "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/PlanDefinition"], "searchType" : "reference" }, { "name" : "version", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The version of 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 may only be used if the url parameter is supplied.", "type" : "string" }, { "name" : "subject", "use" : "in", "min" : 1, "max" : "*", "documentation" : "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", "type" : "string", "searchType" : "reference" }, { "name" : "encounter", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The encounter in context, if any", "type" : "string", "searchType" : "reference" }, { "name" : "practitioner", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The practitioner applying the plan definition", "type" : "string", "searchType" : "reference" }, { "name" : "organization", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The organization applying the plan definition", "type" : "string", "searchType" : "reference" }, { "name" : "userType", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)", "type" : "CodeableConcept" }, { "name" : "userLanguage", "use" : "in", "min" : 0, "max" : "1", "documentation" : "Preferred language of the person using the system", "type" : "CodeableConcept" }, { "name" : "userTaskContext", "use" : "in", "min" : 0, "max" : "1", "documentation" : "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", "type" : "CodeableConcept" }, { "name" : "setting", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The current setting of the request (inpatient, outpatient, etc.)", "type" : "CodeableConcept" }, { "name" : "settingContext", "use" : "in", "min" : 0, "max" : "1", "documentation" : "Additional detail about the setting of the request, if any", "type" : "CodeableConcept" }, { "name" : "return", "use" : "out", "min" : 0, "max" : "*", "documentation" : "A Bundle for each input subject that is the result of applying the plan definition to that subject", "type" : "Bundle" }] }
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.