Your User Friendly Name for MyContentIG Here
0.4.7 - CI Build International flag

Your User Friendly Name for MyContentIG Here, published by HL7 International - [Some] Work Group. This guide is not an authorized publication; it is the continuous build for version 0.4.7 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/sample-content-ig/ and changes regularly. See the Directory of published versions

Library: Measure calculating scores from multiple questionnaires example (Experimental)

Official URL: http://somewhere.org/fhir/uv/mycontentig/Library/QuestionnaireMeasureExample Version: 0.4.7
Draft as of 2024-12-09 Computable Name: QuestionnaireMeasureExample

Example library illustrating basic CQL constructs using questionnaire results to calculate a measure score

Knowledge Artifact Metadata
Name (machine-readable) QuestionnaireMeasureExample
Title (human-readable) Measure calculating scores from multiple questionnaires example
Status Draft
Experimental true
Description

Example library illustrating basic CQL constructs using questionnaire results to calculate a measure score

Library Steward HL7 International - [Some] Work Group
Steward Contact Details http://hl7.org/Special/committees/[something]
Dependency Description: FHIR model information
Resource: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Dependency Description: Library PHQ9Logic
Resource: PHQ-9 Depression Scoring Logic Example
Canonical URL: http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample
Dependency Description: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Library Metadata
Version Number 0.4.7
Library Type Logic Library
Library Subject Patient
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
Parameter Name: Patient
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Parameter Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Measure Population
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Data Requirement Type: Patient
Profile(s): Patient
Library Content
CQL Content
library QuestionnaireMeasureExample version '0.4.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

include PHQ9LogicExample called PHQ9Logic

parameter "Measurement Period" Interval<Date> default Interval[@2021-01-01, @2021-12-31]

context Patient

define "Initial Population":
  AgeInYearsAt(start of "Measurement Period") >= 18

// Likely some condition or other relevant characteristic such as a depression diagnosis
define "Measure Population":
  true

/*
Measure observation is a function defined in terms of the types of members of the measure
population, Patient in this case. In a population evaluation scenario, the measure
observation is evaluated for every member of the population.

In an individual report scenario, however, the measure observation is evaluated for
the current patient. Note that the patient context is flowing through the call here
*/
define function "MeasureObservation"(patient Patient):
  PHQ9Logic.CalculateTotalScore
ELM XML Content
Encoded data (12116 characters)
ELM JSON Content
Encoded data (20592 characters)
Generated using version 0.4.7 of the sample-content-ig Liquid templates