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: NHSN Glycemic Control Hypoglycemia Initial Population

Official URL: https://madie.cms.gov/Measure/NHSNGlycemicControlHypoglycemiaInitialPopulation Version: 1.1.000
Active as of 2026-01-16 Responsible: Centers for Disease Control and Prevention (CDC) Computable Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
Other Identifiers: Short Name: NHSNHypoglycemia (use: usual, ), UUID:0d555fb6-f654-418c-a2b3-2dd0c3f0e7b4 (use: official, ), UUID:dc9459ed-48ca-45f3-923e-3352d9547461 (use: official, )

Usage:Venue: EH

Copyright/Legal: 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.

All inpatient encounters (including ED/Observation visits that end within 1 hour of the start of the inpatient encounter) for patients of all ages where at least one diabetes medication was ordered or administered during the encounter that is during the measurement period.

The primary objective of the NHSN Glycemic Control module is to measure and benchmark medication-related hypoglycemia and hyperglycemia events within a facility. NHSN uses line-level data on medications and blood glucose reported by facilities to provide analytic reports to inform quality-improvement efforts for glycemic control and track patient safety events. As NHSN collects additional data, an additional objective will be to allow inter-facility benchmarking and evaluate national-level trends of medication-related hypoglycemia over time.

Metadata
Title NHSN Glycemic Control Hypoglycemia Initial Population
Version 1.1.000
Short Name NHSNHypoglycemia
GUID (Version Independent) urn:uuid:0d555fb6-f654-418c-a2b3-2dd0c3f0e7b4
GUID (Version Specific) urn:uuid:dc9459ed-48ca-45f3-923e-3352d9547461
Effective Period 2026-01-01 through 2026-12-31
Use Context Venue = EH
Steward (Publisher) Centers for Disease Control and Prevention (CDC)
Developer Lantana Consulting Group
Description

All inpatient encounters (including ED/Observation visits that end within 1 hour of the start of the inpatient encounter) for patients of all ages where at least one diabetes medication was ordered or administered during the encounter that is during the measurement period.

Purpose

The primary objective of the NHSN Glycemic Control module is to measure and benchmark medication-related hypoglycemia and hyperglycemia events within a facility. NHSN uses line-level data on medications and blood glucose reported by facilities to provide analytic reports to inform quality-improvement efforts for glycemic control and track patient safety events. As NHSN collects additional data, an additional objective will be to allow inter-facility benchmarking and evaluate national-level trends of medication-related hypoglycemia over time.

Copyright

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.

Disclaimer

Disclaimer This performance measure is not a clinical guideline, does not establish a standard of medical care and has not been tested for all potential applications.

THE MEASURES AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.

This measure and specifications are subject to further revisions.

Rationale

The NHSN Glycemic Control module supports an electronic health record (EHR)- and vendor-neutral standard for reporting patient-level, linked medication and blood glucose data for inpatients. These data support calculation of inpatient medication-related hypoglycemia events by the NHSN application, which are then returned as reports to the facility.

Clinical Recommendation Statement

Inpatient hypoglycemia can be severe and life-threatening and is associated with longer hospital stays and increased medical costs (Wexler et al., 2007; Curkendall et al., 2009; Cook et al., 2009; Turchin et al., 2009; Egi et al., 2010). The prevalence of inpatient hypoglycemia varies with patient, hospital unit, timing of episodes, and glycemic threshold. Severe hypoglycemia (<40 mg/dL) occurs in 2%--5% of hospitalized patients with diabetes mellitus (DM), while hypoglycemia <70 mg/dL has been reported in up to 10% of all patients in the intensive care unit (Finfer et al., 2012). Patients with DM comprise more than 25% of all U.S. inpatient stays and medication-related hypoglycemia events are common causes of adverse drug events (ADEs) that occur in inpatient settings (Bates et al., 2023; Spector et al., 2017). Rates of severe hypoglycemia vary across hospitals, suggesting opportunities for improvement in glycemic-control quality of care (Hulkower et al., 2014; ADA, 2013; Cook et al., 2009).

Inpatient hyperglycemia can increase morbidity, prolong hospital stays, and increase the risk of mortality (Maynard et al., 2014; SHM, n.d.; Umpierrez et al., 2002; Kyi et al., 2019; Pratiwi et al., 2021). The prevalence of inpatient hyperglycemia varies depending upon glycemic threshold and setting, but blood glucose >140 mg/dL likely occurs in approximately one-eighth to one-quarter of hospitalized patients (Pratiwi et al., 2021; Seisa et al., 2022; Barmanray et al., 2024). Tracking patient blood-glucose levels and implementing appropriate interventions may reduce complications associated with both hyperglycemia and hypoglycemia (ADA, 2013; Cook et al., 2009; Korytkowski et al., 2022; Moghissi et al., 2009).

Citation

American Diabetes Association. Economic costs of diabetes in the U.S. in 2012. Diabetes Care 2013;36:1033--46.

Citation

Bates, D. W., Levine, D. M., Salmasian, H., et al. (2023). The safety of inpatient health care. New England Journal of Medicine, 388(12), 142--153.

Citation

Classen, D. C., Resar, R., Griffin, F., et al. (2011). 'Global trigger tool' shows that adverse events in hospitals may be ten times greater than previously measured. Health Affairs, 30(4), 581--589.

Citation

Cook, C. B., Kongable, G. L., Potter, D. J., et al. (2009). Inpatient glucose control: A glycemic survey of 126 U.S. hospitals. Journal of Hospital Medicine, 4(E7), E7--E14.

Citation

Curkendall, S. M., Natoli, J. L., Alexander, C. M., et al. (2009). Economic and clinical impact of inpatient diabetic hypoglycemia. Endocrine Practice, 15(3), 302--312.

Citation

Egi, M., Bellomo, R., Stachowski, E., et al. (2010). Hypoglycemia and outcome in critically ill patients. Mayo Clinic Proceedings, 85(3), 217--224.

Citation

Finfer, S., Liu, B., Chittock, D. R., et al. (2012). Hypoglycemia and risk of death in critically ill patients. New England Journal of Medicine, 367, 1108--1118.

Citation

Gates, P. J., Meyerson, S. A., Baysari, M. T., et al. (2018). Preventable adverse drug events among inpatients: A systematic review. Pediatrics, 142, e20180805.

Citation

Hulkower RD, Pollack RM, Zonszein J. Understanding hypoglycemia in hospitalized patients. Diabetes Manag (Lond) 2014;4:165-76.

Citation

Maynard, G., et al. (2014). How sweet is it? The use of benchmarking to optimize inpatient glycemic control. Diabetes Spectrum, 27, 212--217.

Citation

Moghissi ES, Korytkowski MT, DiNardo M. American Association of Clinical Endocrinologists and American Diabetes Association consensus statement on inpatient glycemic control. Endocr Pract 2009;15:353-69.

Citation

Society of Hospital Medicine. Glycemic Control for Hospitalists. Optimizing Care, Preventing Hypoglycemia. Available at: https://www.hospitalmedicine.org/clinical-topics/glycemic-control.

Citation

Spector, W. D., Limcangco, R., Furukawa, M. F., Encinosa, W. E. (2017). The marginal costs of adverse drug events associated with exposures to anticoagulants and hypoglycemic agents during hospitalization. Medical Care, 55(8), 856--863.

Citation

Turchin, A., Matheny, M. E., Shubina, M., et al. (2009). Hypoglycemia and clinical outcomes in patients with diabetes hospitalized in the general ward. Diabetes Care, 32(7), 1153--1157.

Citation

Umpierrez, G. E., Isaacs, S. D., Bazargan, N., et al. (2002). Hyperglycemia: An independent marker of in-hospital mortality in patients with undiagnosed diabetes. Journal of Clinical Endocrinology & Metabolism, 87(3), 978--982.

Citation

Wexler, D. J., et al. (2007). Prevalence of hyper- and hypoglycemia among inpatients with diabetes: A national survey of 44 U.S. hospitals. Diabetes Care, 30(2), 367--369.

Definition Blood glucose: Blood-glucose data refers to data from random, periprandial, or fasting tests; from capillary, serum, plasma, interstitial fluid, or whole-blood sources; using central laboratory device (CLD) or point-of-care (POC) testing. Data from continuous glucose monitoring (CGM) systems can only be captured if they are integrated into the EHR and exposed in the corresponding FHIR resources. Post-glucose administration tests are excluded. Events are based on the day/time the laboratory test was collected (drawn). If day/time collected is not available, the day/time the lab was ordered is used.
Definition Emergency department (ED)/Observation (Obs) encounter: Any patient visit to an ED or observation location. One (1) patient visit equals one (1) encounter. ED/Observation encounters are considered outpatient locations.
Definition Hypoglycemic medication: All currently and previously commercially available oral or injectable hypoglycemic medications in the United States.
Definition Inpatient encounter: Includes all encounters in inpatient locations.
Definition Mild hypoglycemia event: Blood glucose 54.0 mg/dL to 69.9 mg/dL as identified on CLD or prescription POC device with no subsequent repeat test for blood glucose with a result \> 80 mg/dL within 5 minutes of the start of the initial low blood glucose test.
Definition Moderate hypoglycemia event: Blood glucose 40.0 mg/dL to 53.9 mg/dL as identified on CLD or prescription POC device with no subsequent repeat test for blood glucose with a result \> 80 mg/dL within 5 minutes of the start of the initial low blood glucose test.
Definition Severe hypoglycemia event: Blood glucose \< 40.0 mg/dL as identified on CLD or prescription POC device with no subsequent repeat test for blood glucose with a result \> 80 mg/dL within 5 minutes of the start of the initial low blood glucose test.
Guidance (Usage) All participating inpatient facilities reporting data to the NHSN Glycemic Control module must be able to report data electronically in adherence to HL7 FHIR US Core FHIR R4.0.1 data standards and specifications and NHSN instructions for reporting dQMs, including the HL7 NHSN dQM Reporting Implementation Guide (https://build.fhir.org/ig/HL7/nhsn-dqm/).
Measure Group (Rate) (ID: Group_1)
Basis Encounter
Scoring Cohort
Type Process
Initial Population ID: InitialPopulation_1
Description:

All inpatient encounters, as well as ED and OBS encounters that end within 1 hour of the start of the inpatient encounter, for patients of all ages where at least one diabetes medication was ordered or administered during the encounter that is during the measurement period.

Criteria: Initial Population
Supplemental Data Guidance Guidance <p>Supplemental Data</p>
Supplemental Data Elements
Supplemental Data Element ID: sde-encounter-locations
Usage Code: Supplemental Data
Description: SDE Encounter Locations
Logic Definition: SDE Encounter Locations
Supplemental Data Element ID: sde-location
Usage Code: Supplemental Data
Description: SDE Location
Logic Definition: SDE Location
Supplemental Data Element ID: sde-medication
Usage Code: Supplemental Data
Description: SDE Medication
Logic Definition: SDE Medication
Supplemental Data Element ID: sde-blood-glucose-observation
Usage Code: Supplemental Data
Description: SDE Blood Glucose Observation
Logic Definition: SDE Blood Glucose Observation
Supplemental Data Element ID: sde-chief-complaint
Usage Code: Supplemental Data
Description: SDE Chief Complaint
Logic Definition: SDE Chief Complaint
Supplemental Data Element ID: sde-condition
Usage Code: Supplemental Data
Description: SDE Condition
Logic Definition: SDE Condition
Supplemental Data Element ID: sde-coverage
Usage Code: Supplemental Data
Description: SDE Coverage
Logic Definition: SDE Coverage
Supplemental Data Element ID: sde-initial-population-encounters
Usage Code: Supplemental Data
Description: SDE Initial Population Encounters
Logic Definition: SDE Initial Population Encounters
Supplemental Data Element ID: sde-medication-administration
Usage Code: Supplemental Data
Description: SDE Medication Administration
Logic Definition: SDE Medication Administration
Supplemental Data Element ID: sde-medication-request
Usage Code: Supplemental Data
Description: SDE Medication Request
Logic Definition: SDE Medication Request
Supplemental Data Element ID: sde-minimal-patient
Usage Code: Supplemental Data
Description: SDE Minimal Patient
Logic Definition: SDE Minimal Patient
Supplemental Data Element ID: sde-service-request
Usage Code: Supplemental Data
Description: SDE Service Request
Logic Definition: SDE Service Request
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 NHSNGlycemicControlHypoglycemiaInitialPopulation
Contents Population Criteria
Logic Definitions
Terminology
Dependencies
Data Requirements
Parameters
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
// Initial Population


define "Initial Population":
  ( "Inpatient Encounters During Measurement Period"
    union "Encounters with Patient Hospital Locations" ) InpatientEncounters
    with "Antidiabetic Drugs Administered or Ordered" ADD
      such that Coalesce(start of ADD.effective.toInterval(), ADD.authoredOn) during InpatientEncounters."hospitalizationWithObservation" ( )
    where ( InpatientEncounters.status = 'finished'
        or InpatientEncounters.status = 'in-progress'
        or InpatientEncounters.status = 'triaged'
        or InpatientEncounters.status = 'onleave'
        or InpatientEncounters.status = 'entered-in-error'
    )
Definition
Logic Definitions
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: 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: CQMCommon
/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference):
  singleton from (
    [Location] L where reference.references(L)
  )
Logic Definition Library Name: CQMCommon
/*
@description: Returns the medication code for the given MedicationRequest
*/
define fluent function getMedicationCode(request Choice<MedicationAdministration, MedicationRequest>):
  if request.medication is FHIR.CodeableConcept then
  	  request.medication as FHIR.CodeableConcept
  	else
  	  (singleton from ([Medication] M where request.medication.references(M))).code
Logic Definition Library Name: CQMCommon
/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
*/
define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
  TheEncounter Visit
  		let ObsVisit: Last([Encounter: "Observation Services"] LastObs
  				where LastObs.status = 'finished'
            and LastObs.period ends 1 hour or less on or before start of Visit.period
  				sort by end of period
  			),
  			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
  			EDVisit: Last([Encounter: "Emergency Department Visit"] LastED
  				where LastED.status = 'finished'
            and LastED.period ends 1 hour or less on or before VisitStart
  				sort by end of period
  			)
  		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]
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
        }
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }
Logic Definition Library Name: FHIRHelpers
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
define function ToString(value EncounterStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRCommon
/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
  resource.id = Last(Split(reference.reference, '/'))
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 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: 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 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 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: USQualityCoreCommon
/*
@description: Returns the id of the given uri (i.e. everything after the last slash)
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))
Logic Definition Library Name: 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
    }
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: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "Inpatient Encounters During Measurement Period":
  [Encounter: "Encounter Inpatient"] InpatientEncounters
    where InpatientEncounters.period ends during day of "Measurement Period"
      and ( InpatientEncounters.class ~ USQualityCoreCommon."inpatient non-acute"
          or InpatientEncounters.class ~ USQualityCoreCommon."inpatient non-acute"
          or InpatientEncounters.class ~ USQualityCoreCommon."short stay"
          or InpatientEncounters.class ~ USQualityCoreCommon."inpatient acute"
          or InpatientEncounters.class ~ USQualityCoreCommon."inpatient encounter"
      )
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "Encounters with Patient Hospital Locations":
  "Inpatient Encounters During Measurement Period" InpatientEncounter
    where exists ( InpatientEncounter.location HospitalLocation
        where HospitalLocation.location.getLocation ( ).type in "Inpatient, Emergency, and Observation Locations"
          and HospitalLocation.period during day of InpatientEncounter.period
    )
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "MedicationRequests":
  [MedicationRequest]
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "MedicationAdministrations":
  [MedicationAdministration]
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "Antidiabetic Drugs Administered or Ordered":
  ( "MedicationRequests"
    union "MedicationAdministrations" ) MedReqOrAdmin
    where MedReqOrAdmin.getMedicationCode() in "Diabetes Medications"
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
// Initial Population


define "Initial Population":
  ( "Inpatient Encounters During Measurement Period"
    union "Encounters with Patient Hospital Locations" ) InpatientEncounters
    with "Antidiabetic Drugs Administered or Ordered" ADD
      such that Coalesce(start of ADD.effective.toInterval(), ADD.authoredOn) during InpatientEncounters."hospitalizationWithObservation" ( )
    where ( InpatientEncounters.status = 'finished'
        or InpatientEncounters.status = 'in-progress'
        or InpatientEncounters.status = 'triaged'
        or InpatientEncounters.status = 'onleave'
        or InpatientEncounters.status = 'entered-in-error'
    )
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Coverage":
  [Coverage] Coverages
    where exists ( "Initial Population" IP
        where Coverages.period starts before or on day of IP.period
          and end of Coverages.period on or after day of end of IP.period
    )
    return { Coverages.id, Coverages.meta, Coverages.status, Coverages.type, Coverages.policyHolder, Coverages.subscriber, Coverages.subscriberId, Coverages.beneficiary, Coverages.dependent, Coverages.relationship, Coverages.period, Coverages.payor, Coverages.class, Coverages.order, Coverages.network, Coverages.subrogation, Coverages.contract }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Medication Request":
  "MedicationRequests" MedRequests
    where exists ( "Initial Population" InitialPopulation
        where MedRequests.authoredOn during InitialPopulation."hospitalizationWithObservation" ( )
    )
    return { MedRequests.id, MedRequests.meta, MedRequests.status, MedRequests.statusReason, MedRequests.intent, MedRequests.category, MedRequests.priority, MedRequests.doNotPerform, MedRequests.reported, MedRequests.medication, MedRequests.subject, MedRequests.encounter, MedRequests.authoredOn, MedRequests.requester, MedRequests.recorder, MedRequests.reasonCode, MedRequests.reasonReference, MedRequests.instantiatesCanonical, MedRequests.instantiatesUri, MedRequests.courseOfTherapyType, MedRequests.dosageInstruction }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Encounter Locations":
  "Initial Population" IP
    where exists ( IP.location InitialPopulationLocation
        let types: ( InitialPopulationLocation.location ).getLocation ( ).type
        where exists ( types type
            where type in "Inpatient, Emergency, and Observation Locations"
        )
          and InitialPopulationLocation.period during IP.period
    )
    return { IP.id, IP.meta, IP.identifier, IP.status, IP.statusHistory, IP.class, IP.classHistory, IP.type, IP.serviceType, IP.priority, IP.subject, IP.period, IP.length, IP.reasonCode, IP.reasonReference, IP.diagnosis, IP.account, IP.hospitalization, IP.location, IP.partOf }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Medication Administration":
  "MedicationAdministrations" MedAdministrations
    where exists ( "Initial Population" InitialPopulation
        where MedAdministrations.effective.toInterval ( ) overlaps InitialPopulation."hospitalizationWithObservation" ( )
    )
    return { MedAdministrations.id, MedAdministrations.meta, MedAdministrations.instantiates, MedAdministrations.partOf, MedAdministrations.status, MedAdministrations.statusReason, MedAdministrations.category, MedAdministrations.medication, MedAdministrations.subject, MedAdministrations.context, MedAdministrations.supportingInformation, MedAdministrations.effective, MedAdministrations.performer, MedAdministrations.reasonCode, MedAdministrations.reasonReference, MedAdministrations.request, MedAdministrations.device, MedAdministrations.note, MedAdministrations.dosage }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Initial Population Encounters":
  "Initial Population" IP
    return { IP.id, IP.meta, IP.identifier, IP.status, IP.statusHistory, IP.class, IP.classHistory, IP.type, IP.serviceType, IP.priority, IP.subject, IP.period, IP.length, IP.reasonCode, IP.reasonReference, IP.diagnosis, IP.account, IP.hospitalization, IP.location, IP.partOf }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
//Supplemental Data Elements


define "SDE Blood Glucose Observation":
  ( ["LaboratoryResultObservation": "Blood Glucose Laboratory and Point of Care Tests"] GlucoseTest
      where exists ( "Initial Population" InitialPopulation
          where start of GlucoseTest.effective.toInterval ( ) during day of InitialPopulation.period
            or GlucoseTest.issued during day of InitialPopulation.period
      )
      return { GlucoseTest.id, GlucoseTest.extension, GlucoseTest.text, GlucoseTest.referenceRange, GlucoseTest.component, GlucoseTest.basedOn, GlucoseTest.partOf, GlucoseTest.category, GlucoseTest.status, GlucoseTest.subject, GlucoseTest.focus, GlucoseTest.encounter, GlucoseTest.effective, GlucoseTest.issued, GlucoseTest.performer, GlucoseTest.value, GlucoseTest.dataAbsentReason, GlucoseTest.interpretation, GlucoseTest.note, GlucoseTest.bodySite, GlucoseTest.method, GlucoseTest.specimen, GlucoseTest.device, GlucoseTest.hasMember, GlucoseTest.derivedFrom }
  )
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Condition":
  ["ConditionProblemsHealthConcerns"] Diagnosis
    where exists ( "Initial Population" IP
        where Diagnosis.prevalenceInterval ( ) overlaps day of IP.period
    )
    return { Diagnosis.id, Diagnosis.meta, Diagnosis.clinicalStatus, Diagnosis.verificationStatus, Diagnosis.category, Diagnosis.severity, Diagnosis.code, Diagnosis.bodySite, Diagnosis.subject, Diagnosis.encounter.reference.getId(), Diagnosis.onset, Diagnosis.stage, Diagnosis.evidence, Diagnosis.note }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "Get Locations from Initial Population":
  flatten ( "Initial Population" IP
      let locationElements: IP.location
      return locationElements LE
        let locationReference: LE.location
        return ( locationReference.getLocation ( ) )
  )
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Location":
  "Get Locations from Initial Population" Locations
    where exists "Initial Population"
      and Locations is not null
    return { Locations.id, Locations.meta, Locations.extension, Locations.status, Locations.operationalStatus, Locations.name, Locations.alias, Locations.description, Locations.mode, Locations.type, Locations.telecom, Locations.address, Locations.physicalType, Locations.position, Locations.managingOrganization, Locations.partOf, Locations.hoursOfOperation, Locations.availabilityExceptions, Locations.endpoint }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Service Request":
  [ServiceRequest] ServiceRequests
    where exists ( "Initial Population" InitialPopulation
        where ServiceRequests.authoredOn during InitialPopulation.period
    )
    return { ServiceRequests.id, ServiceRequests.meta, ServiceRequests.instantiatesCanonical, ServiceRequests.instantiatesUri, ServiceRequests.basedOn, ServiceRequests.replaces, ServiceRequests.requisition, ServiceRequests.status, ServiceRequests.intent, ServiceRequests.category, ServiceRequests.priority, ServiceRequests.doNotPerform, ServiceRequests.code, ServiceRequests.orderDetail, ServiceRequests.quantity, ServiceRequests.subject, ServiceRequests.encounter, ServiceRequests.occurrence, ServiceRequests.asNeeded, ServiceRequests.authoredOn, ServiceRequests.requester, ServiceRequests.performerType, ServiceRequests.performer, ServiceRequests.locationCode, ServiceRequests.reasonCode, ServiceRequests.reasonReference, ServiceRequests.insurance, ServiceRequests.bodySite, ServiceRequests.note, ServiceRequests.patientInstruction }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Minimal Patient":
  [Patient] MinPt
    where exists "Initial Population"
    return { MinPt.id, MinPt.meta, MinPt.extension, MinPt.identifier, MinPt.active, MinPt.name, MinPt.telecom, MinPt.gender, MinPt.birthDate, MinPt.deceased, MinPt.address, MinPt.maritalStatus, MinPt.multipleBirth, MinPt.photo, MinPt.contact, MinPt.communication, MinPt.generalPractitioner, MinPt.managingOrganization, MinPt.link }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Medication":
  ( "MedicationRequests"
    union "MedicationAdministrations" ) MedReqOrAdmin
    let medication: GetMedication(MedReqOrAdmin.medication as Reference)
    where medication is not null
      and exists ( "Initial Population" IP
          where Coalesce(MedReqOrAdmin.effective.toInterval(), MedReqOrAdmin.authoredOn.toInterval()) overlaps IP."hospitalizationWithObservation" ( )
      )
    return { medication.id, medication.meta, medication.code, medication.status, medication.manufacturer, medication.form, medication.amount, medication.ingredient, medication.batch }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define "SDE Chief Complaint":
  "Initial Population" IP
    where exists ( IP.diagnosis InitialPopulationDiagnosis
        where InitialPopulationDiagnosis.use ~ FHIRCommon."CC"
    )
    return { IP.id, IP.meta, IP.identifier, IP.status, IP.statusHistory, IP.class, IP.classHistory, IP.type, IP.serviceType, IP.priority, IP.subject, IP.period, IP.length, IP.reasonCode, IP.reasonReference, IP.diagnosis, IP.account, IP.hospitalization, IP.location, IP.partOf }
Logic Definition Library Name: NHSNGlycemicControlHypoglycemiaInitialPopulation
define function "GetMedication"(reference Reference):
  singleton from ( [Medication] Medication
      where reference.references ( Medication )
  )
Terminology
Code System Description: Code system ActCode
Resource: ActCode
Canonical URL: http://terminology.hl7.org/CodeSystem/v3-ActCode
Code System Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Code System Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
Code System Description: Code system Diagnosis Role
Resource: Diagnosis Role
Canonical URL: http://terminology.hl7.org/CodeSystem/diagnosis-role
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 Inpatient, Emergency, and Observation Locations
Resource: Inpatient, Emergency, and Observation Locations
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.265
Value Set Description: Value set Diabetes Medications
Resource: Diabetes Medications
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1190.58
Value Set Description: Value set Observation Services
Resource: Observation Services
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Value Set Description: Value set Emergency Department Visit
Resource: Emergency Department Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Value Set Description: Value set Blood Glucose Laboratory and Point of Care Tests
Resource: Blood Glucose Laboratory and Point of Care Tests
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1190.38
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
Direct Reference Code Display: inpatient non-acute
Code: NONAC
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
Direct Reference Code Display: short stay
Code: SS
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
Direct Reference Code Display: inpatient acute
Code: ACUTE
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
Direct Reference Code Display: inpatient encounter
Code: IMP
System: http://terminology.hl7.org/CodeSystem/v3-ActCode
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 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: Chief complaint
Code: CC
System: http://terminology.hl7.org/CodeSystem/diagnosis-role
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 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 USQualityCoreCommon
Resource: US Quality Core Commonversion: null0.1.0-cibuild)
Canonical URL: https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild
Dependency Description: Library CQMCommon
Resource: CQMCommonversion: null5.1.000)
Canonical URL: https://madie.cms.gov/Library/CQMCommon|5.1.000
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 SDE
Resource: SupplementalDataElementsversion: null6.1.000)
Canonical URL: https://madie.cms.gov/Library/SupplementalDataElements|6.1.000
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
Data Requirements
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period, location, id, meta, identifier, statusHistory, class, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, partOf
Code Filter(s):
Path: type
ValueSet: Observation Services
Path: status
Code(s): [not stated]: finished (finished)
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period, location, id, meta, identifier, statusHistory, class, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, partOf
Code Filter(s):
Path: type
ValueSet: Emergency Department Visit
Path: status
Code(s): [not stated]: finished (finished)
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, period, class, status, location, id, meta, identifier, statusHistory, classHistory, serviceType, priority, subject, length, reasonCode, reasonReference, diagnosis, account, hospitalization, partOf
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Data Requirement Type: Resource
Profile(s): Resource
Must Support Elements: id
Data Requirement Type: Location
Profile(s): Location
Must Support Elements: id, meta, extension, status, operationalStatus, name, alias, description, mode, type, telecom, address, physicalType, position, managingOrganization, partOf, hoursOfOperation, availabilityExceptions, endpoint
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: authoredOn, id, meta, status, statusReason, intent, category, priority, doNotPerform, reported, medication, subject, encounter, requester, recorder, reasonCode, reasonReference, instantiatesCanonical, instantiatesUri, courseOfTherapyType, dosageInstruction
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: effective, id, meta, instantiates, partOf, status, statusReason, category, medication, subject, context, supportingInformation, performer, reasonCode, reasonReference, request, device, note, dosage
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: code
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: birthDate, id, meta, extension, identifier, active, name, telecom, gender, deceased, address, maritalStatus, multipleBirth, photo, contact, communication, generalPractitioner, managingOrganization, link
Data Requirement Type: Coverage
Profile(s): Coverage
Must Support Elements: period, id, meta, status, type, policyHolder, subscriber, subscriberId, beneficiary, dependent, relationship, payor, class, order, network, subrogation, contract
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: Observation
Profile(s): http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab
Must Support Elements: code, effective, issued, id, extension, text, referenceRange, component, basedOn, partOf, category, status, subject, focus, encounter, performer, value, dataAbsentReason, interpretation, note, bodySite, method, specimen, device, hasMember, derivedFrom
Code Filter(s):
Path: code
ValueSet: Blood Glucose Laboratory and Point of Care Tests
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: abatement, onset, recordedDate, clinicalStatus
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: id, meta, clinicalStatus, verificationStatus, category, severity, code, bodySite, subject, encounter, encounter.reference, onset, stage, evidence, note
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: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: authoredOn, id, meta, instantiatesCanonical, instantiatesUri, basedOn, replaces, requisition, status, intent, category, priority, doNotPerform, code, orderDetail, quantity, subject, encounter, occurrence, asNeeded, requester, performerType, performer, locationCode, reasonCode, reasonReference, insurance, bodySite, note, patientInstruction
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
SDE Coverage Out 0..* Resource
SDE Medication Request Out 0..* Resource
SDE Encounter Locations Out 0..* Resource
SDE Race Out 0..1 Resource
SDE Medication Administration Out 0..* Resource
SDE Sex Out 0..1 Coding
SDE Initial Population Encounters Out 0..* Resource
SDE Blood Glucose Observation Out 0..* Resource
SDE Condition Out 0..* Resource
SDE Payer Out 0..* Resource
Initial Population Out 0..* Encounter
SDE Ethnicity Out 0..1 Resource
SDE Location Out 0..* Resource
SDE Service Request Out 0..* Resource
SDE Minimal Patient Out 0..* Resource
SDE Medication Out 0..* Resource
SDE Chief Complaint Out 0..* Resource
Generated using version 0.5.4 of the sample-content-ig Liquid templates