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

## : Discharged on Antithrombotic TherapyFHIR - XML Representation

Draft as of 2023-10-27

Raw xml | Download

    <Measure xmlns="http://hl7.org/fhir">
      <id value="DischargedonAntithromboticTherapyFHIR"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
        <profile
                 value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"/>
        <profile
                 value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"/>
      </meta>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
        <table class="grid dict">

                <tr>
                    <th scope="row"><b>Title: </b></th>
                    <td style="padding-left: 4px;">Discharged on Antithrombotic TherapyFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Id: </b></th>
                    <td style="padding-left: 4px;">DischargedonAntithromboticTherapyFHIR</td>
                </tr>

                    <tr>
                        <th scope="row"><b>Download cql: </b></th>
                        <td style="padding-left: 4px;"><a href="Library-DischargedonAntithromboticTherapyFHIR.cql">DischargedonAntithromboticTherapyFHIR.cql</a></td>
                    </tr>

                <tr>
                    <th scope="row"><b>Version: </b></th>
                    <td style="padding-left: 4px;">0.8.000</td>
                </tr>

                <tr>
                    <th scope="row"><b>Url: </b></th>
                    <td style="padding-left: 4px;"><a href="Measure-DischargedonAntithromboticTherapyFHIR.html">Discharged on Antithrombotic TherapyFHIR</a></td>
                </tr>

                <tr>
                    <th scope="row">
                        <b>

                                    short-name identifier:

                        </b>
                    </th>

                    <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <span>CMS104FHIR</span>
                            </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row">
                        <b>

                                    version-independent identifier:

                        </b>
                    </th>

                    <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <span>urn:uuid:4f57e4a2-097b-45f8-9c85-91b35ea92dc1</span>
                            </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row">
                        <b>

                                    version-specific identifier:

                        </b>
                    </th>

                    <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <span>urn:uuid:e0b5379f-4b9c-4177-a530-d744fa95d080</span>
                            </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row">
                        <b>

                                    publisher (CMS) identifier:

                        </b>
                    </th>

                    <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <span>104FHIR</span>
                            </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Effective Period: </b></th>
                    <td style="padding-left: 4px;">2024-01-01
                        ..2024-12-31</td>
                </tr>

                <tr>
                    <th scope="row"><b>Status: </b></th>
                    <td style="padding-left: 4px;">draft</td>
                </tr>

                <tr>
                    <th scope="row"><b>Date: </b></th>
                    <td style="padding-left: 4px;">2023-10-27 08:12:31+0000</td>
                </tr>

                <tr>
                    <th scope="row"><b>Approval Date: </b></th>
                    <td style="padding-left: 4px;">2023-08-01</td>
                </tr>

                <tr>
                    <th scope="row"><b>Last Review Date: </b></th>
                    <td style="padding-left: 4px;">2023-08-01</td>
                </tr>

                <tr>
                    <th scope="row"><b>Name: </b></th>
                    <td style="padding-left: 4px;">DischargedonAntithromboticTherapyFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Publisher: </b></th>
                    <td style="padding-left: 4px;">The Joint Commission</td>
                </tr>

            <tr>
                <th scope="row"><b>Author: </b></th>
                <td style="padding-left: 4px;">The Joint Commission: <a href="https://www.jointcommission.org/">https://www.jointcommission.org/</a></td>
            </tr>

                <tr>
                    <th scope="row"><b>Description: </b></th>
                    <td style="padding-left: 4px;"><div><p>Ischemic stroke patients prescribed or continuing to take antithrombotic therapy at hospital discharge</p>
    </div></td>
                </tr>

                <tr>
                    <th scope="row"><b>Use Context: </b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>code</b></th>
                                <th><b>value</b></th>
                            </tr>

                                <tr>
                                    <td>program</td>
                                    <td/>
                                </tr>

                        </table>
                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Purpose: </b></th>
                    <td style="padding-left: 4px;"><div><p>UNKNOWN</p>
    </div></td>
                </tr>

                <tr>
                    <th scope="row"><b>Copyright: </b></th>
                    <td style="padding-left: 4px;"><div><p>Measure specifications are in the Public Domain</p>
    <p>LOINC(R) copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 copyright 2021 World Health Organization. All Rights Reserved.</p>
    </div></td>
                </tr>

                <tr>
                    <th scope="row"><b>Disclaimer: </b></th>
                    <td style="padding-left: 4px;"><div><p>These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.</p>
    </div></td>
                </tr>

            <tr>
                <th scope="row"><b>Rationale: </b></th>
                <td style="padding-left: 4px;"><div><p>The effectiveness of antithrombotic agents in reducing stroke mortality, stroke-related morbidity and recurrence rates has been studied in several large clinical trials. While the use of these agents for patients with acute ischemic stroke and transient ischemic attacks continues to be the subject of study, substantial evidence is available from completed studies. Data at this time suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist.</p>
    <p>or patients with a stroke due to a cardioembolic source (e.g. atrial fibrillation, mechanical heart valve), warfarin is recommended unless contraindicated. In recent years, novel oral anticoagulant agents (NOACs) have been developed and approved by the U.S. Food and Drug Administration (FDA) for stroke prevention, and may be considered as an alternative to warfarin for select patients. Anticoagulation therapy is not generally recommended for secondary stroke prevention in patients presumed to have a non-cardioembolic stroke.
    Anticoagulants at doses to prevent venous thromboembolism are insufficient antithrombotic therapy to prevent recurrent ischemic stroke or transient ischemic attack (TIA).</p>
    </div></td>
            </tr>

            <tr>
                <th scope="row"><b>Clinical recommendation statement: </b></th>
                <td style="padding-left: 4px;"><div><p>Clinical trial results suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist</p>
    </div></td>
            </tr>

                <tr>
                    <th scope="row"><b>Guidance (Usage): </b></th>
                    <td style="padding-left: 4px;">The &quot;Nonelective Inpatient Encounter&quot; value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the &quot;Inpatient encounter&quot; value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.

    The &quot;MedicationRequest&quot; datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.

    The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.

    This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.

    This FHIR-based measure has been derived from the QDM-based measure: CMS104v12.

    Please refer to the HL7 QI-Core Implementation Guide (http://hl7.org/fhir/us/qicore/index.html) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (http://hl7.org/fhir/us/qicore/qdm-to-qicore.html).</td>
                </tr>

                    <tr>
                        <th scope="row"><b>Population Criteria: </b></th>
                        <td style="padding-left: 4px;">

                                <table class="grid-dict">

                                        <tr>
                                            <th><b>64403d17d4d7050edabb0562</b></th>
                                        </tr>

                                        <tr>
                                            <td>Initial Population:</td>

                                                <td>Inpatient hospitalizations for patients age 18 and older, discharged from inpatient care (non-elective admissions) with a principal diagnosis of ischemic or hemorrhagic stroke and a length of stay less than or equal to 120 days that ends during the measurement period</td>

                                        </tr>

                                        <tr>
                                            <td>Denominator:</td>

                                                <td>Inpatient hospitalizations for patients with a principal diagnosis of Ischemic stroke</td>

                                        </tr>

                                        <tr>
                                            <td>Denominator Exclusion:</td>

                                                <td>- Inpatient hospitalizations for patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.
    - Inpatient hospitalizations for patients discharged to another hospital
    - Inpatient hospitalizations for patients who left against medical advice
    - Inpatient hospitalizations for patients who expired
    - Inpatient hospitalizations for patients discharged to home for hospice care
    - Inpatient hospitalizations for patients discharged to a health care facility for hospice care
    - Inpatient hospitalizations for patients with comfort measures documented</td>

                                        </tr>

                                        <tr>
                                            <td>Denominator Exception:</td>

                                                <td>- Inpatient hospitalizations for patients with a documented reason for not prescribing antithrombotic therapy at discharge.
    - Inpatient hospitalizations for patients who receive Prasugrel as an antithrombotic therapy at discharge.</td>

                                        </tr>

                                        <tr>
                                            <td>Numerator:</td>

                                                <td>Inpatient hospitalizations for patients prescribed or continuing to take antithrombotic therapy at hospital discharge</td>

                                        </tr>

                                        <tr>
                                            <td>Numerator Exclusion:</td>

                                                <td>None</td>

                                        </tr>

                                </table>

                        </td>
                    </tr>

                <tr>
                    <th scope="row">
                        <b> Supplemental Data Guidance
                            : </b></th>
                    <td style="padding-left: 4px;"> Patient's Ethnicity:
    Hispanic or Latino
    Not Hispanic or Latino
     Patient's Payer:
    Categories of types of health care payer entities as defined by the US Public Health Data Consortium SOP code system
     Patient's Race:
    Native Hawaiian or Other Pacific Islander
    Asian
    American Indian or Alaska Native
    Other Race
    White
    Black or African American
     Patient's Sex:
    Gender identity restricted to only Male and Female used in administrative situations requiring a restriction to these two categories.
     </td>
                </tr>

                <tr>
                    <th scope="row"><b> Supplemental Data Elements: </b></th>
                    <td style="padding-left: 4px;">

                                    SDE Ethnicity

                                    SDE Payer

                                    SDE Race

                                    SDE Sex

                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Libraries: </b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">

                                <tr>
                                    <td><a href="Library-DischargedonAntithromboticTherapyFHIR.html">DischargedonAntithromboticTherapyFHIR</a></td>
                                </tr>

                        </table>
                    </td>
                </tr>

                    <tr>
                        <th scope="row"><b>Related Artifact Dependencies: </b></th>
                        <td style="padding-left: 4px;">

                                <li><a href="Library-SupplementalDataElements.html">SupplementalDataElements</a> version: 3.4.000</li>

                                <li><a href="Library-TJCOverall.html">TJCOverall</a> version: 8.9.000</li>

                                <li><a href="Library-FHIRHelpers.html">FHIRHelpers</a> version: 4.3.000</li>

                                <li><a href="Library-CQMCommon.html">CQMCommon</a> version: 1.4.000</li>

                                <li><a href="Library-QICoreCommon.html">QICoreCommon</a> version: 1.5.000</li>

                                <li><code>http://hl7.org/fhir/v3/AdministrativeGender</code></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion">Non-Elective Inpatient Encounter</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.212/expansion">Hemorrhagic Stroke</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.247/expansion">Ischemic Stroke</a></li>

                                <li><a href="https://tx.fhir.org/r4/ValueSet/2.16.840.1.113762.1.4.1110.62-20210409">Antithrombotic Therapy for Ischemic Stroke</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.87/expansion">Discharge To Acute Care Facility</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.308/expansion">Left Against Medical Advice</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.309/expansion">Patient Expired</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.209/expansion">Discharged to Home for Hospice Care</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.207/expansion">Discharged to Health Care Facility for Hospice Care</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></li>

                        </td>
                    </tr>
                    <tr>
                        <th scope="row"><b>Parameters:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr>
                                    <th><b>name</b></th>
                                    <th><b>use</b></th>
                                    <th><b>min</b></th>
                                    <th><b>max</b></th>
                                    <th><b>type</b></th>
                                </tr>

                                    <tr>
                                        <td>Measurement Period</td>
                                        <td>In</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>Period</td>
                                    </tr>

                                    <tr>
                                        <td>SDE Sex</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>Coding</td>
                                    </tr>

                                    <tr>
                                        <td>Numerator</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>*</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>Denominator</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>*</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>SDE Payer</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>*</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>Initial Population</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>*</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>SDE Ethnicity</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>Denominator Exclusions</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>*</td>
                                        <td>Resource</td>
                                    </tr>

                                    <tr>
                                        <td>SDE Race</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>Resource</td>
                                    </tr>

                            </table>
                        </td>
                    </tr>

                    <tr>
                        <th scope="row"><b>DataRequirements:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr>
                                    <th><b>Type</b></th>
                                    <th><b>Elements</b></th>
                                    <th><b>Valueset Name</b></th>
                                    <th><b>Valueset</b></th>
                                </tr>

                                    <tr>
                                        <td>Patient(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>)</td>
                                        <td>

                                                ethnicity

                                                race

                                        </td>
                                        <td>

                                        </td>
                                        <td/>
                                    </tr>

                                    <tr>
                                        <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                        <td>

                                                type

                                                period

                                                rank

                                                rank.value

                                                condition

                                                condition.reference

                                                condition.reference.value

                                                hospitalization

                                                hospitalization.dischargeDisposition

                                        </td>
                                        <td>

                                                     Nonelective Inpatient Encounter

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion">Non-Elective Inpatient Encounter</a></td>
                                    </tr>

                                    <tr>
                                        <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                        <td>

                                                type

                                                status

                                                status.value

                                                period

                                                rank

                                                rank.value

                                                condition

                                                condition.reference

                                                condition.reference.value

                                                hospitalization

                                                hospitalization.dischargeDisposition

                                        </td>
                                        <td>

                                                     Observation Services

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></td>
                                    </tr>

                                    <tr>
                                        <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                        <td>

                                                type

                                                status

                                                status.value

                                                period

                                                rank

                                                rank.value

                                                condition

                                                condition.reference

                                                condition.reference.value

                                                hospitalization

                                                hospitalization.dischargeDisposition

                                        </td>
                                        <td>

                                                     Emergency Department Visit

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></td>
                                    </tr>

                                    <tr>
                                        <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                        <td>

                                                id

                                                id.value

                                        </td>
                                        <td>

                                        </td>
                                        <td/>
                                    </tr>

                                    <tr>
                                        <td>Medication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html">QICoreMedication</a>)</td>
                                        <td>

                                                id

                                        </td>
                                        <td>

                                        </td>
                                        <td/>
                                    </tr>

                                    <tr>
                                        <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                        <td>

                                                medication.reference

                                                authoredOn

                                                authoredOn.value

                                        </td>
                                        <td>

                                        </td>
                                        <td/>
                                    </tr>

                                    <tr>
                                        <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                        <td>

                                                medication

                                                authoredOn

                                                authoredOn.value

                                        </td>
                                        <td>

                                                     Antithrombotic Therapy for Ischemic Stroke

                                        </td>
                                        <td><a href="https://tx.fhir.org/r4/ValueSet/2.16.840.1.113762.1.4.1110.62-20210409">Antithrombotic Therapy for Ischemic Stroke</a></td>
                                    </tr>

                                    <tr>
                                        <td>Coverage(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html">QICoreCoverage</a>)</td>
                                        <td>

                                                type

                                                period

                                        </td>
                                        <td>

                                                     Payer Type

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
                                    </tr>

                                    <tr>
                                        <td>ServiceRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-servicerequest.html">QICoreServiceRequest</a>)</td>
                                        <td>

                                                code

                                                status

                                                status.value

                                                intent

                                                intent.value

                                                doNotPerform

                                                doNotPerform.value

                                        </td>
                                        <td>

                                                     Comfort Measures

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a></td>
                                    </tr>

                                    <tr>
                                        <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                        <td>

                                                code

                                                status

                                                status.value

                                        </td>
                                        <td>

                                                     Comfort Measures

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a></td>
                                    </tr>

                            </table>
                        </td>
                    </tr>

                        <tr>
                            <th scope="row"><b>Direct Reference Codes:</b></th>
                            <td style="padding-left: 4px;">
                                <table class="grid-dict">
                                    <tr>
                                        <th><b>display</b></th>
                                        <th><b>code</b></th>
                                        <th><b>system</b></th>
                                    </tr>

                                        <tr>
                                            <td>Male</td>
                                            <td>M</td>
                                            <td><a href="http://hl7.org/fhir/v3/AdministrativeGender">http://hl7.org/fhir/v3/AdministrativeGender</a></td>
                                        </tr>

                                        <tr>
                                            <td>Female</td>
                                            <td>F</td>
                                            <td><a href="http://hl7.org/fhir/v3/AdministrativeGender">http://hl7.org/fhir/v3/AdministrativeGender</a></td>
                                        </tr>

                                </table>
                            </td>
                        </tr>

                    <tr>
                        <th scope="row"><b>Logic Definitions:</b></th>
                        <td style="padding-left: 4px;">

                            <table class="grid-dict">
                                <tr>
                                    <th><b>Group</b></th>
                                    <th><b>Scoring</b></th>
                                    <th><b>Population Criteria</b></th>
                                    <th><b>Expression</b></th>
                                </tr>
                                <tr>

                                    <td> 64403d17d4d7050edabb0562 </td>
                                    <td>

                                            <b>Group scoring:</b>

                                                <span>  proportion </span>

                                    </td>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Initial Population</td>
                                        <td>

                                                <pre><code class="language-cql">// + ', ' + Combine(Patient.name.first().given, ' ')

    define &quot;Initial Population&quot;:
      TJC.&quot;Encounter with Principal Diagnosis and Age&quot;</code></pre>

                                        </td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Denominator</td>
                                        <td>

                                                <pre><code class="language-cql">define &quot;Denominator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot;</code></pre>

                                        </td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Denominator Exclusion</td>
                                        <td>

                                                <pre><code class="language-cql">define &quot;Denominator Exclusions&quot;:
      TJC.&quot;Ischemic Stroke Encounters with Discharge Disposition&quot;
        union &quot;Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke&quot;</code></pre>

                                        </td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Denominator Exception</td>
                                        <td>

                                                <pre><code class="language-cql"/></pre>

                                        </td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Numerator</td>
                                        <td>

                                                <pre><code class="language-cql">define &quot;Numerator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;MedicationRequest&quot;: &quot;Antithrombotic Therapy for Ischemic Stroke&quot;] DischargeAntithrombotic
          such that DischargeAntithrombotic.authoredOn during IschemicStrokeEncounter.period</code></pre>

                                        </td>
                                    </tr>

                                    <tr>
                                        <td/>
                                        <td/>
                                        <td>Numerator Exclusion</td>
                                        <td>

                                                None

                                        </td>
                                    </tr>

                                </tr>
                            </table>

                    <table class="grid-dict">

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>SupplementalDataElements</td>

                                    <td>SDE Sex</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
      case
          when Patient.gender = 'male' then &quot;M&quot;
          when Patient.gender = 'female' then &quot;F&quot;
          else null
        end</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>SDE Sex</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
      SDE.&quot;SDE Sex&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>Non Elective Inpatient Encounter</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Non Elective Inpatient Encounter&quot;:
      [&quot;Encounter&quot;: &quot;Nonelective Inpatient Encounter&quot;] NonElectiveEncounter
            where NonElectiveEncounter.period ends during day of &quot;Measurement Period&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>All Stroke Encounter</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;All Stroke Encounter&quot;:
      &quot;Non Elective Inpatient Encounter&quot; NonElectiveEncounter
      let ConditionCode: NonElectiveEncounter.principalDiagnosis().code
        where ( ConditionCode in &quot;Hemorrhagic Stroke&quot;
           or   ConditionCode in &quot;Ischemic Stroke&quot; )</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>Encounter with Principal Diagnosis and Age</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Encounter with Principal Diagnosis and Age&quot;:
      &quot;All Stroke Encounter&quot; AllStrokeEncounter
        where AgeInYearsAt(date from start of AllStrokeEncounter.period ) &gt;= 18</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>Ischemic Stroke Encounter</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Ischemic Stroke Encounter&quot;:
      &quot;Encounter with Principal Diagnosis and Age&quot; EncounterWithAge
        where EncounterWithAge.principalDiagnosis().code in &quot;Ischemic Stroke&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>Numerator</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;MedicationRequest&quot;: &quot;Antithrombotic Therapy for Ischemic Stroke&quot;] DischargeAntithrombotic
          such that DischargeAntithrombotic.authoredOn during IschemicStrokeEncounter.period</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>Denominator</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>SupplementalDataElements</td>

                                    <td>SDE Payer</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
      [Coverage: type in &quot;Payer Type&quot;] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>SDE Payer</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
      SDE.&quot;SDE Payer&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>Initial Population</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">// + ', ' + Combine(Patient.name.first().given, ' ')

    define &quot;Initial Population&quot;:
      TJC.&quot;Encounter with Principal Diagnosis and Age&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>SupplementalDataElements</td>

                                    <td>SDE Ethnicity</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>SDE Ethnicity</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    define &quot;Denominator Exceptions&quot;:
      &quot;Encounter with Documented Reason for No Antithrombotic At Discharge&quot;
      union &quot;Encounter with Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;

    define &quot;Encounter with Documented Reason for No Antithrombotic At Discharge&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with &quot;Reason for Not Giving Antithrombotic at Discharge&quot; NoDischargeAntithrombotic
          such that NoDischargeAntithrombotic.authoredOn during IschemicStrokeEncounter.period

    define &quot;Reason for Not Giving Antithrombotic at Discharge&quot;:
      [&quot;MedicationNotRequested&quot;: &quot;Antithrombotic Therapy for Ischemic Stroke&quot;] NoAntithromboticDischarge
        where ( NoAntithromboticDischarge.reasonCode in &quot;Medical Reason For Not Providing Treatment&quot;
            or NoAntithromboticDischarge.reasonCode in &quot;Patient Refusal&quot;
        )
          and ( NoAntithromboticDischarge.isCommunity ( )
              or NoAntithromboticDischarge.isDischarge ( )
          )
          and NoAntithromboticDischarge.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }

    define &quot;Encounter with Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with &quot;Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot; DischargePharmacological
          such that DischargePharmacological.authoredOn during IschemicStrokeEncounter.period

    define &quot;Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;:
      [&quot;MedicationRequest&quot;: &quot;Pharmacological Contraindications For Antithrombotic Therapy&quot;] Pharmacological
        where ( Pharmacological.isCommunity ( )
            or Pharmacological.isDischarge ( )
        )
          and Pharmacological.status in { 'active', 'completed' }
          and Pharmacological.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
          and Pharmacological.doNotPerform is not true
    */
    define &quot;SDE Ethnicity&quot;:
      SDE.&quot;SDE Ethnicity&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>Ischemic Stroke Encounters with Discharge Disposition</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Ischemic Stroke Encounters with Discharge Disposition&quot;:
      &quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
      let DischDisp: IschemicStrokeEncounter.hospitalization.dischargeDisposition
      	where  DischDisp in &quot;Discharge To Acute Care Facility&quot;
    		or DischDisp in &quot;Left Against Medical Advice&quot;
    		or DischDisp in &quot;Patient Expired&quot;
    		or DischDisp in &quot;Discharged to Home for Hospice Care&quot;
    		or DischDisp in &quot;Discharged to Health Care Facility for Hospice Care&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>TJCOverall</td>

                                    <td>Intervention Comfort Measures</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Intervention Comfort Measures&quot;:
      ( [&quot;ServiceRequest&quot;: code in &quot;Comfort Measures&quot;] SR
        where SR.status in { 'active', 'completed', 'on-hold' }
          and SR.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
          and SR.doNotPerform is not true
      )
      union ( [&quot;Procedure&quot;: &quot;Comfort Measures&quot;] InterventionPerformed
            where InterventionPerformed.status in { 'completed', 'in-progress' }
      )</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke&quot;:
      &quot;Denominator&quot; Encounter
        with TJC.&quot;Intervention Comfort Measures&quot; ComfortMeasure
          such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during Encounter.hospitalizationWithObservation ( )</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>Denominator Exclusions</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
      TJC.&quot;Ischemic Stroke Encounters with Discharge Disposition&quot;
        union &quot;Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>SupplementalDataElements</td>

                                    <td>SDE Race</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>DischargedonAntithromboticTherapyFHIR</td>

                                    <td>SDE Race</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
      SDE.&quot;SDE Race&quot;</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>CQMCommon</td>

                                    <td>principalDiagnosis</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @description: Returns the condition that is specified as the principal diagnosis for the encounter
    */
    define fluent function principalDiagnosis(Encounter Encounter ):
    	singleton from ((Encounter.diagnosis D where D.rank = 1) PD
          return singleton from ([Condition] C where C.id = PD.condition.reference.getId())
    	)</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>QICoreCommon</td>

                                    <td>getId</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
    @comment: This function can be used to determine the logical id of a given resource. It can be used in
    a single-server environment to trace references. However, this function does not attempt to resolve
    or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
    */
    define fluent function getId(uri String):
      Last(Split(uri, '/'))</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>FHIRHelpers</td>

                                    <td>ToString</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>FHIRHelpers</td>

                                    <td>ToCode</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @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
            }</code></pre>
                                    </td>

                            </tr>

                            <tr>
                                <th><b>Library Name</b></th>
                                <th><b>Name</b></th>
                            </tr>
                            <tr>

                                    <td>CQMCommon</td>

                                    <td>hospitalizationWithObservation</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
    */
    define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
      TheEncounter Visit
      		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
      				where LastObs.status = 'finished'
                and LastObs.period ends 1 hour or less on or before start of Visit.period
      				sort by end of period
      			),
      			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
      			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
      				where LastED.status = 'finished'
                and LastED.period ends 1 hour or less on or before VisitStart
      				sort by end of period
      			)
      		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>
                                    </td>

                            </tr>

                        </table>
                    </td>
                </tr>

        </table>
    </div>
      </text>
      <contained>
        <Library>
          <id value="effective-data-requirements"/>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
              <code value="M"/>
              <display value="Male"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system value="http://hl7.org/fhir/v3/AdministrativeGender"/>
              <code value="F"/>
              <display value="Female"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Sex"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Sex&quot;:
      case
          when Patient.gender = 'male' then &quot;M&quot;
          when Patient.gender = 'female' then &quot;F&quot;
          else null
        end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="0"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Sex"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Sex&quot;:
      SDE.&quot;SDE Sex&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="1"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Non Elective Inpatient Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Non Elective Inpatient Encounter&quot;:
      [&quot;Encounter&quot;: &quot;Nonelective Inpatient Encounter&quot;] NonElectiveEncounter
            where NonElectiveEncounter.period ends during day of &quot;Measurement Period&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="2"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString value="All Stroke Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;All Stroke Encounter&quot;:
      &quot;Non Elective Inpatient Encounter&quot; NonElectiveEncounter
      let ConditionCode: NonElectiveEncounter.principalDiagnosis().code
        where ( ConditionCode in &quot;Hemorrhagic Stroke&quot;
           or   ConditionCode in &quot;Ischemic Stroke&quot; )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="3"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Encounter with Principal Diagnosis and Age"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Encounter with Principal Diagnosis and Age&quot;:
      &quot;All Stroke Encounter&quot; AllStrokeEncounter
        where AgeInYearsAt(date from start of AllStrokeEncounter.period ) &gt;= 18"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="4"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Ischemic Stroke Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Ischemic Stroke Encounter&quot;:
      &quot;Encounter with Principal Diagnosis and Age&quot; EncounterWithAge
        where EncounterWithAge.principalDiagnosis().code in &quot;Ischemic Stroke&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="5"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Numerator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Numerator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;MedicationRequest&quot;: &quot;Antithrombotic Therapy for Ischemic Stroke&quot;] DischargeAntithrombotic
          such that DischargeAntithrombotic.authoredOn during IschemicStrokeEncounter.period"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="6"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="7"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Payer"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Payer&quot;:
      [Coverage: type in &quot;Payer Type&quot;] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="8"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Payer"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Payer&quot;:
      SDE.&quot;SDE Payer&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="9"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Initial Population"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="// + ', ' + Combine(Patient.name.first().given, ' ')

    define &quot;Initial Population&quot;:
      TJC.&quot;Encounter with Principal Diagnosis and Age&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="10"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Ethnicity&quot;:
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="11"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    define &quot;Denominator Exceptions&quot;:
      &quot;Encounter with Documented Reason for No Antithrombotic At Discharge&quot;
      union &quot;Encounter with Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;

    define &quot;Encounter with Documented Reason for No Antithrombotic At Discharge&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with &quot;Reason for Not Giving Antithrombotic at Discharge&quot; NoDischargeAntithrombotic
          such that NoDischargeAntithrombotic.authoredOn during IschemicStrokeEncounter.period

    define &quot;Reason for Not Giving Antithrombotic at Discharge&quot;:
      [&quot;MedicationNotRequested&quot;: &quot;Antithrombotic Therapy for Ischemic Stroke&quot;] NoAntithromboticDischarge
        where ( NoAntithromboticDischarge.reasonCode in &quot;Medical Reason For Not Providing Treatment&quot;
            or NoAntithromboticDischarge.reasonCode in &quot;Patient Refusal&quot;
        )
          and ( NoAntithromboticDischarge.isCommunity ( )
              or NoAntithromboticDischarge.isDischarge ( )
          )
          and NoAntithromboticDischarge.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }

    define &quot;Encounter with Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;:
      TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with &quot;Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot; DischargePharmacological
          such that DischargePharmacological.authoredOn during IschemicStrokeEncounter.period

    define &quot;Pharmacological Contraindications for Antithrombotic Therapy at Discharge&quot;:
      [&quot;MedicationRequest&quot;: &quot;Pharmacological Contraindications For Antithrombotic Therapy&quot;] Pharmacological
        where ( Pharmacological.isCommunity ( )
            or Pharmacological.isDischarge ( )
        )
          and Pharmacological.status in { 'active', 'completed' }
          and Pharmacological.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
          and Pharmacological.doNotPerform is not true
    */
    define &quot;SDE Ethnicity&quot;:
      SDE.&quot;SDE Ethnicity&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="12"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Ischemic Stroke Encounters with Discharge Disposition"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Ischemic Stroke Encounters with Discharge Disposition&quot;:
      &quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
      let DischDisp: IschemicStrokeEncounter.hospitalization.dischargeDisposition
      	where  DischDisp in &quot;Discharge To Acute Care Facility&quot;
    		or DischDisp in &quot;Left Against Medical Advice&quot;
    		or DischDisp in &quot;Patient Expired&quot;
    		or DischDisp in &quot;Discharged to Home for Hospice Care&quot;
    		or DischDisp in &quot;Discharged to Health Care Facility for Hospice Care&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="13"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="TJCOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Intervention Comfort Measures"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Intervention Comfort Measures&quot;:
      ( [&quot;ServiceRequest&quot;: code in &quot;Comfort Measures&quot;] SR
        where SR.status in { 'active', 'completed', 'on-hold' }
          and SR.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
          and SR.doNotPerform is not true
      )
      union ( [&quot;Procedure&quot;: &quot;Comfort Measures&quot;] InterventionPerformed
            where InterventionPerformed.status in { 'completed', 'in-progress' }
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="14"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke&quot;:
      &quot;Denominator&quot; Encounter
        with TJC.&quot;Intervention Comfort Measures&quot; ComfortMeasure
          such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during Encounter.hospitalizationWithObservation ( )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="15"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator Exclusions"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator Exclusions&quot;:
      TJC.&quot;Ischemic Stroke Encounters with Discharge Disposition&quot;
        union &quot;Encounter with Comfort Measures during Hospitalization for Patients with Documented Ischemic Stroke&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="16"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Race"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Race&quot;:
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="17"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="DischargedonAntithromboticTherapyFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Race"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Race&quot;:
      SDE.&quot;SDE Race&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="18"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="CQMCommon"/>
            </extension>
            <extension url="name">
              <valueString value="principalDiagnosis"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns the condition that is specified as the principal diagnosis for the encounter
    */
    define fluent function principalDiagnosis(Encounter Encounter ):
    	singleton from ((Encounter.diagnosis D where D.rank = 1) PD
          return singleton from ([Condition] C where C.id = PD.condition.reference.getId())
    	)"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="19"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="QICoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="getId"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
    @comment: This function can be used to determine the logical id of a given resource. It can be used in
    a single-server environment to trace references. However, this function does not attempt to resolve
    or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
    */
    define fluent function getId(uri String):
      Last(Split(uri, '/'))"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="20"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToString"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function ToString(value uri): value.value"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="21"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToCode"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @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
            }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="22"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString value="CQMCommon"/>
            </extension>
            <extension url="name">
              <valueString value="hospitalizationWithObservation"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
    */
    define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
      TheEncounter Visit
      		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
      				where LastObs.status = 'finished'
                and LastObs.period ends 1 hour or less on or before start of Visit.period
      				sort by end of period
      			),
      			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
      			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
      				where LastED.status = 'finished'
                and LastED.period ends 1 hour or less on or before VisitStart
      				sort by end of period
      			)
      		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="23"/>
            </extension>
          </extension>
          <status value="active"/>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
              <code value="module-definition"/>
            </coding>
          </type>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library SDE"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/SupplementalDataElements|3.4.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library TJC"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/TJCOverall|8.9.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library FHIRHelpers"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library CQMCommon"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/CQMCommon|1.4.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library QICoreCommon"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/QICoreCommon|1.5.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system AdministrativeGender"/>
            <resource value="http://hl7.org/fhir/v3/AdministrativeGender"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Nonelective Inpatient Encounter"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Hemorrhagic Stroke"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Ischemic Stroke"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Antithrombotic Therapy for Ischemic Stroke"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Payer Type"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Discharge To Acute Care Facility"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Left Against Medical Advice"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Patient Expired"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Discharged to Home for Hospice Care"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Discharged to Health Care Facility for Hospice Care"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Comfort Measures"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Observation Services"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Emergency Department Visit"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
          </relatedArtifact>
          <parameter>
            <name value="Measurement Period"/>
            <use value="in"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Period"/>
          </parameter>
          <parameter>
            <name value="SDE Sex"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Coding"/>
          </parameter>
          <parameter>
            <name value="Numerator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Denominator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="SDE Payer"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Initial Population"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="SDE Ethnicity"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Denominator Exclusions"/>
            <use value="out"/>
            <min value="0"/>
            <max value="*"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="SDE Race"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Resource"/>
          </parameter>
          <dataRequirement>
            <type value="Patient"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
            <mustSupport value="ethnicity"/>
            <mustSupport value="race"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="rank"/>
            <mustSupport value="rank.value"/>
            <mustSupport value="condition"/>
            <mustSupport value="condition.reference"/>
            <mustSupport value="condition.reference.value"/>
            <mustSupport value="hospitalization"/>
            <mustSupport value="hospitalization.dischargeDisposition"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
            </codeFilter>
            <dateFilter>
              <path value="period"/>
              <valuePeriod>
                <extension
                           url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
                  <valueExpression>
                    <language value="text/cql-identifier"/>
                    <expression value="Measurement Period"/>
                  </valueExpression>
                </extension>
              </valuePeriod>
            </dateFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="period"/>
            <mustSupport value="rank"/>
            <mustSupport value="rank.value"/>
            <mustSupport value="condition"/>
            <mustSupport value="condition.reference"/>
            <mustSupport value="condition.reference.value"/>
            <mustSupport value="hospitalization"/>
            <mustSupport value="hospitalization.dischargeDisposition"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
            </codeFilter>
            <codeFilter>
              <path value="status.value"/>
              <code>
                <code value="finished"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="period"/>
            <mustSupport value="rank"/>
            <mustSupport value="rank.value"/>
            <mustSupport value="condition"/>
            <mustSupport value="condition.reference"/>
            <mustSupport value="condition.reference.value"/>
            <mustSupport value="hospitalization"/>
            <mustSupport value="hospitalization.dischargeDisposition"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
            </codeFilter>
            <codeFilter>
              <path value="status.value"/>
              <code>
                <code value="finished"/>
              </code>
            </codeFilter>
            <dateFilter>
              <path value="period"/>
              <valuePeriod>
                <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
                  <valueString
                               value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
                </extension>
              </valuePeriod>
            </dateFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
            <mustSupport value="id"/>
            <mustSupport value="id.value"/>
          </dataRequirement>
          <dataRequirement>
            <extension
                       url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-relatedRequirement">
              <extension url="targetId">
                <valueString value="G10002"/>
              </extension>
              <extension url="targetProperty">
                <valueString value="medication"/>
              </extension>
            </extension>
            <type value="Medication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
            <mustSupport value="id"/>
          </dataRequirement>
          <dataRequirement id="G10002">
            <type value="MedicationRequest"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
            <mustSupport value="medication.reference"/>
            <mustSupport value="authoredOn"/>
            <mustSupport value="authoredOn.value"/>
          </dataRequirement>
          <dataRequirement>
            <type value="MedicationRequest"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
            <mustSupport value="medication"/>
            <mustSupport value="authoredOn"/>
            <mustSupport value="authoredOn.value"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.62"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Coverage"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="ServiceRequest"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
            <mustSupport value="code"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="intent"/>
            <mustSupport value="intent.value"/>
            <mustSupport value="doNotPerform"/>
            <mustSupport value="doNotPerform.value"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Procedure"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
            <mustSupport value="code"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
            </codeFilter>
          </dataRequirement>
        </Library>
      </contained>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
        <extension url="guidance">
          <valueString
                       value="Patient's Ethnicity:
    Hispanic or Latino
    Not Hispanic or Latino
     Patient's Payer:
    Categories of types of health care payer entities as defined by the US Public Health Data Consortium SOP code system
     Patient's Race:
    Native Hawaiian or Other Pacific Islander
    Asian
    American Indian or Alaska Native
    Other Race
    White
    Black or African American
     Patient's Sex:
    Gender identity restricted to only Male and Female used in administrative situations requiring a restriction to these two categories.
    "/>
        </extension>
        <extension url="usage">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
              <code value="supplemental-data"/>
              <display value="Supplemental Data"/>
            </coding>
            <text value="Supplemental Data Guidance"/>
          </valueCodeableConcept>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
        <valueReference>
          <reference value="Device/cqf-tooling"/>
        </valueReference>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
        <valueReference>
          <reference value="#effective-data-requirements"/>
        </valueReference>
      </extension>
      <url
           value="http://ecqi.healthit.gov/ecqms/Measure/DischargedonAntithromboticTherapyFHIR"/>
      <identifier>
        <use value="usual"/>
        <type>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
            <code value="short-name"/>
          </coding>
        </type>
        <system value="https://madie.cms.gov/measure/shortName"/>
        <value value="CMS104FHIR"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
            <code value="version-independent"/>
          </coding>
        </type>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:uuid:4f57e4a2-097b-45f8-9c85-91b35ea92dc1"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
            <code value="version-specific"/>
          </coding>
        </type>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:uuid:e0b5379f-4b9c-4177-a530-d744fa95d080"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
            <code value="publisher"/>
          </coding>
        </type>
        <system value="https://madie.cms.gov/measure/cmsId"/>
        <value value="104FHIR"/>
        <assigner>
          <display value="CMS"/>
        </assigner>
      </identifier>
      <version value="0.8.000"/>
      <name value="DischargedonAntithromboticTherapyFHIR"/>
      <title value="Discharged on Antithrombotic TherapyFHIR"/>
      <status value="draft"/>
      <experimental value="false"/>
      <date value="2023-10-27T08:12:31+00:00"/>
      <publisher value="The Joint Commission"/>
      <contact>
        <telecom>
          <system value="url"/>
          <value value="https://www.jointcommission.org/"/>
        </telecom>
      </contact>
      <description
                   value="Ischemic stroke patients prescribed or continuing to take antithrombotic therapy at hospital discharge"/>
      <useContext>
        <code>
          <system
                  value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
          <code value="program"/>
        </code>
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/quality-programs"/>
            <code value="eh-cah"/>
            <display value="EH/CAH"/>
          </coding>
        </valueCodeableConcept>
      </useContext>
      <purpose value="UNKNOWN"/>
      <usage
             value="The &quot;Nonelective Inpatient Encounter&quot; value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the &quot;Inpatient encounter&quot; value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.

    The &quot;MedicationRequest&quot; datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.

    The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.

    This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.

    This FHIR-based measure has been derived from the QDM-based measure: CMS104v12.

    Please refer to the HL7 QI-Core Implementation Guide (http://hl7.org/fhir/us/qicore/index.html) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (http://hl7.org/fhir/us/qicore/qdm-to-qicore.html)."/>
      <copyright
                 value="Measure specifications are in the Public Domain

    LOINC(R) copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 copyright 2021 World Health Organization. All Rights Reserved."/>
      <approvalDate value="2023-08-01"/>
      <lastReviewDate value="2023-08-01"/>
      <effectivePeriod>
        <start value="2024-01-01"/>
        <end value="2024-12-31"/>
      </effectivePeriod>
      <author>
        <name value="The Joint Commission"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.jointcommission.org/"/>
        </telecom>
      </author>
      <library
               value="http://ecqi.healthit.gov/ecqms/Library/DischargedonAntithromboticTherapyFHIR"/>
      <disclaimer
                  value="These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty."/>
      <rationale
                 value="The effectiveness of antithrombotic agents in reducing stroke mortality, stroke-related morbidity and recurrence rates has been studied in several large clinical trials. While the use of these agents for patients with acute ischemic stroke and transient ischemic attacks continues to be the subject of study, substantial evidence is available from completed studies. Data at this time suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist.

    or patients with a stroke due to a cardioembolic source (e.g. atrial fibrillation, mechanical heart valve), warfarin is recommended unless contraindicated. In recent years, novel oral anticoagulant agents (NOACs) have been developed and approved by the U.S. Food and Drug Administration (FDA) for stroke prevention, and may be considered as an alternative to warfarin for select patients. Anticoagulation therapy is not generally recommended for secondary stroke prevention in patients presumed to have a non-cardioembolic stroke.
    Anticoagulants at doses to prevent venous thromboembolism are insufficient antithrombotic therapy to prevent recurrent ischemic stroke or transient ischemic attack (TIA)."/>
      <clinicalRecommendationStatement
                                       value="Clinical trial results suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist"/>
      <group id="64403d17d4d7050edabb0562">
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
              <code value="proportion"/>
              <display value="Proportion"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
          <valueCode value="Encounter"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
          <valueCodeableConcept>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
              <code value="process"/>
              <display value="Process"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <population id="937BAF2A-D36A-4EE5-B2B2-762A0FE04502">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="initial-population"/>
              <display value="Initial Population"/>
            </coding>
          </code>
          <description
                       value="Inpatient hospitalizations for patients age 18 and older, discharged from inpatient care (non-elective admissions) with a principal diagnosis of ischemic or hemorrhagic stroke and a length of stay less than or equal to 120 days that ends during the measurement period"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Initial Population"/>
          </criteria>
        </population>
        <population id="302C1DCC-7FE6-41EF-A94E-FDAE24B7BB1B">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator"/>
              <display value="Denominator"/>
            </coding>
          </code>
          <description
                       value="Inpatient hospitalizations for patients with a principal diagnosis of Ischemic stroke"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator"/>
          </criteria>
        </population>
        <population id="4B649804-9C55-4949-8CE0-01B462CAA74C">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exclusion"/>
              <display value="Denominator Exclusion"/>
            </coding>
          </code>
          <description
                       value="- Inpatient hospitalizations for patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.
    - Inpatient hospitalizations for patients discharged to another hospital
    - Inpatient hospitalizations for patients who left against medical advice
    - Inpatient hospitalizations for patients who expired
    - Inpatient hospitalizations for patients discharged to home for hospice care
    - Inpatient hospitalizations for patients discharged to a health care facility for hospice care
    - Inpatient hospitalizations for patients with comfort measures documented"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Exclusions"/>
          </criteria>
        </population>
        <population id="516A3DD0-69B0-49EF-BBD3-12809CDC843E">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exception"/>
              <display value="Denominator Exception"/>
            </coding>
          </code>
          <description
                       value="- Inpatient hospitalizations for patients with a documented reason for not prescribing antithrombotic therapy at discharge.
    - Inpatient hospitalizations for patients who receive Prasugrel as an antithrombotic therapy at discharge."/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Exceptions"/>
          </criteria>
        </population>
        <population id="99961E3A-EFC4-4858-A3EE-F7F1D5B222FB">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="numerator"/>
              <display value="Numerator"/>
            </coding>
          </code>
          <description
                       value="Inpatient hospitalizations for patients prescribed or continuing to take antithrombotic therapy at hospital discharge"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Numerator"/>
          </criteria>
        </population>
        <population id="5f33f3ea-6ffb-4897-85dd-872dd7ac55b8">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="numerator-exclusion"/>
              <display value="Numerator Exclusion"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
          </criteria>
        </population>
      </group>
      <supplementalData id="sde-ethnicity">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Ethnicity"/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Ethnicity"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-payer">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Payer"/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Payer"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-race">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Race"/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Race"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-sex">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Sex"/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Sex"/>
        </criteria>
      </supplementalData>
    </Measure>