Metadata
Title | Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer PatientsFHIR
Version | 1.0.000
Short Name | CMS129FHIR
GUID (Version Independent) | urn:uuid:a9fa2b95-f5f7-4ff4-931c-b47df9d6371f
GUID (Version Specific) | urn:uuid:2bdfa3ee-eaa5-42ae-8483-a71dc6d3521f
CMS Identifier | 129FHIR
Effective Period | 2026-01-01 through 2026-12-31
Steward (Publisher) | Centers for Medicare & Medicaid Services (CMS)
Developer | American Institutes for Research (AIR)
Description | Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer
Copyright | This electronic clinical quality measure (Measure) and related data specifications are owned and stewarded by the Centers for Medicare & Medicaid Services (CMS). CMS contracted (Contract # 75FCMC18D0027/ Task Order #: 75FCMC24F0144) with the American Institutes for Research (AIR) to develop this electronic measure. AIR is not responsible for any use of the Measure. AIR makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and AIR has no liability to anyone who relies on such measures or specifications. 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. AIR 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-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved.
Disclaimer | The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R].
Rationale | Multiple studies have indicated that a bone scan is not clinically necessary for staging prostate cancer in patients with a low (or very low) risk of recurrence and receiving primary therapy. For patients who are categorized as low risk, bone scans are unlikely to identify their disease. Furthermore, bone scans are not necessary for low risk patients who have no history of bony involvement or if the clinical examination suggests no bony involvement. Less than 1% of low risk patients are at risk of metastatic disease. While clinical practice guidelines do not recommend bone scans in low risk prostate cancer patients, overuse is still common. An analysis of prostate cancer patients in the Surveillance, Epidemiology and End Results Medicare database diagnosed from 2004-2007 found that 43% of patients for whom a bone scan was not recommended received it (Falchook, Hendrix, & Chen, 2015). The analysis also found that the use of bone scans in low risk patients leads to an annual cost of $4 million dollars to Medicare. The overuse of bone scan imaging for low risk prostate cancer patients is a concept included on the American Urological Association's (AUA) list in the Choosing Wisely Initiative as a means to promote adherence to evidence-based imaging practices and to reduce health care dollars wasted (AUA, 2019). This measure is intended to promote adherence to evidence-based imaging practices, lessen the financial burden of unnecessary imaging, and ultimately to improve the quality of care for prostate cancer patients in the United States.
Clinical Recommendation Statement | For symptomatic patients and/or those with a life expectancy of greater than 5 years, bone and soft tissue imaging is appropriate for patients with unfavorable intermediate-risk, high-risk, and very-high-risk prostate cancer (National Comprehensive Cancer Network, 2024) (Evidence Level: Category 2A). Clinicians should not routinely perform abdominopelvic computed tomography (CT) scan or bone scan in asymptomatic patients with low- or intermediate-risk prostate cancer (Eastham, 2022) (Expert Opinion). Don’t perform PET, CT, and radionuclide bone scans, or newer imaging scans in the staging of early prostate cancer at low risk for metastasis (ASCO, 2021).
Citation | American Society of Clinical Oncology (2021) American Society of Clinical Oncology Choosing Wisely; Last Reviewed 2021. Retrieved from https://www.asco.org/news-initiatives/current-initiatives/cancer-care-initiatives/value-cancer-care/choosing-wisely
Citation | American Urological Association. (2013). Five Things Physicians and Patients Should Question. Choosing Wisely. https://www.auanet.org/documents/practices-resources/quality/choosing-wisely/AUA-Choosing-Wisely-15-Things.pdf
Citation | Eastham JA, Auffenberg GB, Barocas DA, et al. (2022) Clinically localized prostate cancer: AUA/ASTRO guideline, part I: introduction, risk assessment, staging, and risk-based management. J Urol, 208(1):10-18. doi: 10.1097/JU.0000000000002757.
Citation | Falchook, A. D., Hendrix, L. H., & Chen, R. C. (2015). Guideline-discordant use of imaging during work-up of newly diagnosed prostate cancer. Journal of Oncology Practice, 11(2), e239-e246. doi:10.1200/jop.2014.001818
Citation | National Comprehensive Cancer Network (2024) NCCN Clinical Practice Guidelines in Oncology Prostate Cancer. Retrieved from https://www.nccn.org/professionals/physician_gls/pdf/prostate.pdf
Definition | Bone scan: Bone scan refers to the conventional technetium-99m-methyl diphosphonate bone scan as well as 18F-sodium fluoride or prostate-specific membrane antigen (PSMA) PET/CT scan
Definition | External beam radiotherapy : External beam radiotherapy refers to 3D conformal radiation therapy, intensity modulated radiation therapy, stereotactic body radiotherapy, and proton beam therapy
Definition | Risk Strata: High/Very High Risk: PSA > 20 ng/mL; OR Gleason score 8 to 10/Gleason grade group 4-5; OR clinically localized stage T3 to T4 (adapted from the National Comprehensive Cancer Network, 2018)
Definition | Risk Strata: Intermediate Risk: PSA 10 to 20 ng/mL; OR Gleason score 7/Gleason grade group 2-3; OR clinical stage T2b to T2c
Definition | Risk Strata: Very Low/Low Risk: PSA < 10 ng/mL; AND Gleason score 6 or less/Gleason grade group 1; AND clinical stage T1 to T2a
Guidance (Usage) | A higher score indicates appropriate treatment of patients with prostate cancer at low (or very low) risk of recurrence. Only patients with prostate cancer with low (or very low) risk of recurrence will be counted in the performance denominator of this measure. PSA test results reported in units other than ng/mL should be converted to ng/mL for reporting of this measure. In 2022, the American Urological Association published guidance recommending that clinicians not perform bone scan in asymptomatic patients with low or favorable intermediate risk prostate cancer. However, this quality measure remains focused on patients with low (or very low) risk of recurrence. This eCQM is a patient-based measure. Telehealth encounters are not eligible for this measure because the measure does not contain telehealth-eligible codes. This FHIR-based measure has been derived from the QDM-based measure CMS 129v15. 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)
Summary | Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer
Basis | boolean
Scoring | [http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']
Type | [http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']
Improvement Notation | [http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']
Initial Population | ID: InitialPopulation_1 Description: All patients, regardless of age, with a diagnosis of prostate cancer Logic Definition: Initial Population
Denominator | ID: Denominator_1 Description: Equals Initial Population at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy Logic Definition: Denominator
Numerator | ID: Numerator_1 Description: Patients who did not have a bone scan performed after diagnosis of prostate cancer and before the end of the measurement period Logic Definition: Numerator
Denominator Exception | ID: DenominatorException_1 Description: Documentation of reason(s) for performing a bone scan (including documented pain related to prostate cancer, salvage therapy, or other medical reasons) Logic Definition: Denominator Exceptions
Supplemental Data Guidance | For every patient evaluated by this measure also identify payer, race, ethnicity and sex
Supplemental Data Elements
Supplemental Data Element | ID: sde-ethnicity Usage Code: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data] Description: SDE Ethnicity Logic Definition: SDE Ethnicity
Supplemental Data Element | ID: sde-payer Usage Code: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data] Description: SDE Payer Logic Definition: SDE Payer
Supplemental Data Element | ID: sde-race Usage Code: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data] Description: SDE Race Logic Definition: SDE Race
Supplemental Data Element | ID: sde-sex Usage Code: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data] Description: SDE Sex Logic Definition: SDE Sex
Measure Logic
Primary Library | https://madie.cms.gov/Library/CMS129FHIRProstCaBoneScanUse
Contents | Population Criteria Logic Definitions Terminology Dependencies Data Requirements
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
    define "Initial Population":
      exists "Prostate Cancer Diagnosis"
Denominator
    define "Denominator":
      "Initial Population"
        and "First Prostate Cancer Treatment during day of Measurement Period" is not null
        and "Most Recent Prostate Cancer Staging Tumor Size T1a to T2a" is not null
        and "Most Recent PSA Test Result is Low"
        and "Most Recent Gleason Score is Low"
Numerator
    define "Numerator":
      not exists "Bone Scan Study Performed"
Denominator Exception
    define "Denominator Exceptions":
      "Has Diagnosis of Pain related to Prostate Cancer"
        or "Has Salvage Therapy Performed after Prostate Cancer Diagnosis"
        or "Has Bone Scan Study Performed with Documented Reason"
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":
      [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: CMS129FHIRProstCaBoneScanUse
    define "SDE Sex":
      SDE."SDE Sex"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Prostate Cancer Diagnosis":
      [ConditionProblemsHealthConcerns: "Prostate Cancer"] ProstateCancer
        where ProstateCancer.prevalenceInterval ( ) overlaps day of "Measurement Period"
          and ProstateCancer.isVerified ( )
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Bone Scan Study Performed":
      [ObservationClinicalResult: "Bone Scan"] BoneScan
        with "Prostate Cancer Diagnosis" ActiveProstateCancer
          such that BoneScan.effective.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
        where BoneScan.effective.toInterval ( ) ends during day of "Measurement Period"
          and BoneScan.status in { 'final', 'amended', 'corrected' }
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Numerator":
      not exists "Bone Scan Study Performed"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Initial Population":
      exists "Prostate Cancer Diagnosis"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "First Prostate Cancer Treatment during day of Measurement Period":
      First([Procedure: "Prostate Cancer Treatment"] ProstateCancerTreatment
          where ProstateCancerTreatment.performed.toInterval() ends during day of "Measurement Period"
            and ProstateCancerTreatment.status = 'completed'
          sort by start of performed.toInterval()
      )
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Most Recent Prostate Cancer Staging Tumor Size T1a to T2a":
      ( Last(([ObservationClinicalResult: "Tumor staging (tumor staging)"] TumorStaging
        // TODO: determine feasibility of ObservationClinicalResult having basedOn reference to Condition
        // where exists("Prostate Cancer Diagnosis" ActiveProstateCancer where TumorStaging.basedOn.references(ActiveProstateCancer))

        ) ProstateCancerStaging
          with "First Prostate Cancer Treatment during day of Measurement Period" FirstProstateCancerTreatment
            such that ProstateCancerStaging.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
              and ProstateCancerStaging.status in { 'final', 'amended', 'corrected' }
          sort by start of effective.toInterval()
      ) ) LastProstateCancerStaging
        where ( LastProstateCancerStaging.value ~ "American Joint Committee on Cancer cT1a (qualifier value)"
            or LastProstateCancerStaging.value ~ "American Joint Committee on Cancer cT1b (qualifier value)"
            or LastProstateCancerStaging.value ~ "American Joint Committee on Cancer cT1c (qualifier value)"
            or LastProstateCancerStaging.value ~ "American Joint Committee on Cancer cT2a (qualifier value)"
        )
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Most Recent PSA Test Result is Low":
      ( Last([LaboratoryResultObservation: "Prostate Specific Antigen Test"] PSATest
          with "Most Recent Prostate Cancer Staging Tumor Size T1a to T2a" MostRecentProstateCancerStaging
            such that PSATest.effective.toInterval() starts before MostRecentProstateCancerStaging.effective.toInterval()
              and PSATest.status in { 'final', 'amended', 'corrected' }
          sort by start of effective.toInterval()
      ) ) LastPSATest
        return LastPSATest.value as Quantity < 10 'ng/mL'
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Most Recent Gleason Score is Low":
      ( Last([ObservationClinicalResult: "Gleason score in Specimen Qualitative"] GleasonScore
          with "First Prostate Cancer Treatment during day of Measurement Period" FirstProstateCancerTreatment
            such that GleasonScore.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
              and GleasonScore.status in { 'final', 'amended', 'corrected' }
          sort by start of effective.toInterval()
      ) ) LastGleasonScore
        return LastGleasonScore.value as Integer <= 6
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Denominator":
      "Initial Population"
        and "First Prostate Cancer Treatment during day of Measurement Period" is not null
        and "Most Recent Prostate Cancer Staging Tumor Size T1a to T2a" is not null
        and "Most Recent PSA Test Result is Low"
        and "Most Recent Gleason Score is Low"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "SDE Payer":
      SDE."SDE Payer"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "SDE Race":
      SDE."SDE Race"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Has Diagnosis of Pain related to Prostate Cancer":
      exists ( ( [ConditionProblemsHealthConcerns: "Pain Warranting Further Investigation for Prostate Cancer"]
          union [ConditionEncounterDiagnosis: "Pain Warranting Further Investigation for Prostate Cancer"] ) ProstateCancerPain
          with "Prostate Cancer Diagnosis" ActiveProstateCancer
            such that ProstateCancerPain.prevalenceInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
              and ProstateCancerPain.isVerified ( )
      )
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Has Salvage Therapy Performed after Prostate Cancer Diagnosis":
      exists ( [Procedure: "Salvage Therapy"] SalvageTherapy
          with "Prostate Cancer Diagnosis" ActiveProstateCancer
            such that SalvageTherapy.performed.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
              and SalvageTherapy.status = 'completed'
      )
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Has Bone Scan Study Performed with Documented Reason":
      exists "Bone Scan Study Performed" BoneScanAfterDiagnosis
        where BoneScanAfterDiagnosis.value ~ "Procedure reason record (record artifact)"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    define "Denominator Exceptions":
      "Has Diagnosis of Pain related to Prostate Cancer"
        or "Has Salvage Therapy Performed after Prostate Cancer Diagnosis"
        or "Has Bone Scan Study Performed with Documented Reason"
Logic Definition | Library Name: CMS129FHIRProstCaBoneScanUse
    /*
    @note: When possible, this function should be migrated to QICoreCommon.
    @description: Returns true if the given Condition has a verification status of "confirmed", "unconfirmed", "provisional", or "differential"
    */

    define fluent function isVerified(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):
      condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
          or condition.verificationStatus ~ QICoreCommon."unconfirmed"
          or condition.verificationStatus ~ QICoreCommon."provisional"
          or condition.verificationStatus ~ QICoreCommon."differential"
      )
Logic Definition | Library Name: QICoreCommon
    /*
    @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 Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
    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]
Logic Definition | Library Name: QICoreCommon
    /*
    @description: Returns an interval representing the normalized abatement of a given Condition.
    @comment: If the abatement element of the Condition is represented as a DateTime, the result
    is an interval beginning and ending on that DateTime.
    If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
    result is an interval from the date the patient turned that age to immediately before one year later.
    If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
    which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
    before one year later than the date the patient turned the ending age of the quantity interval.
    */
    define fluent function abatementInterval(condition Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
    	if condition.abatement is DateTime then
    	  Interval[condition.abatement as DateTime, condition.abatement as DateTime]
    	else if condition.abatement is Quantity then
    		Interval[Patient.birthDate + (condition.abatement as Quantity),
    			Patient.birthDate + (condition.abatement as Quantity) + 1 year)
    	else if condition.abatement is Interval<Quantity> then
    	  Interval[Patient.birthDate + (condition.abatement.low as Quantity),
    		  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
    	else if condition.abatement is Interval<DateTime> then
    	  Interval[condition.abatement.low, condition.abatement.high)
    	else null as Interval<DateTime>
Logic Definition | Library Name: QICoreCommon
    /*
    @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
Logic Definition | Library Name: FHIRHelpers
    define function ToString(value uri): 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
    /*
    @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
            }
Terminology
Code System | Description: Code system SNOMEDCT Resource: http://snomed.info/sct Canonical URL: `http://snomed.info/sct`
Code System | Description: Code system ConditionClinicalStatusCodes Resource: http://terminology.hl7.org/CodeSystem/condition-clinical Canonical URL: `http://terminology.hl7.org/CodeSystem/condition-clinical`
Code System | Description: Code system ConditionVerificationStatusCodes Resource: http://terminology.hl7.org/CodeSystem/condition-ver-status Canonical URL: `http://terminology.hl7.org/CodeSystem/condition-ver-status`
Code System | Description: Code system LOINC Resource: http://loinc.org Canonical URL: `http://loinc.org`
Value Set | Description: Value set Bone Scan Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320`
Value Set | Description: Value set Prostate Cancer Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319`
Value Set | Description: Value set Prostate Cancer Treatment Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398`
Value Set | Description: Value set Prostate Specific Antigen Test Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401`
Value Set | Description: Value set Payer Type Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591`
Value Set | Description: Value set Pain Warranting Further Investigation for Prostate Cancer Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451`
Value Set | Description: Value set Salvage Therapy Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399 Canonical URL: `http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399`
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: Active Code: active System: `http://terminology.hl7.org/CodeSystem/condition-clinical`
Direct Reference Code | Display: Recurrence Code: recurrence System: `http://terminology.hl7.org/CodeSystem/condition-clinical`
Direct Reference Code | Display: Relapse Code: relapse System: `http://terminology.hl7.org/CodeSystem/condition-clinical`
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: Tumor staging (tumor staging) Code: 254292007 System: `http://snomed.info/sct`
Direct Reference Code | Display: American Joint Committee on Cancer cT1a (qualifier value) Code: 1228892002 System: `http://snomed.info/sct`
Direct Reference Code | Display: American Joint Committee on Cancer cT1b (qualifier value) Code: 1228895000 System: `http://snomed.info/sct`
Direct Reference Code | Display: American Joint Committee on Cancer cT1c (qualifier value) Code: 1228899006 System: `http://snomed.info/sct`
Direct Reference Code | Display: American Joint Committee on Cancer cT2a (qualifier value) Code: 1228931008 System: `http://snomed.info/sct`
Direct Reference Code | Display: Gleason score in Specimen Qualitative Code: 35266-6 System: `http://loinc.org`
Direct Reference Code | Display: Procedure reason record (record artifact) Code: 433611000124109 System: `http://snomed.info/sct`
Dependencies
Dependency | Description: QICore model information Resource: http://hl7.org/fhir/Library/QICore-ModelInfo Canonical URL: `http://hl7.org/fhir/Library/QICore-ModelInfo`
Dependency | Description: Library SDE Resource: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000 Canonical URL: `https://madie.cms.gov/Library/SupplementalDataElements|5.1.000`
Dependency | Description: Library FHIRHelpers Resource: https://madie.cms.gov/Library/FHIRHelpers|4.4.000 Canonical URL: `https://madie.cms.gov/Library/FHIRHelpers|4.4.000`
Dependency | Description: Library QICoreCommon Resource: https://madie.cms.gov/Library/QICoreCommon|4.0.000 Canonical URL: `https://madie.cms.gov/Library/QICoreCommon|4.0.000`
Data Requirements
Data Requirement | Type: Patient Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Must Support Elements: extension, birthDate, birthDate.value, url
Data Requirement | Type: Condition Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns Must Support Elements: code Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451
Data Requirement | Type: Condition Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns Must Support Elements: code Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319
Data Requirement | Type: Observation Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result Must Support Elements: code, effective, status, status.value, value Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320
Data Requirement | Type: Observation Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result Must Support Elements: code, value, effective, status, status.value Code Filter(s): Path: code Code(s): http://snomed.info/sct#254292007: 'Tumor staging (tumor staging)'
Data Requirement | Type: Observation Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result Must Support Elements: code, effective, status, status.value, value Code Filter(s): Path: code Code(s): http://loinc.org#35266-6: 'Gleason score in Specimen Qualitative'
Data Requirement | Type: Procedure Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure Must Support Elements: code, performed, status, status.value Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398
Data Requirement | Type: Procedure Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure Must Support Elements: code, performed, status, status.value Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399
Data Requirement | Type: Observation Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab Must Support Elements: code, effective, status, status.value, value Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401
Data Requirement | Type: Coverage Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage Must Support Elements: type, period Code Filter(s): Path: type ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Data Requirement | Type: Condition Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis Must Support Elements: code Code Filter(s): Path: code ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451
Generated using version 0.4.8 of the sample-content-ig Liquid templates