$evaluate

CQL Library Evaluate

activeCQL (UV)2.0.0operation12 inputs1 output

Evaluates the contents of a library and returns the results as a Parameters resource. Results are returned as described in the FHIR Type Mapping section of the conformance page of this implementation guide. Unless specific expressions are named, the operation will provide the results for all public top-level expression declarations in the library. Use the includePrivate parameter to indicate that private expressions should be included as well.

Metadata

hl7.org/fhir
Canonical URL
http://hl7.org/fhir/uv/cql/OperationDefinition/cql-library-evaluate
Code
$evaluate
Kind
operation
Affects State
No
Publisher
HL7 International / Clinical Decision Support

Invocation Context

Can be invoked at:
Type LevelInstance Level
Target Resources:
Affects State:No

Input Parameters (12)

NameTypeCard.Description
urlcanonical0..1The canonical url (with optional version) of the library to be evaluated. This parameter is only used when the operation is invoked at the type level, and is exclusive with the library parameter.
libraryLibrary0..1The library to be evaluated, provided as an input. This parameter is only used when the operation is invoked at the type level, and is exclusive with the url parameter.
subjectstring0..1Subject for which the library will be evaluated. This corresponds to the context in which the library will be evaluated and is represented as a relative FHIR id (e.g. Patient/123), which establishes both the context and context value for the evaluation
expressionstring0..*The identifier (optionally qualified) of the expression(s) to be evaluated, regardless of whether the declaration is private. If no expression names are provided, the operation evaluates all public expression definitions in the library (or all expressions if includePrivate is true). If an expression name is unqualified, it refers to the name of an expression defined in the library being evaluated. If the expression name is qualified, the name refers to an the identifier of an expression defined in the library with the qualifier name, and the qualifier name must be the name of a library included by the library being evaluated (or an included library, recursively). Note that this may result in expression results being included multiple times, as expressions in included libraries may be invoked multiple times from the library being evaluated.
includePrivateboolean0..1Indicates whether to include private expression declarations in the result. Note that if expressions are named, this parameter is ignored. If this parameter is not provided, the default behavior is that only public expression declarations will be included.
parametersParameters0..1Any input parameters for the library. Parameters defined in this input will be bound by name to parameters defined in the CQL library (or included libraries, recursively). 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. If parameter names are qualified, the parameter will be bound only to parameters in the library with the qualifier name, and the qualifier name must be the name of a library included by the library being evaluated (or an included library, recursively).
useServerDataboolean0..1Whether 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).
dataBundle0..1Data to be made available to the library 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).
prefetchDataany0..*Data to be made available to the library 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.
dataEndpointEndpoint0..1An endpoint to use to access data referenced by retrieve operations in the library. If provided, this endpoint is used after the data or prefetchData bundles, and the server, if the useServerData parameter is true.
contentEndpointEndpoint0..1An endpoint to use to access content (i.e. libraries) referenced by the library. If no content endpoint is supplied, the evaluation will attempt to retrieve content from the server on which the operation is being performed.
terminologyEndpointEndpoint0..1An endpoint to use to access terminology (i.e. valuesets, codesystems, and membership testing) referenced by the library. 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.

Output Parameters (1)

NameTypeCard.Description
returnParameters1..1The results of the library evaluation, returned as a Parameters resource with a parameter for each named expression requested by the expression input parameter (or all public (or all, if includePrivate is true) top-level expressions defined in the library if no expression input parameter was specified). Note that explicit request for evaluation of an expression does not respect the access modifier (i.e. even private expressions can be evaluated by directly requesting evaluation of the expression by name).

Additional Information

Version
2.0.0
Date
2023-11-27T16:26:11+00:00