dQM QICore Content Implementation Guide
2025.0.0 - CI Build

dQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-qicore-2025/ and changes regularly. See the Directory of published versions

Library: CMS314FHIRHIVViralSuppression

Official URL: https://madie.cms.gov/Library/CMS314FHIRHIVViralSuppression Version: 1.0.000
Active as of 2025-08-21 Responsible: Health Resources & Services Administration Computable Name: CMS314FHIRHIVViralSuppression
Other Identifiers: https://madie.cms.gov/login#CMS314FHIRHIVViralSuppression (use: official, )

CMS314FHIRHIVViralSuppression

Metadata
Title CMS314FHIRHIVViralSuppression
Version 1.0.000
Identifier CMS314FHIRHIVViralSuppression
Steward (Publisher) Health Resources & Services Administration
Description

CMS314FHIRHIVViralSuppression

Type http://terminology.hl7.org/CodeSystem/library-type#logic-library
Data Requirement Type: Patient
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Data Requirement Type: Condition
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: HIV
Data Requirement Type: Condition
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: HIV
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Office Visit
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Outpatient Consultation
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Annual Wellness Visit
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Face to Face Interaction
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Home Healthcare Services
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Established Office Visit, 18 and Up
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Initial Office Visit, 18 and Up
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Preventive Care Services, Initial Office Visit, 0 to 17
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Preventive Care, Established Office Visit, 0 to 17
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Telephone Visits
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Other
Data Requirement Type: Observation
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab
Must Support Elements: code, status, status.value, effective
Code Filter(s):
Path: code
ValueSet: HIV Viral Load Tests
Data Requirement Type: Observation
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab
Must Support Elements: value
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Resource
Has Active HIV Diagnosis Before or in First 90 Days of Measurement Period Out 0..1 boolean
Has Qualifying Encounter During First 240 Days of Measurement Period Out 0..1 boolean
Initial Population Out 0..1 boolean
Denominator Out 0..1 boolean
Most Recent Viral Load Test During Measurement Period Out 0..1 Resource
Numerator Out 0..1 boolean
SDE Ethnicity Out 0..1 Resource
SDE Payer Out 0..* Resource
SDE Race Out 0..1 Resource
SDE Sex Out 0..1 Coding
Library Content
CQL Content
library CMS314FHIRHIVViralSuppression version '1.0.000'

using QICore version '6.0.0'

include FHIRHelpers version '4.4.000' called FHIRHelpers
include SupplementalDataElements version '5.1.000' called SDE
include QICoreCommon version '4.0.000' called QICoreCommon

codesystem "SNOMEDCT": 'http://snomed.info/sct'

valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'
valueset "Face-to-Face Interaction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.375'
valueset "HIV": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003'
valueset "HIV Viral Load Tests": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.377'
valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'
valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
valueset "Outpatient Consultation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008'
valueset "Preventive Care Services Established Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025'
valueset "Preventive Care Services Initial Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023'
valueset "Preventive Care Services Other": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1150'
valueset "Preventive Care Services, Initial Office Visit, 0 to 17": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022'
valueset "Preventive Care, Established Office Visit, 0 to 17": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024'
valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'

code "Below threshold level (qualifier value)": '260988000' from "SNOMEDCT" display 'Below threshold level (qualifier value)'
code "Not detected (qualifier value)": '260415000' from "SNOMEDCT" display 'Not detected (qualifier value)'

parameter "Measurement Period" Interval<DateTime>
  default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)

context Patient

define "Denominator":
  "Initial Population"

define "Has Active HIV Diagnosis Before or in First 90 Days of Measurement Period":
  exists ( ["ConditionProblemsHealthConcerns": "HIV"]
    union ["ConditionEncounterDiagnosis": "HIV"] ) HIVDx
    where HIVDx.prevalenceInterval ( ) starts before day of ( start of "Measurement Period" + 90 days )
      and HIVDx.isVerified ( )

define "Initial Population":
  "Has Active HIV Diagnosis Before or in First 90 Days of Measurement Period"
    and "Has Qualifying Encounter During First 240 Days of Measurement Period"

define "Most Recent Viral Load Test During Measurement Period":
  Last(["LaboratoryResultObservation": "HIV Viral Load Tests"] ViralLoad
      where ViralLoad.status in { 'final', 'amended', 'corrected' }
        and ViralLoad.effective.latest() during day of "Measurement Period"
      sort by effective.earliest()
  )

define "Has Qualifying Encounter During First 240 Days of Measurement Period":
/*Note: applied workaround using value set 'Preventive Care Services Other', as a DRC cannot be used directly from an encounter retrieve; additional info can be found in CQLIT-368*/
  
  exists ( ["Encounter": "Office Visit"]
    union ["Encounter": "Outpatient Consultation"]
    union ["Encounter": "Annual Wellness Visit"]
    union ["Encounter": "Face-to-Face Interaction"]
    union ["Encounter": "Home Healthcare Services"]
    union ["Encounter": "Preventive Care Services Established Office Visit, 18 and Up"]
    union ["Encounter": "Preventive Care Services Initial Office Visit, 18 and Up"]
    union ["Encounter": "Preventive Care Services, Initial Office Visit, 0 to 17"]
    union ["Encounter": "Preventive Care, Established Office Visit, 0 to 17"]
    union ["Encounter": "Telephone Visits"]
    union ["Encounter": "Preventive Care Services Other"] ) QualifyingEncounter
    where QualifyingEncounter.period during day of Interval[start of "Measurement Period", start of "Measurement Period" + 240 days]
      and QualifyingEncounter.status = 'finished'

define "Numerator":
  "Most Recent Viral Load Test During Measurement Period".value < 200 '{copies}/mL'
    or "Most Recent Viral Load Test During Measurement Period".value ~ "Below threshold level (qualifier value)"
    or "Most Recent Viral Load Test During Measurement Period".value ~ "Not detected (qualifier value)"

define fluent function isVerified(condition Choice<QICore.ConditionProblemsHealthConcerns, QICore.ConditionEncounterDiagnosis>):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
      or condition.verificationStatus ~ QICoreCommon."unconfirmed"
      or condition.verificationStatus ~ QICoreCommon."provisional"
      or condition.verificationStatus ~ QICoreCommon."differential"
  )

define "SDE Ethnicity":
  SDE."SDE Ethnicity"

define "SDE Payer":
  SDE."SDE Payer"

define "SDE Race":
  SDE."SDE Race"

define "SDE Sex":
  SDE."SDE Sex"
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Citations and References
Dependency Description: Library FHIRHelpers
Resource: FHIRHelpers version: 4.4.000
Canonical URL: https://madie.cms.gov/Library/FHIRHelpers|4.4.000
Dependency Description: Library SDE
Resource: SupplementalDataElements version: 5.1.000
Canonical URL: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000
Dependency Description: Library QICoreCommon
Resource: QICoreCommon version: 4.0.000
Canonical URL: https://madie.cms.gov/Library/QICoreCommon|4.0.000
Dependency Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Dependency Description: Value set Annual Wellness Visit
Resource: Annual Wellness Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
Dependency Description: Value set Face-to-Face Interaction
Resource: Face to Face Interaction
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.375
Dependency Description: Value set HIV
Resource: HIV
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003
Dependency Description: Value set HIV Viral Load Tests
Resource: HIV Viral Load Tests
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.377
Dependency Description: Value set Home Healthcare Services
Resource: Home Healthcare Services
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Dependency Description: Value set Office Visit
Resource: Office Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Dependency Description: Value set Outpatient Consultation
Resource: Outpatient Consultation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008
Dependency Description: Value set Preventive Care Services Established Office Visit, 18 and Up
Resource: Preventive Care Services Established Office Visit, 18 and Up
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
Dependency Description: Value set Preventive Care Services Initial Office Visit, 18 and Up
Resource: Preventive Care Services Initial Office Visit, 18 and Up
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
Dependency Description: Value set Preventive Care Services Other
Resource: Preventive Care Services Other
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1150
Dependency Description: Value set Preventive Care Services, Initial Office Visit, 0 to 17
Resource: Preventive Care Services, Initial Office Visit, 0 to 17
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022
Dependency Description: Value set Preventive Care, Established Office Visit, 0 to 17
Resource: Preventive Care, Established Office Visit, 0 to 17
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024
Dependency Description: Value set Telephone Visits
Resource: Telephone Visits
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
Generated using version 0.5.6 of the sample-content-ig Liquid templates