Current Build
CDS Work GroupMaturity Level: 2Ballot Status: Trial Use

For the purposes of the Clinical Reasoning module, a Knowledge Artifact is a structured, computable, and shareable representation of clinical knowledge. A comprehensive definition of clinical knowledge is beyond the scope of this module, but we effectively mean any knowledge relevant to improving patient care. For example, "Patients with diabetes should have regular comprehensive foot examinations to identify risk factors predictive of ulcers and amputations" is a statement of clinical knowledge. A knowledge artifact would then be some representation that can be used to integrate that knowledge into existing healthcare delivery systems.

There are any number of ways to accomplish this integration of clinical knowledge, ranging from direct implementation within an existing EHR system to the use of high-level representation and reasoning systems that can adapt clinical workflow to provide cognitive support to clinicians. Within this module, we aim to provide a representation that is both flexible enough to represent a broad range of knowledge artifacts, but simple and specific enough to enable automated integration of the content.

To achieve these goals, we define several components that are present in a broad variety of knowledge artifacts:

ComponentDescription
Artifact IdentityInformation used to uniquely identify an artifact.
MetadataInformation about the knowledge artifact such as lifecycle status, publisher, documentation, and supporting evidence.
Action DefinitionsDescriptions of actions to be taken as part of the implementation of knowledge
Trigger DefinitionsInformation about what events should trigger the use of the artifact
Expression LogicExpressions used to represent reasoning such as whether or not some criteria is satisfied, or calculation of new values from existing ones.

As with any FHIR resource, the instance identity is specified by the id element. In addition, artifacts may have logical identifiers based on the content or behavior they provide, such as the CMS or NQF identifiers for measure content. These logical identifiers can be provided in the identifier element defined on each resource.

In addition to identity, the version element can be used to specify a content version for the artifact. In general, version numbers are required for published, non-experimental artifacts, and optional otherwise.

The following fragment shows the use of the logical identifier and version elements:

<identifier>
  <use value="official"/>
  <system value="http://motivemi.com/artifacts"/>
  <value value="mmi:low-suicide-risk-order-set"/>
</identifier>
<version value="1.0.0"/>

When using the identifier element to provide the Entity Identifier for a service module consistent with the Decision Support Service (DSS) specification, the following mappings apply:

DSS Model ElementFHIR ElementExample
businessIdIdentifier.valuehemoglobin-control-rule
scopingEntityIdIdentifier.systemcom.clinica
versionArtifact.version1.0.0

Each of the various knowledge artifact resources defines a set of elements that provide consistent representation of metadata such as title, description, and usage, repository indexing and publication information, as well as additional supporting documentation and evidence:

ElementDescription
nameA machine-friendly name for the artifact example
titleA user-friendly title for the artifact example
statusThe lifecycle status for the artifact (draft, active, or inactive) example
experimentalWhether the artifact is for testing purposes, rather than production usage example
descriptionA natural language description of the artifact example
purposeDescribes the purpose of the artifact example
usageDescribes the clinical usage of the artifact example
approvalDateThe date when this artifact was approved by the publisher example
lastReviewDateThe date this version of the artifact was last reviewed example
effectivePeriodThe effective date range for the artifact example
useContextDescribes the context of use for this artifact example
topicDescriptional topics for the artifact example
contributorA content contributor example
publisherThe name of the publisher (either an organization or an individual) example
contactContact details for the publisher example
copyrightLegal copyright description for the artifact example
relatedArtifactRelated resources for the artifact, including additional documentation, supporting evidence, or knowledge management dependencies example

General documentation elements, including description, purpose, and usage, provide immediately available documentation as part of the artifact. Additional documentation can be provided using the relatedArtifact element to link to more detailed information, supporting evidence, and to additional required artifacts as appropriate.

<title value="Appropriate Testing for Children with Pharyngitis"/>
<status value="active"/>
<experimental value="true"/>
<description value="Percentage of children 2-18 years of age who were diagnosed with pharyngitis, ordered an antibiotic and 
	received a group A streptococcus (strep) test for the episode."/>
<purpose value="The Infectious Diseases Society of America (IDSA) "recommends swabbing the throat and testing for GAS 
	pharyngitis by rapid antigen detection test (RADT) and/or culture because the clinical features alone do not reliably discriminate 
	between GAS and viral pharyngitis except when overt viral features like rhinorrhea, cough, oral ulcers, and/or hoarseness are present""/>
<topic>
  <coding>
    <system value="http://hl7.org/fhir/c80-doc-typecodes" />
    <code value="57024-2" />
  </coding>
</topic>

For information on the useContext and topic elements, refer to the Knowledge Artifact Distribution section.

The status element describes the lifecycle status of the artifact, indicating whether it is a draft, active, or retired artifact. This representation is consistent with the states described by the Quality Metadata Conceptual Model. The following table provides a mapping from the states defined here, to the states as defined in the Clinical Decision Support Knowledge Artifact Specification (CDS KAS), as well as the Decision Support Service (DSS) standard:

Experimental?StatusCDS KAS MappingDSS Mapping
truedraftDraft, InTestDRAFT, DEFINED
trueactiveInTestDEFINED
trueretiredInactiveREJECTED
falsedraftDraftDRAFT
falseactiveActiveAPPROVED, PROMOTED
falseretiredInactiveREJECTED, RETIRED

Note that the experimental element can be used independent of the lifecycle status, allowing the full lifecycle of an artifact to be tested.

Actions describe the "output" actions of the knowledge artifact. These actions may be in the form of messages (such as reminders), structured clinical acts (e.g., a laboratory test order) that can be implemented via clinical systems such as a computerized provider entry system or a documentation system, or they may create new events (e.g., declaration of a patient state such as failure of a treatment). Each action definition contains the following basic information:

DescriptionDescriptive information such as identifier, label, title, and textEquivalent.
DocumentationSupporting documentation, citations, or evidence in support of the action.
Related Action DefinitionsEach action definition can specify relationships to other actions, allowing timings and offsets to be expressed.
Trigger DefinitionTriggering events for the action. See the section on trigger definitions below for more information.
ConditionAn optional condition specifying whether the action definition applies.
TimingA description of when the action definition should occur.
BehaviorVarious behaviors that communicate the intended semantics of groups and actions (e.g. selection behavior, grouping behavior, etc.)
TypeThe type of action to be performed (e.g. create, update, delete, etc.)
Activity DefinitionA description of what activity is to be performed. To enable reuse and modularity, ActivityDefinition resources may be reusesd by multiple action definitions.
Dynamic ValuesExpressions that can be used to specify dynamic values for the resulting activity.
Child ActionsEach action may contain any number of child actions, allowing a hierarchy of actions to be described (for example, sections in an order set).

The following fragment shows a simple referral creation action from an example order set for suicide risk assessment and management:

<actionDefinition>
  <!-- Refer to outpatient mental health program for evaluation and treatment of mental health conditions now -->
  <textEquivalent value="Refer to outpatient mental health program for evaluation and treatment of mental health conditions now"/>
  <activityDefinition>
    <reference value="#referralToMentalHealthCare"/>
  </activityDefinition>
  <dynamicValue>
    <path value="timing.event"/>
    <expression value="Now()"/>
  </dynamicValue>
  <dynamicValue>
    <path value="specialty"/>
    <expression value="Code '261QM0850X' from &quot;urn:oid:2.16.840.1.113883.11.19462&quot;"/>
  </dynamicValue>
  <dynamicValue>
    <path value="fulfillmentTime"/>
    <expression value="ReferralRequestFulfillmentTime"/>
  </dynamicValue>
  <dynamicValue>
    <path value="patient"/>
    <expression value="Patient"/>
  </dynamicValue>
  <dynamicValue>
    <path value="requester"/>
    <expression value="Practitioner"/>
  </dynamicValue>
  <dynamicValue>
   <path value="reason"/>
    <expression value="RiskAssessmentScore"/>
  </dynamicValue>
  <dynamicValue>
    <path value="supportingInformation"/>
    <expression value="RiskAssessment"/>
  </dynamicValue>
</actionDefinition>

The example describes how to create a ReferralRequest resource using information available from the context in which the order set is applied. The definition includes expressions for retrieving contextual information using the dynamicValue element of the ActivityDefinition resource. For more information on using expressions to provide dynamic values as part of a definition, refer to the Using Expressions topic in this module.

Each action may specify the type of action to perform:

  • Create
  • Update
  • Remove
  • Fire Event

The Create, Update, and Remove actions indicate that particular resources should be created, updated, or removed, and the Fire Event action indicates that a particular named event should be triggered.

Note that this element is optional, and is used to indicate what type of action is to be taken with the associated activity definition. For example, an action that indicates create with an activity definition that defines a referral request means that the referral request should be realized and the resulting resource created (i.e. applied to the patient's record). An action that indicates update with an activity definition would indicate that an existing resource on the patient's record should be updated based on the new resource content.

Each action may have any number of triggers associated to indicate what events should trigger the action to be taken. The following types of triggers may be defined:

  • Named Event
  • Scheduled Event
  • Data Event

A named event is an event identified by the implementation environment. This type of event allows Event-Condition-Action (ECA) rules to be triggered by any event generated within the implementation environment. A scheduled event occurs on a fixed or periodic schedule. And finally, a data event occurs in response to some data-related event in the integrated environment such as a record being added or updated.

As examples, the following fragments illustrate the use of a named event, a scheduled event, and a data event as part of an ECA rule definition:

<triggerDefinition>
  <type value="named-event"/>
  <eventName value="Admission"/>
</triggerDefinition>
<triggerDefinition>
  <type value="scheduled-event"/>
  <eventTimingDate>10/12/2015</eventTimingDate>
</triggerDefinition>
<triggerDefinition>
  <type value="data-added"/>
  <eventData>
    <dataRequirement>
      <type value="Condition"/>
      <codeFilter>
        <path value="code"/>
        <valueSetString value="Other Female Reproductive Conditions"/>
      </codeFilter>
    </dataRequirement>
  </eventData>
</triggerDefinition>

Each action may have associated conditions that specify whether the action is applicable, or when it should be started and stopped. The $apply operation is used to render a plan definition, and the parameters to the apply are available as context to expressions within the plan definition, including the applicable condition and the dynamic value expressions.

For example, the following fragment shows the condition element of an action definition used in an ECA rule. The condition references the named expression "NoScreening":

<condition>
  <expression value="NoScreening"/>
</condition>

The Clinical Reasoning module defines several resources, including Library, PlanDefinition, and Measure to represent each of the components described above. By combining these components in different ways, several different types of knowledge artifacts can be represented:

Artifact TypeDescriptionExample
LibraryA general purpose container for clinical knowledge, potentially defined in non-FHIR structures. For example, a sharable package of clinical logic expressed in Clinical Quality Language.Expressions that define the criteria that must be met to determine whether or not a patient has diabetes.
Event-Condition-Action (ECA) RuleA decision support rule of the form [on Event] if Condition then Action, defining actions that shoud be taken whenever some condition is met in response to a particular event.On a patient checking in to a clinic appointment, if the patient has diabetes and has not had a recent foot examination, place an unsigned order for a comprehensive foot exam.
Order SetA pre-defined and approved group of orders related to a particular clinical condition (e.g., hypertension treatment and monitoring) or stage of care (e.g., hospital admission to Coronary Care Unit). Order sets are used within electronic health record systems as a checklist for physicians when treating a patient with a specific condition or in a specific context. An order set is a structured collection of orders presented to the physician in a computerized physician order entry system (CPOE).The specific orders to be placed when a patient presents with diabetic ketoacidosis.
ProtocolA pre-defined procedural method for standardizing a set of activities. As examples, protocols can be used within laboratory settings to standardize handling of specimens for specific tests; standardize the treatment steps for a particular condition; or standardize the steps to be taken in a particular research trial.The specific tasks that should be performed to provide effective treatment for a new diagnosis of diabetes.
Documentation TemplateA structured form for recording information on a patient into a set of predefined data slots.A form describing the information that should be gathered during a comprehensive diabetic foot exam.
MeasureA quantitative tool to assess the performance of an individual or organization with respect to a specified process or outcome via the measurement of actions, processes, or outcomes of clinical care. Quality measures are often derived from clinical quidelines and are designed to determine whether the appropriate care has been provided given a set of clinical criteria and an evidence base.Percentage of patients aged 18-75 years of age with diabetes who had a foot exam during the measurement period.

The Library resource is a general purpose container for clinical knowledge that may be defined in non-FHIR representations. For example, a Clinical Quality Language expression library can be represented as a Library resource so that it can be referenced as part of other knowledge artifacts.

For example, the following fragment shows a Library that contains the CQL logic for Chlamydia Screening decision support:

<Library>
  <id value="example"/>
  <identifier>
    <use value="official"/>
    <value value="ChalmydiaScreening_Common"/>
  </identifier>
  <version value="2.0.0"/>
  <title value="Chlamydia Screening Common Library"/>
  <type>
  <coding>
    <code value="logic-library"/>
  </coding>
  </type>
  <status value="draft"/>
  <description value="Common Logic for adherence to Chlamydia Screening guidelines"/>
  <publicationDate value="2015-07-22"/>
  <topic>
    <text value="Chlamydia Screening"/>
  </topic>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource>
      <reference value="Library/library-quick-model-definition"/>
    </resource>
  </relatedArtifact>
  <dataRequirement>
    <type value="Condition"/>
    <codeFilter>
      <path value="code"/>
      <valueSetString value="Other Female Reproductive Conditions"/>
    </codeFilter>
  </dataRequirement>
  <content>
    <contentType value="text/cql"/>
    <url value="http://cqlrepository.org/ChlamydiaScreening_Common.cql"/>
  </content>
</Library>

An Event-Condition-Action (ECA) rule is an artifact with the general syntax "on event, if condition is true, then do action." The event triggers the invocation of the rule; the condition is a logical test that, if satisfied or evaluates "true", causes an action; while the action describes a set of activities to be performed. These actions may in turn cause further events to occur, which may in turn cause other ECA rules to fire.

Note that the "activity" to be performed may be to document a patient-specific assessment performed by a clinical decision support service (e.g. patient has a 37% chance of a heart attack in the next 5 years), not just recommendations/recommended actions. In this case, the action would be to "create" a RiskAssessment.

The PlanDefinition resource can be used to represent an ECA rule using the action element. A single, top-level action represents the overall rule, with the triggerDefinition element used to specify the triggering event(s), the condition element used to specify the applicable condition for the rule, and the action element describing the action to be performed.

For example, the following fragment illustrates a simple use of PlanDefinition to expose a Chlamydia Screening ECA rule:

<PlanDefinition>
  <id value="chlamydia-screening-intervention"/>
  <identifier>
    <use value="official"/>
    <value value="ChlamydiaScreening_CDS_UsingCommon"/>
  </identifier>
  <version value="2.0.0"/>
  <title value="Chalmydia Screening CDS Example Using Common"/>
  <status value="draft"/>
  <description value="Chlamydia Screening CDS Example Using Common"/>
  <publicationDate value="2015-07-22"/>
  <topic>
    <text value="Chlamydia Screening"/>
  </topic>
  <library>
    <reference value="Library/ChlamydiaScreening_CDS_UsingCommon"/>
  </library>
  <action>
    <title value="Patient has not had chlamydia screening within the recommended timeframe..."/>
    <triggerDefinition>
      <type value="scheduled-event"/>
      <eventTimingDate>10/12/2015</eventTimingDate>
    </triggerDefinition>
    <condition>
      <expression value="NoScreening"/>
    </condition>
    <dynamicValue>
      <path value="~"/>
      <expression value="ChlamydiaScreeningRequest"/>
    </dynamicValue>
  </action>
</PlanDefinition>

Note that the use of the tilde (~) in the path element here indicates that the result of the expression is the entire result for the action, rather than providing the value for a specific element of the result. In other words, the ChlamydiaScreeningRequest expression will result in an entire ProcedureRequest resource, which is the action to be performed.

An order set is a pre-defined and approved group of orders related to a particular clinical context (e.g., hypertension treatment and monitoring) or stage of care (e.g., hospital admission to Coronary Care Unit) or a particular grouping (e.g. pediatrics, adult, males over 50, etc.). An order set is typically used as a checklist for clinicians when managing a patient with a specific context. It is a structured collection of orders relevant to that condition or context and presented to the clinician in a computerized provider order entry system (CPOE).

The PlanDefinition resource can represent an Order Set using action definitions to define the orderable items in the order set. The items in an order set are typically organized hierarchically, as a set of sections, sub-sections, etc., with the actions themselves at the very bottom of the structure. In the PlanDefinition resource, each section, and sub-section, as well as the individual items are all represented as action definitions. Each group and/or subgroup may have behavior indicators associated with it, e.g., the number of actions that can/should/must be selected from the group of actions.

For example, the following fragment illustrates the items in a suicide risk order set:

Note that this example is a fragment of a larger example for the PlanDefinition resource, available here.
<!-- Suicide Risk Assessment and Outpatient Management -->
<actionDefinition>
  <title value="Suicide Risk Assessment and Outpatient Management"/>
  <!-- Consults and Referrals -->
  <action>
    <title value="Consults and Referrals"/>
    <groupingBehavior value="logical-group"/>
    <selectionBehavior value="any"/>
    <action>
      <!-- Refer to outpatient mental health program for evaluation and treatment of mental health conditions now -->
      <textEquivalent value="Refer to outpatient mental health program for evaluation and treatment of mental health conditions now"/>
      <definition>
        <reference value="#referralToMentalHealthCare"/>
      </definition>
      <dynamicValue>...</dynamicValue>
    </action>
  </action>
  <!-- Medications -->
  <action>
    <title value="Medications"/>
    <groupingBehavior value="logical-group"/>
    <selectionBehavior value="at-most-one"/>
    <action>
      <!-- First-Line Antidepressants -->
      <title value="First-Line Antidepressants"/>
      <documentation>
        <type value="justification"/>
        <document>
          <contentType value="text/html"/>
          <url value="http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf"/>
          <title value="Practice Guideline for the Treatment of Patients with Major Depressive Disorder"/>
        </document>
      </documentation>
      <groupingBehavior value="logical-group"/>
      <selectionBehavior value="at-most-one"/>
      <action>
        <!-- Selective Serotonin Reuptake Inhibitors (Choose a maximum of one or document reasons for exception) -->
        <title value="Selective Serotonin Reuptake Inhibitors (Choose a mazimum of one or document reasons for exception)"/>
        <documentation>
          <type value="justification"/>
          <document>
            <contentType value="text/html"/>
            <url value="http://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=6daeb45c-451d-b135-bf8f-2d6dff4b6b01"/>
            <title value="National Library of Medicine. DailyMed website. CITALOPRAM- citalopram hydrobromide tablet, film coated."/>
          </document>
        </documentation>
        <groupingBehavior value="logical-group"/>
        <selectionBehavior value="at-most-one"/>
        <action>
          <!-- citalopram 20 mg tablet 1 tablet oral 1 time daily now (30 table; 3 refills) -->
          <textEquivalent value="citalopram 20 mg tablet 1 tablet oral 1 time daily now (30 table; 3 refills)"/>
          <definition>
            <reference value="#citalopramPrescription"/>
          </definition>
          <dynamicValue>...</dynamicValue>
        </action>
        <action>
          <!-- escitalopram 10 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
          <textEquivalent value="escitalopram 10 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)"/>
          <!-- Follows pattern established above -->
        </action>
        <action>
          <!-- fluoxetine 20 mg capsule 1 capsule oral 1 time daily now (30 tablet; 3 refills) -->
          <textEquivalent value="fluoxetine 20 mg capsule 1 capsule oral 1 time daily now (30 tablet; 3 refills)"/>
          <!-- Follows pattern established above -->
        </action>
        <action>
          <!-- paroxetine 20 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
          <textEquivalent value="paroxetine 20 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)"/>
          <!-- Follows pattern established above -->
        </action>
        <action>
          <!-- sertraline 50 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
          <textEquivalent value="sertraline 50 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)"/>
          <!-- Follows pattern established above -->
        </action>
      </action>
      <action>
        <!-- Dopamine Norepinephrine Reuptake Inhibitors (Choose a maximum of one or document reasons for exception) -->
        <textEquivalent value="Dopamine Norepinephrine Reuptake Inhibitors (Choose a maximum of one or document reasons for exception)"/>
        <!-- Follows pattern established above -->
      </action>
      <action>
        <!-- Serotonin Norepinephrine Reuptake Inhibitors (Choose a maximum of one or doument reasons for exception) -->
        <textEquivalent value="Serotonin Norepinephrine Reuptake Inhibitors (Choose a maximum of one or doument reasons for exception)"/>
        <!-- Follows pattern established above -->
      </action>
      <action>
        <!-- Norepinephrine-Serotonin Modulators (Choose a maximum of one or document reasons for exception) -->
        <textEquivalent value="Norepinephrine-Serotonin Modulators (Choose a maximum of one or document reasons for exception)"/>
        <!-- Follows pattern established above -->
      </action>
    </action>
  </action>
</action>

In this example, the order set structure consists of:

<!-- Suicide Risk Assessment and Outpatient Management -->
  <!-- Consults and Referrals -->
      <!-- Refer to outpatient mental health program for evaluation and treatment of mental health conditions now -->
  <!-- Medications -->
      <!-- First-Line Antidepressants -->
        <!-- Selective Serotonin Reuptake Inhibitors (Choose a maximum of one or document reasons for exception) -->
          <!-- citalopram 20 mg tablet 1 tablet oral 1 time daily now (30 table; 3 refills) -->
          <!-- escitalopram 10 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
          <!-- fluoxetine 20 mg capsule 1 capsule oral 1 time daily now (30 tablet; 3 refills) -->
          <!-- paroxetine 20 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
          <!-- sertraline 50 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills) -->
        <!-- Dopamine Norepinephrine Reuptake Inhibitors (Choose a maximum of one or document reasons for exception) -->
        <!-- Serotonin Norepinephrine Reuptake Inhibitors (Choose a maximum of one or doument reasons for exception) -->
        <!-- Norepinephrine-Serotonin Modulators (Choose a maximum of one or document reasons for exception) -->

Each group defines the selection and grouping behavior for the items in the group, as well as providing links to supporting documentation for the particular items in the order set.

A protocol is a pre-defined procedural method for standardizing a set of activities. As examples, protocols can be used within laboratory settings to standardize handling of specimens for specific tests; standardize the treatment steps for a particular condition; or standardize the steps to be taken in a particular research trial.

The PlanDefinition resource can be used to represent a Protocol, using the action definitions to define the steps of the protocol and the relationships between them. Triggering events for each action, as well as applicable conditions can all be specified using the appropriate action elements within the PlanDefinition.

As a simple example, the following fragment shows a portion of a BMI Assessment protocol:

<action>
  <!--step label-->
  <label value="Measure BMI"/>
  <title value="Measure, Weight, Height, Waist, Circumference; Calculate BMI"/>
  <!--description of activity-->
  <description value="Weight must be measured so that the BMI can be calculated. Most charts are based on weights obtained with the patient wearing undergarments and no shoes. BMI can be manually calculated (kg/[height in meters]2), but is more easily obtained from a nomogram. Waist circumference is important because evidence suggests that abdominal fat is a particularly strong determinant of cardiovascular risk in those with a BMI of 25 to 34.9 kg/m2. Increased waist circumference can also be a marker of increased risk even in persons of normal weight. The technique for measuring waist circumference is described in the text. A nutrition assessment will also help to assess the diet and physical activity habits of overweight patients"/>

  <!--Rules prior to execution-->
  <condition>
    <description value="The practitioner must seek to determine whether the patient has ever been overweight. While a technical definition is provided, a simple question such as 'Have you ever been overweight?' will accomplish the same goal. Questions directed towards weight history, dietary habits, physical activities, and medications may provide useful information about the origins of obesity in particular patients.
      
For those who have not been overweight, a 2 year interval is appropriate for the reassessment of BMI. While this time span is not evidence-based, it is believed to be a reasonable compromise between the need to identify weight gain at an early stage and the need to limit the time, effort, and cost of repeated measurements."/>
    <expression value="Observation of Obesity or BMI Measured in Past 2 Years"/>
    <!-- CQL: exists ([Observation: Obesity]) or not exists ([Observation: BMI] O where O.effectiveDateTime 2 years or less before Today()) -->
  </condition>
  <!--  Activities that occur within timepoint-->
  <definition>
    <reference value="#procedure"/>
  </definition>
</action>

A documentation template is a structured form for recording information on a patient into a set of pre-defined data slots. These templates are used to guide structured data entry within an EHR or other clinical information system. Some types of clinical documents that can be represented via the documentation template artifacts are encounter summaries, procedure notes, patient-reported outcomes, and flowsheets.

The Questionnaire resource provides a basis for representing the structure of a documentation template. Using the expression extensions, the resource can be extended to provide dynamic behavior such as calculating values, showing/hiding content based on answers to questions, and other interactive functionality.

Documentation Templates often include not only a description of the data to be collected, but the behavior of the template during evaluation. For example, whether or not to display a particular question or group of questions based on answers to previously asked questions, or calculating the value of an answer based on other answers. The Questionnaire resource by itself does not provide this functionality, so this module introduces a CQIF-Questionnaire profile of the Questionnaire resource to allow this behavior to be modeled.

As an example, the PHQ-9 Health Questionnaire contains a question that is answered by totaling the weights from the answers of each of the previous questions. The CQIF Questionnaire example illustrates the representation of this questionnaire with the required logic for computation.

The following fragment taken from that example illustrates the use of the cqlExpression extension to calculate the TotalScore answer for a PHQ-9 Depression Assessment instrument:

<item>
  <extension url="http://hl7.org/fhir/StructureDefinition/cqif-basic-cqlExpression">
    <valueString value="CalculateTotalScore"/>
  </extension>
  <linkId value="TotalScore"/>
  <concept>
    <system value="http://loinc.org"/>
    <code value="44261-6"/>
  </concept>
  <text value="Total score"/>
  <type value="choice"/>
  <required value="true"/>
  <options>
    <reference value="ValueSet/http://loinc.org/vs/LL358-3"/>
    <display value="Patient Health Questionnaire (PHQ-9) Not at all/Several days/More than half the days/Nearly every day"/>
  </options>
</item>

A quantitative tool to assess the performance of an individual or organization with respect to a specified process or outcome via the measurement of actions, processes, or outcomes of clinical care. Note that the Measure itself does not contain any logic; rather a Library resource is referenced that contains the logic required by the measure, and the various expression elements, such as poulation criteria, reference named expressions within that library (or libraries).

For example, the following fragment defines how to calculate the controlling high blood pressure measure:

<Measure>
  <id value="cbp"/>
  <status value="active"/>
  <experimental value="true"/>
  <description value="Controlling High Blood Pressure Cohort Definition"/>
  <topic>
    <coding>
      <system value="http://hl7.org/fhir/c80-doc-typecodes"/>
      <code value="57024-2"/>
    </coding>
  </topic>
  <library>
    <reference value="Library/cbp-logic"/>
  </library>
  <group>
    <identifier>
      <value value="CBP-cohort"/>
    </identifier>
    <population>
      <type value="initial-population"/>
      <identifier>
        <value value="cbp-cohort"/>
      </identifier>
      <criteria value="In Demographic"/>
    </population>
  </group>
  <group>
    <identifier>
      <value value="BP-systolic"/>
    </identifier>
    <population>
      <type value="initial-population"/>
      <identifier>
        <value value="bp-systolic"/>
      </identifier>
      <criteria value="BP: Systolic"/>
    </population>
  </group>
  <group>
    <identifier>
      <value value="BP-diastolic"/>
    </identifier>
    <population>
      <type value="initial-population"/>
      <identifier>
        <value value="bp-diastolic"/>
      </identifier>
      <criteria value="BP: Diastolic"/>
    </population>
  </group>
</Measure>