Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions

Measure: Appropriate Treatment for ST-Segment Elevation Myocardial Infarction (STEMI) Patients in the Emergency DepartmentFHIR

Official URL: https://madie.cms.gov/Measure/CMS996FHIRAptTxforSTEMI Version: 2.0.000
Active as of 2026-01-16 Responsible: Centers for Medicare & Medicaid Services (CMS) Computable Name: CMS996FHIRAptTxforSTEMI
Other Identifiers: Short Name: CMS996FHIR (use: usual, ), UUID:a48685e0-4926-4ae8-9eb3-d8e8839b1704 (use: official, ), UUID:97360389-6ed6-4546-87f8-4c9f1d643023 (use: official, ), Endorser: 3613e (use: official, ), Publisher: 996FHIR (use: official, )

Copyright/Legal: Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.

This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.

LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.

CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association.

ICD-10 is copyright 2024 World Health Organization. All Rights Reserved.

Percentage of emergency department (ED) encounters for patients 18 years and older with a diagnosis of ST-segment elevation myocardial infarction (STEMI) that received appropriate treatment, defined as fibrinolytic therapy within 30 minutes of ED arrival, percutaneous coronary intervention (PCI) within 90 minutes of ED arrival, or discharge to an acute care facility within 45 minutes of ED arrival

Metadata
Title Appropriate Treatment for ST-Segment Elevation Myocardial Infarction (STEMI) Patients in the Emergency DepartmentFHIR
Version 2.0.000
Short Name CMS996FHIR
GUID (Version Independent) urn:uuid:a48685e0-4926-4ae8-9eb3-d8e8839b1704
GUID (Version Specific) urn:uuid:97360389-6ed6-4546-87f8-4c9f1d643023
CMS Identifier 996FHIR
CMS Consensus Based Entity Identifier 3613e
Effective Period 2026-01-01 through 2026-12-31
Steward (Publisher) Centers for Medicare & Medicaid Services (CMS)
Developer Acumen, LLC
Description

Percentage of emergency department (ED) encounters for patients 18 years and older with a diagnosis of ST-segment elevation myocardial infarction (STEMI) that received appropriate treatment, defined as fibrinolytic therapy within 30 minutes of ED arrival, percutaneous coronary intervention (PCI) within 90 minutes of ED arrival, or discharge to an acute care facility within 45 minutes of ED arrival

Copyright

Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.

This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.

LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.

CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association.

ICD-10 is copyright 2024 World Health Organization. All Rights Reserved.

Disclaimer

These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.

THE MEASURES AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Rationale

Studies have shown that delays in the treatment of acute myocardial infarction (AMI) leads to increased risk of in-hospital mortality and morbidity, with nearly two lives per 1,000 patients lost per hour of delay in treatment (Solhpour & Yusuf, 2013; Fibrinolytic Therapy Trialists' Collaborative Group, 1994). For patients receiving fibrinolytic therapy, the American Heart Association (AHA) estimates that 65 lives will be saved per 1,000 patients if treatment is administered within the first hour of symptom onset, and 131 lives will be saved per 1,000 patients treated if fibrinolytic therapy is delivered within the first three hours (O'Connor et al., 2010). The total ischemic time---that is, the time from onset of STEMI symptoms to the initiation of some form of reperfusion therapy---is the principal determinant of health outcomes for patients with an AMI, so timely care is essential to minimize disease morbidity and mortality. Primary PCI is the preferred treatment approach, with guidelines recommending initiation of PCI within 120 minutes from first medical contact (O'Gara et al., 2013). In situations where it is unlikely or impossible for a patient to receive primary PCI within the 120-minute timeframe, fibrinolytic therapy may be used for reperfusion and should be rapidly administered to reduce mortality and minimize morbidity; guidelines recommend that fibrinolytic therapy administration occur within 30 minutes of hospital arrival; this may also require rapid transfer for PCI (O'Gara et al., 2013). Implementation of an dQM addressing appropriateness and effectiveness of care for STEMI patients in the ED has the potential to improve the delivery of care furthering alignment with current clinical practice guidelines, while reducing adverse health outcomes such as mortality, bleeding events, and reinfarction. Use of the dQM could also reduce burden on facilities currently measured using the chart-abstracted Fibrinolytic Therapy Received within 30 Minutes of ED Arrival (OP-2) measure and broaden the population for which performance scores could be publicly reported.

Clinical Recommendation Statement

Primary PCI in STEMI: The 2013 ACCF/AHA clinical practice guideline for the management of STEMI recommends that:

  • "Primary PCI should be performed in patients with STEMI and ischemic symptoms of less than 12 hours' duration."
  • "Primary PCI should be performed in patients with STEMI and ischemic symptoms of less than 12 hours' duration who have contraindications to fibrinolytic therapy, irrespective of the time delay from first medical contact."

Fibrinolytic Therapy when there is an Anticipated Delay to Performing Primary PCI within 120 Minutes of First Medical Contact: The 2013 American College of Cardiology Foundation (ACCF)/American Heart Association (AHA) clinical practice guideline for the management of STEMI recommends that:

  • "In the absence of contraindications, fibrinolytic therapy should be given to patients with STEMI and onset of ischemic symptoms within the previous 12 hours when it is anticipated that primary PCI cannot be performed within 120 minutes of first medical contact."

Transfer to a PCI-Capable Hospital after Fibrinolytic Therapy: The 2013 ACCF/AHA clinical practice guideline for the management of STEMI recommends that:

  • Immediate transfer to a PCI-capable hospital for coronary angiography is recommended for suitable patients with STEMI who develop cardiogenic shock or acute severe heart failure (HF), irrespective of the time delay from MI onset.
  • Urgent transfer to a PCI-capable hospital for coronary angiography is reasonable for patients with STEMI who demonstrate evidence of failed reperfusion or reocclusion after fibrinolytic therapy.
  • Transfer to a PCI-capable hospital for coronary angiography is reasonable for patients with STEMI who have received fibrinolytic therapy even when hemodynamically stable and with clinical evidence of successful reperfusion. Angiography can be performed as soon as logistically feasible at the receiving hospital, and ideally within 24 hours, but should not be performed within the first 2 to 3 hours after administration of fibrinolytic therapy.
Citation

Fibrinolytic Therapy Trialists' (FTT) Collaborative Group. (1994). Indications for fibrinolytic therapy in suspected acute myocardial infarction: collaborative overview of early mortality and major morbidity results from all randomised trials of more than 1000 patients. The Lancet, 343(8893):311-22.

Citation

O'Connor RE, Brady W, Brooks SC, Diercks D, Egan J, Ghaemmaghami C, Menon V, O'Neil BJ, Travers AH, Yannapoulos D. (2010) Part 10: Acute coronary syndromes: 2010 American Heart Association Guidelines for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care. Circulation, 122(suppl 3): S787-S817. DOI: 10.1161/CIRCULATIONAHA.110.971028.

Citation

O'Gara P, Kushner F, Ascheim D, Casey D, Chung M, de Lemos J, Ettinger S, Fang J, Fesmire F, Franklin B, Granger C, Krumholz H, Linderbaum J, Morrow D, Newby L, Ornato J, Ou N, Radford M, Tamis-Holland J, Tommaso C, Tracy C, Woo Y, Zhao D, Anderson J, Jacobs A, Halperin J, Albert N, Brindis R, Creager M, DeMets D, Guyton R, Hochman J, Kovacs R, Kushner F, Ohman E, Stevenson W, Yancy C. (2013). 2013 ACCF/AHA guideline for the management of ST-elevation myocardial infarction: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines. Circulation, 127(4): e362-425.

Citation

Sohlpour A, Yusuf SW. (2014). Fibrinolytic therapy in patients with ST-elevation myocardial infarction. Expert Rev. Cardiovasc. Early online, 1-15.

Guidance (Usage) In order to support the best outcomes for patients and align with other guidelines, PCI device deployment time should be used for calculating the "PCI is performed within 90 minutes of ED arrival" numerator criteria and not the start time of the procedure. This dQM is an episode-based measure and should be reported for each instance of an ED encounter during the measurement period for patients with a STEMI. This FHIR-based measure has been derived from the QDM-based measure: CMS996v6. Please refer to the HL7 QI-Core Implementation Guide (*++https://hl7.org/fhir/us/qicore/STU6/++* ) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (*++https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html++*).
Measure Group (Rate) (ID: Group_1)
Basis Encounter
Scoring Proportion
Improvement Notation Increased score indicates improvement
Type Process
Rate Aggregation None
Initial Population ID: InitialPopulation_1
Description:

All emergency department encounters for patients 18 years and older at the start of the encounter with a diagnosis of ST-segment elevation myocardial infarction (STEMI) during an Emergency Department encounter that ends during the measurement period

Criteria: Initial Population
Denominator ID: Denominator_1
Description:

Equals Initial Population

Criteria: Denominator
Denominator Exclusion ID: DenominatorExclusion_1
Description:

Patients with the following conditions are excluded from measure denominator: At some point during ED encounter: * Allergic reaction to alteplase, streptokinase, anistreplase, tenecteplase, or reteplase Starts before the start of ED encounter and does not end before ED encounter: * Bleeding or bleeding diathesis (excluding menses) * Known malignant intracranial neoplasm (primary or metastatic) * Known structural cerebral vascular lesion (e.g., arteriovenous malformation) * Advanced dementia * Pregnancy * Diagnosis of allergy to thrombolytics At the start of ED encounter or within 90 days or less of ED encounter: -Active oral anticoagulant therapy Occurs 24 hours or less before start of ED encounter or during ED encounter: * Aortic dissection or ruptured aortic aneurysm, Angina pectoris with documented spasm, Aneurysm of heart, Ventricular aneurysm due to and following acute myocardial infarction, Takotsubo cardiomyopathy or syndrome * Severe neurologic impairment * Mechanical circulatory assist device placement or removal, including: aortic balloon pump, biventricular assist device, intra-aortic balloon, intra-aortic balloon counterpulsation, intra-aortic counterpulsation balloon pump, left ventricular device, percutaneous ventricular assist device, or ventricular assist device * Intubation, including endotracheal intubation, mechanical ventilation, nasotracheal intubation, or orotracheal intubation * Cardiopulmonary arrest, including: cardiac arrest, cardiopulmonary resuscitation (CPR), defibrillation, respiratory arrest, or ventricular fibrillation (V-fib), ventricular tachycardia (VT), or pulseless electrical activity (PEA); or, traumatic or prolonged (\>10 minutes) CPR Occurs 21 days or less before start of ED encounter or starts during ED encounter: * Major surgery Occurs within 90 days before start of or at start of ED encounter: * Ischemic stroke * Significant facial and/or closed head trauma * Peptic ulcer Occurs 90 days or less before start of ED encounter: * Intracranial or intraspinal surgery With a discharge disposition of patient expired in the ED With a discharge disposition of left against medical advice With documentation of hospice services in the 6 months within start of ED encounter, or active hospice status at start of ED encounter

Criteria: Denominator Exclusions
Denominator Exception ID: DenominatorException_1
Description:

Emergency department encounters where the patient received fibrinolytic therapy at another facility within 24 hours. Emergency department encounters with a documented reason for not administering fibrinolytic therapy within 30 minutes of ED arrival. Emergency department encounters with a documented reason for not performing a PCI within 90 minutes of ED arrival.

Criteria: Denominator Exceptions
Numerator ID: Numerator_1
Description:

Emergency department encounters with a diagnosis of STEMI: * where time from ED arrival to fibrinolysis is 30 minutes or fewer; OR * where PCI is performed within 90 minutes of arrival; OR * where the patient is discharged to an acute care facility within 45 minutes of ED arrival

Criteria: Numerator
<p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p>
Supplemental Data Elements
Supplemental Data Element ID: sde-ethnicity
Usage Code: Supplemental Data
Description: SDE Ethnicity
Logic Definition: SDE Ethnicity
Supplemental Data Element ID: sde-payer
Usage Code: Supplemental Data
Description: SDE Payer
Logic Definition: SDE Payer
Supplemental Data Element ID: sde-race
Usage Code: Supplemental Data
Description: SDE Race
Logic Definition: SDE Race
Supplemental Data Element ID: sde-sex
Usage Code: Supplemental Data
Description: SDE Sex
Logic Definition: SDE Sex
Measure Logic
Primary Library https://madie.cms.gov/Library/CMS996FHIRAptTxforSTEMI
Contents Population Criteria
Logic Definitions
Terminology
Dependencies
Data Requirements
Parameters
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
define "Initial Population":
  "ED Encounter with STEMI Diagnosis"
Definition
Denominator
define "Denominator":
  "Initial Population"
Definition
Denominator Exclusion
define "Denominator Exclusions":
  "Allergy or Intolerance to Thrombolytic Medications Overlaps ED Encounter"
    union "Adverse Effect to Thrombolytic Medications Before End of ED Encounter"
    union "Active Exclusion Diagnosis at Start of ED Encounter"
    union "Active use of Anticoagulants"
    union "Exclusion Diagnosis During ED Encounter or Within 24 Hours of ED Encounter Start"
    union "Major Surgical Procedure 21 Days or Less Before Start of or Starts During ED Encounter"
    union "Intubation or Mechanical Circulatory Assist Device Placement or Removal Procedure During ED Encounter or Within 24 Hours of ED Encounter Start"
    union "Active Exclusion Diagnosis Within 90 Days Before or At the Start of ED Encounter"
    union "Intracranial or Intraspinal Procedure 90 Days or Less Before Start of ED Encounter"
    union "ED Encounter with Discharge Disposition as Patient Expired"
    union "ED Encounter with Discharge Disposition as Left Against Medical Advice"
    union "ED Encounter with Hospice Services"
    union "Currently Pregnant"
Definition
Denominator Exception
define "Denominator Exceptions":
  "Received tPA in Another Facility within 24 hours Prior to Admission"
    union "ED Encounter with a Documented Reason for No PCI Performed"
    union "ED Encounter with a Documented Reason for Not Administering Fibrinolytic Therapy"
Definition
Numerator
define "Numerator":
  "Fibrinolytic Therapy Administration within 30 Minutes of Arrival"
    union "PCI within 90 Minutes of Arrival"
    union "ED Departure with Discharge to Acute Care Facility Within 45 Minutes Of Arrival"
Definition
Logic Definitions
Logic Definition Library Name: SupplementalDataElements
define "SDE Sex":
  case
    when Patient.sex() = '248153007' then "Male (finding)"
    when Patient.sex() = '248152002' then "Female (finding)"
    else null
  end
Logic Definition Library Name: SupplementalDataElements
define "SDE Payer":
  [USQualityCore.Coverage: type in "Payer Type"] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Ethnicity":
  (Patient.ethnicity()) E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Race":
  (Patient.race()) R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }
Logic Definition Library Name: CQMCommon
/*  
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter  
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
  Encounter.reasonReference D
    return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))
Logic Definition Library Name: CQMCommon
/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference):
  singleton from (
    [Location] L where reference.references(L)
  )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter During MP":
  ["Encounter": class ~ "EMER"] EDEncounter
    where EDEncounter.type in "Emergency Department Evaluation and Management Visit"
      and EDEncounter.period ends during day of "Measurement Period"
      and EDEncounter.status = 'finished'
      and AgeInYearsAt(date from start of(EDEncounter.period)) >= 18
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with STEMI Diagnosis":
  "ED Encounter During MP" EDEncounterinMP
    where ( EDEncounterinMP.reasonCode in "STEMI"
        or exists ( ( ( [ConditionProblemsHealthConcerns: "STEMI"]
              union [ConditionEncounterDiagnosis: "STEMI"]
          ).verified ( ) ) DxSTEMI
            where ( EDEncounterinMP.encounterDiagnosis ( ).code in "STEMI"
                or ( DxSTEMI.onset.toInterval ( ) starts during EDEncounterinMP.period )
            )
        )
    )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Fibrinolytic Therapy Administration within 30 Minutes of Arrival":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ["MedicationAdministration": "Fibrinolytic Therapy"] Fibrinolytic
      such that Fibrinolytic.status = 'completed'
        and start of ( Fibrinolytic.effective.toInterval ( ) ) 30 minutes or less after EDwithSTEMI.currentemergencyDepartmentArrivalTime ( )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "PCI within 90 Minutes of Arrival":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ["Procedure": "Percutaneous Coronary Intervention"] PCI
      such that PCI.performed.toInterval ( ) starts 90 minutes or less after EDwithSTEMI.currentemergencyDepartmentArrivalTime ( )
        and PCI.status = 'completed'
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Departure with Discharge to Acute Care Facility Within 45 Minutes Of Arrival":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    where EDwithSTEMI.currentemergencyDepartmentDepartTime ( ) 45 minutes or less after EDwithSTEMI.currentemergencyDepartmentArrivalTime ( )
      and EDwithSTEMI.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Numerator":
  "Fibrinolytic Therapy Administration within 30 Minutes of Arrival"
    union "PCI within 90 Minutes of Arrival"
    union "ED Departure with Discharge to Acute Care Facility Within 45 Minutes Of Arrival"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Initial Population":
  "ED Encounter with STEMI Diagnosis"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Denominator":
  "Initial Population"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Allergy or Intolerance to Thrombolytic Medications Overlaps ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with ["AllergyIntolerance": "Thrombolytic medications"] ThrombolyticAllergy
      such that ThrombolyticAllergy.clinicalStatus ~ USQualityCoreCommon."allergy-active"
        and ( ThrombolyticAllergy.verificationStatus is not null implies ( ThrombolyticAllergy.verificationStatus ~ USQualityCoreCommon."allergy-confirmed"
              or ThrombolyticAllergy.verificationStatus ~ USQualityCoreCommon."allergy-unconfirmed"
          )
        )
        and ( ThrombolyticAllergy.onset.toInterval ( ) overlaps ( EDwSTEMI.period )
            or ThrombolyticAllergy.onset before end EDwSTEMI.period
        )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Adverse Effect to Thrombolytic Medications Before End of ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with [AdverseEvent: "Thrombolytics Adverse Event"] ThrombolyticAdverseEvent
      such that Coalesce(ThrombolyticAdverseEvent.date, ThrombolyticAdverseEvent.detected, ThrombolyticAdverseEvent.recordedDate) before end of ( EDwSTEMI.period )
        and ThrombolyticAdverseEvent.actuality = 'actual'
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Active Exclusion Diagnosis at Start of ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ( ( ["ConditionProblemsHealthConcerns": "Active Bleeding or Bleeding Diathesis, Excluding Menses"]
        union ["ConditionProblemsHealthConcerns": "Malignant Intracranial Neoplasm Group"]
        union ["ConditionProblemsHealthConcerns": "Cerebral Vascular Lesion"]
        union ["ConditionProblemsHealthConcerns": "Dementia and Related Intracranial Pathologies"]
        union ["ConditionProblemsHealthConcerns": "Pregnant State"]
        union ["ConditionProblemsHealthConcerns": "Allergy to thrombolytics"]
    ).verified ( ) ) ActiveExclusionDx
      such that ActiveExclusionDx.prevalenceInterval ( ) overlaps before ( EDwithSTEMI.period )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Active Oral Anticoagulant Medication at the Start of ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ["MedicationRequest": "Oral Anticoagulant Medications"] OralAnticoagulant
      such that OralAnticoagulant.status in { 'active', 'completed' }
        and OralAnticoagulant.intent = 'order'
        and OralAnticoagulant.authoredOn 90 days or less before or on start of EDwithSTEMI.period
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Active Long Term use of Anticoagulants":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ( ( ["ConditionProblemsHealthConcerns": "Long term (current) use of anticoagulants"]
        union ["ConditionEncounterDiagnosis": "Long term (current) use of anticoagulants"]
    ).verified ( ) ) LongTermAnticoagulant
      such that ( LongTermAnticoagulant.onset.toInterval ( ) starts before or on start of EDwithSTEMI.period
          and LongTermAnticoagulant.onset.toInterval ( ) ends on or after start of EDwithSTEMI.period
      )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Active use of Anticoagulants":
  "Active Oral Anticoagulant Medication at the Start of ED Encounter"
    union "Active Long Term use of Anticoagulants"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Exclusion Diagnosis During ED Encounter or Within 24 Hours of ED Encounter Start":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ( ( ["ConditionProblemsHealthConcerns": "Aortic Dissection or Ruptured Aortic Aneurysm"]
        union ["ConditionProblemsHealthConcerns": "Neurologic impairment"]
        union ["ConditionProblemsHealthConcerns": "Angina pectoris with documented spasm"]
        union ["ConditionProblemsHealthConcerns": "Ventricular aneurysm due to and following acute myocardial infarction (disorder)"]
        union ["ConditionProblemsHealthConcerns": "Aneurysm of heart"]
        union ["ConditionProblemsHealthConcerns": "Takotsubo cardiomyopathy (disorder)"]
        union ["ConditionProblemsHealthConcerns": "Takotsubo syndrome"]
        union ["ConditionProblemsHealthConcerns": "Cardiopulmonary Emergency"]
    ).verified ( ) ) ExclusionDiagnosis
      such that ( ( ExclusionDiagnosis.onset.toInterval ( ) starts during EDwithSTEMI.period )
          or ( ExclusionDiagnosis.onset.toInterval ( ) starts 24 hours or less before start of EDwithSTEMI.period )
      )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Major Surgical Procedure 21 Days or Less Before Start of or Starts During ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ["Procedure": "Major Surgical Procedure"] MajorSurgery
      such that ( MajorSurgery.performed.toInterval ( ) starts 21 days or less before start of EDwithSTEMI.period
          or MajorSurgery.performed.toInterval ( ) starts during EDwithSTEMI.period
      )
        and MajorSurgery.status = 'completed'
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Intubation or Mechanical Circulatory Assist Device Placement or Removal Procedure During ED Encounter or Within 24 Hours of ED Encounter Start":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ( ["Procedure": "Endotracheal Intubation"]
      union ["Procedure": "Mechanical Circulatory Assist Device"] ) AirwayProcedure
      such that ( ( AirwayProcedure.performed.toInterval ( ) starts during ( EDwithSTEMI.period ) )
          or ( AirwayProcedure.performed.toInterval ( ) starts 24 hours or less before start of ( EDwithSTEMI.period ) )
      )
        and AirwayProcedure.status = 'completed'
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Active Exclusion Diagnosis Within 90 Days Before or At the Start of ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with ( ( ["ConditionProblemsHealthConcerns": "Ischemic Stroke"]
        union ["ConditionProblemsHealthConcerns": "Closed Head and Facial Trauma"]
        union ["ConditionProblemsHealthConcerns": "Active Peptic Ulcer"]
    ).verified ( ) ) ExclusionCondition
      such that ExclusionCondition.prevalenceInterval ( ) starts during Interval[start of ( EDwSTEMI.period ) - 90 days, start of ( EDwSTEMI.period )]
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Intracranial or Intraspinal Procedure 90 Days or Less Before Start of ED Encounter":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ["Procedure": "Intracranial or Intraspinal surgery"] CranialorSpinalSurgery
      such that CranialorSpinalSurgery.performed.toInterval ( ) starts 90 days or less before start of ( EDwithSTEMI.period )
        and CranialorSpinalSurgery.status = 'completed'
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with Discharge Disposition as Patient Expired":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    where EDwithSTEMI.hospitalization.dischargeDisposition in "Patient Expired"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with Discharge Disposition as Left Against Medical Advice":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    where EDwSTEMI.hospitalization.dischargeDisposition in "Left Against Medical Advice"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with Hospice Services":
  from
    "ED Encounter with STEMI Diagnosis" EDwSTEMI
    let SixMonthsBeforeToEndOfSTEMI: Interval[start of ( EDwSTEMI.period ) - 6 months, end of ( EDwSTEMI.period )]
    where ( exists ( ( ( [Encounter: "Encounter Inpatient"] ).isEncounterPerformed ( ) ) InpatientEncounter
          where ( InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
              or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"
          )
            and InpatientEncounter.period starts before or on start of ( EDwSTEMI.period )
            and InpatientEncounter.period overlaps day of SixMonthsBeforeToEndOfSTEMI
      )
        or exists ( ( ( [Encounter: "Hospice Encounter"] ).isEncounterPerformed ( ) ) HospiceEncounter
            where HospiceEncounter.period starts before or on start of ( EDwSTEMI.period )
              and ( HospiceEncounter.period overlaps day of SixMonthsBeforeToEndOfSTEMI )
        )
        or exists ( ( ( [ObservationScreeningAssessment: "Hospice care [Minimum Data Set]"] ).isAssessmentPerformed ( ) ) HospiceAssessment
            where ( HospiceAssessment as ObservationScreeningAssessment ).value ~ "Yes (qualifier value)"
              and HospiceAssessment.effective.toInterval ( ) starts before or on start of ( EDwSTEMI.period )
              and ( HospiceAssessment.effective.toInterval ( ) overlaps day of SixMonthsBeforeToEndOfSTEMI )
        )
        or exists ( ( ( [ServiceRequest: "Hospice Care Ambulatory"] ).isInterventionOrder ( ) ) HospiceOrder
            where HospiceOrder.authoredOn 6 months or less before start of ( EDwSTEMI.period )
        )
        or exists ( ( ( [Procedure: "Hospice Care Ambulatory"] ).isInterventionPerformed ( ) ) HospicePerformed
            where HospicePerformed.performed.toInterval ( ) starts before or on start of ( EDwSTEMI.period )
              and ( HospicePerformed.performed.toInterval ( ) overlaps day of SixMonthsBeforeToEndOfSTEMI )
        )
        or exists ( ( ( [ConditionProblemsHealthConcerns: "Hospice Diagnosis"] ).verified ( ) ) HospiceCareDiagnosis
            where HospiceCareDiagnosis.onset.toInterval ( ) ends on or after start of ( EDwSTEMI.period )
        )
    )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Currently Pregnant":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with ( ["USCore.ObservationPregnancyStatusProfile"] ) PregStatus
      such that PregStatus.status = 'final'
        and ( PregStatus.value in "Pregnant State" )
        and ( PregStatus.effective during EDwSTEMI.period )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Denominator Exclusions":
  "Allergy or Intolerance to Thrombolytic Medications Overlaps ED Encounter"
    union "Adverse Effect to Thrombolytic Medications Before End of ED Encounter"
    union "Active Exclusion Diagnosis at Start of ED Encounter"
    union "Active use of Anticoagulants"
    union "Exclusion Diagnosis During ED Encounter or Within 24 Hours of ED Encounter Start"
    union "Major Surgical Procedure 21 Days or Less Before Start of or Starts During ED Encounter"
    union "Intubation or Mechanical Circulatory Assist Device Placement or Removal Procedure During ED Encounter or Within 24 Hours of ED Encounter Start"
    union "Active Exclusion Diagnosis Within 90 Days Before or At the Start of ED Encounter"
    union "Intracranial or Intraspinal Procedure 90 Days or Less Before Start of ED Encounter"
    union "ED Encounter with Discharge Disposition as Patient Expired"
    union "ED Encounter with Discharge Disposition as Left Against Medical Advice"
    union "ED Encounter with Hospice Services"
    union "Currently Pregnant"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Received tPA in Another Facility within 24 hours Prior to Admission":
  "ED Encounter with STEMI Diagnosis" EDwithSTEMI
    with ( ( ["ConditionProblemsHealthConcerns": "Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to current facility"]
        union ["ConditionEncounterDiagnosis": "Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to current facility"]
    ).verified ( ) ) TPA
      such that TPA.onset.toInterval ( ) starts during EDwithSTEMI.period
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with a Documented Reason for No PCI Performed":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with ["ProcedureNotDone": "Percutaneous Coronary Intervention"] PCINotDone
      such that ( PCINotDone.statusReason in "Patient Refusal"
          or PCINotDone.statusReason in "Procedure Not Indicated/Contraindicated"
      )
        and PCINotDone.performed during EDwSTEMI.period
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "ED Encounter with a Documented Reason for Not Administering Fibrinolytic Therapy":
  "ED Encounter with STEMI Diagnosis" EDwSTEMI
    with ["MedicationAdministrationNotDone": "Fibrinolytic Therapy"] FibrinolyticNoMed
      such that ( FibrinolyticNoMed.statusReason in "Patient Refusal"
          or FibrinolyticNoMed.statusReason in "Drug Intervention Not Indicated/Contraindicated"
      )
        and FibrinolyticNoMed.effective during EDwSTEMI.period
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define "Denominator Exceptions":
  "Received tPA in Another Facility within 24 hours Prior to Admission"
    union "ED Encounter with a Documented Reason for No PCI Performed"
    union "ED Encounter with a Documented Reason for Not Administering Fibrinolytic Therapy"
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define fluent function currentemergencyDepartmentArrivalTime(EDEncounter Encounter):
  First(EDEncounter.location EDLocation
      where exists((EDLocation.location.getLocation().type) LocationType
          where(LocationType in "Emergency Department Visit"
              or LocationType ~ "Emergency room"
              or LocationType ~ "Emergency trauma unit"
          )
            and start of EDLocation.period is not null
      )
      return start of EDLocation.period
      sort ascending
  )
Logic Definition Library Name: CMS996FHIRAptTxforSTEMI
define fluent function currentemergencyDepartmentDepartTime(EDEncounter Encounter):
  Last(EDEncounter.location EDLocation
      where exists((EDLocation.location.getLocation().type) LocationType
          where(LocationType in "Emergency Department Visit"
              or LocationType ~ "Emergency room"
              or LocationType ~ "Emergency trauma unit"
          )
            and 
            end of EDLocation.period is not null
      )
      return 
      end of EDLocation.period
      sort ascending
  )
Logic Definition Library Name: FHIRCommon
/*
@description: Returns the single extension (if present) on the given resource with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define fluent function ext(domainResource DomainResource, url String):
  singleton from domainResource.exts(url)
Logic Definition Library Name: FHIRCommon
/*
@description: Returns any extensions defined on the given resource with the specified url
*/
define fluent function exts(domainResource DomainResource, url String):
  domainResource.extension E
    where E.url = url
    return E
Logic Definition Library Name: FHIRCommon
/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resourceId String):
  resourceId = Last(Split(reference.reference, '/'))
Logic Definition Library Name: FHIRCommon
/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.

The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.

NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
  case
    when choice is FHIR.dateTime then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
    when choice is FHIR.Period then
      FHIRHelpers.ToInterval(choice as FHIR.Period)
    when choice is FHIR.instant then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
    when choice is FHIR.Age then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
    when choice is FHIR.Range then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
    when choice is FHIR.Timing then
      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
    when choice is FHIR.string then
      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
    else
      null as Interval<DateTime>
  end
Logic Definition Library Name: FHIRCommon
/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
  resource.id = Last(Split(reference.reference, '/'))
Logic Definition Library Name: FHIRCommon
/*
@description: Returns the single extension (if present) on the given element with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given element with the specified url.
*/
define fluent function ext(element Element, url String):
  singleton from element.exts(url)
Logic Definition Library Name: FHIRCommon
/*
@description: Returns any extensions defined on the given element with the specified url.
*/
define fluent function exts(element Element, url String):
  element.extension E
    where E.url = url
    return E
Logic Definition Library Name: FHIRCommon
/*
@description: Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function verified(conditions List<FHIR.Condition>):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ "confirmed"
        or C.verificationStatus ~ "unconfirmed"
        or C.verificationStatus ~ "provisional"
        or C.verificationStatus ~ "differential"
      )
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized prevalence period of a given Condition resource.
@comment: Uses the toInterval and toAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
  or condition.clinicalStatus ~ "recurrence"
  or condition.clinicalStatus ~ "relapse" then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
  (end of condition.abatementInterval()) abatementDate
    return 
	  if abatementDate is null then
        Interval[start of condition.onset.toInterval(), abatementDate)
      else
        Interval[start of condition.onset.toInterval(), abatementDate]
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized Abatement of a given Condition resource.
@comment: @comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.

NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define fluent function abatementInterval(condition Condition):
  if condition.abatement is FHIR.dateTime then
    Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
  else if condition.abatement is FHIR.Period then
    FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
  else if condition.abatement is FHIR.string then
    Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
  else if condition.abatement is FHIR.Age then
    Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
      FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
  else if condition.abatement is FHIR.Range then
    Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
      FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
  else if condition.abatement is FHIR.boolean then
    Interval[end of condition.onset.toInterval(), condition.recordedDate)
  else 
    null
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]
Logic Definition Library Name: FHIRHelpers
define function ToString(value EncounterStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDate(value date): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value dateTime): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value instant): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) 
value to a CQL Quantity
@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
@seealso: ToCalendarUnit
*/
define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
    end
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts a UCUM definite duration unit to a CQL calendar duration
unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) 
topic of the CQL specification.
@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
*/
define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationAdministrationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ProcedureStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value AdverseEventActuality): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestIntent): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ObservationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ServiceRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ServiceRequestIntent): value.value
Logic Definition Library Name: Status
// TODO: Deprecate because this is now in FHIRCommon
//Condition
/*
@description: Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
@deprecated: Use the USCoreCommon verified function insteada
*/
define fluent function verified(conditions List<Choice<ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis>>):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ "confirmed"
        or C.verificationStatus ~ "unconfirmed"
        or C.verificationStatus ~ "provisional"
        or C.verificationStatus ~ "differential"
      )
Logic Definition Library Name: Status
//Encounter, Performed
//General usage unless required otherwise by measure intent (e.g., follow-up encounters)
define fluent function isEncounterPerformed(Enc List<FHIR.Encounter>):
  Enc E
    where E.status = 'finished'
Logic Definition Library Name: Status
//Assessment, Performed
define fluent function isAssessmentPerformed(Obs List<ObservationScreeningAssessment>):
  Obs O
    where O.status in { 'final', 'amended', 'corrected' }
Logic Definition Library Name: Status
//Intervention, Order
define fluent function isInterventionOrder(ServiceRequest List<FHIR.ServiceRequest>):
  ServiceRequest S
    where S.status in { 'active', 'completed' }
      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}
Logic Definition Library Name: Status
//Intervention, Performed
define fluent function isInterventionPerformed(Proc List<FHIR.Procedure>):
  Proc P
    where P.status ~ 'completed'
Logic Definition Library Name: USCoreCommon
/*
@description: Returns the sex element as defined for the USCore patient profile
*/
define fluent function sex(patient Patient):
  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code
Logic Definition Library Name: USCoreCommon
define fluent function ethnicity(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E
    return {
      ombCategory: E.ext('ombCategory').value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }
Logic Definition Library Name: USCoreCommon
define fluent function race(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E
    return {
      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }
Terminology
Code System Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Code System Description: Code system ActCode
Resource: ActCode
Canonical URL: http://terminology.hl7.org/CodeSystem/v3-ActCode
Code System Description: Code system ConditionVerificationStatusCodes
Resource: ConditionVerificationStatus
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-ver-status
Code System Description: Code system RoleCode
Resource: RoleCode
Canonical URL: http://terminology.hl7.org/CodeSystem/v3-RoleCode
Code System Description: Code system AllergyIntoleranceClinicalStatusCodes
Resource: AllergyIntolerance Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
Code System Description: Code system AllergyIntoleranceVerificationStatusCodes
Resource: AllergyIntolerance Verification Status
Canonical URL: http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
Code System Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
Code System Description: Code system ICD10CM
Resource: International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM)
Canonical URL: http://hl7.org/fhir/sid/icd-10-cm
Code System Description: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Value Set Description: Value set Emergency Department Evaluation and Management Visit
Resource: Emergency Department Evaluation and Management Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
Value Set Description: Value set STEMI
Resource: STEMI
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4017
Value Set Description: Value set Fibrinolytic Therapy
Resource: Fibrinolytic Therapy
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4019
Value Set Description: Value set Emergency Department Visit
Resource: Emergency Department Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Value Set Description: Value set Percutaneous Coronary Intervention
Resource: Percutaneous Coronary Intervention
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.2000.5
Value Set Description: Value set Discharge To Acute Care Facility
Resource: Discharge To Acute Care Facility
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87
Value Set Description: Value set Payer Type
Resource: Payer Type
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Value Set Description: Value set Thrombolytic medications
Resource: Thrombolytic medications
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.4
Value Set Description: Value set Thrombolytics Adverse Event
Resource: Thrombolytics Adverse Event
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.6
Value Set Description: Value set Active Bleeding or Bleeding Diathesis, Excluding Menses
Resource: Active Bleeding Excluding Menses or Bleeding Diathesis
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4036
Value Set Description: Value set Malignant Intracranial Neoplasm Group
Resource: Malignant Intracranial Neoplasm Group
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.3
Value Set Description: Value set Cerebral Vascular Lesion
Resource: Cerebral Vascular Lesion
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4025
Value Set Description: Value set Dementia and Related Intracranial Pathologies
Resource: Dementia and Related Intracranial Pathologies
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4043
Value Set Description: Value set Pregnant State
Resource: Pregnancy ICD10 SNOMEDCT
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4055
Value Set Description: Value set Allergy to thrombolytics
Resource: Allergy to thrombolytics
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.5
Value Set Description: Value set Oral Anticoagulant Medications
Resource: Oral Anticoagulant Medications
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4045
Value Set Description: Value set Aortic Dissection or Ruptured Aortic Aneurysm
Resource: Aortic Dissection or Ruptured Aortic Aneurysm
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4028
Value Set Description: Value set Neurologic impairment
Resource: Neurologic impairment
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.114.12.1012
Value Set Description: Value set Cardiopulmonary Emergency
Resource: Cardiopulmonary Arrest
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4048
Value Set Description: Value set Major Surgical Procedure
Resource: Major Surgical Procedure
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4056
Value Set Description: Value set Endotracheal Intubation
Resource: Endotracheal Intubation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.69
Value Set Description: Value set Mechanical Circulatory Assist Device
Resource: Insertion or Replacement of Mechanical Circulatory Assist Device
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4052
Value Set Description: Value set Ischemic Stroke
Resource: Ischemic Stroke
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247
Value Set Description: Value set Closed Head and Facial Trauma
Resource: Closed Head and Facial Trauma
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4026
Value Set Description: Value set Active Peptic Ulcer
Resource: Acute Peptic Ulcer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.3157.4031
Value Set Description: Value set Intracranial or Intraspinal surgery
Resource: Intracranial or Intraspinal surgery
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.2
Value Set Description: Value set Patient Expired
Resource: Patient Expired
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309
Value Set Description: Value set Left Against Medical Advice
Resource: Left Against Medical Advice
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308
Value Set Description: Value set Encounter Inpatient
Resource: Encounter Inpatient
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Value Set Description: Value set Hospice Encounter
Resource: Hospice Encounter
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
Value Set Description: Value set Hospice Care Ambulatory
Resource: Hospice Care Ambulatory
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
Value Set Description: Value set Hospice Diagnosis
Resource: Hospice Diagnosis
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
Value Set Description: Value set Patient Refusal
Resource: Patient Refusal
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93
Value Set Description: Value set Procedure Not Indicated/Contraindicated
Resource: Procedure Not Indicated/Contraindicated
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1282.2
Value Set Description: Value set Drug Intervention Not Indicated/Contraindicated
Resource: Drug Intervention Not Indicated/Contraindicated
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1282.1
Direct Reference Code Display: Male (finding)
Code: 248153007
System: http://snomed.info/sct
Direct Reference Code Display: Female (finding)
Code: 248152002
System: http://snomed.info/sct
Direct Reference Code Display: emergency
Code: EMER
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
Direct Reference Code Display: confirmed
Code: confirmed
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: unconfirmed
Code: unconfirmed
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: provisional
Code: provisional
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: differential
Code: differential
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: Emergency room
Code: ER
System: http://terminology.hl7.org/CodeSystem/v3-RoleCode
Direct Reference Code Display: Emergency trauma unit
Code: ETU
System: http://terminology.hl7.org/CodeSystem/v3-RoleCode
Direct Reference Code Display: Active
Code: active
System: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
Direct Reference Code Display: Confirmed
Code: confirmed
System: http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
Direct Reference Code Display: Unconfirmed
Code: unconfirmed
System: http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
Direct Reference Code Code: active
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: recurrence
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: relapse
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Display: Long term (current) use of anticoagulants
Code: Z79.01
System: http://hl7.org/fhir/sid/icd-10-cm
Direct Reference Code Display: Angina pectoris with documented spasm
Code: I20.1
System: http://hl7.org/fhir/sid/icd-10-cm
Direct Reference Code Display: Ventricular aneurysm due to and following acute myocardial infarction (disorder)
Code: 723858002
System: http://snomed.info/sct
Direct Reference Code Display: Aneurysm of heart
Code: I25.3
System: http://hl7.org/fhir/sid/icd-10-cm
Direct Reference Code Display: Takotsubo cardiomyopathy (disorder)
Code: 441541008
System: http://snomed.info/sct
Direct Reference Code Display: Takotsubo syndrome
Code: I51.81
System: http://hl7.org/fhir/sid/icd-10-cm
Direct Reference Code Display: Discharge to home for hospice care (procedure)
Code: 428361000124107
System: http://snomed.info/sct
Direct Reference Code Display: Discharge to healthcare facility for hospice care (procedure)
Code: 428371000124100
System: http://snomed.info/sct
Direct Reference Code Display: Hospice care [Minimum Data Set]
Code: 45755-6
System: http://loinc.org
Direct Reference Code Display: Yes (qualifier value)
Code: 373066001
System: http://snomed.info/sct
Direct Reference Code Display: Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to current facility
Code: Z92.82
System: http://hl7.org/fhir/sid/icd-10-cm
Dependencies
Dependency Description: USQualityCore model information
Resource: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
Canonical URL: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
Dependency Description: USCore model information
Resource: http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived
Dependency Description: FHIR model information
Resource: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library SDE
Resource: SupplementalDataElements version: 6.1.000
Canonical URL: https://madie.cms.gov/Library/SupplementalDataElements|6.1.000
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Dependency Description: Library USCommon
Resource: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Dependency Description: Library FHIRCommon
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Dependency Description: Library Status
Resource: Status version: 2.1.000
Canonical URL: https://madie.cms.gov/Library/Status|2.1.000
Dependency Description: Library CQMCommon
Resource: CQMCommon version: 5.1.000
Canonical URL: https://madie.cms.gov/Library/CQMCommon|5.1.000
Dependency Description: Library USQualityCoreCommon
Resource: US Quality Core Common version: 0.1.0-cibuild
Canonical URL: https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild
Data Requirements
Data Requirement Type: Patient
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient
Must Support Elements: ombCategory, detailed, text
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: class, type, period, status, reasonCode, hospitalization, hospitalization.dischargeDisposition, location, location.type
Code Filter(s):
Path: class
Code(s): ActCode: EMER (emergency)
Path: status
Code(s): [not stated]: finished (finished)
Path: hospitalization.dischargeDisposition
ValueSet: Discharge To Acute Care Facility
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: class, type, period, status, reasonCode, hospitalization, hospitalization.dischargeDisposition, location, location.type
Code Filter(s):
Path: class
Code(s): ActCode: EMER (emergency)
Path: status
Code(s): [not stated]: finished (finished)
Path: hospitalization.dischargeDisposition
ValueSet: Patient Expired
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: class, type, period, status, reasonCode, hospitalization, hospitalization.dischargeDisposition, location, location.type
Code Filter(s):
Path: class
Code(s): ActCode: EMER (emergency)
Path: status
Code(s): [not stated]: finished (finished)
Path: hospitalization.dischargeDisposition
ValueSet: Left Against Medical Advice
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, hospitalization, hospitalization.dischargeDisposition, period, location, location.type, status
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, period, location, location.type, status
Code Filter(s):
Path: type
ValueSet: Hospice Encounter
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: class, type, period, status, reasonCode, location, location.type
Code Filter(s):
Path: class
Code(s): ActCode: EMER (emergency)
Path: status
Code(s): [not stated]: finished (finished)
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: class, type, period, status, location, location.type, reasonCode
Code Filter(s):
Path: class
Code(s): ActCode: EMER (emergency)
Path: status
Code(s): [not stated]: finished (finished)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: STEMI
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): Z79.01 (Long term (current) use of anticoagulants)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): Z92.82 (Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to current facility)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: onset
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: STEMI
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Active Bleeding Excluding Menses or Bleeding Diathesis
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Malignant Intracranial Neoplasm Group
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Cerebral Vascular Lesion
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Dementia and Related Intracranial Pathologies
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Pregnancy ICD10 SNOMEDCT
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Allergy to thrombolytics
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): Z79.01 (Long term (current) use of anticoagulants)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Aortic Dissection or Ruptured Aortic Aneurysm
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Neurologic impairment
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): I20.1 (Angina pectoris with documented spasm)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): SNOMED CT: 723858002 (Ventricular aneurysm due to and following acute myocardial infarction (disorder))
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): I25.3 (Aneurysm of heart)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): SNOMED CT: 441541008 (Takotsubo cardiomyopathy (disorder))
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): I51.81 (Takotsubo syndrome)
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Cardiopulmonary Arrest
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Ischemic Stroke
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Closed Head and Facial Trauma
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Acute Peptic Ulcer
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
ValueSet: Hospice Diagnosis
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code, onset
Code Filter(s):
Path: code
Code(s): International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM): Z92.82 (Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to current facility)
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: birthDate
Data Requirement Type: Resource
Profile(s): Resource
Must Support Elements: id
Data Requirement Type: Location
Profile(s): Location
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Code Filter(s):
Path: code
ValueSet: Fibrinolytic Therapy
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Code Filter(s):
Path: code
ValueSet: Oral Anticoagulant Medications
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication.reference, status, effective
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication, status, effective
Code Filter(s):
Path: medication
ValueSet: Fibrinolytic Therapy
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Percutaneous Coronary Intervention
Path: status
Code(s): [not stated]: completed (completed)
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Major Surgical Procedure
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Endotracheal Intubation
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Insertion or Replacement of Mechanical Circulatory Assist Device
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Intracranial or Intraspinal surgery
Path: status
Code(s): [not stated]: completed (completed)
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Data Requirement Type: Coverage
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: Payer Type
Data Requirement Type: AllergyIntolerance
Profile(s): AllergyIntolerance
Must Support Elements: code, clinicalStatus, verificationStatus, onset
Code Filter(s):
Path: code
ValueSet: Thrombolytic medications
Data Requirement Type: AdverseEvent
Profile(s): AdverseEvent
Must Support Elements: event, date, detected, recordedDate, actuality
Code Filter(s):
Path: event
ValueSet: Thrombolytics Adverse Event
Path: actuality
Code(s): [not stated]: actual (actual)
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: abatement, verificationStatus, onset, recordedDate, clinicalStatus
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication.reference, status, intent, authoredOn
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, status, intent, authoredOn
Code Filter(s):
Path: medication
ValueSet: Oral Anticoagulant Medications
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: value, status
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 45755-6 (Hospice care [Minimum Data Set])
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code, authoredOn, status, intent
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Data Requirement Type: Observation
Profile(s): US Core Observation Pregnancy Status Profile
Must Support Elements: status, value, effective
Code Filter(s):
Path: status
Code(s): [not stated]: final (final)
Path: value
ValueSet: Pregnancy ICD10 SNOMEDCT
Data Requirement Type: Procedure
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone
Must Support Elements: code, statusReason, performed
Code Filter(s):
Path: code
ValueSet: Percutaneous Coronary Intervention
Data Requirement Type: MedicationAdministration
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone
Must Support Elements: medication, statusReason, effective
Code Filter(s):
Path: medication
ValueSet: Fibrinolytic Therapy
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
SDE Sex Out 0..1 Coding
Numerator Out 0..* Encounter
Denominator Out 0..* Encounter
SDE Payer Out 0..* Resource
Initial Population Out 0..* Encounter
SDE Ethnicity Out 0..1 Resource
Denominator Exclusions Out 0..* Encounter
SDE Race Out 0..1 Resource
Denominator Exceptions Out 0..* Encounter
Generated using version 0.5.4 of the sample-content-ig Liquid templates