Clinical Practice Guidelines, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 2.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cqf-recommendations/ and changes regularly. See the Directory of published versions
Official URL: http://hl7.org/fhir/uv/cpg/OperationDefinition/cpg-activitydefinition-apply | Version: 2.0.0 | |||
Standards status: Trial-use | Maturity Level: 2 | Computable Name: CPGActivityDefinitionApply | ||
Other Identifiers: OID:2.16.840.1.113883.4.642.40.48.33.1 |
The apply operation applies a activityDefinition to a given context
Generated Narrative: OperationDefinition cpg-activitydefinition-apply
URL: [base]/ActivityDefinition/$apply
URL: [base]/ActivityDefinition/[id]/$apply
Use | Name | Scope | Cardinality | Type | Binding | Documentation |
IN | url | 0..1 | uri | Canonical URL of the ActivityDefinition when invoked at the resource type level. This is exclusive with the | ||
IN | version | 0..1 | string | Version of the ActivityDefinition when invoked at the resource type level. This is exclusive with the | ||
IN | activityDefinition | 0..1 | ActivityDefinition | The activity definition to apply. If the operation is invoked on an instance, this parameter is not allowed. If the operation is invoked at the type level, this parameter is required | ||
IN | subject | 1..* | string (reference) | The subject(s) that is/are the target of the activity definition 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 ActivityDefinition based on the type of the subject. If multiple subjects of the same type are provided, the behavior is implementation-defined | ||
IN | encounter | 0..1 | string (reference) | The encounter in context, if any | ||
IN | practitioner | 0..1 | string (reference) | The practitioner in context | ||
IN | organization | 0..1 | string (reference) | The organization in context | ||
IN | userType | 0..1 | CodeableConcept | The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.) | ||
IN | userLanguage | 0..1 | CodeableConcept | Preferred language of the person using the system | ||
IN | userTaskContext | 0..1 | CodeableConcept | 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 | ||
IN | setting | 0..1 | CodeableConcept | The current setting of the request (inpatient, outpatient, etc.) | ||
IN | settingContext | 0..1 | CodeableConcept | Additional detail about the setting of the request, if any | ||
IN | parameters | 0..1 | Parameters | Any input parameters defined in libraries referenced by the ActivityDefinition. 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. | ||
IN | useServerData | 0..1 | boolean | 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). | ||
IN | data | 0..1 | Bundle | Data to be made available to the ActivityDefinition 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). | ||
IN | prefetchData | 0..* | Data to be made available to the ActivityDefinition 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. | |||
IN | prefetchData.key | 0..1 | string | 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 | ||
IN | prefetchData.descriptor | 0..1 | DataRequirement | A DataRequirement describing the content of the prefetch item. | ||
IN | prefetchData.data | 0..1 | Bundle | The prefetch data as a Bundle. If the prefetchData has no prefetchResult part, it indicates there is no data associated with this prefetch item. | ||
IN | dataEndpoint | 0..1 | Endpoint | An endpoint to use to access data referenced by retrieve operations in libraries referenced by the ActivityDefinition. If provided, this endpoint is used after the data or prefetchData bundles, and the server, if the useServerData parameter is true. | ||
IN | artifactEndpointConfiguration | 0..* | Configuration information to resolve canonical artifacts Processing Semantics: Create a canonical-like reference (e.g.
Rank each
NOTE: For evenly ranked | |||
IN | artifactEndpointConfiguration.artifactRoute | 0..1 | uri | An optional route used to determine whether this endpoint is expected to be able to resolve artifacts that match the route (i.e. start with the route, up to and including the entire url) | ||
IN | artifactEndpointConfiguration.endpointUri | 0..1 | uri | The URI of the endpoint, exclusive with the | ||
IN | artifactEndpointConfiguration.endpoint | 0..1 | Endpoint | An Endpoint resource describing the endpoint, exclusive with the | ||
IN | terminologyEndpoint | 0..1 | Endpoint | An endpoint to use to access terminology (i.e. valuesets, codesystems, and membership testing) referenced by the ActivityDefinition. 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. | ||
OUT | return | 1..1 | Resource | The request resource that is the result of applying the definition |
The result of invoking this operation is a resource of the type specified by the activity definition, with all the definitions resolved as appropriate for the type of resource. Any dynamicValue elements will be evaluated (in the order in which they appear in the resource) and the results applied to the returned resource.
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 ActivityDefinition resource.
Note that the result of this operation is transient (i.e. the resource created by the operation is not persisted in the server, but returned as a contained resource in the result). The result effectively represents a proposed activity, and it is up to the caller to determine whether and how the activity is carried out.