Your User Friendly Name for MyContentIG Here
0.4.6 - 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.6 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.6
Draft as of 2024-09-19 Computable Name: QuestionnaireMeasureExample

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

Title: Measure calculating scores from multiple questionnaires example
Id: QuestionnaireMeasureExample
Version: 0.4.6
Url: Measure calculating scores from multiple questionnaires example
Status: draft
Experimental: true
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Subject:

system: http://hl7.org/fhir/resource-types

code: Patient

Date: 2024-09-19 19:22:59+0000
Publisher: HL7 International - [Some] Work Group
Description:

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

Jurisdiction: 001
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
Measurement PeriodPeriod01In
PatientPatient01Out
Initial Populationboolean01Out
Measure Populationboolean01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
Content: text/cql
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
Content: application/elm+xml
Encoded data (12116 characters)
Content: application/elm+json
Encoded data (20592 characters)