Clinical Practice Guidelines, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 3.0.0-ballot 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
| Page standards status: Informative |
Interactive clinical decision support collects information needed to evaluate a guideline and reevaluates when that information changes. Use this pattern when existing patient data is incomplete or needs confirmation.
The inputs are a PlanDefinition, its referenced case-feature definitions, and the patient context. The outputs are a questionnaire interaction, any extracted resources, and revised proposed activities. Evaluation, data persistence, and clinical action remain separate responsibilities.
Read the CPG $apply operation and SDC population and extraction guidance before implementing this cycle.
Case-feature definitions referenced in PlanDefinition.action.input describe the information to collect. The application coordinates these steps:
A RequestGroup can organize returned proposals, but CPG $apply does not require every result to use one. Its result is a Bundle for each subject and may contain individual requests, RequestGroups, or CarePlans. Render and process the result according to the operation contract.
| Pattern | Generation scope | Appropriate use |
|---|---|---|
| PlanDefinition/$questionnaire | Case features across the plan and referenced nested plans | Collect a comprehensive set of information up front; generation is non-adaptive |
| StructureDefinition/$questionnaire during an apply cycle | Currently relevant case-feature definitions selected by the application | Collect questions for the applicable branches and reevaluate as context changes |
The second pattern is adaptive because evaluation and application orchestration choose the next relevant features. It is conceptually related to SDC adaptive forms, but does not make the CPG operation an implementation of SDC $next-question. Select the interface the participating systems support.
Missing information is distinct from a negative finding. Preserve unknown answers, explicit negatives, and data that could not be retrieved or evaluated. Confirm populated answers where the workflow requires it; a populated value may need review for relevance or freshness.
Validate extracted resources against their intended profiles and inspect warnings or errors before using or persisting them. An engine may produce a result when only part of the data is valid; a result alone is not evidence that extraction or clinical interpretation succeeded.
The CQF message extension can communicate evaluation or item-related issues. Messages may identify missing extraction values, profile nonconformance, or data excluded from CQL evaluation. A warning does not necessarily mean operation failure, but the consumer needs a defined way to inspect it, inform the user where appropriate, and determine what can proceed.
Extraction creates a representation of answers; it does not by itself guarantee correct provenance, reconciliation with existing records, or authorized persistence. The application owns those decisions and the updated context supplied to reevaluation.
The CPG questionnaire operations generate forms from StructureDefinitions, directly or through a PlanDefinition's input requirements. Their formal parameter lists and result types are defined by the linked OperationDefinitions. The processing guidance below explains the intended mappings.
Use CPG StructureDefinition $questionnaire. Its minimalOnly parameter limits generation to relevant elements. In minimal mode, process elements in the differential, or required snapshot elements (min > 0), including required children of required parents; exclude elements constrained by fixed[x] or pattern[x] from questions. The operation guidance does not recommend combining supportedOnly with minimalOnly.
Verify the generated form against the source profile, including cardinalities, prohibited elements, fixed values, slices, and extraction behavior. Minimal generation is a form-construction rule, not a guarantee that every resulting response is profile-valid.
| Source | Generated Questionnaire item or behavior |
|---|---|
| SDC definition-extract-value extension | Carry the extension to the extraction group rather than creating a question for the value |
| CPG featureExpression | Establish item population context and derive child initial expressions as described below |
ElementDefinition.defaultValue[x] |
Item initial[x] |
| StructureDefinition canonical and element path | Item definition, combining the canonical, #, and element path |
| Short description, label, or readable path | Item text, in that order of preference |
| Element type | Item type using the mappings below |
min > 0 |
Item required |
max > 1 or max = * |
Item repeats |
maxLength for a string |
Item maxLength |
| Bound value set | Expanded answerOption values with an appropriate choice item |
| Item identity | Generate a unique linkId within the Questionnaire |
For definition, use the full element path. A choice path can replace [x] with the concrete type, such as Observation.effectiveDateTime; a sliced element includes its slice name after a colon. Preserve enough information to map the answer back to the intended element during extraction.
Determine type from the differential when specified, otherwise from the snapshot. A code is collected as a choice with a Coding answer and mapped back to a code during extraction. This mapping does not populate item code or prefix, and does not define an automatic readOnly mapping. Complex data types are represented using groups and child items.
The population and extraction guidance supplies the SDC details. To connect generated items to that processing:
The direction of these mappings is from source profile and expressions to questionnaire items. Extraction then uses the item definitions and extraction extensions to construct the data representation.
Questionnaire answers support a smaller set of types than ElementDefinition. Check both the displayed item type and the type reconstructed by extraction.
| FHIR source type | Questionnaire.item.type |
QuestionnaireResponse answer type | Extraction consideration |
|---|---|---|---|
boolean |
boolean |
boolean |
Preserve an absent answer separately from false |
date |
date |
date |
Preserve date precision |
dateTime, instant |
dateTime |
dateTime |
Respect the source type's precision/timezone constraints |
decimal |
decimal |
decimal |
Preserve numeric precision |
integer, positiveInt, unsignedInt |
integer |
integer |
Reapply source range constraints |
time |
time |
time |
Preserve time semantics |
canonical, oid, uri, url, uuid |
url |
uri |
Reconstruct the intended source type |
base64Binary, id, markdown, string |
string |
string |
Validate the source type and encoding |
code |
choice |
Coding |
Convert the selected Coding back to the source code |
Coding |
choice |
Coding |
Retain system, code, and version as needed |
CodeableConcept |
Group of choice and text items | Coding and string answers | Reconstruct coding and text in the concept |
Quantity |
quantity |
Quantity |
Preserve units and the applicable unit constraints |
Reference |
reference |
Reference |
Check target type and resolution |
Attachment |
attachment |
Attachment |
Check supported content and access |
For other complex types, generate a group from the data type's StructureDefinition. For example, a Range can be represented by a group with Quantity items for its low and high values. The following illustrative structure shows the nesting; the source profile and SDC extraction rules determine the final definitions and constraints.
{
"linkId": "Range",
"definition": "http://example.org/StructureDefinition/ExampleObservation#Observation.value[x]:valueRange",
"text": "Actual result",
"type": "group",
"item": [
{
"linkId": "Range.low",
"definition": "http://example.org/StructureDefinition/ExampleObservation#Observation.value[x]:valueRange.low",
"text": "Low limit",
"type": "quantity"
},
{
"linkId": "Range.high",
"definition": "http://example.org/StructureDefinition/ExampleObservation#Observation.value[x]:valueRange.high",
"text": "High limit",
"type": "quantity"
}
]
}
Use CPG PlanDefinition $questionnaire to generate a non-adaptive questionnaire from the case-feature inputs of a plan.
PlanDefinition.action.input.The result should conform to SDC Populatable Questionnaire — Expression and SDC Extractable Questionnaire — Definition, and align with the expected output of assembly. See modular questionnaires for that composition pattern.
Test initial population, changed and cleared answers, repeated evaluation, unavailable data, extraction messages, and user selection of proposals. Check that extracted facts retain their source and patient context and that stale proposals are not committed after the context changes. Use Conformance for the formal requirements and Activity Flow for what happens after a proposal is selected.