Id: DRCommunicationWithPhysicianManagingDiabetesFHIR Url: http://ecqi.healthit.gov/ecqms/Library/DRCommunicationWithPhysicianManagingDiabetesFHIR Version: 0.0.004 Identifier: value: DRCommunicationWithPhysicianManagingDiabetesFHIR Name: DRCommunicationWithPhysicianManagingDiabetesFHIR Title: DRCommunicationWithPhysicianManagingDiabetesFHIR Status: active Experimental: false Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2023-08-14T15:19:06+00:00 Description: DRCommunicationWithPhysicianManagingDiabetesFHIR Related Artifacts: Dependencies Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Patient http://hl7.org/fhir/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.526.3.1285 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.464.1003.101.12.1014 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.1012 Condition http://hl7.org/fhir/Condition ; 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.526.3.327 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication ;;;;; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication ;;;;; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication ;;;;; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.526.3.1251 Coverage http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 uri http://hl7.org/fhir/uri ; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320 Communication http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone ; code filter: path: reasonCode value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320 Coverage http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Content: text/cql library DRCommunicationWithPhysicianManagingDiabetesFHIR version '0.0.004'#xD; #xD; using QICore version '4.1.1' /*This spec aligns with AU2022/PY2023 QDM version*/ /* Notes: -This spec aligns with AU2022/PY2023 QDM version - Per BonnieMat-1455 and ticket https://github.com/cqframework/cql-execution/issues/296 --https://oncprojectracking.healthit.gov/support/browse/CQLIT-371 (formerly BonnieMat-1420) --surrounding negation with QI-Core 4.1.1 DRC are not supported as resource filters and must be replaced with valueset or used on unfiltered resource in predicate --cardinality issues surrounding negation coding to be addressed in future execution engine update */#xD; #xD; #xD; #xD; include FHIRHelpers version '4.3.000' called FHIRHelpers#xD; include SupplementalDataElements version '3.4.000' called SDE#xD; include QICoreCommon version '1.5.000' called QICoreCommon#xD; #xD; codesystem "SNOMEDCT": 'http://snomed.info/sct'#xD; codesystem "ActCode": 'http://terminology.hl7.org/CodeSystem/v3-ActCode'#xD; #xD; valueset "Care Services in Long-Term Residential Facility": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014'#xD; valueset "Diabetic Retinopathy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.327'#xD; valueset "Level of Severity of Retinopathy Findings": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283'#xD; valueset "Macular Edema Findings Present": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320'#xD; valueset "Macular Exam": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1251'#xD; valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'#xD; valueset "Nursing Facility Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012'#xD; valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'#xD; valueset "Ophthalmological Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285'#xD; valueset "Outpatient Consultation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008'#xD; valueset "Patient Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008'#xD; valueset "Macular edema absent (situation)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391'#xD; #xD; code "Healthcare professional (occupation)": '223366009' from "SNOMEDCT" display 'Healthcare professional (occupation)'#xD; code "Medical practitioner (occupation)": '158965000' from "SNOMEDCT" display 'Medical practitioner (occupation)'#xD; code "Ophthalmologist (occupation)": '422234006' from "SNOMEDCT" display 'Ophthalmologist (occupation)'#xD; code "Optometrist (occupation)": '28229004' from "SNOMEDCT" display 'Optometrist (occupation)'#xD; code "Physician (occupation)": '309343006' from "SNOMEDCT" display 'Physician (occupation)'#xD; code "virtual": 'VR' from "ActCode" display 'virtual' // code "Macular edema absent (situation)": '428341000124108' from "SNOMEDCT" display 'Macular edema absent (situation)'#xD; #xD; code "AMB": 'AMB' from "ActCode" display 'Ambulatory'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "Initial Population":#xD; AgeInYearsAt(date from start of "Measurement Period") >= 18#xD; and exists "Diabetic Retinopathy Encounter"#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; and exists "Macular Exam Performed"#xD; #xD; define "Numerator":#xD; exists "Level of Severity of Retinopathy Findings Communicated"#xD; and ( exists "Macular Edema Absence Communicated"#xD; or exists "Macular Edema Presence Communicated"#xD; )#xD; #xD; define "Denominator Exceptions":#xD; exists "Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy"#xD; or exists "Medical or Patient Reason for Not Communicating Absence of Macular Edema"#xD; or exists "Medical or Patient Reason for Not Communicating Presence of Macular Edema"#xD; #xD; define "Qualifying Encounter During Measurement Period":#xD; ( ["Encounter": "Office Visit"]#xD; union ["Encounter": "Ophthalmological Services"]#xD; union ["Encounter": "Outpatient Consultation"]#xD; union ["Encounter": "Care Services in Long-Term Residential Facility"]#xD; union ["Encounter": "Nursing Facility Visit"] ) QualifyingEncounter#xD; where QualifyingEncounter.period during "Measurement Period"#xD; and QualifyingEncounter.status = 'finished'#xD; and QualifyingEncounter.class !~ "virtual"#xD; #xD; define "Diabetic Retinopathy Encounter":#xD; "Qualifying Encounter During Measurement Period" ValidQualifyingEncounter#xD; with ["Condition": "Diabetic Retinopathy"] DiabeticRetinopathy#xD; such that DiabeticRetinopathy.prevalenceInterval ( ) overlaps ValidQualifyingEncounter.period#xD; and DiabeticRetinopathy.isActive ( )#xD; and not ( DiabeticRetinopathy.verificationStatus ~ QICoreCommon."unconfirmed"#xD; or DiabeticRetinopathy.verificationStatus ~ QICoreCommon."refuted"#xD; or DiabeticRetinopathy.verificationStatus ~ QICoreCommon."entered-in-error"#xD; )#xD; #xD; define "Macular Exam Performed":#xD; ["Observation": "Macular Exam"] MacularExam#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that MacularExam.effective.toInterval ( ) during EncounterDiabeticRetinopathy.period#xD; where MacularExam.value is not null#xD; and MacularExam.status in { 'final', 'amended', 'corrected', 'preliminary' }#xD; #xD; define "Results of Dilated Macular or Fundus Exam Communicated":#xD; exists "Level of Severity of Retinopathy Findings Communicated"#xD; and ( exists "Macular Edema Absence Communicated"#xD; or exists "Macular Edema Presence Communicated"#xD; )#xD; #xD; define "Level of Severity of Retinopathy Findings Communicated":#xD; ["Communication": "Level of Severity of Retinopathy Findings"] LevelOfSeverityCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that LevelOfSeverityCommunicated.sent after start of EncounterDiabeticRetinopathy.period#xD; where LevelOfSeverityCommunicated.status = 'completed'#xD; #xD; define "Macular Edema Absence Communicated":#xD; ["Communication": "Macular edema absent (situation)"] MacularEdemaAbsentCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that MacularEdemaAbsentCommunicated.sent after start of EncounterDiabeticRetinopathy.period#xD; where MacularEdemaAbsentCommunicated.status = 'completed'#xD; #xD; define "Macular Edema Presence Communicated":#xD; ["Communication": "Macular Edema Findings Present"] MacularEdemaPresentCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that MacularEdemaPresentCommunicated.sent after start of EncounterDiabeticRetinopathy.period#xD; where MacularEdemaPresentCommunicated.status = 'completed'#xD; #xD; define "Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy":#xD; [CommunicationNotDone: "Level of Severity of Retinopathy Findings"] LevelOfSeverityNotCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that LevelOfSeverityNotCommunicated.recorded during EncounterDiabeticRetinopathy.period#xD; where ( LevelOfSeverityNotCommunicated.statusReason in "Medical Reason"#xD; or LevelOfSeverityNotCommunicated.statusReason in "Patient Reason"#xD; )#xD; #xD; define "Medical or Patient Reason for Not Communicating Presence of Macular Edema":#xD; [CommunicationNotDone: "Macular Edema Findings Present"] MacularEdemaPresentNotCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that MacularEdemaPresentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period#xD; where ( MacularEdemaPresentNotCommunicated.statusReason in "Medical Reason"#xD; or MacularEdemaPresentNotCommunicated.statusReason in "Patient Reason"#xD; ) /* Note: below definition workaround for https://oncprojectracking.healthit.gov/support/browse/CQLIT-371. Using value set workaround has been applied for now but when QI Core STU 5 gets in the tool, it may be reverted back to a DRC */#xD; #xD; #xD; define "Medical or Patient Reason for Not Communicating Absence of Macular Edema":#xD; [CommunicationNotDone: "Macular edema absent (situation)"] MacularEdemaAbsentNotCommunicated#xD; with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy#xD; such that MacularEdemaAbsentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period#xD; where ( MacularEdemaAbsentNotCommunicated.statusReason in "Medical Reason"#xD; or MacularEdemaAbsentNotCommunicated.statusReason in "Patient Reason"#xD; ) Content: application/elm+xml Encoded data (181644 characters) Content: application/elm+json Encoded data (257468 characters)
Code system ConditionClinicalStatusCodes
Code system ConditionVerificationStatusCodes
Value set Care Services in Long-Term Residential Facility
Value set Level of Severity of Retinopathy Findings
Value set Macular Edema Findings Present
Value set Macular edema absent (situation)
Qualifying Encounter During Measurement Period
Level of Severity of Retinopathy Findings Communicated
Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy
Medical or Patient Reason for Not Communicating Absence of Macular Edema
Medical or Patient Reason for Not Communicating Presence of Macular Edema
Results of Dilated Macular or Fundus Exam Communicated