eCQM QICore Content Implementation Guide
2024.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 2024.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-2024/ and changes regularly. See the Directory of published versions

Library: CMS71FHIRSTKAnticoagAFFlutter

Official URL: https://madie.cms.gov/Library/CMS71FHIRSTKAnticoagAFFlutter Version: 0.3.001
Active as of 2024-12-09 Responsible: The Joint Commission Computable Name: CMS71FHIRSTKAnticoagAFFlutter
Other Identifiers: https://madie.cms.gov/login#CMS71FHIRSTKAnticoagAFFlutter (use: official, )

CMS71FHIRSTKAnticoagAFFlutter

Title: CMS71FHIRSTKAnticoagAFFlutter
Id: CMS71FHIRSTKAnticoagAFFlutter
Version: 0.3.001
Url: https://madie.cms.gov/Library/CMS71FHIRSTKAnticoagAFFlutter
official

CMS71FHIRSTKAnticoagAFFlutter

Type:

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

code: logic-library

Date: 2024-12-09T13:49:44+00:00
Publisher: The Joint Commission
Description: CMS71FHIRSTKAnticoagAFFlutter
Related Artifacts:

Dependencies

  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93
  • https://madie.cms.gov/Library/CQMCommon|2.2.000
  • https://madie.cms.gov/Library/FHIRHelpers|4.4.000
  • https://madie.cms.gov/Library/QICoreCommon|2.1.000
  • https://madie.cms.gov/Library/SupplementalDataElements|3.5.000
  • https://madie.cms.gov/Library/TJCOverall|8.15.000
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;;;;
Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.113762.1.4.1110.76
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.117.1.7.1.202
Procedure http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure ;;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203
Procedure http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure ;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
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.117.1.7.1.424
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.1110.76
MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest ;;;;;;; code filter:
path: medication
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200
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
ServiceRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest ;;;;;;; code filter:
path: code
value set: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-mednotrequested ;;;;;; code filter:
path: medication
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200
Content: text/cql
library CMS71FHIRSTKAnticoagAFFlutter version '0.3.001'

using QICore version '4.1.1'

/* 2025 AU */


include FHIRHelpers version '4.4.000' called FHIRHelpers
include CQMCommon version '2.2.000' called CQMCommon
include QICoreCommon version '2.1.000' called QICoreCommon
include SupplementalDataElements version '3.5.000' called SDE
include TJCOverall version '8.15.000' called TJC

valueset "Anticoagulant Therapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200'
valueset "Atrial Ablation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203'
valueset "Atrial Fibrillation or Flutter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202'
valueset "Discharge To Acute Care Facility": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87'
valueset "Discharged to Health Care Facility for Hospice Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207'
valueset "Discharged to Home for Hospice Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209'
valueset "History of Atrial Ablation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76'
valueset "Left Against Medical Advice": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308'
valueset "Medical Reason For Not Providing Treatment": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473'
valueset "Patient Expired": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309'
valueset "Patient Refusal": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'

parameter "Measurement Period" Interval<DateTime>

context Patient

define "Initial Population":
  TJC."Ischemic Stroke Encounter"

define "Denominator":
  "Encounter With A History Of Atrial Ablation"
    union "Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter"

define "Encounter With A History Of Atrial Ablation":
  ( TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
      where exists ( ["Procedure": "Atrial Ablation"] AtrialAblationProcedure
          where AtrialAblationProcedure.status = 'completed'
            and AtrialAblationProcedure.performed.toInterval ( ) starts before start of IschemicStrokeEncounter.period
      )
  )
    union ( TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
        with ["Condition": "History of Atrial Ablation"] AtrialAblationDiagnosis
          such that AtrialAblationDiagnosis.verificationStatus is not null
            and AtrialAblationDiagnosis.verificationStatus ~ QICoreCommon."confirmed"
            and AtrialAblationDiagnosis.onset.toInterval ( ) starts before start of IschemicStrokeEncounter.period
    )
    union ( TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
        with ["Observation": "History of Atrial Ablation"] AtrialAblationObservation
          such that AtrialAblationObservation.status in { 'final', 'amended', 'corrected' }
            and AtrialAblationObservation.effective.earliest ( ) on or before end of IschemicStrokeEncounter.period
    )

define "Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter":
  ( TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
      with ["Condition": "Atrial Fibrillation or Flutter"] AtrialFibrillationFlutter
        such that AtrialFibrillationFlutter.verificationStatus is not null
          and AtrialFibrillationFlutter.verificationStatus ~ QICoreCommon."confirmed"
          and AtrialFibrillationFlutter.onset.toInterval ( ) starts on or before end of IschemicStrokeEncounter.period
  )
    union TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
      where exists ( ( IschemicStrokeEncounter.encounterDiagnosis ( ) ) EncounterDiagnosis
          where EncounterDiagnosis.code in "Atrial Fibrillation or Flutter"
      )

define "Denominator Exclusions":
  ( "Denominator" Encounter
      where Encounter.status = 'finished'
        and ( Encounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
            or Encounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
            or Encounter.hospitalization.dischargeDisposition in "Patient Expired"
            or Encounter.hospitalization.dischargeDisposition in "Discharged to Home for Hospice Care"
            or Encounter.hospitalization.dischargeDisposition in "Discharged to Health Care Facility for Hospice Care"
        )
  )
    union "Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter"

define "Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter":
  "Denominator" Encounter
    with TJC."Intervention Comfort Measures" ComfortMeasure
      such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during Encounter.hospitalizationWithObservation ( )

define "Numerator":
  "Denominator" Encounter
    with ["MedicationRequest": medication in "Anticoagulant Therapy"] DischargeAnticoagulant
      such that ( DischargeAnticoagulant.isCommunity ( )
          or DischargeAnticoagulant.isDischarge ( )
      )
        and DischargeAnticoagulant.status in { 'active', 'completed' }
        and DischargeAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and DischargeAnticoagulant.authoredOn during Encounter.period
      //BONNIEMAT-1617-Since there is an anticipated resolution for STU 5 for Medication.Discharge which leaves one blockers on coverage, will leave the assertion logic as is and update the test cases for coverage.


define "Denominator Exceptions":
  "Denominator" Encounter
    with "Documented Reason For Not Giving Anticoagulant At Discharge" NoDischargeAnticoagulant
      such that NoDischargeAnticoagulant.authoredOn during Encounter.period

define "Documented Reason For Not Giving Anticoagulant At Discharge":
  ["MedicationNotRequested": medication in "Anticoagulant Therapy"] NoAnticoagulant
    where ( NoAnticoagulant.reasonCode in "Medical Reason For Not Providing Treatment"
        or NoAnticoagulant.reasonCode in "Patient Refusal"
    )
      and ( NoAnticoagulant.isCommunity ( )
          or NoAnticoagulant.isDischarge ( )
      )
      and NoAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }

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

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

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

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