This page is part of the Clinical Guidelines (v2.0.0-ballot: STU2 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions
Page standards status: Trial-use | Maturity Level: 2 |
{
"resourceType" : "OperationDefinition",
"id" : "cpg-careplan-apply",
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>URL: [base]/CarePlan/[id]/$apply</p><p>Parameters</p><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>encounter</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a><br/>(<a href=\"http://hl7.org/fhir/R4/search.html#reference\">reference</a>)</td><td/><td><div><p>The encounter in context, if any</p>\n</div></td></tr><tr><td>IN</td><td>practitioner</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a><br/>(<a href=\"http://hl7.org/fhir/R4/search.html#reference\">reference</a>)</td><td/><td><div><p>The practitioner applying the plan definition</p>\n</div></td></tr><tr><td>IN</td><td>organization</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a><br/>(<a href=\"http://hl7.org/fhir/R4/search.html#reference\">reference</a>)</td><td/><td><div><p>The organization applying the plan definition</p>\n</div></td></tr><tr><td>IN</td><td>userType</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td/><td><div><p>The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)</p>\n</div></td></tr><tr><td>IN</td><td>userLanguage</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td/><td><div><p>Preferred language of the person using the system</p>\n</div></td></tr><tr><td>IN</td><td>userTaskContext</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td/><td><div><p>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</p>\n</div></td></tr><tr><td>IN</td><td>setting</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td/><td><div><p>The current setting of the request (inpatient, outpatient, etc.)</p>\n</div></td></tr><tr><td>IN</td><td>settingContext</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td/><td><div><p>Additional detail about the setting of the request, if any</p>\n</div></td></tr><tr><td>IN</td><td>mergeNestedCarePlans</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>True if the result of any nested PlanDefinitions should be merged into the final care plan, false if they should be preserved as nested CarePlans in the output. If this parameter is not specified, the default behavior is to preserve nested care plans in the output.</p>\n</div></td></tr><tr><td>IN</td><td>parameters</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/parameters.html\">Parameters</a></td><td/><td><div><p>Any input parameters defined in libraries referenced by the PlanDefinition. Parameter types are mapped to CQL as specified in the Using CQL section of this implementation guide. If a parameter appears more than once in the input Parameters resource, it is represented with a List in the input CQL. If a parameter has parts, it is represented as a Tuple in the input CQL.</p>\n</div></td></tr><tr><td>IN</td><td>useServerData</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>Whether to use data from the server performing the evaluation. If this parameter is true (the default), then the operation will use data first from any bundles provided as parameters (through the data and prefetch parameters), second data from the server performing the operation, and third, data from the dataEndpoint parameter (if provided). If this parameter is false, the operation will use data first from the bundles provided in the data or prefetch parameters, and second from the dataEndpoint parameter (if provided).</p>\n</div></td></tr><tr><td>IN</td><td>data</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></td><td/><td><div><p>Data to be made available to the PlanDefinition evaluation. This parameter is exclusive with the prefetchData parameter (i.e. either provide all data as a single bundle, or provide data using multiple bundles with prefetch descriptions).</p>\n</div></td></tr><tr><td>IN</td><td>prefetchData</td><td/><td>0..*</td><td></td><td/><td><div><p>Data to be made available to the PlanDefinition evaluation, organized as prefetch response bundles. Each prefetchData parameter specifies either the name of the prefetchKey it is satisfying, a DataRequirement describing the prefetch, or both.</p>\n</div></td></tr><tr><td>IN</td><td>prefetchData.key</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#string\">string</a></td><td/><td><div><p>The key of the prefetch item. This typically corresponds to the name of a parameter in a library, or the name of a prefetch item in a CDS Hooks discovery response</p>\n</div></td></tr><tr><td>IN</td><td>prefetchData.descriptor</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/metadatatypes.html#DataRequirement\">DataRequirement</a></td><td/><td><div><p>A DataRequirement describing the content of the prefetch item.</p>\n</div></td></tr><tr><td>IN</td><td>prefetchData.data</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></td><td/><td><div><p>The prefetch data as a Bundle. If the prefetchData has no prefetchResult part, it indicates there is no data associated with this prefetch item.</p>\n</div></td></tr><tr><td>IN</td><td>dataEndpoint</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/endpoint.html\">Endpoint</a></td><td/><td><div><p>An endpoint to use to access data referenced by retrieve operations in libraries referenced by the PlanDefinition. If provided, this endpoint is used after the data or prefetchData bundles, and the server, if the useServerData parameter is true.</p>\n</div></td></tr><tr><td>IN</td><td>contentEndpoint</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/endpoint.html\">Endpoint</a></td><td/><td><div><p>An endpoint to use to access content (i.e. libraries) referenced by the PlanDefinition. If no content endpoint is supplied, the evaluation will attempt to retrieve content from the server on which the operation is being performed.</p>\n</div></td></tr><tr><td>IN</td><td>terminologyEndpoint</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/endpoint.html\">Endpoint</a></td><td/><td><div><p>An endpoint to use to access terminology (i.e. valuesets, codesystems, and membership testing) referenced by the PlanDefinition. If no terminology endpoint is supplied, the evaluation will attempt to use the server on which the operation is being performed as the terminology server.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/careplan.html\">CarePlan</a></td><td/><td><div><p>The CarePlan that is the result of applying the optional aspects of the input CarePlan</p>\n</div></td></tr></table><div><p>The result of this operation is the updated CarePlan resource that is the result of applying any optional logic in any RequestGroup activities in the input CarePlan. The resulting RequestGroups will have actions for each of the applicable actions in the requestgroup 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.</p>\n</div></div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 2
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "trial-use"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "cds"
}
],
"url" : "http://hl7.org/fhir/uv/cpg/OperationDefinition/cpg-careplan-apply",
"version" : "2.0.0-ballot",
"name" : "CPGCarePlanApply",
"title" : "CPG CarePlan Apply",
"status" : "active",
"kind" : "operation",
"date" : "2023-12-19T19:53:17+00:00",
"publisher" : "HL7 International / Clinical Decision Support",
"contact" : [
{
"name" : "HL7 International / Clinical Decision Support",
"telecom" : [
{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/dss"
}
]
}
],
"description" : "The apply operation applies any conditional logic within a CarePlan to a given context",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}
]
}
],
"code" : "apply",
"comment" : "The result of this operation is the updated CarePlan resource that is the result of applying any optional logic in any RequestGroup activities in the input CarePlan. The resulting RequestGroups will have actions for each of the applicable actions in the requestgroup 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.",
"resource" : [
"CarePlan"
],
"system" : false,
"type" : false,
"instance" : true,
"parameter" : [
{
"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" : "mergeNestedCarePlans",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "True if the result of any nested PlanDefinitions should be merged into the final care plan, false if they should be preserved as nested CarePlans in the output. If this parameter is not specified, the default behavior is to preserve nested care plans in the output.",
"type" : "boolean"
},
{
"name" : "parameters",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Any input parameters defined in libraries referenced by the PlanDefinition. Parameter types are mapped to CQL as specified in the Using CQL section of this implementation guide. If a parameter appears more than once in the input Parameters resource, it is represented with a List in the input CQL. If a parameter has parts, it is represented as a Tuple in the input CQL.",
"type" : "Parameters"
},
{
"name" : "useServerData",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Whether to use data from the server performing the evaluation. If this parameter is true (the default), then the operation will use data first from any bundles provided as parameters (through the data and prefetch parameters), second data from the server performing the operation, and third, data from the dataEndpoint parameter (if provided). If this parameter is false, the operation will use data first from the bundles provided in the data or prefetch parameters, and second from the dataEndpoint parameter (if provided).",
"type" : "boolean"
},
{
"name" : "data",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "Data to be made available to the PlanDefinition evaluation. This parameter is exclusive with the prefetchData parameter (i.e. either provide all data as a single bundle, or provide data using multiple bundles with prefetch descriptions).",
"type" : "Bundle"
},
{
"name" : "prefetchData",
"use" : "in",
"min" : 0,
"max" : "*",
"documentation" : "Data to be made available to the PlanDefinition evaluation, organized as prefetch response bundles. Each prefetchData parameter specifies either the name of the prefetchKey it is satisfying, a DataRequirement describing the prefetch, or both.",
"part" : [
{
"name" : "key",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "The key of the prefetch item. This typically corresponds to the name of a parameter in a library, or the name of a prefetch item in a CDS Hooks discovery response",
"type" : "string"
},
{
"name" : "descriptor",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "A DataRequirement describing the content of the prefetch item.",
"type" : "DataRequirement"
},
{
"name" : "data",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "The prefetch data as a Bundle. If the prefetchData has no prefetchResult part, it indicates there is no data associated with this prefetch item.",
"type" : "Bundle"
}
]
},
{
"name" : "dataEndpoint",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "An endpoint to use to access data referenced by retrieve operations in libraries referenced by the PlanDefinition. If provided, this endpoint is used after the data or prefetchData bundles, and the server, if the useServerData parameter is true.",
"type" : "Endpoint"
},
{
"name" : "contentEndpoint",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "An endpoint to use to access content (i.e. libraries) referenced by the PlanDefinition. If no content endpoint is supplied, the evaluation will attempt to retrieve content from the server on which the operation is being performed.",
"type" : "Endpoint"
},
{
"name" : "terminologyEndpoint",
"use" : "in",
"min" : 0,
"max" : "1",
"documentation" : "An endpoint to use to access terminology (i.e. valuesets, codesystems, and membership testing) referenced by the PlanDefinition. If no terminology endpoint is supplied, the evaluation will attempt to use the server on which the operation is being performed as the terminology server.",
"type" : "Endpoint"
},
{
"name" : "return",
"use" : "out",
"min" : 1,
"max" : "1",
"documentation" : "The CarePlan that is the result of applying the optional aspects of the input CarePlan",
"type" : "CarePlan"
}
]
}
IG © 2023+ HL7 International / Clinical Decision Support. Package hl7.fhir.uv.cpg#2.0.0-ballot based on FHIR 4.0.1. Generated 2023-12-19
Links: Table of Contents |
QA Report
| Version History |
|
Propose a change