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

## Measure: Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR

Official URL: http://ecqi.healthit.gov/ecqms/Measure/DRCommunicationWithPhysicianManagingDiabetesFHIR | Version: 0.0.004
Draft as of 2023-10-27 | ​ Responsible: American Academy of Ophthalmology | Computable Name: DRCommunicationWithPhysicianManagingDiabetesFHIR
Other Identifiers: Short Name (use: usual, ), UUID:0f55e61f-dc17-4fe4-a604-7f030260618f (use: official, ), UUID:c2a33022-8d8d-426b-ae12-9bfd9afbdb82 (use: official, ), Publisher (use: official, )
Copyright/Legal: Copyright 2023 American Academy of Ophthalmology. All Rights Reserved.

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.

UNKNOWN

Title: | Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR
Id: | DRCommunicationWithPhysicianManagingDiabetesFHIR
Download cql: | DRCommunicationWithPhysicianManagingDiabetesFHIR.cql
Version: | 0.0.004
Url: | Diabetic Retinopathy: Communication with the Physician Managing Ongoing Diabetes CareFHIR
short-name identifier: | CMS142FHIR
version-independent identifier: | urn:uuid:0f55e61f-dc17-4fe4-a604-7f030260618f
version-specific identifier: | urn:uuid:c2a33022-8d8d-426b-ae12-9bfd9afbdb82
publisher (CMS) identifier: | 142FHIR
Effective Period: | 2024-01-01 ..2024-12-31
Status: | draft
Date: | 2023-10-27 08:12:31+0000
Approval Date: | 2023-08-14
Last Review Date: | 2023-08-14
Name: | DRCommunicationWithPhysicianManagingDiabetesFHIR
Publisher: | American Academy of Ophthalmology
Author: | ​American Academy of Ophthalmology: www.aao.org, American Medical Association (AMA): https://www.ama-assn.org/
Description: | 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: | UNKNOWN
Copyright: | Copyright 2023 American Academy of Ophthalmology. All Rights Reserved.
Disclaimer: | 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 "AS IS" 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: | 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 & DCCT/EDIC Research Group, 2014).
Clinical recommendation statement: | 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).
Guidance (Usage): | 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).
Population Criteria: |
645a7029beb771640fc4cc37
Initial Population: | All patients aged 18 years and older with a diagnosis of diabetic retinopathy
Denominator: | Equals Initial Population who had a dilated macular or fundus exam performed
Denominator Exclusion: | None
Numerator: | 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
Numerator Exclusion: | None
Denominator Exception: | 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.
Supplemental Data Guidance : |
Supplemental Data Elements: | SDE Ethnicity SDE Payer SDE Race SDE Sex
Libraries: |
DRCommunicationWithPhysicianManagingDiabetesFHIR
Related Artifact Dependencies: | SupplementalDataElements version: 3.4.000 FHIRHelpers version: 4.3.000 QICoreCommon version: 1.5.000 `http://hl7.org/fhir/v3/AdministrativeGender` ActCode Condition Clinical Status Codes ConditionVerificationStatus Level of Severity of Retinopathy Findings Office Visit Ophthalmological Services Outpatient Consultation Care Services in Long-Term Residential Facility Nursing Facility Visit Diabetic Retinopathy Macular Edema Findings Absent Macular Edema Findings Present Macular Exam Payer Medical Reason Patient Reason
Parameters: |
name | use | min | max | type
--- | --- | --- | --- | ---
Measurement Period | In | 0 | 1 | Period
SDE Sex | Out | 0 | 1 | Coding
Numerator | Out | 0 | 1 | boolean
Denominator | Out | 0 | 1 | boolean
SDE Payer | Out | 0 | * | Resource
Initial Population | Out | 0 | 1 | boolean
SDE Ethnicity | Out | 0 | 1 | Resource
SDE Race | Out | 0 | 1 | Resource
Denominator Exceptions | Out | 0 | 1 | boolean
DataRequirements: |
Type | Elements | Valueset Name | Valueset
--- | --- | --- | ---
Patient(QICorePatient) | ethnicity race |  |
Encounter(QICoreEncounter) | type period status status.value class | Office Visit | Office Visit
Encounter(QICoreEncounter) | type period status status.value class | Ophthalmological Services | Ophthalmological Services
Encounter(QICoreEncounter) | type period status status.value class | Outpatient Consultation | Outpatient Consultation
Encounter(QICoreEncounter) | type period status status.value class | Care Services in Long-Term Residential Facility | Care Services in Long-Term Residential Facility
Encounter(QICoreEncounter) | type period status status.value class | Nursing Facility Visit | Nursing Facility Visit
Condition(QICoreCondition) | code verificationStatus | Diabetic Retinopathy | Diabetic Retinopathy
Communication(QICoreCommunication) | reasonCode sent sent.value status status.value | Level of Severity of Retinopathy Findings | Level of Severity of Retinopathy Findings
Communication(QICoreCommunication) | reasonCode sent sent.value status status.value | Macular edema absent (situation) | Macular Edema Findings Absent
Communication(QICoreCommunication) | reasonCode sent sent.value status status.value | Macular Edema Findings Present | Macular Edema Findings Present
Observation(QICoreObservation) | code effective value status status.value | Macular Exam | Macular Exam
Coverage(QICoreCoverage) | type period | Payer Type | Payer
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Level of Severity of Retinopathy Findings | Level of Severity of Retinopathy Findings
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Level of Severity of Retinopathy Findings | Level of Severity of Retinopathy Findings
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Macular edema absent (situation) | Macular Edema Findings Absent
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Macular edema absent (situation) | Macular Edema Findings Absent
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Macular Edema Findings Present | Macular Edema Findings Present
Communication(QICoreCommunicationNotDone) | reasonCode extension statusReason | Macular Edema Findings Present | Macular Edema Findings Present
Direct Reference Codes: |
display | code | system
--- | --- | ---
Male | M | http://hl7.org/fhir/v3/AdministrativeGender
Female | F | http://hl7.org/fhir/v3/AdministrativeGender
virtual | VR | http://terminology.hl7.org/CodeSystem/v3-ActCode
| active | http://terminology.hl7.org/CodeSystem/condition-clinical
| recurrence | http://terminology.hl7.org/CodeSystem/condition-clinical
| relapse | http://terminology.hl7.org/CodeSystem/condition-clinical
| unconfirmed | http://terminology.hl7.org/CodeSystem/condition-ver-status
| refuted | http://terminology.hl7.org/CodeSystem/condition-ver-status
| entered-in-error | http://terminology.hl7.org/CodeSystem/condition-ver-status
Logic Definitions: |
Group | Scoring | Population Criteria | Expression
--- | --- | --- | ---
645a7029beb771640fc4cc37 | Group scoring: proportion
|  | Initial Population |
    define "Initial Population":
      AgeInYearsAt(date from start of "Measurement Period") >= 18
        and exists "Diabetic Retinopathy Encounter"
|  | Denominator |
    define "Denominator":
      "Initial Population"
        and exists "Macular Exam Performed"
|  | Denominator Exclusion | None
|  | Numerator |
    define "Numerator":
      exists "Level of Severity of Retinopathy Findings Communicated"
        and ( exists "Macular Edema Absence Communicated"
            or exists "Macular Edema Presence Communicated"
        )
|  | Numerator Exclusion | None
|  | Denominator Exception |
    define "Denominator Exceptions":
      exists "Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy"
        or exists "Medical or Patient Reason for Not Communicating Absence of Macular Edema"
        or exists "Medical or Patient Reason for Not Communicating Presence of Macular Edema"

Library Name | Name
--- | ---
SupplementalDataElements | SDE Sex
    define "SDE Sex":
      case
          when Patient.gender = 'male' then "M"
          when Patient.gender = 'female' then "F"
          else null
        end
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Qualifying Encounter During Measurement Period
    define "Qualifying Encounter During Measurement Period":
      ( ["Encounter": "Office Visit"]
        union ["Encounter": "Ophthalmological Services"]
        union ["Encounter": "Outpatient Consultation"]
        union ["Encounter": "Care Services in Long-Term Residential Facility"]
        union ["Encounter": "Nursing Facility Visit"] ) QualifyingEncounter
        where QualifyingEncounter.period during "Measurement Period"
          and QualifyingEncounter.status = 'finished'
          and QualifyingEncounter.class !~ "virtual"
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Diabetic Retinopathy Encounter
    define "Diabetic Retinopathy Encounter":
      "Qualifying Encounter During Measurement Period" ValidQualifyingEncounter
        with ["Condition": "Diabetic Retinopathy"] DiabeticRetinopathy
          such that DiabeticRetinopathy.prevalenceInterval ( ) overlaps ValidQualifyingEncounter.period
            and DiabeticRetinopathy.isActive ( )
            and not ( DiabeticRetinopathy.verificationStatus ~ QICoreCommon."unconfirmed"
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon."refuted"
                or DiabeticRetinopathy.verificationStatus ~ QICoreCommon."entered-in-error"
            )
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Level of Severity of Retinopathy Findings Communicated
    define "Level of Severity of Retinopathy Findings Communicated":
      ["Communication": "Level of Severity of Retinopathy Findings"] LevelOfSeverityCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that LevelOfSeverityCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where LevelOfSeverityCommunicated.status = 'completed'
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Macular Edema Absence Communicated
    define "Macular Edema Absence Communicated":
      ["Communication": "Macular edema absent (situation)"] MacularEdemaAbsentCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaAbsentCommunicated.status = 'completed'
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Macular Edema Presence Communicated
    define "Macular Edema Presence Communicated":
      ["Communication": "Macular Edema Findings Present"] MacularEdemaPresentCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that MacularEdemaPresentCommunicated.sent after start of EncounterDiabeticRetinopathy.period
        where MacularEdemaPresentCommunicated.status = 'completed'
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Numerator
    define "Numerator":
      exists "Level of Severity of Retinopathy Findings Communicated"
        and ( exists "Macular Edema Absence Communicated"
            or exists "Macular Edema Presence Communicated"
        )
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Initial Population
    define "Initial Population":
      AgeInYearsAt(date from start of "Measurement Period") >= 18
        and exists "Diabetic Retinopathy Encounter"
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Macular Exam Performed
    define "Macular Exam Performed":
      ["Observation": "Macular Exam"] MacularExam
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that MacularExam.effective.toInterval ( ) during EncounterDiabeticRetinopathy.period
        where MacularExam.value is not null
          and MacularExam.status in { 'final', 'amended', 'corrected', 'preliminary' }
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Denominator
    define "Denominator":
      "Initial Population"
        and exists "Macular Exam Performed"
Library Name | Name
SupplementalDataElements | SDE Payer
    define "SDE Payer":
      [Coverage: type in "Payer Type"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
Library Name | Name
SupplementalDataElements | SDE Ethnicity
    define "SDE Ethnicity":
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
Library Name | Name
SupplementalDataElements | SDE Race
    define "SDE Race":
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | SDE Race
    define "SDE Race":
      SDE."SDE Race"
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy
    define "Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy":
      [CommunicationNotDone: "Level of Severity of Retinopathy Findings"] LevelOfSeverityNotCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that LevelOfSeverityNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( LevelOfSeverityNotCommunicated.statusReason in "Medical Reason"
            or LevelOfSeverityNotCommunicated.statusReason in "Patient Reason"
        )
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Medical or Patient Reason for Not Communicating Absence of Macular Edema
    /* 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 "Medical or Patient Reason for Not Communicating Absence of Macular Edema":
      [CommunicationNotDone: "Macular edema absent (situation)"] MacularEdemaAbsentNotCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that MacularEdemaAbsentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaAbsentNotCommunicated.statusReason in "Medical Reason"
            or MacularEdemaAbsentNotCommunicated.statusReason in "Patient Reason"
        )
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Medical or Patient Reason for Not Communicating Presence of Macular Edema
    define "Medical or Patient Reason for Not Communicating Presence of Macular Edema":
      [CommunicationNotDone: "Macular Edema Findings Present"] MacularEdemaPresentNotCommunicated
        with "Diabetic Retinopathy Encounter" EncounterDiabeticRetinopathy
          such that MacularEdemaPresentNotCommunicated.recorded during EncounterDiabeticRetinopathy.period
        where ( MacularEdemaPresentNotCommunicated.statusReason in "Medical Reason"
            or MacularEdemaPresentNotCommunicated.statusReason in "Patient Reason"
        )
Library Name | Name
DRCommunicationWithPhysicianManagingDiabetesFHIR | Denominator Exceptions
    define "Denominator Exceptions":
      exists "Medical or Patient Reason for Not Communicating Level of Severity of Retinopathy"
        or exists "Medical or Patient Reason for Not Communicating Absence of Macular Edema"
        or exists "Medical or Patient Reason for Not Communicating Presence of Macular Edema"
Library Name | Name
QICoreCommon | prevalenceInterval
    /*
    @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 ~ "active"
      or condition.clinicalStatus ~ "recurrence"
      or condition.clinicalStatus ~ "relapse" then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval())
Library Name | Name
QICoreCommon | isActive
    /* 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 ~ "active"
        or condition.clinicalStatus ~ "recurrence"
        or condition.clinicalStatus ~ "relapse"
Library Name | Name
QICoreCommon | toInterval
    /*
    @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<DateTime>, or Interval<Quantity> 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<DateTime> or Interval<Quantity>.
    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<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>>):
      case
    	  when choice is DateTime then
        	Interval[choice as DateTime, choice as DateTime]
    		when choice is Interval<DateTime> then
      		choice as Interval<DateTime>
    		when choice is Quantity then
    		  Interval[Patient.birthDate + (choice as Quantity),
    			  Patient.birthDate + (choice as Quantity) + 1 year)
    		when choice is Interval<Quantity> then
    		  Interval[Patient.birthDate + (choice.low as Quantity),
    			  Patient.birthDate + (choice.high as Quantity) + 1 year)
    		else
    			null as Interval<DateTime>
    	end
Library Name | Name
FHIRHelpers | ToString
    define function ToString(value uri): value.value
Library Name | Name
FHIRHelpers | ToCode
    /*
    @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
            }