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

## : Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR - XML Representation

Draft as of 2023-10-27

Raw xml | Download

    <Measure xmlns="http://hl7.org/fhir">
      <id value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
      <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;">Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR</td>
                </tr>

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

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

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

                <tr>
                    <th scope="row"><b>Url: </b></th>
                    <td style="padding-left: 4px;"><a href="Measure-DRCommunicationWithPhysicianManagingDiabetesFHIR.html">Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR</a></td>
                </tr>

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

                                    short-name identifier:

                        </b>
                    </th>

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

                            <p style="margin-bottom: 5px;">
                                <span>CMS142FHIR</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:0f55e61f-dc17-4fe4-a604-7f030260618f</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:c2a33022-8d8d-426b-ae12-9bfd9afbdb82</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>142FHIR</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-14</td>
                </tr>

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

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

                <tr>
                    <th scope="row"><b>Publisher: </b></th>
                    <td style="padding-left: 4px;">American Academy of Ophthalmology</td>
                </tr>

            <tr>
                <th scope="row"><b>Author: </b></th>
                <td style="padding-left: 4px;">American Academy of Ophthalmology: <a href="www.aao.org">www.aao.org</a>, American Medical Association (AMA): <a href="https://www.ama-assn.org/">https://www.ama-assn.org/</a></td>
            </tr>

                <tr>
                    <th scope="row"><b>Description: </b></th>
                    <td style="padding-left: 4px;"><div><p>Percentage of patients aged 18 years and older with a diagnosis of diabetic retinopathy who had a dilated macular or fundus exam performed with documented communication to the physician who manages the ongoing care of the patient with diabetes mellitus regarding the findings of the macular or fundus exam at least once during the measurement period.</p>
    </div></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>Copyright 2023 American Academy of Ophthalmology. All Rights Reserved.</p>
    </div></td>
                </tr>

                <tr>
                    <th scope="row"><b>Disclaimer: </b></th>
                    <td style="padding-left: 4px;"><div><p>The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.</p>
    <p>The Measure, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain.</p>
    <p>Commercial uses of the Measure require a license agreement between the user and the American Academy of Ophthalmology (Academy). Neither the Academy, its members, the American Medical Association (AMA), nor the former AMA-convened Physician Consortium for Performance Improvement(R) (AMA-PCPI), nor PCPI, nor their members shall be responsible for any use of the Measure.</p>
    <p>The PCPI’s and AMA’s significant past efforts and contributions to the development and updating of the Measures are acknowledged. The National Committee for Quality Assurance's significant past efforts and contributions to the development and updating of the Measure is acknowledged.</p>
    <p>THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.</p>
    <p>Limited proprietary coding is contained in the Measure specifications for convenience. A license agreement must be entered prior to a third party’s use of Current Procedural Terminology (CPT[R]) or other proprietary code set contained in the Measures. Any other use of CPT or other coding by the third party is strictly prohibited. The Academy, the AMA, and former members of the PCPI disclaim all liability for use or accuracy of any CPT or other coding contained in the specifications.</p>
    <p>CPT(R) contained in the Measure specifications is copyright 2004-2022 American Medical Association. LOINC(R) is 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 is copyright 2022 World Health Organization. All Rights Reserved.</p>
    <p>Due to technical limitations, registered trademarks are indicated by (R) or [R].</p>
    </div></td>
                </tr>

            <tr>
                <th scope="row"><b>Rationale: </b></th>
                <td style="padding-left: 4px;"><div><p>Diabetic retinopathy is a prevalent complication of diabetes, estimated to affect 28.5% of diabetic patients in the US (Zhang et al., 2010). Diabetic retinopathy is a key indicator of systemic complications of diabetes (Zhang et al., 2010). Coordination of care between the eye care specialist and the physician managing a patient’s ongoing diabetes care is essential in stemming the progression of vision loss. Communication from the eye care specialist to a primary care physician facilitates the exchange of information about the severity and progression of a patient’s diabetic retinopathy, adherence to recommended ocular care, need for follow-up visits, and treatment plans (Storey et al., 2016). Data from the Diabetes Control and Complications Trial showed that diabetic treatment and maintenance of glucose control delays the onset and slows the progression of diabetic retinopathy (Aiello &amp; DCCT/EDIC Research Group, 2014).</p>
    </div></td>
            </tr>

            <tr>
                <th scope="row"><b>Clinical recommendation statement: </b></th>
                <td style="padding-left: 4px;"><div><p>The ophthalmologist should refer patients with diabetes to a primary care physician for appropriate management of their systemic condition and should communicate examination results to the physician managing the patient's ongoing diabetes care (III; Good Quality; Strong Recommendation) (Flaxel et al., 2020).</p>
    <p>Ophthalmologists should communicate the ophthalmologic findings and level of retinopathy with the primary care physician as well as the need for optimizing metabolic control (III; Good Quality; Strong Recommendation) (Flaxel et al,, 2020).</p>
    <p>Close partnership with the primary care physician is important to make sure that the care of the patient is optimized (III; Good Quality; Strong Recommendation) (Flaxel et al., 2020).</p>
    </div></td>
            </tr>

                <tr>
                    <th scope="row"><b>Guidance (Usage): </b></th>
                    <td style="padding-left: 4px;">The measure, as written, does not specifically require documentation of laterality. Coding limitations in particular clinical terminologies do not currently allow for that level of specificity (ICD-10-CM includes laterality, but SNOMED-CT does not uniformly include this distinction). Therefore, at this time, it is not a requirement of this measure to indicate laterality of the diagnoses, findings or procedures. Available coding to capture the data elements specified in this measure has been provided. It is assumed that the eligible clinician will record laterality in the patient medical record, as quality care and clinical documentation should include laterality.

    The communication of results to the primary care physician providing ongoing care of a patient's diabetes should be completed soon after the dilated exam is performed. Eligible clinicians reporting on this measure should note that all data for the reporting year is to be submitted by the deadline established by CMS. Therefore, eligible clinicians who see patients towards the end of the reporting period (i.e., December in particular), should communicate the results of the dilated macular exam as soon as possible in order for those patients to be counted in the measure numerator. Communicating the results as soon as possible after the date of the exam will ensure the data are included in the submission to CMS.

    This eCQM is a patient-based measure.

    Telehealth encounters are not eligible for this measure because the measure requires a clinical action that cannot be conducted via telehealth.

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

    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>645a7029beb771640fc4cc37</b></th>
                                        </tr>

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

                                                <td>All patients aged 18 years and older with a diagnosis of diabetic retinopathy</td>

                                        </tr>

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

                                                <td>Equals Initial Population who had a dilated macular or fundus exam performed</td>

                                        </tr>

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

                                                <td>None</td>

                                        </tr>

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

                                                <td>Patients with documentation, at least once within the measurement period, of the findings of the dilated macular or fundus exam via communication to the physician who manages the patient's diabetic care</td>

                                        </tr>

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

                                                <td>None</td>

                                        </tr>

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

                                                <td>Documentation of medical reason(s) for not communicating the findings of the dilated macular or fundus exam to the physician who manages the ongoing care of the patient with diabetes.

    Documentation of patient reason(s) for not communicating the findings of the dilated macular or fundus exam to the physician who manages the ongoing care of the patient with diabetes.</td>

                                        </tr>

                                </table>

                        </td>
                    </tr>

                <tr>
                    <th scope="row">
                        <b> Supplemental Data Guidance
                            : </b></th>
                    <td style="padding-left: 4px;">  </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-DRCommunicationWithPhysicianManagingDiabetesFHIR.html">DRCommunicationWithPhysicianManagingDiabetesFHIR</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-FHIRHelpers.html">FHIRHelpers</a> version: 4.3.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="http://terminology.hl7.org/7.1.0/CodeSystem-v3-ActCode.html">ActCode</a></li>

                                <li><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-clinical.html">Condition Clinical Status Codes</a></li>

                                <li><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html">ConditionVerificationStatus</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1283/expansion">Level of Severity of Retinopathy Findings</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a></li>

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

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1008/expansion">Outpatient Consultation</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1014/expansion">Care Services in Long-Term Residential Facility</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1012/expansion">Nursing Facility Visit</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.327/expansion">Diabetic Retinopathy</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.2.1391/expansion">Macular Edema Findings Absent</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1320/expansion">Macular Edema Findings Present</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1251/expansion">Macular Exam</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.526.3.1007/expansion">Medical Reason</a></li>

                                <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1008/expansion">Patient Reason</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>1</td>
                                        <td>boolean</td>
                                    </tr>

                                    <tr>
                                        <td>Denominator</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>boolean</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>1</td>
                                        <td>boolean</td>
                                    </tr>

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

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

                                    <tr>
                                        <td>Denominator Exceptions</td>
                                        <td>Out</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td>boolean</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

                                                status

                                                status.value

                                                class

                                        </td>
                                        <td>

                                                     Office Visit

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</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

                                                period

                                                status

                                                status.value

                                                class

                                        </td>
                                        <td>

                                                     Ophthalmological Services

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1285/expansion">Ophthalmological 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

                                                period

                                                status

                                                status.value

                                                class

                                        </td>
                                        <td>

                                                     Outpatient Consultation

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1008/expansion">Outpatient Consultation</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

                                                period

                                                status

                                                status.value

                                                class

                                        </td>
                                        <td>

                                                     Care Services in Long-Term Residential Facility

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1014/expansion">Care Services in Long-Term Residential Facility</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

                                                period

                                                status

                                                status.value

                                                class

                                        </td>
                                        <td>

                                                     Nursing Facility Visit

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1012/expansion">Nursing Facility 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>

                                                code

                                                verificationStatus

                                        </td>
                                        <td>

                                                     Diabetic Retinopathy

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.327/expansion">Diabetic Retinopathy</a></td>
                                    </tr>

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

                                                reasonCode

                                                sent

                                                sent.value

                                                status

                                                status.value

                                        </td>
                                        <td>

                                                     Level of Severity of Retinopathy Findings

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1283/expansion">Level of Severity of Retinopathy Findings</a></td>
                                    </tr>

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

                                                reasonCode

                                                sent

                                                sent.value

                                                status

                                                status.value

                                        </td>
                                        <td>

                                                     Macular edema absent (situation)

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.2.1391/expansion">Macular Edema Findings Absent</a></td>
                                    </tr>

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

                                                reasonCode

                                                sent

                                                sent.value

                                                status

                                                status.value

                                        </td>
                                        <td>

                                                     Macular Edema Findings Present

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1320/expansion">Macular Edema Findings Present</a></td>
                                    </tr>

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

                                                code

                                                effective

                                                value

                                                status

                                                status.value

                                        </td>
                                        <td>

                                                     Macular Exam

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1251/expansion">Macular Exam</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>Communication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-communicationnotdone.html">QICoreCommunicationNotDone</a>)</td>
                                        <td>

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Level of Severity of Retinopathy Findings

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1283/expansion">Level of Severity of Retinopathy Findings</a></td>
                                    </tr>

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

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Level of Severity of Retinopathy Findings

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1283/expansion">Level of Severity of Retinopathy Findings</a></td>
                                    </tr>

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

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Macular edema absent (situation)

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.2.1391/expansion">Macular Edema Findings Absent</a></td>
                                    </tr>

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

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Macular edema absent (situation)

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.2.1391/expansion">Macular Edema Findings Absent</a></td>
                                    </tr>

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

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Macular Edema Findings Present

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1320/expansion">Macular Edema Findings Present</a></td>
                                    </tr>

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

                                                reasonCode

                                                extension

                                                statusReason

                                        </td>
                                        <td>

                                                     Macular Edema Findings Present

                                        </td>
                                        <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1320/expansion">Macular Edema Findings Present</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>

                                        <tr>
                                            <td>virtual</td>
                                            <td>VR</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-v3-ActCode.html">http://terminology.hl7.org/CodeSystem/v3-ActCode</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>active</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>recurrence</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>relapse</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>unconfirmed</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html">http://terminology.hl7.org/CodeSystem/condition-ver-status</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>refuted</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html">http://terminology.hl7.org/CodeSystem/condition-ver-status</a></td>
                                        </tr>

                                        <tr>
                                            <td/>
                                            <td>entered-in-error</td>
                                            <td><a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html">http://terminology.hl7.org/CodeSystem/condition-ver-status</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> 645a7029beb771640fc4cc37 </td>
                                    <td>

                                            <b>Group scoring:</b>

                                                <span>  proportion </span>

                                    </td>

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

                                                <pre><code class="language-cql">define &quot;Initial Population&quot;:
      AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18
        and exists &quot;Diabetic Retinopathy Encounter&quot;</code></pre>

                                        </td>
                                    </tr>

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

                                                <pre><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists &quot;Macular Exam Performed&quot;</code></pre>

                                        </td>
                                    </tr>

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

                                                None

                                        </td>
                                    </tr>

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

                                                <pre><code class="language-cql">define &quot;Numerator&quot;:
      exists &quot;Level of Severity of Retinopathy Findings Communicated&quot;
        and ( exists &quot;Macular Edema Absence Communicated&quot;
            or exists &quot;Macular Edema Presence Communicated&quot;
        )</code></pre>

                                        </td>
                                    </tr>

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

                                                None

                                        </td>
                                    </tr>

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

                                                <pre><code class="language-cql">define &quot;Denominator Exceptions&quot;:
      exists &quot;Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Absence of Macular Edema&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Presence of Macular Edema&quot;</code></pre>

                                        </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>DRCommunicationWithPhysicianManagingDiabetesFHIR</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>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Qualifying Encounter During Measurement Period</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Qualifying Encounter During Measurement Period&quot;:
      ( [&quot;Encounter&quot;: &quot;Office Visit&quot;]
        union [&quot;Encounter&quot;: &quot;Ophthalmological Services&quot;]
        union [&quot;Encounter&quot;: &quot;Outpatient Consultation&quot;]
        union [&quot;Encounter&quot;: &quot;Care Services in Long-Term Residential Facility&quot;]
        union [&quot;Encounter&quot;: &quot;Nursing Facility Visit&quot;] ) QualifyingEncounter
        where QualifyingEncounter.period during &quot;Measurement Period&quot;
          and QualifyingEncounter.status = 'finished'
          and QualifyingEncounter.class !~ &quot;virtual&quot;</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Diabetic Retinopathy Encounter</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Diabetic Retinopathy Encounter&quot;:
      &quot;Qualifying Encounter During Measurement Period&quot; ValidQualifyingEncounter
        with [&quot;Condition&quot;: &quot;Diabetic Retinopathy&quot;] DiabeticRetinopathy
          such that DiabeticRetinopathy.prevalenceInterval ( ) overlaps ValidQualifyingEncounter.period
            and DiabeticRetinopathy.isActive ( )
            and not ( DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;refuted&quot;
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;entered-in-error&quot;
            )</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Level of Severity of Retinopathy Findings Communicated</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Level of Severity of Retinopathy Findings Communicated&quot;:
      [&quot;Communication&quot;: &quot;Level of Severity of Retinopathy Findings&quot;] LevelOfSeverityCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that LevelOfSeverityCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where LevelOfSeverityCommunicated.status = 'completed'</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Macular Edema Absence Communicated</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Macular Edema Absence Communicated&quot;:
      [&quot;Communication&quot;: &quot;Macular edema absent (situation)&quot;] MacularEdemaAbsentCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaAbsentCommunicated.status = 'completed'</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Macular Edema Presence Communicated</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Macular Edema Presence Communicated&quot;:
      [&quot;Communication&quot;: &quot;Macular Edema Findings Present&quot;] MacularEdemaPresentCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaPresentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaPresentCommunicated.status = 'completed'</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Numerator</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      exists &quot;Level of Severity of Retinopathy Findings Communicated&quot;
        and ( exists &quot;Macular Edema Absence Communicated&quot;
            or exists &quot;Macular Edema Presence Communicated&quot;
        )</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Initial Population</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
      AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18
        and exists &quot;Diabetic Retinopathy Encounter&quot;</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Macular Exam Performed</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Macular Exam Performed&quot;:
      [&quot;Observation&quot;: &quot;Macular Exam&quot;] MacularExam
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularExam.effective.toInterval ( ) during EncounterDiabeticRetinopathy.period
        where MacularExam.value is not null
          and MacularExam.status in { 'final', 'amended', 'corrected', 'preliminary' }</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Denominator</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists &quot;Macular Exam Performed&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>DRCommunicationWithPhysicianManagingDiabetesFHIR</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>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>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>SDE Ethnicity</td>

                            </tr>
                            <tr>

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

                                    <td>Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy&quot;:
      [CommunicationNotDone: &quot;Level of Severity of Retinopathy Findings&quot;] LevelOfSeverityNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that LevelOfSeverityNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( LevelOfSeverityNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or LevelOfSeverityNotCommunicated.statusReason in &quot;Patient Reason&quot;
        )</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Medical or Patient Reason for Not Communicating Absence of Macular Edema</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/* Note:
    below definition workaround for
    https://oncprojectracking.healthit.gov/support/browse/CQLIT-371. Using value set workaround has been applied for now
    but when QI Core STU 5 gets in the tool, it may be reverted back to a DRC */

    define &quot;Medical or Patient Reason for Not Communicating Absence of Macular Edema&quot;:
      [CommunicationNotDone: &quot;Macular edema absent (situation)&quot;] MacularEdemaAbsentNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaAbsentNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or MacularEdemaAbsentNotCommunicated.statusReason in &quot;Patient Reason&quot;
        )</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Medical or Patient Reason for Not Communicating Presence of Macular Edema</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Medical or Patient Reason for Not Communicating Presence of Macular Edema&quot;:
      [CommunicationNotDone: &quot;Macular Edema Findings Present&quot;] MacularEdemaPresentNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaPresentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaPresentNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or MacularEdemaPresentNotCommunicated.statusReason in &quot;Patient Reason&quot;
        )</code></pre>
                                    </td>

                            </tr>

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

                                    <td>DRCommunicationWithPhysicianManagingDiabetesFHIR</td>

                                    <td>Denominator Exceptions</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
      exists &quot;Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Absence of Macular Edema&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Presence of Macular Edema&quot;</code></pre>
                                    </td>

                            </tr>

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

                                    <td>QICoreCommon</td>

                                    <td>prevalenceInterval</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @description: Returns an interval representing the normalized prevalence period of a given Condition.
    @comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
    onset to abatement as specified in the given Condition. If the condition is active, the resulting interval will have
    a closed ending boundary. If the condition is not active, the resulting interval will have an open ending boundary.
    */
    define fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ &quot;active&quot;
      or condition.clinicalStatus ~ &quot;recurrence&quot;
      or condition.clinicalStatus ~ &quot;relapse&quot; then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval())</code></pre>
                                    </td>

                            </tr>

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

                                    <td>QICoreCommon</td>

                                    <td>isActive</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/* Candidates for FHIRCommon */

    /*
    @description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
    */
    define fluent function isActive(condition Condition):
      condition.clinicalStatus ~ &quot;active&quot;
        or condition.clinicalStatus ~ &quot;recurrence&quot;
        or condition.clinicalStatus ~ &quot;relapse&quot;</code></pre>
                                    </td>

                            </tr>

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

                                    <td>QICoreCommon</td>

                                    <td>toInterval</td>

                            </tr>
                            <tr>

                                    <td/>
                                    <td>
                                        <pre class="highlight language-cql"><code class="language-cql">/*
    @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
    @comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types
    to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
    representations for timing-valued elements in QICore, allowing this function to be used across any resource.
    The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
    The intent of this function is to provide a clear and concise mechanism to treat single
    elements that have multiple possible representations as intervals so that logic doesn't have to account
    for the variability. More complex calculations (such as medication request period or dispense period
    calculation) need specific guidance and consideration. That guidance may make use of this function, but
    the focus of this function is on single element calculations where the semantics are unambiguous.
    If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
    If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
    and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
    If the input is a DateTime Interval, the result is the input.
    If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
    is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
    immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
    Any other input will reslt in a null DateTime Interval
    */
    define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt;):
      case
    	  when choice is DateTime then
        	Interval[choice as DateTime, choice as DateTime]
    		when choice is Interval&lt;DateTime&gt; then
      		choice as Interval&lt;DateTime&gt;
    		when choice is Quantity then
    		  Interval[Patient.birthDate + (choice as Quantity),
    			  Patient.birthDate + (choice as Quantity) + 1 year)
    		when choice is Interval&lt;Quantity&gt; then
    		  Interval[Patient.birthDate + (choice.low as Quantity),
    			  Patient.birthDate + (choice.high as Quantity) + 1 year)
    		else
    			null as Interval&lt;DateTime&gt;
    	end</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>

                        </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-directReferenceCode">
            <valueCoding>
              <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
              <code value="VR"/>
              <display value="virtual"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
              <code value="active"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
              <code value="recurrence"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
              <code value="relapse"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="unconfirmed"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="refuted"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="entered-in-error"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Qualifying Encounter During Measurement Period"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Qualifying Encounter During Measurement Period&quot;:
      ( [&quot;Encounter&quot;: &quot;Office Visit&quot;]
        union [&quot;Encounter&quot;: &quot;Ophthalmological Services&quot;]
        union [&quot;Encounter&quot;: &quot;Outpatient Consultation&quot;]
        union [&quot;Encounter&quot;: &quot;Care Services in Long-Term Residential Facility&quot;]
        union [&quot;Encounter&quot;: &quot;Nursing Facility Visit&quot;] ) QualifyingEncounter
        where QualifyingEncounter.period during &quot;Measurement Period&quot;
          and QualifyingEncounter.status = 'finished'
          and QualifyingEncounter.class !~ &quot;virtual&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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Diabetic Retinopathy Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Diabetic Retinopathy Encounter&quot;:
      &quot;Qualifying Encounter During Measurement Period&quot; ValidQualifyingEncounter
        with [&quot;Condition&quot;: &quot;Diabetic Retinopathy&quot;] DiabeticRetinopathy
          such that DiabeticRetinopathy.prevalenceInterval ( ) overlaps ValidQualifyingEncounter.period
            and DiabeticRetinopathy.isActive ( )
            and not ( DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;refuted&quot;
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon.&quot;entered-in-error&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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Level of Severity of Retinopathy Findings Communicated"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Level of Severity of Retinopathy Findings Communicated&quot;:
      [&quot;Communication&quot;: &quot;Level of Severity of Retinopathy Findings&quot;] LevelOfSeverityCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that LevelOfSeverityCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where LevelOfSeverityCommunicated.status = 'completed'"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Macular Edema Absence Communicated"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Macular Edema Absence Communicated&quot;:
      [&quot;Communication&quot;: &quot;Macular edema absent (situation)&quot;] MacularEdemaAbsentCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaAbsentCommunicated.status = 'completed'"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Macular Edema Presence Communicated"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Macular Edema Presence Communicated&quot;:
      [&quot;Communication&quot;: &quot;Macular Edema Findings Present&quot;] MacularEdemaPresentCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaPresentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaPresentCommunicated.status = 'completed'"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Numerator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Numerator&quot;:
      exists &quot;Level of Severity of Retinopathy Findings Communicated&quot;
        and ( exists &quot;Macular Edema Absence Communicated&quot;
            or exists &quot;Macular Edema Presence Communicated&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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Initial Population"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Initial Population&quot;:
      AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18
        and exists &quot;Diabetic Retinopathy Encounter&quot;"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Macular Exam Performed"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Macular Exam Performed&quot;:
      [&quot;Observation&quot;: &quot;Macular Exam&quot;] MacularExam
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularExam.effective.toInterval ( ) during EncounterDiabeticRetinopathy.period
        where MacularExam.value is not null
          and MacularExam.status in { 'final', 'amended', 'corrected', 'preliminary' }"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists &quot;Macular Exam Performed&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 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="11"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString
                           value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </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="12"/>
            </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="13"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString
                           value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Ethnicity&quot;:
      SDE.&quot;SDE Ethnicity&quot;"/>
            </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="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="15"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString
                           value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </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="16"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
            <extension url="libraryName">
              <valueString
                           value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy&quot;:
      [CommunicationNotDone: &quot;Level of Severity of Retinopathy Findings&quot;] LevelOfSeverityNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that LevelOfSeverityNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( LevelOfSeverityNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or LevelOfSeverityNotCommunicated.statusReason in &quot;Patient Reason&quot;
        )"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Medical or Patient Reason for Not Communicating Absence of Macular Edema"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/* Note:
    below definition workaround for
    https://oncprojectracking.healthit.gov/support/browse/CQLIT-371. Using value set workaround has been applied for now
    but when QI Core STU 5 gets in the tool, it may be reverted back to a DRC */

    define &quot;Medical or Patient Reason for Not Communicating Absence of Macular Edema&quot;:
      [CommunicationNotDone: &quot;Macular edema absent (situation)&quot;] MacularEdemaAbsentNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaAbsentNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or MacularEdemaAbsentNotCommunicated.statusReason in &quot;Patient Reason&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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Medical or Patient Reason for Not Communicating Presence of Macular Edema"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Medical or Patient Reason for Not Communicating Presence of Macular Edema&quot;:
      [CommunicationNotDone: &quot;Macular Edema Findings Present&quot;] MacularEdemaPresentNotCommunicated
        with &quot;Diabetic Retinopathy Encounter&quot; EncounterDiabeticRetinopathy
          such that MacularEdemaPresentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaPresentNotCommunicated.statusReason in &quot;Medical Reason&quot;
            or MacularEdemaPresentNotCommunicated.statusReason in &quot;Patient Reason&quot;
        )"/>
            </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="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator Exceptions"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator Exceptions&quot;:
      exists &quot;Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Absence of Macular Edema&quot;
        or exists &quot;Medical or Patient Reason for Not Communicating Presence of Macular Edema&quot;"/>
            </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="QICoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="prevalenceInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns an interval representing the normalized prevalence period of a given Condition.
    @comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
    onset to abatement as specified in the given Condition. If the condition is active, the resulting interval will have
    a closed ending boundary. If the condition is not active, the resulting interval will have an open ending boundary.
    */
    define fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ &quot;active&quot;
      or condition.clinicalStatus ~ &quot;recurrence&quot;
      or condition.clinicalStatus ~ &quot;relapse&quot; then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval())"/>
            </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="QICoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="isActive"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/* Candidates for FHIRCommon */

    /*
    @description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
    */
    define fluent function isActive(condition Condition):
      condition.clinicalStatus ~ &quot;active&quot;
        or condition.clinicalStatus ~ &quot;recurrence&quot;
        or condition.clinicalStatus ~ &quot;relapse&quot;"/>
            </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="QICoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="toInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
    @comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types
    to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
    representations for timing-valued elements in QICore, allowing this function to be used across any resource.
    The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
    The intent of this function is to provide a clear and concise mechanism to treat single
    elements that have multiple possible representations as intervals so that logic doesn't have to account
    for the variability. More complex calculations (such as medication request period or dispense period
    calculation) need specific guidance and consideration. That guidance may make use of this function, but
    the focus of this function is on single element calculations where the semantics are unambiguous.
    If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
    If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
    and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
    If the input is a DateTime Interval, the result is the input.
    If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
    is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
    immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
    Any other input will reslt in a null DateTime Interval
    */
    define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt;):
      case
    	  when choice is DateTime then
        	Interval[choice as DateTime, choice as DateTime]
    		when choice is Interval&lt;DateTime&gt; then
      		choice as Interval&lt;DateTime&gt;
    		when choice is Quantity then
    		  Interval[Patient.birthDate + (choice as Quantity),
    			  Patient.birthDate + (choice as Quantity) + 1 year)
    		when choice is Interval&lt;Quantity&gt; then
    		  Interval[Patient.birthDate + (choice.low as Quantity),
    			  Patient.birthDate + (choice.high as Quantity) + 1 year)
    		else
    			null as Interval&lt;DateTime&gt;
    	end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="23"/>
            </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="24"/>
            </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="25"/>
            </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 FHIRHelpers"/>
            <resource
                      value="http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.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="Code system ActCode"/>
            <resource value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system ConditionClinicalStatusCodes"/>
            <resource
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system ConditionVerificationStatusCodes"/>
            <resource
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Level of Severity of Retinopathy Findings"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Office Visit"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Ophthalmological Services"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Outpatient Consultation"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Care Services in Long-Term Residential Facility"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Nursing Facility Visit"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Diabetic Retinopathy"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.327"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Macular edema absent (situation)"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Macular Edema Findings Present"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Macular Exam"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1251"/>
          </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 Medical Reason"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Patient Reason"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008"/>
          </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="1"/>
            <type value="boolean"/>
          </parameter>
          <parameter>
            <name value="Denominator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="boolean"/>
          </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="1"/>
            <type value="boolean"/>
          </parameter>
          <parameter>
            <name value="SDE Ethnicity"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="SDE Race"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Denominator Exceptions"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="boolean"/>
          </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="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="class"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="class"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="class"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="class"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <mustSupport value="class"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
            <mustSupport value="code"/>
            <mustSupport value="verificationStatus"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.327"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="sent"/>
            <mustSupport value="sent.value"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283"/>
            </codeFilter>
            <codeFilter>
              <path value="status.value"/>
              <code>
                <code value="completed"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="sent"/>
            <mustSupport value="sent.value"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391"/>
            </codeFilter>
            <codeFilter>
              <path value="status.value"/>
              <code>
                <code value="completed"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communication"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="sent"/>
            <mustSupport value="sent.value"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320"/>
            </codeFilter>
            <codeFilter>
              <path value="status.value"/>
              <code>
                <code value="completed"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Observation"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
            <mustSupport value="code"/>
            <mustSupport value="effective"/>
            <mustSupport value="value"/>
            <mustSupport value="status"/>
            <mustSupport value="status.value"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1251"/>
            </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="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1283"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1391"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Communication"/>
            <profile
                     value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-communicationnotdone"/>
            <mustSupport value="reasonCode"/>
            <mustSupport value="extension"/>
            <mustSupport value="statusReason"/>
            <codeFilter>
              <path value="reasonCode"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1320"/>
            </codeFilter>
          </dataRequirement>
        </Library>
      </contained>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
        <extension url="guidance"/>
        <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/DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
      <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="CMS142FHIR"/>
      </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:0f55e61f-dc17-4fe4-a604-7f030260618f"/>
      </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:c2a33022-8d8d-426b-ae12-9bfd9afbdb82"/>
      </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="142FHIR"/>
        <assigner>
          <display value="CMS"/>
        </assigner>
      </identifier>
      <version value="0.0.004"/>
      <name value="DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
      <title
             value="Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR"/>
      <status value="draft"/>
      <experimental value="false"/>
      <date value="2023-10-27T08:12:31+00:00"/>
      <publisher value="American Academy of Ophthalmology"/>
      <contact>
        <telecom>
          <system value="url"/>
          <value value="www.aao.org"/>
        </telecom>
      </contact>
      <description
                   value="Percentage of patients aged 18 years and older with a diagnosis of diabetic retinopathy who had a dilated macular or fundus exam performed with documented communication to the physician who manages the ongoing care of the patient with diabetes mellitus regarding the findings of the macular or fundus exam at least once during the measurement period."/>
      <purpose value="UNKNOWN"/>
      <usage
             value="The measure, as written, does not specifically require documentation of laterality. Coding limitations in particular clinical terminologies do not currently allow for that level of specificity (ICD-10-CM includes laterality, but SNOMED-CT does not uniformly include this distinction). Therefore, at this time, it is not a requirement of this measure to indicate laterality of the diagnoses, findings or procedures. Available coding to capture the data elements specified in this measure has been provided. It is assumed that the eligible clinician will record laterality in the patient medical record, as quality care and clinical documentation should include laterality.

    The communication of results to the primary care physician providing ongoing care of a patient's diabetes should be completed soon after the dilated exam is performed. Eligible clinicians reporting on this measure should note that all data for the reporting year is to be submitted by the deadline established by CMS. Therefore, eligible clinicians who see patients towards the end of the reporting period (i.e., December in particular), should communicate the results of the dilated macular exam as soon as possible in order for those patients to be counted in the measure numerator. Communicating the results as soon as possible after the date of the exam will ensure the data are included in the submission to CMS.

    This eCQM is a patient-based measure.

    Telehealth encounters are not eligible for this measure because the measure requires a clinical action that cannot be conducted via telehealth.

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

    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="Copyright 2023 American Academy of Ophthalmology. All Rights Reserved."/>
      <approvalDate value="2023-08-14"/>
      <lastReviewDate value="2023-08-14"/>
      <effectivePeriod>
        <start value="2024-01-01"/>
        <end value="2024-12-31"/>
      </effectivePeriod>
      <author>
        <name value="American Academy of Ophthalmology"/>
        <telecom>
          <system value="url"/>
          <value value="www.aao.org"/>
        </telecom>
      </author>
      <author>
        <name value="American Medical Association (AMA)"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.ama-assn.org/"/>
        </telecom>
      </author>
      <library
               value="http://ecqi.healthit.gov/ecqms/Library/DRCommunicationWithPhysicianManagingDiabetesFHIR"/>
      <disclaimer
                  value="The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.

    The Measure, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain.

    Commercial uses of the Measure require a license agreement between the user and the American Academy of Ophthalmology (Academy). Neither the Academy, its members, the American Medical Association (AMA), nor the former AMA-convened Physician Consortium for Performance Improvement(R) (AMA-PCPI), nor PCPI, nor their members shall be responsible for any use of the Measure.

    The PCPI’s and AMA’s significant past efforts and contributions to the development and updating of the Measures are acknowledged. The National Committee for Quality Assurance's significant past efforts and contributions to the development and updating of the Measure is acknowledged.

    THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.

    Limited proprietary coding is contained in the Measure specifications for convenience. A license agreement must be entered prior to a third party’s use of Current Procedural Terminology (CPT[R]) or other proprietary code set contained in the Measures. Any other use of CPT or other coding by the third party is strictly prohibited. The Academy, the AMA, and former members of the PCPI disclaim all liability for use or accuracy of any CPT or other coding contained in the specifications.

    CPT(R) contained in the Measure specifications is copyright 2004-2022 American Medical Association. LOINC(R) is 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 is copyright 2022 World Health Organization. All Rights Reserved.

    Due to technical limitations, registered trademarks are indicated by (R) or [R]."/>
      <rationale
                 value="Diabetic retinopathy is a prevalent complication of diabetes, estimated to affect 28.5% of diabetic patients in the US (Zhang et al., 2010). Diabetic retinopathy is a key indicator of systemic complications of diabetes (Zhang et al., 2010). Coordination of care between the eye care specialist and the physician managing a patient’s ongoing diabetes care is essential in stemming the progression of vision loss. Communication from the eye care specialist to a primary care physician facilitates the exchange of information about the severity and progression of a patient’s diabetic retinopathy, adherence to recommended ocular care, need for follow-up visits, and treatment plans (Storey et al., 2016). Data from the Diabetes Control and Complications Trial showed that diabetic treatment and maintenance of glucose control delays the onset and slows the progression of diabetic retinopathy (Aiello &amp; DCCT/EDIC Research Group, 2014)."/>
      <clinicalRecommendationStatement
                                       value="The ophthalmologist should refer patients with diabetes to a primary care physician for appropriate management of their systemic condition and should communicate examination results to the physician managing the patient's ongoing diabetes care (III; Good Quality; Strong Recommendation) (Flaxel et al., 2020).

    Ophthalmologists should communicate the ophthalmologic findings and level of retinopathy with the primary care physician as well as the need for optimizing metabolic control (III; Good Quality; Strong Recommendation) (Flaxel et al,, 2020).

    Close partnership with the primary care physician is important to make sure that the care of the patient is optimized (III; Good Quality; Strong Recommendation) (Flaxel et al., 2020)."/>
      <group id="645a7029beb771640fc4cc37">
        <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="boolean"/>
        </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="outcome"/>
              <display value="Outcome"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <population id="716D9EB9-48AD-4D92-B67C-CF6985DF631E">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="initial-population"/>
              <display value="Initial Population"/>
            </coding>
          </code>
          <description
                       value="All patients aged 18 years and older with a diagnosis of diabetic retinopathy"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Initial Population"/>
          </criteria>
        </population>
        <population id="8CEF1065-41F1-4AF8-B0C0-415F31E3F0CB">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator"/>
              <display value="Denominator"/>
            </coding>
          </code>
          <description
                       value="Equals Initial Population who had a dilated macular or fundus exam performed"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator"/>
          </criteria>
        </population>
        <population id="2682b2c5-083d-4b56-9746-75f66d46778f">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exclusion"/>
              <display value="Denominator Exclusion"/>
            </coding>
          </code>
          <criteria>
            <language value="text/cql-identifier"/>
          </criteria>
        </population>
        <population id="60B3780B-77DA-4908-8D2E-32759767D3A1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="numerator"/>
              <display value="Numerator"/>
            </coding>
          </code>
          <description
                       value="Patients with documentation, at least once within the measurement period, of the findings of the dilated macular or fundus exam via communication to the physician who manages the patient's diabetic care"/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Numerator"/>
          </criteria>
        </population>
        <population id="75a7b945-33d1-4d8f-a195-9ae8c7e82d01">
          <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>
        <population id="263226A4-54BD-43A7-8C11-30D202F4291D">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exception"/>
              <display value="Denominator Exception"/>
            </coding>
          </code>
          <description
                       value="Documentation of medical reason(s) for not communicating the findings of the dilated macular or fundus exam to the physician who manages the ongoing care of the patient with diabetes.

    Documentation of patient reason(s) for not communicating the findings of the dilated macular or fundus exam to the physician who manages the ongoing care of the patient with diabetes."/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Exceptions"/>
          </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>