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: CMS72FHIRSTKAntithromboticDay2

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

CMS72FHIRSTKAntithromboticDay2

Title: CMS72FHIRSTKAntithromboticDay2
Id: CMS72FHIRSTKAntithromboticDay2
Version: 0.7.001
Url: https://madie.cms.gov/Library/CMS72FHIRSTKAntithromboticDay2
official

CMS72FHIRSTKAntithromboticDay2

Type:

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

code: logic-library

Date: 2024-12-09T15:11:21+00:00
Publisher: The Joint Commission
Description: CMS72FHIRSTKAntithromboticDay2
Related Artifacts:

Dependencies

  • http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.21
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.21
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.226
  • 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.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 ;
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
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
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
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.113762.1.4.1045.21
MedicationAdministration http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration ;;;;;; code filter:
path: medication
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.226
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.113762.1.4.1110.62
MedicationAdministration http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-mednotadministered ;;;;; code filter:
path: medication
value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62
Content: text/cql
library CMS72FHIRSTKAntithromboticDay2 version '0.7.001'

/* 2025 AU */


using QICore version '4.1.1'

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 "Antithrombotic Therapy for Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62'
valueset "Comfort Measures": 'http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45'
valueset "INR": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213'
valueset "Intravenous or Intraarterial Thrombolytic tPA Therapy Prior to Arrival": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.21'
valueset "Intravenous or Intraarterial Thrombolytic tPA Therapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.21'
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 Refusal": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'
valueset "Pharmacological Contraindications For Antithrombotic Therapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.52'
valueset "Thrombolytic tPA Therapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.226'

parameter "Measurement Period" Interval<DateTime>

context Patient

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

define "Denominator":
  "Initial Population"

define "Denominator Exclusions":
  "Encounter Less Than Two Days"
    union "Encounter With Comfort Measures During Day Of Or Day After Arrival"
    union "Encounter With Thrombolytic Therapy Given Prior To Arrival Or During Hospitalization"

define "Encounter Less Than Two Days":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    where IschemicStrokeEncounter.hospitalizationWithObservation ( ).lengthInDays ( ) < 2

define "Encounter With Comfort Measures During Day Of Or Day After Arrival":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with TJC."Intervention Comfort Measures" ComfortMeasure
      such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of ( start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) ).CalendarDayOfOrDayAfter ( )

define "Encounter With Thrombolytic Therapy Given Prior To Arrival Or During Hospitalization":
  "Encounter With Thrombolytic Therapy Medication Or Procedures"
    union "Encounter With Thrombolytic Therapy Prior To Arrival"
    union "Encounter With Thrombolytic Therapy Documented As Already Given"

define "Encounter With Thrombolytic Therapy Medication Or Procedures":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with "Thrombolytic Therapy Medication Or Procedures" ThrombolyticTherapy
      such that ThrombolyticTherapy.effective.toInterval ( ) starts during Interval[start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) - 24 hours, end of IschemicStrokeEncounter.hospitalizationWithObservation ( ) )

define "Thrombolytic Therapy Medication Or Procedures":
  ( ["MedicationAdministration": medication in "Thrombolytic tPA Therapy"] ThrombolyticMedication
      where ThrombolyticMedication.status in { 'in-progress', 'completed' }
      return {
        id: ThrombolyticMedication.id,
        effective: ThrombolyticMedication.effective
      }
  )
    union ( ["Procedure": "Intravenous or Intraarterial Thrombolytic tPA Therapy"] ThrombolyticProcedure
        where ThrombolyticProcedure.status = 'completed'
        return {
          id: ThrombolyticProcedure.id,
          effective: ThrombolyticProcedure.performed
        }
    )

define "Encounter With Thrombolytic Therapy Prior To Arrival":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    where exists ( ( IschemicStrokeEncounter.encounterDiagnosis ( ) ) EncounterDiagnosis
        where ( EncounterDiagnosis.code in "Intravenous or Intraarterial Thrombolytic tPA Therapy Prior to Arrival" )
    )

define "Encounter With Thrombolytic Therapy Documented As Already Given":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with [Condition: "Intravenous or Intraarterial Thrombolytic tPA Therapy Prior to Arrival"] PriorTPA
      such that PriorTPA.recordedDate during CQMCommon."HospitalizationWithObservation" ( IschemicStrokeEncounter )
        and PriorTPA.isActive ( )
        and PriorTPA.verificationStatus is not null
        and PriorTPA.verificationStatus ~ QICoreCommon."confirmed"

define "Numerator":
  "Encounter With Antithrombotic Therapy"

define "Encounter With Antithrombotic Therapy":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with ["MedicationAdministration": medication in "Antithrombotic Therapy for Ischemic Stroke"] Antithrombotic
      such that Antithrombotic.status in { 'in-progress', 'completed' }
        and Antithrombotic.effective.toInterval ( ) starts during day of ( start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) ).CalendarDayOfOrDayAfter ( )

define "Denominator Exceptions":
  "Encounter With Documented Reason For No Antithrombotic Ordered Or Administered Day Of Or Day After Hospital Arrival"
    union "Encounter With Pharmacological Contraindications For Antithrombotic Therapy Given Day Of Or Day After Hospital Arrival"
    union "Encounter With An INR Greater Than 3.5"

define "Encounter With Documented Reason For No Antithrombotic Ordered Or Administered Day Of Or Day After Hospital Arrival":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with "Documented Reason For No Antithrombotic Ordered Or Administered" NoAntithrombotic
      such that NoAntithrombotic.authoredOn during day of ( start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) ).CalendarDayOfOrDayAfter ( )

define "Documented Reason For No Antithrombotic Ordered Or Administered":
  "Reason For Not Ordering Antithrombotic"
    union "Reason For Not Administering Antithrombotic"

define "Reason For Not Administering Antithrombotic":
  ["MedicationAdministrationNotDone": medication in "Antithrombotic Therapy for Ischemic Stroke"] MedicationAdm
    where ( MedicationAdm.statusReason in "Medical Reason for Not Providing Treatment"
        or MedicationAdm.statusReason in "Patient Refusal"
    )
    return {
      id: MedicationAdm.id,
      authoredOn: MedicationAdm.recorded
    }

define "Reason For Not Ordering Antithrombotic":
  ["MedicationNotRequested": medication in "Antithrombotic Therapy for Ischemic Stroke"] NoAntithromboticOrder
    where NoAntithromboticOrder.status = 'completed'
      and NoAntithromboticOrder.intent = 'order'
      and ( NoAntithromboticOrder.reasonCode in "Medical Reason for Not Providing Treatment"
          or NoAntithromboticOrder.reasonCode in "Patient Refusal"
      )
    return {
      id: NoAntithromboticOrder.id,
      authoredOn: NoAntithromboticOrder.authoredOn
    }

define "Encounter With Pharmacological Contraindications For Antithrombotic Therapy Given Day Of Or Day After Hospital Arrival":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with ["MedicationAdministration": medication in "Pharmacological Contraindications For Antithrombotic Therapy"] PharmacologicalContraindications
      such that PharmacologicalContraindications.status in { 'in-progress', 'completed' }
        and PharmacologicalContraindications.effective.toInterval ( ) starts during day of ( start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) ).CalendarDayOfOrDayAfter ( )

define "Encounter With An INR Greater Than 3.5":
  TJC."Ischemic Stroke Encounter" IschemicStrokeEncounter
    with ["Observation": "INR"] INR
      such that INR.value as Quantity > 3.5
        and INR.status in { 'final', 'amended', 'corrected' }
        and INR.issued during day of ( start of IschemicStrokeEncounter.hospitalizationWithObservation ( ) ).CalendarDayOfOrDayAfter ( )

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

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

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

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