eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2024.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2024/ and changes regularly. See the Directory of published versions

Measure: Excessive Radiation Dose or Inadequate Image Quality for Diagnostic Computed Tomography in Adults - Facility OQR FHIR

Official URL: https://madie.cms.gov/Measure/ALARACTOQRFHIR Version: 0.4.000
Draft as of 2024-07-09 Responsible: Alara Imaging, Inc. Computable Name: ALARACTOQRFHIR
Other Identifiers: Short Name (use: usual, ), UUID:65c110b9-5f5f-46a5-a10c-81e1341f901f (use: official, ), UUID:250bfdd5-f3d3-41cb-9536-f95a2e789257 (use: official, ), Endorser (use: official, ), Publisher (use: official, )

Copyright/Legal: The translation software was written and will be updated and maintained by Alara Imaging, Inc. and will be accessible by creating a secure account through Alara’s website. Copyright (C) 2024 Alara Imaging, Inc. All Rights Reserved. This Measure and related data specifications are owned by Alara Imaging, Inc. Alara Imaging, Inc. is not responsible for any use of the Measure. Alara Imaging, Inc. makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and Alara Imaging, Inc. has no liability to anyone who relies on such measures or specifications. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices). Commercial use is defined as the sale, licensing, 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. All commercial uses or requests for modification must be approved by Alara Imaging, Inc. and are subject to a license at the discretion of Alara Imaging, Inc.

This measure is an episode of care measure that provides a standardized method for monitoring the performance of diagnostic CT to discourage unnecessarily high radiation doses, a risk factor for cancer, while preserving image quality. This measure is expressed as a percentage of CT exams that are out-of-range based on having either excessive radiation dose or inadequate image quality relative to evidence-based thresholds based on the clinical indication for the exam. All diagnostic CT exams of specified anatomic sites performed in hospital non-inpatient care settings (including emergency settings) are eligible. This eCQM requires the use of additional software to access primary data elements stored within radiology electronic health records and translate them into data elements that can be ingested by this eCQM. Additional details are included in the Guidance field.

UNKNOWN

Title: Excessive Radiation Dose or Inadequate Image Quality for Diagnostic Computed Tomography in Adults - Facility OQR FHIR
Id: ALARACTOQRFHIR
Version: 0.4.000
Url: Excessive Radiation Dose or Inadequate Image Quality for Diagnostic Computed Tomography in Adults - Facility OQR FHIR
short-name identifier:

CMS1206FHIR

version-independent identifier:

urn:uuid:65c110b9-5f5f-46a5-a10c-81e1341f901f

version-specific identifier:

urn:uuid:250bfdd5-f3d3-41cb-9536-f95a2e789257

endorser (CMS Consensus Based Entity) identifier:

3663e

publisher (CMS) identifier:

1206FHIR

Effective Period: 2025-01-01..2025-12-31
Status: draft
Publisher: Alara Imaging, Inc.
Author: University of California San Francisco
Description:

This measure is an episode of care measure that provides a standardized method for monitoring the performance of diagnostic CT to discourage unnecessarily high radiation doses, a risk factor for cancer, while preserving image quality. This measure is expressed as a percentage of CT exams that are out-of-range based on having either excessive radiation dose or inadequate image quality relative to evidence-based thresholds based on the clinical indication for the exam. All diagnostic CT exams of specified anatomic sites performed in hospital non-inpatient care settings (including emergency settings) are eligible. This eCQM requires the use of additional software to access primary data elements stored within radiology electronic health records and translate them into data elements that can be ingested by this eCQM. Additional details are included in the Guidance field.

Purpose:

UNKNOWN

Copyright:

The translation software was written and will be updated and maintained by Alara Imaging, Inc. and will be accessible by creating a secure account through Alara’s website. Copyright (C) 2024 Alara Imaging, Inc. All Rights Reserved. This Measure and related data specifications are owned by Alara Imaging, Inc. Alara Imaging, Inc. is not responsible for any use of the Measure. Alara Imaging, Inc. makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and Alara Imaging, Inc. has no liability to anyone who relies on such measures or specifications. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices). Commercial use is defined as the sale, licensing, 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. All commercial uses or requests for modification must be approved by Alara Imaging, Inc. and are subject to a license at the discretion of Alara Imaging, Inc.

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. Alara Imaging, Inc., the University of California San Francisco, and its members and users shall not be responsible for any use or accuracy of the Measure or any code contained within the Measure. THE MEASURE AND SPECIFICATIONS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. Limited proprietary coding is contained in the Measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. Alara Imaging disclaims all liability for use or accuracy of any third-party code contained in the specifications. CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. SNOMED Clinical Terms(R) (SNOMED CT[R]) is copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved. Due to technical limitations, registered trademarks are indicated by (R) or [R].

Rationale:

Diagnostic imaging using CT occurs in more than a third of acute care hospitalizations in the U.S. (Vance, 2013) and greater than 90 million scans are performed annually in the U.S. (IMV, 2019). There is marked observed variation in the radiation doses used to perform these exams (Smith-Bindman, 2019). The inconsistency in how CT exams are performed represents a significant, unnecessary, and modifiable iatrogenic health risk, as there is extensive epidemiological and biological evidence that suggests exposure to radiation in the same range as that routinely delivered by CT increases a person's risk of developing cancer (Board of Radiation Effects, 2006; Grant, 2017; Hong, 2019; Sakata, 2019; Sadakane, 2019, references a and b; Bernier, 2019; Meulepas, 2019; Brenner, 2020; Berrington de Gonzalez, 2020; Sugiyama, 2020; Hauptmann, 2020; Huang, 2020; Abalo, 2021; Cao, 2022; Hauptmann, 2023). It is estimated that 2% (37,000) of the 1.8 million cancers diagnosed annually in the U.S. are caused by CT exams (Berrington de Gonzalez, 2009; NCI Cancer Statistics, 2020). The measure focuses on reducing radiation dose in CT, an intermediate outcome directly and proportionally related to cancer prevention. As radiation dose is known to be directly related and proportional to future cancer risk (Board of Radiation Effects, 2006; Berrington de Gonzalez, 2009), any reduction in radiation exposure would be expected to lead to a proportional reduction in cancers. Research suggests that when healthcare organizations and clinicians are provided with a summary of their CT radiation doses, their subsequent doses can be reduced without changing the usefulness of these tests (Smith-Bindman, 2020). On the basis of the current estimated number of CT scans performed annually in the U.S. (IMV, 2019), distribution in scan types and observed doses (Demb, 2017; Smith-Bindman, 2019), modeling of the cancer risk associated with CT at different ages of exposure (Berrington de Gonzalez, 2009), and costs of cancer care (Dieguez, 2017; Mariotto, 2011), an estimated 13,982 cancers could be prevented among Medicare beneficiaries annually, resulting in $1.86 billion to $5.21 billion annual cost savings. These cost calculations were supported by more recent data on cancer survivorship and costs, which yielded an estimated $3.04 billion dollars in annual costs savings to Medicare. (Mariotto, 2020; NCI Office of Cancer Survivorship, 2022).

Clinical recommendation statement:

The measure aligns with numerous evidence- and consensus-based clinical guidelines asking radiologists to track, optimize, and lower CT radiation doses, guidelines that have been written by the American College of Radiology (Kanal, 2017), cardiovascular imaging societies (Hirshfeld, 2018, references a, b and c noted below), Image Gently Alliance, an initiative begun by the American College of Radiology, the Radiological Society of North America, American Society of Radiologic Technologists, the American Association of Physicists in Medicine, and the Society of Pediatric Radiology, which dozens of U.S. and international organizations have joined as recently as 2020 (Image Gently Alliance, 2022), and the US Food and Drug Administration (FDA, 2019). This measure has been strongly supported by a Technical Expert Panel (TEP) comprising a diverse group of clinicians, patient advocates, and leaders of medical specialty societies, payers, and healthcare safety and accrediting organizations, all of whom were engaged through every stage of measure conceptualization, development, and testing. In assessing the face validity of the measure, 100% of TEP members agreed radiation dose and global noise are relevant metrics of CT quality, that size is an appropriate method of risk adjustment, and that performance on this measure of radiation dose and image quality as specified is a representation of quality.

Guidance (Usage): This is an inverse measure; as such the higher the value the worse the performance. The level of aggregation for this eCQM is the facility. A parallel eCQM measures CT exams aggregated at the level of the clinician or clinician group. A single CT exam may be simultaneously measured in both the MIPS and one of the hospital reporting programs (inpatient or outpatient); however, a single exam cannot be measured in both the inpatient and outpatient hospital quality reporting programs. TRANSLATION SOFTWARE As a radiology measure, the measure derives standardized data elements from structured fields within both the electronic health record (EHR) and the radiology electronic clinical data systems, including the Radiology Information System (RIS) and the Picture Archiving and Communication System (PACS). Primary imaging data including Radiation Dose Structured Reports and image pixel data are stored in the PACS in Digital Imaging and Communications in Medicine (DICOM) format, a universally adopted standard for medical imaging information. Because of limitations in their specifications and format, eCQMs cannot currently access and consume elements from these radiology sources in their original DICOM formats. Thus, translation software was developed to transform primary data into a format that the eCQM can consume. This eCQM requires the use of additional software (translation software) to access the primary data elements that are required for measure computation and translate them into data elements that can be ingested by this eCQM. The purpose of this translation software is to access and link these primary data elements with minimal site burden, assess each CT exam for eligibility based on initial population criteria, and generate the three data elements mapped to a clinical terminology for eCQM consumption: CT Dose and Image Quality Category, Calculated CT Size-Adjusted Dose, and Calculated CT Global Noise. The translation software necessary to use this eCQM is written and maintained by Alara Imaging, Inc. CODING The translation software will create three variables required for measure computation including the CT Dose and Image Quality Category (LOINC(R) Code 96914-7), the Calculated CT Global Noise (LOINC(R) Code 96912-1) and the Calculated CT Size-Adjusted Dose (LOINC(R) Code 96913-9). These variables are defined in the Definition field above. These transformed data elements can be stored in the EHR. MEASURE CALCULATION The measure will evaluate each included CT exam based on allowable thresholds that are specified by the CT Dose and Image Quality Category. An exam is considered out of range if either the Calculated CT Global Noise or the Calculated CT Size-Adjusted Dose is out of range for the CT Dose and Image Quality Category. Exams will be evaluated against their corresponding threshold, shown below with the following format: [Category shorthand (=CT Dose and Image Quality Category), threshold for the Calculated CT Global Noise in Hounsfield units, threshold for the Calculated CT Size-Adjusted Dose in dose length product]. [LA31752-1 (=Abdomen and Pelvis, Low Dose), 64, 598]; [LA31753-9 (=Abdomen and Pelvis, Routine Dose), 29, 644]; [LA31754-7 (=Abdomen and Pelvis, High Dose), 29, 1260]; [LA31755-4 (=Cardiac Low Dose), 55, 93]; [LA31756-2 (=Cardiac Routine Dose), 32, 576]; [LA31758-8 (=Chest Low Dose), 55, 377]; [LA31759-6 (=Chest Routine Dose), 49, 377]; [LA31761-2 (=Chest High Dose or Cardiac High Dose), 49, 1282]; [LA31762-0 (=Head Low Dose), 115, 582]; [LA31763-8 (=Head Routine Dose), 115, 1025]; [LA31764-6 (=Head High Dose), 115, 1832]; [LA31765-3 (=Upper or Lower Extremity), 73, 320]; [LA31766-1 (=Neck or Cervical Spine), 25, 1260]; [LA31767-9 (=Thoracic or Lumbar Spine), 25, 1260]; [LA31768-7 (=Combined Chest, Abdomen and Pelvis), 29, 1637]; [LA31851-1 (=Combined Thoracic and Lumbar Spine), 25, 2520]; [LA31769-5 (=Combined Head and Neck, Routine Dose), 25, 2285]; [LA31770-3 (=Combined Head and Neck, High Dose), 25, 3092] EXCLUSIONS CT scans with missing patient age or missing CT Dose and Image Quality Category (LOINC(R) 96914-7) are excluded from the initial population. CT scans with a missing Calculated Global Noise value or a missing Calculated CT Size-Adjusted Dose value are not included in the denominator. CT scans assigned a CT Dose and Image Quality Category (LOINC(R) 96914-7) value using the LOINC(R) answer list (LL5824-9) of full body (LA31771-1) are excluded from the denominator. These exams are included in the initial population because they have a non-missing CT Dose and Image Quality Category but are then removed as a Denominator Exclusion in the eCQM because the value is full body, which reflects CT exams that cannot be categorized by anatomical area or by clinical indication, either because they are simultaneous exams of multiple body regions outside of four commonly encountered multiple region groupings, or because there is insufficient data for their classification based on the given diagnosis and procedure codes. This eCQM is an episode-based measure and should be reported for each eligible CT scan performed in a hospital outpatient setting. This FHIR-based measure has been derived from the QDM-based measure: CMS1206v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).
Population Criteria:
66439a54a7a1805d3b73743c
Initial Population: All CT scans in adults aged 18 years and older at the start of the measurement period that have a CT Dose and Image Quality Category and were performed in a hospital outpatient department (including emergency), during the measurement period, and not part of an inpatient hospitalization.
Denominator: Equals Initial population with a CT Dose and Image Quality Category, a Calculated Global Noise value, and a Calculated CT Size-Adjusted Dose value
Denominator Exclusion: Denominator, where a CT scan with a CT Dose and Image Quality Category = full body
Numerator: Calculated CT Size-Adjusted Dose greater than or equal to a threshold specific to the CT Dose and Image Quality Category, or Calculated CT Global Noise value greater than or equal to a threshold specific to the CT Dose and Image Quality Category
Supplemental Data Elements:

SDE Ethnicity

SDE Payer

SDE Race

SDE Sex

Supplemental Data Guidance : For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity SDE Payer SDE Race SDE Sex
Libraries:
ALARACTOQRFHIR
Terminology and Other Dependencies:
  • Library/SupplementalDataElements|3.5.000
  • Library/QICoreCommon|2.1.000
  • Library/FHIRHelpers|4.4.000
  • Library/AlaraCommonFunctions|1.5.000
  • AdministrativeGender
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • Encounter Inpatient
  • Payer
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    SDE Sex Out 0 1 Coding
    Numerator Out 0 * Resource
    Denominator Out 0 * Resource
    SDE Payer Out 0 * Resource
    Initial Population Out 0 * Resource
    SDE Ethnicity Out 0 1 Resource
    Denominator Exclusion Out 0 * Resource
    SDE Race Out 0 1 Resource
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient) ethnicity race
    Observation(QICoreObservation) code effective value value.unit value.value value.codes
    Encounter(QICoreEncounter) type period Encounter Inpatient Encounter Inpatient
    Coverage(QICoreCoverage) type period Payer Type Payer
    Direct Reference Codes:
    display code system
    Male M http://hl7.org/fhir/administrative-gender
    Female F http://hl7.org/fhir/administrative-gender
    CT dose and image quality category 96914-7 http://loinc.org
    Calculated CT global noise 96912-1 http://loinc.org
    Calculated CT size-adjusted dose 96913-9 http://loinc.org
    Abdomen and Pelvis Low Dose LA31752-1 http://loinc.org
    Abdomen and Pelvis Routine Dose LA31753-9 http://loinc.org
    Abdomen and Pelvis High Dose LA31754-7 http://loinc.org
    Cardiac Low Dose LA31755-4 http://loinc.org
    Cardiac Routine Dose LA31756-2 http://loinc.org
    Chest Low Dose LA31758-8 http://loinc.org
    Chest Routine Dose LA31759-6 http://loinc.org
    Cardiac High Dose or Chest High Dose LA31761-2 http://loinc.org
    Head Low Dose LA31762-0 http://loinc.org
    Head Routine Dose LA31763-8 http://loinc.org
    Head High Dose LA31764-6 http://loinc.org
    Extremity LA31765-3 http://loinc.org
    Neck or Cervical Spine LA31766-1 http://loinc.org
    Thoracic or Lumbar Spine LA31767-9 http://loinc.org
    Simultaneous Chest and Abdomen and Pelvis LA31768-7 http://loinc.org
    Simultaneous Thoracic and Lumbar Spine LA31851-1 http://loinc.org
    Simultaneous Head and Neck Routine Dose LA31769-5 http://loinc.org
    Simultaneous Head and Neck High Dose LA31770-3 http://loinc.org
    Full Body LA31771-1 http://loinc.org
    Logic Definitions:
    Group Scoring Population Criteria Expression
    66439a54a7a1805d3b73743c Group scoring: proportion
    Type:

    Outcome

    Rate Aggregation: None
    Improvement Notation:

    increase

    Initial Population
    define "Initial Population":
      "Qualified Scan without Inpatient Encounter"
    Denominator
    define "Denominator":
      "Qualified Scan with Values"
    Denominator Exclusion
    define "Denominator Exclusion":
      "Qualified Scan with Values" CTScan
        where ( CTScan.value as Concept ).codes contains "Full Body"
    Numerator
    define "Numerator":
      "Qualified Scan with Values" CTScan
        where AlaraCommon."CT Scan Qualifies" ( CTScan )
    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
    ALARACTOQRFHIR SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library Name Name
    ALARACTOQRFHIR Qualified Scan
    define "Qualified Scan":
      [Observation: "CT dose and image quality category"] CTScan
        where QICoreCommon.ToInterval ( CTScan.effective ) ends during day of "Measurement Period"
          and AgeInYearsAt(date from start of "Measurement Period") >= 18
    Library Name Name
    ALARACTOQRFHIR Qualified Scan without Inpatient Encounter
    define "Qualified Scan without Inpatient Encounter":
      "Qualified Scan" QualifiedCTScan
        without [Encounter: "Encounter Inpatient"] InpatientEncounter
          such that QICoreCommon.ToInterval ( QualifiedCTScan.effective ) starts during QICoreCommon.ToInterval ( InpatientEncounter.period )
    Library Name Name
    ALARACTOQRFHIR Qualified Scan with Values
    define "Qualified Scan with Values":
      "Qualified Scan without Inpatient Encounter" CTScan
        where AlaraCommon."Global Noise Value" ( CTScan ) is not null
          and AlaraCommon."Size Adjusted Value" ( CTScan ) is not null
          and CTScan.value is not null
    Library Name Name
    ALARACTOQRFHIR Numerator
    define "Numerator":
      "Qualified Scan with Values" CTScan
        where AlaraCommon."CT Scan Qualifies" ( CTScan )
    Library Name Name
    ALARACTOQRFHIR Denominator
    define "Denominator":
      "Qualified Scan with Values"
    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
    ALARACTOQRFHIR SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
    Library Name Name
    ALARACTOQRFHIR Initial Population
    define "Initial Population":
      "Qualified Scan without Inpatient Encounter"
    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
    ALARACTOQRFHIR SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library Name Name
    ALARACTOQRFHIR Denominator Exclusion
    define "Denominator Exclusion":
      "Qualified Scan with Values" CTScan
        where ( CTScan.value as Concept ).codes contains "Full Body"
    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
    ALARACTOQRFHIR SDE Race
    define "SDE Race":
      SDE."SDE Race"
    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.
    If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
    @deprecated: This function is deprecated. Use the fluent function `toInterval()` instead
    */
    define function ToInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):
      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)
    		when choice is Timing then
          Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>
    		else
    			null as Interval<DateTime>
    	end
    Library Name Name
    AlaraCommonFunctions Global Noise Value
    define function "Global Noise Value"(Obs Observation ):
      singleton from ( Obs.component C
          where C.code ~ "Calculated CT global noise"
            and ( C.value as Quantity ).unit = '[hnsf\'U]'
          return (C.value as Quantity).value
      )
    Library Name Name
    AlaraCommonFunctions Size Adjusted Value
    define function "Size Adjusted Value"(Obs Observation ):
      singleton from ( Obs.component C
          where C.code ~ "Calculated CT size-adjusted dose"
            and ( C.value as Quantity ).unit = 'mGy.cm'
          return (C.value as Quantity).value
      )
    Library Name Name
    AlaraCommonFunctions CT Scan Qualifies
    define function "CT Scan Qualifies"(Obs Observation ):
      "Qualifies"(Obs, "Abdomen and Pelvis Low Dose", 64, 598)
        or "Qualifies"(Obs, "Abdomen and Pelvis Routine Dose", 29, 644)
        or "Qualifies"(Obs, "Abdomen and Pelvis High Dose", 29, 1260)
        or "Qualifies"(Obs, "Cardiac Low Dose", 55, 93)
        or "Qualifies"(Obs, "Cardiac Routine Dose", 32, 576)
        or "Qualifies"(Obs, "Chest Low Dose", 55, 377)
        or "Qualifies"(Obs, "Chest Routine Dose", 49, 377)
        or "Qualifies"(Obs, "Cardiac High Dose or Chest High Dose", 49, 1282)
        or "Qualifies"(Obs, "Head Low Dose", 115, 582)
        or "Qualifies"(Obs, "Head Routine Dose", 115, 1025)
        or "Qualifies"(Obs, "Head High Dose", 115, 1832)
        or "Qualifies"(Obs, "Extremity", 73, 320)
        or "Qualifies"(Obs, "Neck or Cervical Spine", 25, 1260)
        or "Qualifies"(Obs, "Thoracic or Lumbar Spine", 25, 1260)
        or "Qualifies"(Obs, "Simultaneous Chest and Abdomen and Pelvis", 29, 1637)
        or "Qualifies"(Obs, "Simultaneous Thoracic and Lumbar Spine", 25, 2520)
        or "Qualifies"(Obs, "Simultaneous Head and Neck Routine Dose", 25, 2285)
        or "Qualifies"(Obs, "Simultaneous Head and Neck High Dose", 25, 3092)
    Library Name Name
    AlaraCommonFunctions Qualifies
    define function "Qualifies"(Obs Observation, code System.Code, noiseThreshold Decimal, sizeDoseThreshold Decimal ):
      (Obs.value as Concept).codes contains code
        and ( "Global Noise Value"(Obs)>= noiseThreshold
            or "Size Adjusted Value"(Obs)>= sizeDoseThreshold
        )
    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
            }