eCQM QICore Content Implementation Guide
2023.0.0 - CI Build

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

Library: HIVSTITestingFHIR

Official URL: http://ecqi.healthit.gov/ecqms/Library/HIVSTITestingFHIR Version: 0.1.000
Active as of 2023-08-11 Computable Name: HIVSTITestingFHIR
Other Identifiers: https://madie.cms.gov/login#HIVSTITestingFHIR (use: official, )

Usage:Program: EP/EC

HIVSTITestingFHIR

Id: HIVSTITestingFHIR
Url: http://ecqi.healthit.gov/ecqms/Library/HIVSTITestingFHIR
Version: 0.1.000
Identifier:

value: HIVSTITestingFHIR

Name: HIVSTITestingFHIR
Title: HIVSTITestingFHIR
Status: active
Experimental: false
Type:

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

code: logic-library

Date: 2023-08-11T15:54:16+00:00
Description: HIVSTITestingFHIR
Use Context:
codevaluedisplay
program ep-ec EP/EC
Related Artifacts:

Dependencies

Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Patient http://hl7.org/fhir/Patient ;;
Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1052
Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1258.1
Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.117
Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ; code filter:
path: type
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1150
Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003
Content: text/cql
library HIVSTITestingFHIR version '0.1.000'

using QICore version '4.1.1'

include FHIRHelpers version '4.3.000' called FHIRHelpers
include SupplementalDataElements version '3.4.000' called SDE
include QICoreCommon version '1.5.000' called QICoreCommon
include CQMCommon version '1.4.000' called CQMCommon

codesystem "CPT": 'http://www.ama-assn.org/go/cpt'

valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'
valueset "Chlamydia Screening": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1052'
valueset "Face-to-Face Interaction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048'
valueset "Gonorrhea Screening": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1258.1'
valueset "HIV": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003'
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, 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 "Syphilis Tests": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.117'
valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'
valueset "Preventive Care Services - Other": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1150'

/*code "Unlisted preventive medicine service": '99429' from "CPT" display 'Unlisted preventive medicine service'*/
/*additional details in CQLIT-368*/



parameter "Measurement Period" Interval<DateTime>

context Patient

define "Denominator":
  "Initial Population"

define "Initial Population":
  AgeInYearsAt(date from start of "Measurement Period") >= 13
    and "Has Qualifying Encounter During Measurement Period"
    and "Has HIV Diagnosis Before End of Measurement Period"

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

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

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

define "SDE Sex":
  SDE."SDE Sex"

define "Numerator":
  "Has Chlamydia Testing"
    and "Has Gonorrhea Testing"
    and "Has Syphilis Testing"

define "Has Qualifying Encounter During Measurement Period":
  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 "Measurement Period"
  )

define "Has HIV Diagnosis Before End of Measurement Period":
  exists ["Condition": "HIV"] HIVDx
    where QICoreCommon."ToPrevalenceInterval" ( HIVDx ) starts on or before day of end of "Measurement Period"

define "Has Chlamydia Testing":
  exists ["Observation": "Chlamydia Screening"] ChlamydiaTest
    where ChlamydiaTest.value is not null
      and QICoreCommon."Latest" ( ChlamydiaTest.effective ) during day of "Measurement Period"

define "Has Gonorrhea Testing":
  exists ["Observation": "Gonorrhea Screening"] GonorrheaTest
    where GonorrheaTest.value is not null
      and QICoreCommon."Latest" ( GonorrheaTest.effective ) during day of "Measurement Period"

define "Has Syphilis Testing":
  exists ["Observation": "Syphilis Tests"] SyphilisTest
    where SyphilisTest.value is not null
      and QICoreCommon."Latest" ( SyphilisTest.effective ) during day of "Measurement Period"
Content: application/elm+xml
Encoded data (138792 characters)
Content: application/elm+json
Encoded data (198608 characters)