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: Functional Status Assessments for Heart FailureFHIR

Official URL: https://madie.cms.gov/Measure/CMS90FHIRFSAforHeartFailure Version: 1.0.000
Active as of 2026-01-16 Responsible: Centers for Medicare & Medicaid Services (CMS) Computable Name: CMS90FHIRFSAforHeartFailure
Other Identifiers: Short Name: CMS90FHIR (use: usual, ), UUID:54792d38-7ad9-459c-b209-91b8915ab7ac (use: official, ), UUID:52a6d08e-18d6-4563-b69c-aed2f46d4ef4 (use: official, ), Publisher: 90FHIR (use: official, )

Copyright/Legal: 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) codes, descriptions and other data are copyright 2024. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. Fee schedules, relative value units, conversion factors and/or related components are not assigned by the AMA, are not part of CPT, and the AMA is not recommending their use. The AMA does not directly or indirectly practice medicine or dispense medical services. The AMA assumes no liability for data contained or not contained herein. Applicable FARS/DFARS restrictions apply to government use.

The American Dental Association (“ADA”) holds a copyright to the Current Dental Terminology (“CDT”) codes contained in certain measure specifications. The CDT codes in the measure specifications are included with the permission of the ADA. All uses of the CDT codes require a license from the ADA. No alteration, amendments, or modifications of the CDT or any portion thereof is allowed. Resale, transmission, or distribution of copies of the CDT or other portions of the CDT is also not allowed. To inquire about licensing, contact CDT-SNODENT@ada.org.

The measure specifications contain coding from LOINC(R) (http://loinc.org). The LOINC table, LOINC codes, LOINC panels and form file, LOINC linguistic variants file, LOINC/RSNA Radiology Playbook, and LOINC/IEEE Medical Device Code Mapping Table are copyright 2004-2024 Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee, and are available at no cost under the license at http://loinc.org/terms-of-use.

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. “HL7” is the registered trademark of Health Level Seven International.

Percentage of patients 18 years of age and older with heart failure who completed initial and follow-up patient-reported functional status assessments

Metadata
Title Functional Status Assessments for Heart FailureFHIR
Version 1.0.000
Short Name CMS90FHIR
GUID (Version Independent) urn:uuid:54792d38-7ad9-459c-b209-91b8915ab7ac
GUID (Version Specific) urn:uuid:52a6d08e-18d6-4563-b69c-aed2f46d4ef4
CMS Identifier 90FHIR
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 18 years of age and older with heart failure who completed initial and follow-up patient-reported functional status assessments

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) codes, descriptions and other data are copyright 2024. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. Fee schedules, relative value units, conversion factors and/or related components are not assigned by the AMA, are not part of CPT, and the AMA is not recommending their use. The AMA does not directly or indirectly practice medicine or dispense medical services. The AMA assumes no liability for data contained or not contained herein. Applicable FARS/DFARS restrictions apply to government use.

The American Dental Association ("ADA") holds a copyright to the Current Dental Terminology ("CDT") codes contained in certain measure specifications. The CDT codes in the measure specifications are included with the permission of the ADA. All uses of the CDT codes require a license from the ADA. No alteration, amendments, or modifications of the CDT or any portion thereof is allowed. Resale, transmission, or distribution of copies of the CDT or other portions of the CDT is also not allowed. To inquire about licensing, contact CDT-SNODENT@ada.org.

The measure specifications contain coding from LOINC(R) (http://loinc.org). The LOINC table, LOINC codes, LOINC panels and form file, LOINC linguistic variants file, LOINC/RSNA Radiology Playbook, and LOINC/IEEE Medical Device Code Mapping Table are copyright 2004-2024 Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee, and are available at no cost under the license at http://loinc.org/terms-of-use.

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. "HL7" is the registered trademark of Health Level Seven International.

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].

Rationale

Patients living with heart failure often have poor functional status and health-related quality of life, which declines as the disease progresses (Allen et al., 2012). In addition, their care is often complicated by multiple comorbidities. To assist in managing these complex patients, the American College of Cardiology Foundation and American Heart Association recommend collecting initial and repeat assessments of a patient's function and ability to complete desired activities of daily living (Hunt et al., 2009). The American Heart Association also released scientific statements emphasizing the collection of patient-reported health status (for example, functional limitations, symptom burden, quality of life) from heart failure patients as an important means of establishing a dynamic conversation between patient and provider regarding care goals and the patient's priorities (Allen et al., 2012; Rumsfeld et al., 2013).

The most recent update to clinical guidelines by the American Heart Association, the American College of Cardiology, and the Heart Failure Society of America further emphasizes that better understanding of symptom burden and prognosis may improve the quality of treatment decisions. The guideline also indicates that routine assessment can facilitate population health management by identifying high-risk patients needing closer monitoring or referral to specialized centers and that patient-reported health status assessment increases the patient's role in care, which can motivate initiation and uptake of medical therapy (Heidenreich et al., 2022).

Clinical Recommendation Statement

The American Heart Association, the American College of Cardiology, and the Heart Failure Society of America (2022): This guideline provides patient-centric recommendations for clinicians to prevent, diagnose, and manage patients with heart failure and specifically recommends assessing patient-reported health status using a validated questionnaire to provide incremental information for patient functional status, symptom burden, and prognosis. Tools specifically recommended in the guideline are as follows:

  • The Kansas City Cardiomyopathy Questionnaire or,

  • The Minnesota Living with Heart Failure Questionnaire

  • PROMIS-Plus-HF [Patient Reported Outcomes Measurement Information System Plus-Heart Failure]

Citation

Allen, L. A., Stevenson, L. W., Grady, K. L., et al. (2012). Decision Making in Advanced Heart Failure: A Scientific Statement from the American Heart Association. Circulation, 125(15), 1928-1952. doi: 10.1161/CIR.0b013e31824f2173

Citation

Heidenreich PA, Bozkurt B, Aguilar D, Allen LA, Byun JJ, Colvin MM, Deswal A, Drazner MH, Dunlay SM, Evers LR, Fang JC, Fedson SE, Fonarow GC, Hayek SS, Hernandez AF, Khazanie P, Kittleson MM, Lee CS, Link MS, Milano CA, Nnacheta LC, Sandhu AT, Stevenson LW, Vardeny O, Vest AR, Yancy CW. 2022 AHA/ACC/HFSA guideline for the management of heart failure: a report of the American College of Cardiology/American Heart Association Joint Committee on Clinical Practice Guidelines. Circulation. 2022;145:e895--e1032. doi: 10.1161/CIR.0000000000001063

Citation

Hunt, S. A., Abraham, W. T., Chin, M. H., et al. (2009). 2009 Focused Update Incorporated into the ACC/AHA 2005 Guidelines for the Diagnosis and Management of Heart Failure in Adults. Circulation, 119(14), e391-e479. doi: 10.1161/CIRCULATIONAHA.109.192065

Citation

Rumsfeld, J. S., Alexander, K. P., Goff, D. C., et al. (2013). Cardiovascular Health: The Importance of Measuring Patient-Reported Health Status: A Scientific Statement from the American Heart Association. Circulation, 127(22), 2233-2249. doi: 10.1161/CIR.0b013e3182949a2e

Guidance (Usage) Initial functional status assessment (FSA) and encounter: The initial FSA is an FSA that occurs within two weeks before or during an encounter, in the 180 days or more before the end of the measurement period. Follow-up FSA: The follow-up FSA must be completed at least 30 days but no more than 180 days after the initial FSA. The same FSA instrument must be used for the initial and follow-up assessment. This eCQM is a patient-based measure. This FHIR-based measure is derived from the QDM-based measure CMS90v15. 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:

Patients 18 years of age and older who had two outpatient encounters during the measurement period and a diagnosis of heart failure that starts any time before and continues into the measurement period

Criteria: Initial Population
Denominator ID: Denominator_1
Description:

Equals Initial Population

Criteria: Denominator
Denominator Exclusion ID: DenominatorExclusion_1
Description:

Exclude patients who are in hospice care or have a hospice care order documented during any part of the measurement period. Exclude patients with severe cognitive impairment in any part of the measurement period.

Criteria: Denominator Exclusions
Numerator ID: Numerator_1
Description:

Patients with patient-reported functional status assessment results (i.e., Veterans RAND 12-item health survey \[VR-12\]; VR-36; Kansas City Cardiomyopathy Questionnaire \[KCCQ\]; KCCQ-12; Minnesota Living with Heart Failure Questionnaire \[MLHFQ\]; Patient-Reported Outcomes Measurement Information System \[PROMIS\]-10 Global Health; PROMIS-29) present in the EHR within two weeks before or during the initial FSA encounter and results for the follow-up FSA at least 30 days but no more than 180 days after the initial FSA

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/CMS90FHIRFSAforHeartFailure
Contents Population Criteria
Logic Definitions
Terminology
Dependencies
Data Requirements
Parameters
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
define "Initial Population":
  AgeInYearsAt(date from start of "Measurement Period") >= 18
    and exists ( ( ( [ConditionProblemsHealthConcerns: "Heart Failure"]
          union [ConditionEncounterDiagnosis: "Heart Failure"]
      ).verified ( ) ) HeartFailure
        where HeartFailure.onset.toInterval ( ) overlaps before day of "Measurement Period"
    )
    and exists ( "Outpatient Encounters with at least one subsequent Outpatient Encounter during Measurement Period" )
Definition
Denominator
define "Denominator":
  "Initial Population"
Definition
Denominator Exclusion
define "Denominator Exclusions":
  Hospice."Has Hospice Services"
    or exists ( ( ( [ConditionProblemsHealthConcerns: "Severe cognitive impairment (finding)"]
          union [ConditionEncounterDiagnosis: "Severe cognitive impairment (finding)"]
      ).verified ( ) ) SevereCognitiveImpairment
        where SevereCognitiveImpairment.onset.toInterval ( ) overlaps day of "Measurement Period"
    )
Definition
Numerator
define "Numerator":
  ( "Has Encounter with Initial and Follow Up PROMIS10 Assessments" )
    or ( "Has Encounter with Initial and Follow Up PROMIS29 Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR12 Oblique Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR12 Orthogonal Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR36 Oblique Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR36 Orthogonal Assessments" )
    or ( "Has Encounter with Initial and Follow Up MLHFQ Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ12 Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ Domain Score Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ Total Score Assessments" )
Definition
Logic Definitions
Logic Definition Library Name: Hospice
define "Has Hospice Services":
  exists ((([USQualityCore.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 ends during day of "Measurement Period"
  )
    or exists ((([USQualityCore.Encounter: "Hospice Encounter"]).isEncounterPerformed()) HospiceEncounter
        where HospiceEncounter.period overlaps day of "Measurement Period"
    )
    // TODO: Shouldn't need to specify a code path here (see https://jira.hl7.org/browse/FHIR-53941)
    or exists ((([USQualityCore.ObservationScreeningAssessment: code ~ "Hospice care [Minimum Data Set]"]).isAssessmentPerformed()) HospiceAssessment
        where HospiceAssessment.value ~ "Yes (qualifier value)"
          and HospiceAssessment.effective.toInterval() overlaps day of "Measurement Period"
    )
    or exists ((([USQualityCore.ServiceRequest: "Hospice Care Ambulatory"]).isInterventionOrder()) HospiceOrder
        where HospiceOrder.authoredOn during day of "Measurement Period"
    )
    or exists ((([USQualityCore.Procedure: "Hospice Care Ambulatory"]).isInterventionPerformed()) HospicePerformed
        where HospicePerformed.performed.toInterval() overlaps day of "Measurement Period"
    )
    // TODO: Consider whether to keep this as the union of Problems and EncounterDiagnosis
    or exists ((([FHIR.Condition: "Hospice Diagnosis"]).verified()) HospiceCareDiagnosis
        where HospiceCareDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"
    )
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: CMS90FHIRFSAforHeartFailure
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Qualifying Encounters":
  ( ( [Encounter: "Office Visit"]
      union [Encounter: "Telephone Visits"]
      union [Encounter: "Virtual Encounter"]
  ).isEncounterPerformed ( ) ) ValidEncounter
    where ValidEncounter.period during day of "Measurement Period"
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date PROMIS10 Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "PROMIS-10 Global Mental Health (GMH) score T-score"] ).isAssessmentPerformed ( ) ) PROMIS10MentalScore,
    ( ( [ObservationScreeningAssessment: "PROMIS-10 Global Physical Health (GPH) score T-score"] ).isAssessmentPerformed ( ) ) PROMIS10PhysicalScore
    let PROMIS10MentalScoreDate: date from start of PROMIS10MentalScore.effective.toInterval ( ),
    PROMIS10PhysicalScoreDate: date from start of PROMIS10PhysicalScore.effective.toInterval ( )
    where PROMIS10MentalScoreDate same day as PROMIS10PhysicalScoreDate
      and ( PROMIS10MentalScore as ObservationScreeningAssessment ).value is not null
      and ( PROMIS10PhysicalScore as ObservationScreeningAssessment ).value is not null
    return PROMIS10MentalScoreDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up PROMIS10 Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date PROMIS10 Total Assessment Completed" InitialPROMIS10Date,
      "Date PROMIS10 Total Assessment Completed" FollowupPROMIS10Date
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialPROMIS10Date 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupPROMIS10Date during day of Interval[date from InitialPROMIS10Date + 30 days, date from InitialPROMIS10Date + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date PROMIS29 Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Sleep disturbance score T-score"] ).isAssessmentPerformed ( ) ) Promis29Sleep,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Satisfaction with participation in social roles score T-score"] ).isAssessmentPerformed ( ) ) Promis29SocialRoles,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Physical function score T-score"] ).isAssessmentPerformed ( ) ) Promis29Physical,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Pain interference score T-score"] ).isAssessmentPerformed ( ) ) Promis29Pain,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Fatigue score T-score"] ).isAssessmentPerformed ( ) ) Promis29Fatigue,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Depression score T-score"] ).isAssessmentPerformed ( ) ) Promis29Depression,
    ( ( [ObservationScreeningAssessment: "PROMIS-29 Anxiety score T-score"] ).isAssessmentPerformed ( ) ) Promis29Anxiety
    let Promis29SleepDate: date from start of Promis29Sleep.effective.toInterval ( ),
    Promis29SocialRolesDate: date from start of Promis29SocialRoles.effective.toInterval ( ),
    Promis29PhysicalDate: date from start of Promis29Physical.effective.toInterval ( ),
    Promis29PainDate: date from start of Promis29Pain.effective.toInterval ( ),
    Promis29FatigueDate: date from start of Promis29Fatigue.effective.toInterval ( ),
    Promis29DepressionDate: date from start of Promis29Depression.effective.toInterval ( ),
    Promis29AnxietyDate: date from start of Promis29Anxiety.effective.toInterval ( )
    where Promis29SleepDate same day as Promis29SocialRolesDate
      and Promis29SocialRoles.value is not null
      and Promis29SleepDate same day as Promis29PhysicalDate
      and Promis29Physical.value is not null
      and Promis29SleepDate same day as Promis29PainDate
      and Promis29Pain.value is not null
      and Promis29SleepDate same day as Promis29FatigueDate
      and Promis29Fatigue.value is not null
      and Promis29SleepDate same day as Promis29DepressionDate
      and Promis29Depression.value is not null
      and Promis29SleepDate same day as Promis29AnxietyDate
      and Promis29Anxiety.value is not null
      and Promis29Sleep.value is not null
    return Promis29SleepDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up PROMIS29 Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date PROMIS29 Total Assessment Completed" InitialPROMIS29Date,
      "Date PROMIS29 Total Assessment Completed" FollowupPROMIS29Date
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialPROMIS29Date 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupPROMIS29Date during day of Interval[date from InitialPROMIS29Date + 30 days, date from InitialPROMIS29Date + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date VR12 Oblique Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "VR-12 Mental component summary (MCS) score - oblique method T-score"] ).isAssessmentPerformed ( ) ) VR12MentalAssessment,
    ( ( [ObservationScreeningAssessment: "VR-12 Physical component summary (PCS) score - oblique method T-score"] ).isAssessmentPerformed ( ) ) VR12PhysicalAssessment
    let VR12MentalAssessmentDate: date from start of VR12MentalAssessment.effective.toInterval ( ),
    VR12PhysicalAssessmentDate: date from start of VR12PhysicalAssessment.effective.toInterval ( )
    where VR12MentalAssessmentDate same day as VR12PhysicalAssessmentDate
      and ( VR12MentalAssessment as ObservationScreeningAssessment ).value is not null
      and ( VR12PhysicalAssessment as ObservationScreeningAssessment ).value is not null
    return VR12MentalAssessmentDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up VR12 Oblique Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date VR12 Oblique Total Assessment Completed" InitialVR12ObliqueDate,
      "Date VR12 Oblique Total Assessment Completed" FollowupVR12ObliqueDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialVR12ObliqueDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupVR12ObliqueDate during day of Interval[date from InitialVR12ObliqueDate + 30 days, date from InitialVR12ObliqueDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date VR12 Orthogonal Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "VR-12 Mental component summary (MCS) score - orthogonal method T-score"] ).isAssessmentPerformed ( ) ) VR12MentalAssessment,
    ( ( [ObservationScreeningAssessment: "VR-12 Physical component summary (PCS) score - orthogonal method T-score"] ).isAssessmentPerformed ( ) ) VR12PhysicalAssessment
    let VR12MentalAssessmentDate: date from start of VR12MentalAssessment.effective.toInterval ( ),
    VR12PhysicalAssessmentDate: date from start of VR12PhysicalAssessment.effective.toInterval ( )
    where VR12MentalAssessmentDate same day as VR12PhysicalAssessmentDate
      and ( VR12MentalAssessment as ObservationScreeningAssessment ).value is not null
      and ( VR12PhysicalAssessment as ObservationScreeningAssessment ).value is not null
    return VR12MentalAssessmentDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up VR12 Orthogonal Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date VR12 Orthogonal Total Assessment Completed" InitialVR12OrthogonalDate,
      "Date VR12 Orthogonal Total Assessment Completed" FollowupVR12OrthogonalDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialVR12OrthogonalDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupVR12OrthogonalDate during day of Interval[date from InitialVR12OrthogonalDate + 30 days, date from InitialVR12OrthogonalDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date VR36 Oblique Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "VR-36 Mental component summary (MCS) score - oblique method T-score"] ).isAssessmentPerformed ( ) ) VR36MentalAssessment,
    ( ( [ObservationScreeningAssessment: "VR-36 Physical component summary (PCS) score - oblique method T-score"] ).isAssessmentPerformed ( ) ) VR36PhysicalAssessment
    let VR36MentalAssessmentDate: date from start of VR36MentalAssessment.effective.toInterval ( ),
    VR36PhysicalAssessmentDate: date from start of VR36PhysicalAssessment.effective.toInterval ( )
    where VR36MentalAssessmentDate same day as VR36PhysicalAssessmentDate
      and ( VR36MentalAssessment as ObservationScreeningAssessment ).value is not null
      and ( VR36PhysicalAssessment as ObservationScreeningAssessment ).value is not null
    return VR36MentalAssessmentDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up VR36 Oblique Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date VR36 Oblique Total Assessment Completed" InitialVR36ObliqueDate,
      "Date VR36 Oblique Total Assessment Completed" FollowupVR36ObliqueDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialVR36ObliqueDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupVR36ObliqueDate during day of Interval[date from InitialVR36ObliqueDate + 30 days, date from InitialVR36ObliqueDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date VR36 Orthogonal Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "VR-36 Mental component summary (MCS) score - orthogonal method T-score"] ).isAssessmentPerformed ( ) ) VR36MentalAssessment,
    ( ( [ObservationScreeningAssessment: "VR-36 Physical component summary (PCS) score - orthogonal method T-score"] ).isAssessmentPerformed ( ) ) VR36PhysicalAssessment
    let VR36MentalAssessmentDate: date from start of VR36MentalAssessment.effective.toInterval ( ),
    VR36PhysicalAssessmentDate: date from start of VR36PhysicalAssessment.effective.toInterval ( )
    where VR36MentalAssessmentDate same day as VR36PhysicalAssessmentDate
      and ( VR36MentalAssessment as ObservationScreeningAssessment ).value is not null
      and ( VR36PhysicalAssessment as ObservationScreeningAssessment ).value is not null
    return VR36MentalAssessmentDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up VR36 Orthogonal Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date VR36 Orthogonal Total Assessment Completed" InitialVR36OrthogonalDate,
      "Date VR36 Orthogonal Total Assessment Completed" FollowupVR36OrthogonalDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialVR36OrthogonalDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupVR36OrthogonalDate during day of Interval[date from InitialVR36OrthogonalDate + 30 days, date from InitialVR36OrthogonalDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date MLHFQ Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "Physical score [MLHFQ]"] ).isAssessmentPerformed ( ) ) MLHFQPhysical,
    ( ( [ObservationScreeningAssessment: "Emotional score [MLHFQ]"] ).isAssessmentPerformed ( ) ) MLHFQEmotional
    let MLHFQPhysicalDate: date from start of MLHFQPhysical.effective.toInterval ( ),
    MLHFQEmotionalDate: date from start of MLHFQEmotional.effective.toInterval ( )
    where MLHFQPhysicalDate same day as MLHFQEmotionalDate
      and ( MLHFQPhysical as ObservationScreeningAssessment ).value is not null
      and ( MLHFQEmotional as ObservationScreeningAssessment ).value is not null
    return MLHFQPhysicalDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up MLHFQ Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date MLHFQ Total Assessment Completed" InitialMLHFQDate,
      "Date MLHFQ Total Assessment Completed" FollowupMLHFQDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialMLHFQDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupMLHFQDate during day of Interval[date from InitialMLHFQDate + 30 days, date from InitialMLHFQDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date KCCQ12 Total Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "Kansas City Cardiomyopathy Questionnaire - 12 item [KCCQ-12]"] ).isAssessmentPerformed ( ) ) KCCQ12Item,
    ( ( [ObservationScreeningAssessment: "Overall summary score [KCCQ-12]"] ).isAssessmentPerformed ( ) ) KCCQ12Summary
    let KCCQ12ItemDate: date from start of KCCQ12Item.effective.toInterval ( ),
    KCCQ12SummaryDate: date from start of KCCQ12Summary.effective.toInterval ( )
    where KCCQ12ItemDate same day as KCCQ12SummaryDate
      and ( KCCQ12Item as ObservationScreeningAssessment ).value is not null
      and ( KCCQ12Summary as ObservationScreeningAssessment ).value is not null
    return KCCQ12ItemDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up KCCQ12 Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date KCCQ12 Total Assessment Completed" InitialKCCQ12Date,
      "Date KCCQ12 Total Assessment Completed" FollowupKCCQ12Date
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialKCCQ12Date 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupKCCQ12Date during day of Interval[date from InitialKCCQ12Date + 30 days, date from InitialKCCQ12Date + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date KCCQ Domain Assessment Completed":
  from
    ( ( [ObservationScreeningAssessment: "Quality of life score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQLifeQuality,
    ( ( [ObservationScreeningAssessment: "Symptom stability score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQSymptomStability,
    ( ( [ObservationScreeningAssessment: "Self-efficacy score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQSelfEfficacy,
    ( ( [ObservationScreeningAssessment: "Total symptom score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQSymptoms,
    ( ( [ObservationScreeningAssessment: "Physical limitation score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQPhysicalLimits,
    ( ( [ObservationScreeningAssessment: "Social limitation score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQSocialLimits
    let KCCQLifeQualityDate: date from start of KCCQLifeQuality.effective.toInterval ( ),
    KCCQSymptomStabilityDate: date from start of KCCQSymptomStability.effective.toInterval ( ),
    KCCQSelfEfficacyDate: date from start of KCCQSelfEfficacy.effective.toInterval ( ),
    KCCQSymptomsDate: date from start of KCCQSymptoms.effective.toInterval ( ),
    KCCQPhysicalLimitsDate: date from start of KCCQPhysicalLimits.effective.toInterval ( ),
    KCCQSocialLimitsDate: date from start of KCCQSocialLimits.effective.toInterval ( )
    where KCCQLifeQualityDate same day as KCCQSymptomStabilityDate
      and ( KCCQSymptomStability as ObservationScreeningAssessment ).value is not null
      and KCCQLifeQualityDate same day as KCCQSelfEfficacyDate
      and ( KCCQSelfEfficacy as ObservationScreeningAssessment ).value is not null
      and KCCQLifeQualityDate same day as KCCQSymptomsDate
      and ( KCCQSymptoms as ObservationScreeningAssessment ).value is not null
      and KCCQLifeQualityDate same day as KCCQPhysicalLimitsDate
      and ( KCCQPhysicalLimits as ObservationScreeningAssessment ).value is not null
      and KCCQLifeQualityDate same day as KCCQSocialLimitsDate
      and ( KCCQSocialLimits as ObservationScreeningAssessment ).value is not null
      and ( KCCQLifeQuality as ObservationScreeningAssessment ).value is not null
    return KCCQLifeQualityDate
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up KCCQ Domain Score Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date KCCQ Domain Assessment Completed" InitialKCCQAssessmentDate,
      "Date KCCQ Domain Assessment Completed" FollowupKCCQAssessmentDate
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialKCCQAssessmentDate 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupKCCQAssessmentDate during day of Interval[date from InitialKCCQAssessmentDate + 30 days, date from InitialKCCQAssessmentDate + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Date KCCQ Total Assessment Completed":
  ( ( [ObservationScreeningAssessment: "Overall summary score [KCCQ]"] ).isAssessmentPerformed ( ) ) KCCQSummaryScore
    where ( KCCQSummaryScore as ObservationScreeningAssessment ).value is not null
    return date from start of KCCQSummaryScore.effective.toInterval ( )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Has Encounter with Initial and Follow Up KCCQ Total Score Assessments":
  exists ( from
      "Qualifying Encounters" ValidEncounters,
      "Date KCCQ Total Assessment Completed" InitialKCCQTotalScore,
      "Date KCCQ Total Assessment Completed" FollowupKCCQTotalScore
      where ValidEncounters.period ends 180 days or more before day of end of "Measurement Period"
        and InitialKCCQTotalScore 14 days or less on or before day of end of ValidEncounters.period
        and date from FollowupKCCQTotalScore during day of Interval[date from InitialKCCQTotalScore + 30 days, date from InitialKCCQTotalScore + 180 days]
      return ValidEncounters
  )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Numerator":
  ( "Has Encounter with Initial and Follow Up PROMIS10 Assessments" )
    or ( "Has Encounter with Initial and Follow Up PROMIS29 Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR12 Oblique Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR12 Orthogonal Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR36 Oblique Assessments" )
    or ( "Has Encounter with Initial and Follow Up VR36 Orthogonal Assessments" )
    or ( "Has Encounter with Initial and Follow Up MLHFQ Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ12 Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ Domain Score Assessments" )
    or ( "Has Encounter with Initial and Follow Up KCCQ Total Score Assessments" )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Outpatient Encounters with at least one subsequent Outpatient Encounter during Measurement Period":
  from
    "Qualifying Encounters" OfficeVisit1
    with "Qualifying Encounters" OfficeVisit2
      such that OfficeVisit2.period starts 1 day or more after day of end of OfficeVisit1.period
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Initial Population":
  AgeInYearsAt(date from start of "Measurement Period") >= 18
    and exists ( ( ( [ConditionProblemsHealthConcerns: "Heart Failure"]
          union [ConditionEncounterDiagnosis: "Heart Failure"]
      ).verified ( ) ) HeartFailure
        where HeartFailure.onset.toInterval ( ) overlaps before day of "Measurement Period"
    )
    and exists ( "Outpatient Encounters with at least one subsequent Outpatient Encounter during Measurement Period" )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Denominator":
  "Initial Population"
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "Denominator Exclusions":
  Hospice."Has Hospice Services"
    or exists ( ( ( [ConditionProblemsHealthConcerns: "Severe cognitive impairment (finding)"]
          union [ConditionEncounterDiagnosis: "Severe cognitive impairment (finding)"]
      ).verified ( ) ) SevereCognitiveImpairment
        where SevereCognitiveImpairment.onset.toInterval ( ) overlaps day of "Measurement Period"
    )
Logic Definition Library Name: CMS90FHIRFSAforHeartFailure
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: Status
//Encounter, Performed
//General usage unless required otherwise by measure intent (e.g., follow-up encounters)
define fluent function isEncounterPerformed(Enc List<FHIR.Encounter>):
  Enc E
    where E.status = 'finished'
Logic Definition Library Name: Status
//Assessment, Performed
define fluent function isAssessmentPerformed(Obs List<ObservationScreeningAssessment>):
  Obs O
    where O.status in { 'final', 'amended', 'corrected' }
Logic Definition Library Name: Status
// TODO: Deprecate because this is now in FHIRCommon
//Condition
/*
@description: Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
@deprecated: Use the USCoreCommon verified function insteada
*/
define fluent function verified(conditions List<Choice<ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis>>):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ "confirmed"
        or C.verificationStatus ~ "unconfirmed"
        or C.verificationStatus ~ "provisional"
        or C.verificationStatus ~ "differential"
      )
Logic Definition Library Name: Status
//Intervention, Order
define fluent function isInterventionOrder(ServiceRequest List<FHIR.ServiceRequest>):
  ServiceRequest S
    where S.status in { 'active', 'completed' }
      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}
Logic Definition Library Name: Status
//Intervention, Performed
define fluent function isInterventionPerformed(Proc List<FHIR.Procedure>):
  Proc P
    where P.status ~ 'completed'
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
define function ToString(value EncounterStatus): 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 ToString(value ObservationStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value dateTime): value.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
/*
@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 ToString(value ServiceRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ServiceRequestIntent): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ProcedureStatus): value.value
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: FHIRCommon
/*
@description: Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function verified(conditions List<FHIR.Condition>):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ "confirmed"
        or C.verificationStatus ~ "unconfirmed"
        or C.verificationStatus ~ "provisional"
        or C.verificationStatus ~ "differential"
      )
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized prevalence period of a given Condition resource.
@comment: Uses the toInterval and toAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
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]
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized Abatement of a given Condition resource.
@comment: @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.

NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define fluent function abatementInterval(condition Condition):
  if condition.abatement is FHIR.dateTime then
    Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
  else if condition.abatement is FHIR.Period then
    FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
  else if condition.abatement 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 if condition.abatement is FHIR.Age then
    Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
      FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
  else if condition.abatement is FHIR.Range then
    Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
      FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
  else if condition.abatement is FHIR.boolean then
    Interval[end of condition.onset.toInterval(), condition.recordedDate)
  else 
    null
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 LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Code System Description: Code system ConditionVerificationStatusCodes
Resource: ConditionVerificationStatus
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-ver-status
Code System Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
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 Telephone Visits
Resource: Telephone Visits
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
Value Set Description: Value set Virtual Encounter
Resource: Virtual Encounter
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089
Value Set Description: Value set Heart Failure
Resource: Heart Failure
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376
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 Encounter Inpatient
Resource: Encounter Inpatient
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Value Set Description: Value set Hospice Encounter
Resource: Hospice Encounter
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
Value Set Description: Value set Hospice Care Ambulatory
Resource: Hospice Care Ambulatory
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
Value Set Description: Value set Hospice Diagnosis
Resource: Hospice Diagnosis
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
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: PROMIS-10 Global Mental Health (GMH) score T-score
Code: 71969-0
System: http://loinc.org
Direct Reference Code Display: PROMIS-10 Global Physical Health (GPH) score T-score
Code: 71971-6
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Sleep disturbance score T-score
Code: 71955-9
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Satisfaction with participation in social roles score T-score
Code: 71957-5
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Physical function score T-score
Code: 71959-1
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Pain interference score T-score
Code: 71961-7
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Fatigue score T-score
Code: 71963-3
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Depression score T-score
Code: 71965-8
System: http://loinc.org
Direct Reference Code Display: PROMIS-29 Anxiety score T-score
Code: 71967-4
System: http://loinc.org
Direct Reference Code Display: VR-12 Mental component summary (MCS) score - oblique method T-score
Code: 72026-8
System: http://loinc.org
Direct Reference Code Display: VR-12 Physical component summary (PCS) score - oblique method T-score
Code: 72025-0
System: http://loinc.org
Direct Reference Code Display: VR-12 Mental component summary (MCS) score - orthogonal method T-score
Code: 72028-4
System: http://loinc.org
Direct Reference Code Display: VR-12 Physical component summary (PCS) score - orthogonal method T-score
Code: 72027-6
System: http://loinc.org
Direct Reference Code Display: VR-36 Mental component summary (MCS) score - oblique method T-score
Code: 71990-6
System: http://loinc.org
Direct Reference Code Display: VR-36 Physical component summary (PCS) score - oblique method T-score
Code: 71989-8
System: http://loinc.org
Direct Reference Code Display: VR-36 Mental component summary (MCS) score - orthogonal method T-score
Code: 72008-6
System: http://loinc.org
Direct Reference Code Display: VR-36 Physical component summary (PCS) score - orthogonal method T-score
Code: 72007-8
System: http://loinc.org
Direct Reference Code Display: Physical score [MLHFQ]
Code: 85618-7
System: http://loinc.org
Direct Reference Code Display: Emotional score [MLHFQ]
Code: 85609-6
System: http://loinc.org
Direct Reference Code Display: Kansas City Cardiomyopathy Questionnaire - 12 item [KCCQ-12]
Code: 86923-0
System: http://loinc.org
Direct Reference Code Display: Overall summary score [KCCQ-12]
Code: 86924-8
System: http://loinc.org
Direct Reference Code Display: Quality of life score [KCCQ]
Code: 72189-4
System: http://loinc.org
Direct Reference Code Display: Symptom stability score [KCCQ]
Code: 72194-4
System: http://loinc.org
Direct Reference Code Display: Self-efficacy score [KCCQ]
Code: 72190-2
System: http://loinc.org
Direct Reference Code Display: Total symptom score [KCCQ]
Code: 72191-0
System: http://loinc.org
Direct Reference Code Display: Physical limitation score [KCCQ]
Code: 72195-1
System: http://loinc.org
Direct Reference Code Display: Social limitation score [KCCQ]
Code: 72196-9
System: http://loinc.org
Direct Reference Code Display: Overall summary score [KCCQ]
Code: 71940-1
System: http://loinc.org
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: Discharge to home for hospice care (procedure)
Code: 428361000124107
System: http://snomed.info/sct
Direct Reference Code Display: Discharge to healthcare facility for hospice care (procedure)
Code: 428371000124100
System: http://snomed.info/sct
Direct Reference Code Display: Yes (qualifier value)
Code: 373066001
System: http://snomed.info/sct
Direct Reference Code Display: Hospice care [Minimum Data Set]
Code: 45755-6
System: http://loinc.org
Direct Reference Code Code: active
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: recurrence
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: relapse
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Display: Severe cognitive impairment (finding)
Code: 702956004
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 Hospice
Resource: Hospice version: 7.1.000
Canonical URL: https://madie.cms.gov/Library/Hospice|7.1.000
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: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Office Visit
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Telephone Visits
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Virtual Encounter
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: birthDate
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 71969-0 (PROMIS-10 Global Mental Health (GMH) score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 71971-6 (PROMIS-10 Global Physical Health (GPH) score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71955-9 (PROMIS-29 Sleep disturbance score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71957-5 (PROMIS-29 Satisfaction with participation in social roles score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71959-1 (PROMIS-29 Physical function score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71961-7 (PROMIS-29 Pain interference score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71963-3 (PROMIS-29 Fatigue score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71965-8 (PROMIS-29 Depression score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, value, status
Code Filter(s):
Path: code
Code(s): LOINC: 71967-4 (PROMIS-29 Anxiety score T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72026-8 (VR-12 Mental component summary (MCS) score - oblique method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72025-0 (VR-12 Physical component summary (PCS) score - oblique method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72028-4 (VR-12 Mental component summary (MCS) score - orthogonal method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72027-6 (VR-12 Physical component summary (PCS) score - orthogonal method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 71990-6 (VR-36 Mental component summary (MCS) score - oblique method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 71989-8 (VR-36 Physical component summary (PCS) score - oblique method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72008-6 (VR-36 Mental component summary (MCS) score - orthogonal method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72007-8 (VR-36 Physical component summary (PCS) score - orthogonal method T-score)
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 85618-7 (Physical score [MLHFQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 85609-6 (Emotional score [MLHFQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 86923-0 (Kansas City Cardiomyopathy Questionnaire - 12 item [KCCQ-12])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 86924-8 (Overall summary score [KCCQ-12])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72189-4 (Quality of life score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72194-4 (Symptom stability score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72190-2 (Self-efficacy score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72191-0 (Total symptom score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72195-1 (Physical limitation score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 72196-9 (Social limitation score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: value, status
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 71940-1 (Overall summary score [KCCQ])
Data Requirement Type: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment
Must Support Elements: code, value, effective, status
Code Filter(s):
Path: code
Code(s): LOINC: 45755-6 (Hospice care [Minimum Data Set])
Path: value
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: Heart Failure
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
Code(s): SNOMED CT: 702956004 (Severe cognitive impairment (finding))
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: Heart Failure
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
Code(s): SNOMED CT: 702956004 (Severe cognitive impairment (finding))
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: Condition
Profile(s): Condition
Must Support Elements: abatement, verificationStatus, onset, recordedDate, clinicalStatus
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: code, verificationStatus
Code Filter(s):
Path: code
ValueSet: Hospice Diagnosis
Data Requirement Type: Encounter
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter
Must Support Elements: type, hospitalization, hospitalization.dischargeDisposition, period
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Data Requirement Type: Encounter
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-encounter
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: Hospice Encounter
Data Requirement Type: ServiceRequest
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicerequest
Must Support Elements: code, authoredOn
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Data Requirement Type: Procedure
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedure
Must Support Elements: code, performed
Code Filter(s):
Path: code
ValueSet: Hospice Care Ambulatory
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
SDE Sex Out 0..1 Coding
Numerator Out 0..1 boolean
Denominator Out 0..1 boolean
SDE Payer Out 0..* Resource
Initial Population Out 0..1 boolean
SDE Ethnicity Out 0..1 Resource
Denominator Exclusions Out 0..1 boolean
SDE Race Out 0..1 Resource
Generated using version 0.5.4 of the sample-content-ig Liquid templates