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

Measure: Questionnaire Measure Example (Experimental)

Official URL: http://somewhere.org/fhir/uv/mycontentig/Measure/QuestionnaireMeasureExample Version: 0.4.6
Draft as of 2024-05-05 Computable Name: QuestionnaireMeasureExample

Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires

Knowledge Artifact Metadata
Name (machine-readable) QuestionnaireMeasureExample
Title (human-readable) Questionnaire Measure Example
Status Draft
Experimental true
Description

Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires

Measure Steward HL7 International - [Some] Work Group
Steward Contact Details http://hl7.org/Special/committees/[something]
Measure Metadata
Version Number 0.4.6
Measure Scoring Continuous Variable
Measure Type Process
Improvement Notation Increased score indicates improvement
Measure Population Criteria (ID: group-1)
Initial Population ID: 8A48538B-80BB-4E8B-9716-559C657278FD
Description: No description provided Logic Definition: Initial Population
Measure Population ID: 8FBD6CFA-99E4-4108-B083-91067C55170E
Description: No description provided Logic Definition: Measure Population
Measure Observation ID: 8B71AD15-47EB-4939-8318-1DF60CABCFD6
Description: No description provided Logic Definition: MeasureObservation
Measure Logic
Primary Library Measure calculating scores from multiple questionnaires example
Dependency Description: Library PHQ9Logic
Resource: PHQ-9 Depression Scoring Logic Example
Canonical URL: http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample
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: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Direct Reference Code Code: LA6568-5
System: http://loinc.org
Direct Reference Code Code: LA6569-3
System: http://loinc.org
Direct Reference Code Code: LA6570-1
System: http://loinc.org
Direct Reference Code Code: LA6571-9
System: http://loinc.org
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
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
Measure Logic Data Requirements
Data Requirement Type: Patient
Profile(s): Patient
Measure Logic Definitions
Logic Definition Library Name: PHQ9LogicExample
// Use the QuestionnaireResponse provided as a parameter if available
// Otherwise look it up from the record
define "QuestionnaireResponse":
  if response is not null then
    response
  else
    Last(
      [QuestionnaireResponse] QR
        where QR.questionnaire = 'http://somewhere.org/fhir/uv/mycontentig/Questionnaire/phq-9-questionnaire'
        sort by (authored as FHIR.dateTime) desc
    )
Logic Definition Library Name: PHQ9LogicExample
// NOTE: This ties this logic directly to this particular rendering of the Questionnaire.
// Ideally the items would be filtered based on Code of the Item, rather than the LinkId,
// but that would require pulling in the Questionnaire because the QuestionnaireResponse
// only has the LinkId.
define "Responses":
  "QuestionnaireResponse" QR
    return QR.item I where I.linkId in {
      'LittleInterest',
      'FeelingDown',
      'TroubleSleeping',
      'FeelingTired',
      'BadApetite',
      'FeelingBadAboutSelf',
      'TroubleConcetrating',
      'MovingSpeaking'
    }
Logic Definition Library Name: PHQ9LogicExample
define "CalculateTotalScore":
  Sum("Responses" R return all AnswerCardinality(First(R.answer.value)))
Logic Definition Library Name: QuestionnaireMeasureExample
define "Initial Population":
  AgeInYearsAt(start of "Measurement Period") >= 18
Logic Definition Library Name: QuestionnaireMeasureExample
// Likely some condition or other relevant characteristic such as a depression diagnosis
define "Measure Population":
  true
Logic Definition Library Name: QuestionnaireMeasureExample
/*
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
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: PHQ9LogicExample
/*
@source: https://www.med.umich.edu/1info/FHP/practiceguides/depress/score.pdf
*/
define function "AnswerCardinality"(answer Coding):
  case
    when answer ~ "Not at all" then 0
    when answer ~ "Several days" then 1
    when answer ~ "More than half the days" then 2
    when answer ~ "Nearly every day" then 3
    else null
  end
Logic Definition Library Name: FHIRHelpers
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }
Generated using version 0.4.6 of the sample-content-ig Liquid templates