Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions

Measure: Intravesical Bacillus-Calmette-Guerin for Non-Muscle Invasive Bladder CancerFHIR

Official URL: https://madie.cms.gov/Measure/CMS646FHIRIntravesicalBCGTherapy Version: 1.0.000
Active as of 2026-01-16 Responsible: Oregon Urology Computable Name: CMS646FHIRIntravesicalBCGTherapy
Other Identifiers: Short Name: CMS646FHIR (use: usual, ), UUID:907ead5a-2f8f-468e-b774-309ea8aa6182 (use: official, ), UUID:67c8554c-9288-4de2-b8dc-45ae4673e032 (use: official, ), Publisher: 646FHIR (use: official, )

Copyright/Legal: 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. Oregon Urology Institute (OUI) and Large Urology Group Practice Association (LUGPA) disclaim all liability for the use or accuracy of third-party codes contained in the specifications.

CPT(R) contained in the Measure specifications is copyright 2004-2024. American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

Percentage of patients initially diagnosed with non-muscle invasive bladder cancer and who received intravesical Bacillus-Calmette-Guerin (BCG) within 6 months of bladder cancer staging

Metadata
Title Intravesical Bacillus-Calmette-Guerin for Non-Muscle Invasive Bladder CancerFHIR
Version 1.0.000
Short Name CMS646FHIR
GUID (Version Independent) urn:uuid:907ead5a-2f8f-468e-b774-309ea8aa6182
GUID (Version Specific) urn:uuid:67c8554c-9288-4de2-b8dc-45ae4673e032
CMS Identifier 646FHIR
Effective Period 2026-01-01 through 2026-12-31
Steward (Publisher) Oregon Urology
Developer Oregon Urology
Description

Percentage of patients initially diagnosed with non-muscle invasive bladder cancer and who received intravesical Bacillus-Calmette-Guerin (BCG) within 6 months of bladder cancer staging

Copyright

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. Oregon Urology Institute (OUI) and Large Urology Group Practice Association (LUGPA) disclaim all liability for the use or accuracy of third-party codes contained in the specifications.

CPT(R) contained in the Measure specifications is copyright 2004-2024. American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 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 MEASURES 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].

Rationale

Bladder cancer is ranked 10th for new cancer cases in 2020 and is the ninth leading cause of cancer death in the United States. There are 81,400 estimated new cases in 2020 and 17,980 estimated deaths in 2020. In 2016, an estimated 699,450 people were living with bladder cancer in the United States. Early detection (discovery of cancer in situ or localized to the primary site) is found in 85% of the patients, and with these there is a five-year survival rate of 95.8% for In Situ and 69.2% for Localized. Bladder cancer is rarely found in patients under age 20, with the median age of diagnosis being 73 (NIH, 2020).

National Comprehensive Cancer Network (NCCN) Guidelines for Bladder Cancer (version 6.2021) defines intravesical BCG as Category 1 Treatment for T1, Tis and Ta - high grade, non-muscle invasive bladder cancer. Most public data reflects prophylactic or adjuvant use of intravesical therapy to prevent recurrence or delay progression to a higher grade or stage. BCG has been shown to be effective as prophylaxis to prevent bladder cancer recurrences following TURBT. The NCCN Bladder Cancer Panel Members recommend BCG as the preferred option over Mitomycin C for adjuvant treatment of high-grade lesions (Ta). BCG is also standard therapy for Primary Tis. Most T1 lesions are high-risk and are similarly treated with adjuvant intravesical therapy, with BCG being a Category 1 recommendation (NCCN, 2021).

Clinical Recommendation Statement

Intravesical BCG should be administered within 6 months of the initial diagnosis of non-muscle invasive bladder cancer. It may be administered 3-4 weeks after resection, but there needs to be pathological tumor confirmation and must be withheld if there is traumatic catheterization, bacteriuria, persistent gross hematuria, persistent severe local symptoms or systemic symptoms. The normal induction course is 6 weekly instillations of intravesical BCG (AUA Non-Muscle Invasive Bladder Cancer and American Urological Association (AUA) Guideline for the Management of Non-muscle Invasive Bladder Cancer: Stages T1, TIS, and Ta High Risk).

Citation

Chamie, K., Saigal, C.S., Lai, J., Hanley, J.M., Setodji, C.M., Konety, B.R., ... Urologic Diseases in America Project (2011). Compliance with Guidelines for Patients with Bladder Cancer: Variation in the Delivery of Care. Cancer.2011 Dec 1: 117(23): 5392-5401. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3206145/

Citation

Chang, S.S., Boorjian, S.A., Chou, R., Clark, P.E., Daneshmand, S., Konety, B.R., ... Mckiernan, J. M., (2016) American Urological Association. Non-Muscle Invasive Bladder Cancer. https://www.auanet.org/guidelines-and-quality/guidelines/bladder-cancer-non-muscle-invasive-guideline

Citation

Hall, M.C., Chang, S.S., Dalbagni, G., Pruthi, R.S., Schellhammer, P.F., Seigne, J.D., ... Wolf, S., (2016). American Urological Association. Guideline for the Management of Non-muscle Invasive Bladder Cancer (Stages Ta, T1, and Tis): Update 2016. https://www.auajournals.org/doi/10.1016/j.juro.2007.09.003

Citation

Kassouf, W., Black, P., (2016) Treatment of primary non-muscle invasive urothelial bladder cancer. Literature review current through Dec. 2016. https://www.uptodate.com/contents/treatment-of-primary-non-muscle-invasive-urothelial-bladder-cancer?source=search_result&search=Treatment%20of%20primary%20non-muscle%20invasive%20urothelial%20bladder%20cancer&selectedTitle=1~150 T of primary

Citation

National Cancer Institute. (2020). SEER Cancer Stat Facts: Bladder Cancer. Surveillance, Epidemiology, and End Results Program. U.S. Department of Health and Human Services, National Institutes of Health. https://seer.cancer.gov/statfacts/html/urinb.html

Citation

NCCN Clinical Practice Guidelines in Oncology (NCCN Guidelines). (2021). Bladder Cancer. Version 6.2021. https://www.nccn.org/professionals/physician_gls/pdf/bladder.pdf

Citation

Pacific Northwest Evidence-based Practice Center, Oregon Health & Science University. (2016). PCORI Topic Brief. Comparative Effectiveness of Treatments for Non-Muscle-Invasive Bladder Cancer http://www.pcori.org/sites/default/files/PCORI-Assessment-Options-Advisory-Panel-Fall-2016-Topic-Brief-Non-Muscle-Invasive-Bladder-Cancer.pdf

Definition Bacillus Calmette-Guerin (BCG) : A live attenuated strain of *Mycobacterium bovis*, first indicated as a tuberculosis vaccine, has had widespread use in intravesical immunotherapy since the 1970s
Definition Histology: Urothelial carcinoma
Definition Intravesical: Within the urinary bladder
Definition Primary Tumor (T) Stage - T1: The tumor invades subepithelial connective tissue (high grade or low grade)
Definition Primary Tumor (T) Stage - Ta: Noninvasive and high grade
Definition Primary Tumor (T) Stage - Tis: Carcinoma in situ: "flat tumor"
Definition Tumor Location: Urinary bladder
Guidance (Usage) Ta bladder cancer must be high grade Ta only and is supported by the 2016 AUA guidelines and 2018 NCCN guidelines. The BCG dose can be full or partial and can be from any lot or manufacturer. 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 CMS646v6. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
Measure Group (Rate) (ID: Group_1)
Basis boolean
Scoring Proportion
Improvement Notation Increased score indicates improvement
Type Process
Initial Population ID: InitialPopulation_1
Description:

All patients initially diagnosed with T1, Tis or high grade Ta non-muscle invasive bladder cancer with bladder cancer staging within 6 months before to 6 months after the start of the measurement period and a qualified encounter in the measurement period

Criteria: Initial Population
Denominator ID: Denominator_1
Description:

Equals Initial Population

Criteria: Denominator
Denominator Exclusion ID: DenominatorExclusion_1
Description:

Immunosuppressed patients, includes HIV and immunocompromised state, with a diagnosis prior to Bladder Cancer Staging. Immunosuppressive drug therapy starting on or before Bladder Cancer Staging. Active Tuberculosis diagnosis during the Bladder Cancer Staging. Mixed histology urothelial cell carcinoma including micropapillary, plasmacytoid, sarcomatoid, adenocarcinoma and squamous disease prior to Bladder Cancer Staging. Patients who undergo cystectomy, chemotherapy or radiation within 6 months prior to Bladder Cancer Staging.

Criteria: Denominator Exclusion
Denominator Exception ID: DenominatorException_1
Description:

Unavailability of BCG within 6 months after Bladder Cancer Staging

Criteria: Denominator Exception
Numerator ID: Numerator_1
Description:

Intravesical Bacillus-Calmette Guerin (BCG) instillation for initial dose or series: BCG is initiated within 6 months of the bladder cancer staging

Criteria: Numerator
<p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p>
Supplemental Data Elements
Supplemental Data Element ID: sde-ethnicity
Usage Code: Supplemental Data
Description: SDE Ethnicity
Logic Definition: SDE Ethnicity
Supplemental Data Element ID: sde-payer
Usage Code: Supplemental Data
Description: SDE Payer
Logic Definition: SDE Payer
Supplemental Data Element ID: sde-race
Usage Code: Supplemental Data
Description: SDE Race
Logic Definition: SDE Race
Supplemental Data Element ID: sde-sex
Usage Code: Supplemental Data
Description: SDE Sex
Logic Definition: SDE Sex
Measure Logic
Primary Library https://madie.cms.gov/Library/CMS646FHIRIntravesicalBCGTherapy
Contents Population Criteria
Logic Definitions
Terminology
Dependencies
Data Requirements
Parameters
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
define "Initial Population":
  "Has Most Recent Bladder Cancer Tumor Staging is T1, Tis, Ta HG"
    and "Has Qualifying Encounter"
Definition
Denominator
define "Denominator":
  "Initial Population"
Definition
Denominator Exclusion
define "Denominator Exclusion":
  exists "Acute Tuberculosis Diagnosis"
    or exists "Immunosuppressive Drugs"
    or exists "Cystectomy Done"
    or "Has Excluding HIV, Immunocompromised Conditions or Mixed Histology Before Staging"
    or "Has Excluding Chemotherapy or Radiotherapy Procedure Before Staging"
Definition
Denominator Exception
define "Denominator Exception":
  exists "BCG Not Available Within 6 Months After Bladder Cancer Staging"
Definition
Numerator
define "Numerator":
  "First BCG Administered" is not null
Definition
Logic Definitions
Logic Definition Library Name: SupplementalDataElements
define "SDE Sex":
  case
    when Patient.sex() = '248153007' then "Male (finding)"
    when Patient.sex() = '248152002' then "Female (finding)"
    else null
  end
Logic Definition Library Name: SupplementalDataElements
define "SDE Payer":
  [USQualityCore.Coverage: type in "Payer Type"] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Ethnicity":
  (Patient.ethnicity()) E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Race":
  (Patient.race()) R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Bladder Cancer Diagnosis":
  ( [ConditionProblemsHealthConcerns: "Bladder Cancer for Urology Care"]
    union [ConditionEncounterDiagnosis: "Bladder Cancer for Urology Care"] ) BladderCancer
    where ( BladderCancer.onset.toInterval ( ) starts before day of end of "Measurement Period"
        or BladderCancer.onset.toInterval ( ) before day of end of "Measurement Period"
    )
      and BladderCancer.isVerified ( )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "First Bladder Cancer Staging Procedure":
  First([Procedure: "Tumor staging (tumor staging)"] BladderCancerStaging
      with "Bladder Cancer Diagnosis" BladderCancer
        such that BladderCancerStaging.performed.toInterval() starts on or before day of start of BladderCancer.onset.toInterval ( )
      where BladderCancerStaging.status = 'completed'
      sort by start of performed.toInterval()
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "First BCG Administered":
  First([MedicationAdministration: "Bacillus Calmette Guerin for Urology Care"] BCG
      with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
        such that BCG.effective.toInterval() starts 6 months or less after day of start of FirstBladderCancerStaging.performed.toInterval()
          and BCG.effective.toInterval() starts during day of "Measurement Period"
      where BCG.status in { 'in-progress', 'completed' }
      sort by start of effective.toInterval()
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Numerator":
  "First BCG Administered" is not null
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "BCG Not Available Within 6 Months After Bladder Cancer Staging":
  [MedicationAdministrationNotDone: "Bacillus Calmette Guerin for Urology Care"] BCGNotGiven
    with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
      such that BCGNotGiven.effective 6 months or less after day of start of FirstBladderCancerStaging.performed.toInterval ( )
    where BCGNotGiven.statusReason in "Unavailability of Bacillus Calmette Guerin for Urology Care"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Denominator Exception":
  exists "BCG Not Available Within 6 Months After Bladder Cancer Staging"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "July 1 of Year Prior to the Measurement Period":
  Date((year from start of "Measurement Period" - 1), 7, 1)
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "June 30 of the Measurement Period":
  Date((year from start of "Measurement Period"), 6, 30)
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "First Bladder Cancer Staging Procedure during 6 Months Prior to Measurement Period through the First 6 Months of Measurement Period":
  "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
    where FirstBladderCancerStaging.performed.toInterval ( ) during day of Interval["July 1 of Year Prior to the Measurement Period", "June 30 of the Measurement Period"]
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
/*Ta High Grade only to be included.  Ta low grade is to be excluded from this measure.*/


define "Has Most Recent Bladder Cancer Tumor Staging is T1, Tis, Ta HG":
  exists ( [LaboratoryResultObservation] StagingObservation
      where StagingObservation.getStagingProcedure ( ) is not null
        and ( StagingObservation.value as CodeableConcept ~ "American Joint Committee on Cancer cT1 (qualifier value)"
            or StagingObservation.value as CodeableConcept ~ "American Joint Committee on Cancer cTis (qualifier value)"
            or StagingObservation.value as CodeableConcept ~ "American Joint Committee on Cancer cTa (qualifier value)"
            or StagingObservation.value as CodeableConcept ~ "Carcinoma in situ of bladder"
        )
        and StagingObservation.status in { 'final', 'amended', 'corrected' }
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Has Qualifying Encounter":
  exists ( [Encounter: "Office Visit"] ValidEncounter
      where ValidEncounter.period during day of "Measurement Period"
        and ValidEncounter.class !~ "virtual"
        and ValidEncounter.status = 'finished'
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Initial Population":
  "Has Most Recent Bladder Cancer Tumor Staging is T1, Tis, Ta HG"
    and "Has Qualifying Encounter"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Denominator":
  "Initial Population"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Acute Tuberculosis Diagnosis":
  ( [ConditionProblemsHealthConcerns: "Tuberculosis for Urology Care"]
    union [ConditionEncounterDiagnosis: "Tuberculosis for Urology Care"] ) ActiveTuberculosis
    with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
      such that ( ( ActiveTuberculosis.onset.toInterval ( ) overlaps after day of FirstBladderCancerStaging.performed.toInterval ( ) )
          or ( ActiveTuberculosis.onset.toInterval ( ) overlaps after day of FirstBladderCancerStaging.performed.toInterval ( )
              and ( ( ActiveTuberculosis.abatement.toInterval ( ) overlaps after day of FirstBladderCancerStaging.performed.toInterval ( ) )
                  or ( ActiveTuberculosis.abatement is null )
              )
          )
      )
    where ActiveTuberculosis.isVerified ( )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Immunosuppressive Drugs":
  [MedicationRequest: "Immunosuppressive Drugs for Urology Care"] ImmunosuppressiveDrugs
    let firstMedicationPeriod: First((collapse(ImmunosuppressiveDrugs.dosageInstruction.timing.repeat.bounds DoseTime
          return DoseTime.toInterval()
      )) DrugPeriods
        sort by start of $this
    ),
    //get the very first event
    
    firstMedicationEvent: First((ImmunosuppressiveDrugs.dosageInstruction.timing dosageTiming
        //return first event for the specific dosageTiming
        
        return First(dosageTiming.event dosageTimingEvents
            sort ascending
        )) firstEvents
        sort ascending
    ),
    medicationPeriod: Coalesce(firstMedicationEvent.toInterval(), firstMedicationPeriod)
    with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
      such that medicationPeriod starts on or before day of start of FirstBladderCancerStaging.performed.toInterval ( )
    where ImmunosuppressiveDrugs.status in { 'active', 'completed' }
      and ImmunosuppressiveDrugs.intent = 'order'
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Cystectomy Done":
  [Procedure: "Cystectomy for Urology Care"] Cystectomy
    with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
      such that Cystectomy.performed.toInterval ( ) 6 months or less before day of start of FirstBladderCancerStaging.performed.toInterval ( )
    where Cystectomy.status = 'completed'
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Has Excluding HIV, Immunocompromised Conditions or Mixed Histology Before Staging":
  exists ( ( ( [ConditionProblemsHealthConcerns: "HIV"]
        union [ConditionEncounterDiagnosis: "HIV"]
    )
      union ( [ConditionProblemsHealthConcerns: "Immunocompromised Conditions"]
          union [ConditionEncounterDiagnosis: "Immunocompromised Conditions"]
      )
      union ( [ConditionProblemsHealthConcerns: "Mixed Histology Urothelial Cell Carcinoma for Urology Care"]
          union [ConditionEncounterDiagnosis: "Mixed Histology Urothelial Cell Carcinoma for Urology Care"]
      ) ) ExclusionDiagnosis
      with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
        such that ( ( ExclusionDiagnosis.onset.toInterval ( ) starts on or before day of start of FirstBladderCancerStaging.performed.toInterval ( ) )
            or ( ExclusionDiagnosis.onset.toInterval ( ) starts on or before day of start of FirstBladderCancerStaging.performed.toInterval ( ) )
        )
      where ExclusionDiagnosis.isVerified ( )
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Has Excluding Chemotherapy or Radiotherapy Procedure Before Staging":
  exists ( ( [MedicationRequest: "Chemotherapy Agents for Advanced Cancer"] ExclusionMed
        let firstMedicationPeriod: First((collapse(ExclusionMed.dosageInstruction.timing.repeat.bounds DoseTime
              return DoseTime.toInterval()
          )) DrugPeriods
            sort by start of $this
        )
        with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
          such that firstMedicationPeriod starts 6 months or less before FirstBladderCancerStaging.performed.toInterval ( )
        where ExclusionMed.status in { 'active', 'completed' }
          and ExclusionMed.intent = 'order'
    )
      union ( [Procedure: "Combined radiotherapy (procedure)"] ExclusionProcedure
          with "First Bladder Cancer Staging Procedure" FirstBladderCancerStaging
            such that ExclusionProcedure.performed.toInterval ( ) starts 6 months or less before FirstBladderCancerStaging.performed.toInterval ( )
          where ExclusionProcedure.status in { 'completed', 'in-progress' }
      )
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "Denominator Exclusion":
  exists "Acute Tuberculosis Diagnosis"
    or exists "Immunosuppressive Drugs"
    or exists "Cystectomy Done"
    or "Has Excluding HIV, Immunocompromised Conditions or Mixed Histology Before Staging"
    or "Has Excluding Chemotherapy or Radiotherapy Procedure Before Staging"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define fluent function isVerified(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ Status."confirmed"
      or condition.verificationStatus ~ Status."unconfirmed"
      or condition.verificationStatus ~ Status."provisional"
      or condition.verificationStatus ~ Status."differential"
  )
Logic Definition Library Name: CMS646FHIRIntravesicalBCGTherapy
define fluent function getStagingProcedure(StagingObservation LaboratoryResultObservation):
  StagingObservation.partOf StagingReference
    return "First Bladder Cancer Staging Procedure during 6 Months Prior to Measurement Period through the First 6 Months of Measurement Period" FirstBladderCancerStagingMP
      where FirstBladderCancerStagingMP.id = StagingReference.reference.getId ( )
Logic Definition Library Name: USQualityCoreCommon
/*
@description: Returns the id of the given uri (i.e. everything after the last slash)
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))
Logic Definition Library Name: FHIRCommon
/*
@description: Returns the single extension (if present) on the given resource with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define fluent function ext(domainResource DomainResource, url String):
  singleton from domainResource.exts(url)
Logic Definition Library Name: FHIRCommon
/*
@description: Returns any extensions defined on the given resource with the specified url
*/
define fluent function exts(domainResource DomainResource, url String):
  domainResource.extension E
    where E.url = url
    return E
Logic Definition Library Name: FHIRCommon
/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range 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 FHIR, allowing this function to be used across any resource.

The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
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 Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.

NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
  case
    when choice is FHIR.dateTime then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
    when choice is FHIR.Period then
      FHIRHelpers.ToInterval(choice as FHIR.Period)
    when choice is FHIR.instant then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
    when choice is FHIR.Age then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
    when choice is FHIR.Range then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
    when choice is FHIR.Timing then
      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
    when choice is FHIR.string then
      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
    else
      null as Interval<DateTime>
  end
Logic Definition Library Name: FHIRCommon
/*
@description: Returns the single extension (if present) on the given element with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given element with the specified url.
*/
define fluent function ext(element Element, url String):
  singleton from element.exts(url)
Logic Definition Library Name: FHIRCommon
/*
@description: Returns any extensions defined on the given element with the specified url.
*/
define fluent function exts(element Element, url String):
  element.extension E
    where E.url = url
    return E
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRHelpers
/*
@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
        }
Logic Definition Library Name: FHIRHelpers
/*
@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
        }
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value dateTime): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value instant): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDate(value date): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) 
value to a CQL Quantity
@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
@seealso: ToCalendarUnit
*/
define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
    end
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts a UCUM definite duration unit to a CQL calendar duration
unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) 
topic of the CQL specification.
@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
*/
define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end
Logic Definition Library Name: FHIRHelpers
define function ToString(value ProcedureStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationAdministrationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ObservationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value EncounterStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestIntent): value.value
Logic Definition Library Name: USCoreCommon
/*
@description: Returns the sex element as defined for the USCore patient profile
*/
define fluent function sex(patient Patient):
  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code
Logic Definition Library Name: USCoreCommon
define fluent function ethnicity(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E
    return {
      ombCategory: E.ext('ombCategory').value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }
Logic Definition Library Name: USCoreCommon
define fluent function race(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E
    return {
      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }
Terminology
Code System Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Code System Description: Code system ConditionVerificationStatusCodes
Resource: ConditionVerificationStatus
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-ver-status
Code System Description: Code system ICD10CM
Resource: International Classification of Diseases, 10th Revision, Clinical Modification (ICD-10-CM)
Canonical URL: http://hl7.org/fhir/sid/icd-10-cm
Code System Description: Code system ActCode
Resource: ActCode
Canonical URL: http://terminology.hl7.org/CodeSystem/v3-ActCode
Value Set Description: Value set Bacillus Calmette Guerin for Urology Care
Resource: Bacillus Calmette Guerin for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.353
Value Set Description: Value set Bladder Cancer for Urology Care
Resource: Bladder Cancer for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.354
Value Set Description: Value set Unavailability of Bacillus Calmette Guerin for Urology Care
Resource: Unavailability of Bacillus Calmette Guerin for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.369
Value Set Description: Value set Office Visit
Resource: Office Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Value Set Description: Value set Payer Type
Resource: Payer Type
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Value Set Description: Value set Tuberculosis for Urology Care
Resource: Tuberculosis for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.351
Value Set Description: Value set Immunosuppressive Drugs for Urology Care
Resource: Immunosuppressive Drugs for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.364
Value Set Description: Value set Cystectomy for Urology Care
Resource: Cystectomy for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.358
Value Set Description: Value set HIV
Resource: HIV
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003
Value Set Description: Value set Immunocompromised Conditions
Resource: Immunocompromised Conditions
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.363
Value Set Description: Value set Mixed Histology Urothelial Cell Carcinoma for Urology Care
Resource: Mixed Histology Urothelial Cell Carcinoma for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.365
Value Set Description: Value set Chemotherapy Agents for Advanced Cancer
Resource: Chemotherapy Agents for Advanced Cancer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.355
Direct Reference Code Display: Male (finding)
Code: 248153007
System: http://snomed.info/sct
Direct Reference Code Display: Female (finding)
Code: 248152002
System: http://snomed.info/sct
Direct Reference Code Display: Tumor staging (tumor staging)
Code: 254292007
System: http://snomed.info/sct
Direct Reference Code Display: confirmed
Code: confirmed
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: unconfirmed
Code: unconfirmed
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: provisional
Code: provisional
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: differential
Code: differential
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Display: American Joint Committee on Cancer cT1 (qualifier value)
Code: 1228889001
System: http://snomed.info/sct
Direct Reference Code Display: American Joint Committee on Cancer cTis (qualifier value)
Code: 1228884006
System: http://snomed.info/sct
Direct Reference Code Display: American Joint Committee on Cancer cTa (qualifier value)
Code: 1228883000
System: http://snomed.info/sct
Direct Reference Code Display: Carcinoma in situ of bladder
Code: D09.0
System: http://hl7.org/fhir/sid/icd-10-cm
Direct Reference Code Display: virtual
Code: VR
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
Direct Reference Code Display: Combined radiotherapy (procedure)
Code: 169331000
System: http://snomed.info/sct
Dependencies
Dependency Description: USQualityCore model information
Resource: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
Canonical URL: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
Dependency Description: USCore model information
Resource: http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived
Dependency Description: FHIR model information
Resource: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library SDE
Resource: SupplementalDataElements version: 6.1.000
Canonical URL: https://madie.cms.gov/Library/SupplementalDataElements|6.1.000
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Dependency Description: Library USCommon
Resource: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Dependency Description: Library FHIRCommon
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Dependency Description: Library Status
Resource: Status version: 2.1.000
Canonical URL: https://madie.cms.gov/Library/Status|2.1.000
Dependency Description: Library USQualityCoreCommon
Resource: US Quality Core Common version: 0.1.0-cibuild
Canonical URL: https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild
Data Requirements
Data Requirement Type: Patient
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient
Must Support Elements: ombCategory, detailed, text
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: birthDate
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Bladder Cancer for Urology Care
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Tuberculosis for Urology Care
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: HIV
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Immunocompromised Conditions
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Mixed Histology Urothelial Cell Carcinoma for Urology Care
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Bladder Cancer for Urology Care
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Tuberculosis for Urology Care
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: HIV
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Immunocompromised Conditions
Data Requirement Type: Condition
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Mixed Histology Urothelial Cell Carcinoma for Urology Care
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status, id
Code Filter(s):
Path: code
Code(s): SNOMED CT: 254292007 (Tumor staging (tumor staging))
Path: status
Code(s): [not stated]: completed (completed)
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status, id
Code Filter(s):
Path: code
ValueSet: Cystectomy for Urology Care
Path: status
Code(s): [not stated]: completed (completed)
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status, id
Code Filter(s):
Path: code
Code(s): SNOMED CT: 169331000 (Combined radiotherapy (procedure))
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Code Filter(s):
Path: code
ValueSet: Bacillus Calmette Guerin for Urology Care
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Code Filter(s):
Path: code
ValueSet: Immunosuppressive Drugs for Urology Care
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Code Filter(s):
Path: code
ValueSet: Chemotherapy Agents for Advanced Cancer
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication.reference, effective, status
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication, effective, status
Code Filter(s):
Path: medication
ValueSet: Bacillus Calmette Guerin for Urology Care
Data Requirement Type: MedicationAdministration
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone
Must Support Elements: medication, effective, statusReason
Code Filter(s):
Path: medication
ValueSet: Bacillus Calmette Guerin for Urology Care
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab
Must Support Elements: value, status, reference
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, period, class, status
Code Filter(s):
Path: type
ValueSet: Office Visit
Path: class
Path: status
Code(s): [not stated]: finished (finished)
Data Requirement Type: Coverage
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: Payer Type
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, dosageInstruction, status, intent
Code Filter(s):
Path: medication
ValueSet: Immunosuppressive Drugs for Urology Care
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication.reference, dosageInstruction, status, intent
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, dosageInstruction, status, intent
Code Filter(s):
Path: medication
ValueSet: Chemotherapy Agents for Advanced Cancer
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
SDE Sex Out 0..1 Coding
Numerator Out 0..1 boolean
Denominator Exception 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
Denominator Exclusion Out 0..1 boolean
SDE Race Out 0..1 Resource
Generated using version 0.5.4 of the sample-content-ig Liquid templates