library MPPPatientLevel
using QICore version '4.1.1'
include CQMCommon version '1.4.000' called CQMCommon
include FHIRHelpers version '4.3.000' called FHIRHelpers
include QICoreCommon version '1.5.000' called QICoreCommon
include SupplementalDataElements version '3.4.000' called SDE
include AttributionModel version '0.1.0' called AM
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.113883.3.464.1003.101.12.1048'
valueset "HIV": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003'
valueset "HIV Viral Load": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1002'
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.12.1030'
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 "Telehealth Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1031'
valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'
parameter "Measurement Period" Interval<DateTime>
default Interval[@2024-01-01T00:00:00.000Z, @2025-01-01T00:00:00.000Z)
context Patient
define "Has Qualifying Encounter During First 240 Days of 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"]
) QualifyingEncounter
where QualifyingEncounter.period during day of Interval[start of "Measurement Period", start of "Measurement Period" + 240 days]
and QualifyingEncounter.isAttributable()
)
define "Initial Population":
"Has Qualifying Encounter During First 240 Days of Measurement Period"
|