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: Cervical Cancer ScreeningFHIR

Official URL: https://madie.cms.gov/Measure/CervicalCancerScreeningFHIR Version: 0.0.001
Draft as of 2024-12-18 Responsible: National Committee for Quality Assurance Computable Name: CervicalCancerScreeningFHIR
Other Identifiers: Short Name (use: usual, ), UUID:3be5df74-24e1-46ed-b899-6e98b9e3760b (use: official, ), UUID:d66e7255-e320-4d80-b28a-091f041ea7e0 (use: official, ), Publisher (use: official, )

Copyright/Legal: This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. 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 NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2021 National Committee for Quality Assurance. All Rights Reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third party codes contained in the specifications. CPT(R) contained in the Measure specifications is copyright 2004-2021 American Medical Association. LOINC(R) copyright 2004-2021 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2021 International Health Terminology Standards Development Organisation. ICD-10 copyright 2021 World Health Organization. All Rights Reserved.

Percentage of women 21-64 years of age who were screened for cervical cancer using either of the following criteria: - Women age 21-64 who had cervical cytology performed within the last 3 years - Women age 30-64 who had cervical human papillomavirus (HPV) testing performed within the last 5 years

UNKNOWN

Title: Cervical Cancer ScreeningFHIR
Id: CervicalCancerScreeningFHIR
Version: 0.0.001
Url: Cervical Cancer ScreeningFHIR
short-name identifier:

CMS124FHIR

version-independent identifier:

urn:uuid:3be5df74-24e1-46ed-b899-6e98b9e3760b

version-specific identifier:

urn:uuid:d66e7255-e320-4d80-b28a-091f041ea7e0

publisher (CMS) identifier:

124FHIR

Effective Period: 2025-01-01..2025-12-31
Status: draft
Publisher: National Committee for Quality Assurance
Author: National Committee for Quality Assurance
Description:

Percentage of women 21-64 years of age who were screened for cervical cancer using either of the following criteria: - Women age 21-64 who had cervical cytology performed within the last 3 years - Women age 30-64 who had cervical human papillomavirus (HPV) testing performed within the last 5 years

Purpose:

UNKNOWN

Copyright:

This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. 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 NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2021 National Committee for Quality Assurance. All Rights Reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third party codes contained in the specifications. CPT(R) contained in the Measure specifications is copyright 2004-2021 American Medical Association. LOINC(R) copyright 2004-2021 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2021 International Health Terminology Standards Development Organisation. ICD-10 copyright 2021 World Health Organization. All Rights Reserved.

Disclaimer:

The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Scoring:

Proportion

Rationale:

All women are at risk for cervical cancer. In 2020, an estimated 13,800 women were diagnosed with cervical cancer in the U.S., resulting in an estimated 4,290 deaths (National Cancer Institute, 2020). Screening can identify precancerous lesions and can detect invasive cancer early, when treatment is more likely to be successful (American Cancer Society, 2020).

Clinical recommendation statement:

US Preventive Services Task Force (USPSTF) (2018) "The USPSTF recommends screening for cervical cancer every 3 years with cervical cytology alone in women aged 21 to 29 years. For women aged 30 to 65 years, the USPSTF recommends screening every 3 years with cervical cytology alone, every 5 years with high-risk human papillomavirus (hrHPV) testing alone, or every 5 years with hrHPV testing in combination with cytology (cotesting) (A recommendation)" "The USPSTF recommends against screening for cervical cancer in women older than 65 years who have had adequate prior screening and are not otherwise at high risk for cervical cancer. (D recommendation)" "The USPSTF recommends against screening for cervical cancer in women younger than 21 years. (D recommendation)" "The USPSTF recommends against screening for cervical cancer in women who have had a hysterectomy with removal of the cervix and do not have a history of a high-grade precancerous lesion (ie, cervical intraepithelial neoplasia [CIN] grade 2 or 3) or cervical cancer. (D recommendation)"

Guidance (Usage): To ensure the measure is only looking for a cervical cytology test only after a woman turns 21 years of age, the youngest age in the initial population is 23. Please note the measure may include screenings performed outside the age range of patients referenced in the initial population. Screenings that occur prior to the measurement period are valid to meet measure criteria. Evidence of hrHPV testing within the last 5 years also captures patients who had cotesting; therefore additional methods to identify cotesting are not necessary. This eCQM is a patient-based measure. This FHIR-based measure has been derived from the QDM-based measure: CMS124v13. 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:
64d29f68f9c3ae6981ef507d
Initial Population: Women 24-64 years of age by the end of the measurement period with a visit during the measurement period
Denominator: Equals Initial Population
Denominator Exclusion: Exclude patients who are in hospice care for any part of the measurement period. Women who had a hysterectomy with no residual cervix or a congenital absence of cervix. Exclude patients receiving palliative care for any part of the measurement period.
Numerator: Women with one or more screenings for cervical cancer. Appropriate screenings are defined by any one of the following criteria: - Cervical cytology performed during the measurement period or the two years prior to the measurement period for women who are at least 21 years old at the time of the test. - Cervical human papillomavirus (HPV) testing performed during the measurement period or the four years prior to the measurement period for women who are 30 years or older at the time of the test.
Libraries:
CervicalCancerScreeningFHIR
Terminology and Other Dependencies:
  • Library/Status|1.8.000
  • Library/FHIRHelpers|4.4.000
  • Library/QICoreCommon|2.1.000
  • Library/Hospice|6.12.000
  • Library/PalliativeCare|1.11.000
  • Observation Category Codes
  • SNOMED CT (all versions)
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • Pap Test
  • HPV Test
  • Office Visit
  • Preventive Care Services - Established Office Visit, 18 and Up
  • Preventive Care Services-Initial Office Visit, 18 and Up
  • Home Healthcare Services
  • Telephone Visits
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089
  • Encounter Inpatient
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
  • Hospice Care Ambulatory
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
  • Hysterectomy with No Residual Cervix
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1016
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    Numerator Out 0 1 boolean
    Denominator Out 0 1 boolean
    Initial Population Out 0 1 boolean
    Denominator Exclusions Out 0 1 boolean
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Observation(QICoreObservation) code effective value status status.value category Pap Test Pap Test
    Observation(QICoreObservation) code effective value status status.value category HPV Test HPV Test
    Observation(QICoreObservation) code value effective status status.value category
    Observation(QICoreObservation) code effective status status.value category
    Patient(QICorePatient)
    Encounter(QICoreEncounter) type status status.value period Office Visit Office Visit
    Encounter(QICoreEncounter) type status status.value period Preventive Care Services Established Office Visit, 18 and Up Preventive Care Services - Established Office Visit, 18 and Up
    Encounter(QICoreEncounter) type status status.value period Preventive Care Services Initial Office Visit, 18 and Up Preventive Care Services-Initial Office Visit, 18 and Up
    Encounter(QICoreEncounter) type status status.value period Home Healthcare Services Home Healthcare Services
    Encounter(QICoreEncounter) type status status.value period Telephone Visits Telephone Visits
    Encounter(QICoreEncounter) type status status.value period Virtual Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089
    Encounter(QICoreEncounter) type hospitalization hospitalization.dischargeDisposition period status status.value Encounter Inpatient Encounter Inpatient
    Encounter(QICoreEncounter) type period status status.value Hospice Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
    Encounter(QICoreEncounter) type period status status.value Palliative Care Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
    ServiceRequest(QICoreServiceRequest) code authoredOn authoredOn.value status status.value intent intent.value Hospice Care Ambulatory Hospice Care Ambulatory
    Procedure(QICoreProcedure) code performed status status.value Hospice Care Ambulatory Hospice Care Ambulatory
    Procedure(QICoreProcedure) code performed status status.value Hysterectomy with No Residual Cervix Hysterectomy with No Residual Cervix
    Procedure(QICoreProcedure) code performed status status.value Palliative Care Intervention http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
    Condition(QICoreCondition) code Hospice Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
    Condition(QICoreCondition) code Congenital or Acquired Absence of Cervix http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1016
    Condition(QICoreCondition) code Palliative Care Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
    Direct Reference Codes:
    display code system
    laboratory laboratory http://terminology.hl7.org/CodeSystem/observation-category
    Discharge to home for hospice care (procedure) 428361000124107 http://snomed.info/sct
    Discharge to healthcare facility for hospice care (procedure) 428371000124100 http://snomed.info/sct
    survey survey http://terminology.hl7.org/CodeSystem/observation-category
    Yes (qualifier value) 373066001 http://snomed.info/sct
    Hospice care [Minimum Data Set] 45755-6 http://loinc.org
    Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal) 71007-9 http://loinc.org
    Logic Definitions:
    Group Scoring Population Criteria Expression
    64d29f68f9c3ae6981ef507d Group scoring: proportion Measure scoring:

    Proportion

    Type:

    Process

    Rate Aggregation: None
    Improvement Notation:

    increase

    Initial Population
    define "Initial Population":
      AgeInYearsAt(date from 
        end of "Measurement Period"
      ) in Interval[24, 64]
        and Patient.gender = 'female'
        and exists "Qualifying Encounters"
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or exists "Absence of Cervix"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
    Numerator
    define "Numerator":
      exists "Cervical Cytology Within 3 Years"
        or exists "HPV Test Within 5 Years for Women Age 30 and Older"
    Library Name Name
    CervicalCancerScreeningFHIR Cervical Cytology Within 3 Years
    define "Cervical Cytology Within 3 Years":
      ( ( [Observation: "Pap Test"] ).isLaboratoryTestPerformed ( ) ) CervicalCytology
        where CervicalCytology.effective.latest ( ) during day of Interval[start of "Measurement Period" - 2 years, end of "Measurement Period"]
          and CervicalCytology.value is not null
    Library Name Name
    CervicalCancerScreeningFHIR HPV Test Within 5 Years for Women Age 30 and Older
    define "HPV Test Within 5 Years for Women Age 30 and Older":
      ( ( [Observation: "HPV Test"] ).isLaboratoryTestPerformed ( ) ) HPVTest
        where AgeInYearsAt(date from HPVTest.effective.latest()) >= 30
          and HPVTest.effective.latest ( ) during day of Interval[start of "Measurement Period" - 4 years, end of "Measurement Period"]
          and HPVTest.value is not null
    Library Name Name
    CervicalCancerScreeningFHIR Numerator
    define "Numerator":
      exists "Cervical Cytology Within 3 Years"
        or exists "HPV Test Within 5 Years for Women Age 30 and Older"
    Library Name Name
    CervicalCancerScreeningFHIR Qualifying Encounters
    define "Qualifying Encounters":
      ( ( ["Encounter": "Office Visit"]
          union [Encounter: "Preventive Care Services Established Office Visit, 18 and Up"]
          union [Encounter: "Preventive Care Services Initial Office Visit, 18 and Up"]
          union [Encounter: "Home Healthcare Services"]
          union [Encounter: "Telephone Visits"]
          union [Encounter: "Virtual Encounter"]
      ).isEncounterPerformed ( ) ) ValidEncounters
        where ValidEncounters.period.toInterval ( ) during day of "Measurement Period"
    Library Name Name
    CervicalCancerScreeningFHIR Initial Population
    define "Initial Population":
      AgeInYearsAt(date from 
        end of "Measurement Period"
      ) in Interval[24, 64]
        and Patient.gender = 'female'
        and exists "Qualifying Encounters"
    Library Name Name
    CervicalCancerScreeningFHIR Denominator
    define "Denominator":
      "Initial Population"
    Library Name Name
    Hospice Has Hospice Services
    define "Has Hospice Services":
      exists ((([Encounter: "Encounter Inpatient"]).isEncounterPerformed()) InpatientEncounter
          where (InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
              or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"
          )
            and InpatientEncounter.period.toInterval() ends during day of "Measurement Period"
      )
        or exists ((([Encounter: "Hospice Encounter"]).isEncounterPerformed()) HospiceEncounter
            where HospiceEncounter.period.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Observation: "Hospice care [Minimum Data Set]"]).isAssessmentPerformed()) HospiceAssessment
            where HospiceAssessment.value ~ "Yes (qualifier value)"
              and HospiceAssessment.effective.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([ServiceRequest: "Hospice Care Ambulatory"]).isInterventionOrder()) HospiceOrder
            where HospiceOrder.authoredOn.toInterval() during day of "Measurement Period"
            // and HospiceOrder.doNotPerform is not true
            // https://oncprojectracking.healthit.gov/support/browse/CQLIT-447
        )
        or exists ((([Procedure: "Hospice Care Ambulatory"]).isInterventionPerformed()) HospicePerformed
            where HospicePerformed.performed.toInterval() overlaps day of "Measurement Period"
        )
        or exists (([Condition: "Hospice Diagnosis"]) HospiceCareDiagnosis
            where HospiceCareDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"
        )
    Library Name Name
    CervicalCancerScreeningFHIR Absence of Cervix
    define "Absence of Cervix":
      ( ( ( [Procedure: "Hysterectomy with No Residual Cervix"] ).isProcedurePerformed ( ) ) NoCervixProcedure
          where NoCervixProcedure.performed.toInterval ( ) ends on or before end of "Measurement Period"
      )
        union ( [Condition: "Congenital or Acquired Absence of Cervix"] NoCervixDiagnosis
            where NoCervixDiagnosis.prevalenceInterval ( ) starts on or before end of "Measurement Period"
        )
    Library Name Name
    PalliativeCare Has Palliative Care in the Measurement Period
    define "Has Palliative Care in the Measurement Period":
      exists ((([Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"]).isAssessmentPerformed()) PalliativeAssessment
          where PalliativeAssessment.effective.toInterval() overlaps day of "Measurement Period"
      )
        or exists ([Condition: "Palliative Care Diagnosis"] PalliativeDiagnosis
            where PalliativeDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Encounter: "Palliative Care Encounter"]).isEncounterPerformed()) PalliativeEncounter
            where PalliativeEncounter.period.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Procedure: "Palliative Care Intervention"]).isInterventionPerformed()) PalliativeIntervention
            where PalliativeIntervention.performed.toInterval() overlaps day of "Measurement Period"
        )
    Library Name Name
    CervicalCancerScreeningFHIR Denominator Exclusions
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or exists "Absence of Cervix"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
    Library Name Name
    Status isLaboratoryTestPerformed
    //Laboratory Test, Performed
    define fluent function isLaboratoryTestPerformed(Obs List<Observation>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }
          and exists ( O.category ObservationCategory
              where ( ObservationCategory ) ~ "laboratory"
          )
    Library Name Name
    FHIRHelpers ToConcept
    /*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }
    Library Name Name
    QICoreCommon latest
    /*
    @description: Given an interval, returns the ending point if the interval has an ending boundary specified,
    otherwise, returns the starting point
    */
    define fluent function latest(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):
      (choice.toInterval()) period
        return
          if (period."hasEnd"()) then end of period
          else start of period
    Library Name Name
    Status isEncounterPerformed
    //Encounter, Performed
    //General usage unless required otherwise by measure intent (e.g., follow-up encounters)
    define fluent function isEncounterPerformed(Enc List<Encounter>):
      Enc E
        where E.status in {'finished', 'arrived', 'triaged', 'in-progress', 'onleave'}
    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
    */
    define fluent 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
    Status isAssessmentPerformed
    //This library contains functions that are based on QDM 5.6 to QICore 4.1.1 March 2023 (https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1). The functions may appear similar to some QICoreCommon functions but different in that they have constraints that are relevant for measures authored by NCQA.
    
    //Assessment, Performed
    define fluent function isAssessmentPerformed(Obs List<Observation>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }
              and exists ( O.category ObservationCategory
              where ( ObservationCategory ) ~ "survey"
          )
    Library Name Name
    Status isInterventionOrder
    //Intervention, Order: active and completed only    
    define fluent function isInterventionOrder(ServiceRequest List<ServiceRequest>):
      ServiceRequest S
        where S.status in { 'active', 'completed' }
          and S.intent = 'order'
    Library Name Name
    Status isInterventionPerformed
    //Intervention, Performed
    define fluent function isInterventionPerformed(Proc List<Procedure>):
      Proc P
        where P.status ~ 'completed'
    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, or has an abatement date the resulting 
    interval will have a closed ending boundary. Otherwise, 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
        (end of condition.abatementInterval()) abatementDate
        return if abatementDate is null then
          Interval[start of condition.onset.toInterval(), abatementDate)
        else
          Interval[start of condition.onset.toInterval(), abatementDate]
    Library Name Name
    Status isProcedurePerformed
    //Procedure, Performed
    define fluent function isProcedurePerformed(Proc List<Procedure>):
      Proc P
        where P.status ~ 'completed'