CAUTISIRExample
type: Measure
node role: treeRoot
resource.id:
  value: CAUTISIRExample
resource.language:
  value: en
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Metadata Title Example Catheter-Associated Urinary Tract Infection Standardized Infection Ratio (SIR) Version 2.0.0-cibuild Identifier urn:oid:2.16.840.1.113883.4.642.40.61.29.27 Status Draft Experimental true Jurisdiction 001 from http://unstats.un.org/unsd/methods/m49/m49.htm Topic Health Quality Measure Document Steward (Publisher) HL7 International / Clinical Quality Information Description Example measure illustrating an approach to representing the Catheter-Associated Urinary Tract Infection (CAUTI) Standardized Infection Ratio (SIR) measure. See https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/blob/master/Source/Cooking%20With%20CQL/93/CAUTI.md for more detailed discussion of the example. Measure Group (Rate) (ID: group-1) Basis Location Scoring Ratio Initial Population ID: denominator-initial-population Description: No description provided Criteria: Denominator Initial Population Initial Population ID: numerator-initial-population Description: No description provided Criteria: Numerator Initial Population Denominator ID: denominator Description: No description provided Criteria: Denominator Input Population: denominator-initial-population Numerator ID: numerator Description: No description provided Criteria: Numerator Input Population: numerator-initial-population Measure Observation ID: denominator-observation Description: No description provided Criteria: Denominator Observation Input Population: denominator AggregateMethod: sum Measure Observation ID: numerator-observation Description: No description provided Criteria: Numerator Observation Input Population: numerator AggregateMethod: sum Measure Logic Primary Library CAUTI Standardized Infection Ratio (SIR) Contents Population Criteria Logic Definitions Terminology Dependencies Data Requirements Parameters Population Criteria Measure Group (Rate) (ID: group-1) Initial Population define "Denominator Initial Population": [Location] L with Elements."Encounter During Measurement Period" E such th…
domain resource.contained: Library
  index: -1
  resource.id:
    value: effective-data-requirements
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTIElements
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Encounter During Measurement Period
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Encounter During Measurement Period": [Encounter] E where E.period during "Measurement Period"
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTISIR
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Denominator Initial Population
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Denominator Initial Population": [Location] L with Elements."Encounter During Measurement Period" E such that E.location.location.references(L)
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTISIR
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Numerator Initial Population
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Numerator Initial Population": exists (Elements."Encounter During Measurement Period")
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 2
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTISIR
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Numerator
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Numerator": "Numerator Initial Population"
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 3
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTIParameters
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Critical Access Hospital Parameters
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: /* @description: CAUTI Risk Adjustment factors for Critical Access Hospitals @comment: Source: https://www.cdc.gov/nhsn/2022rebaseline/tables/table-10.html */ define "Critical Access Hospital Parameters": List<Tuple { parameter String, parameterEstimate Decimal, standardError Decimal, pValue String }> { // Intercept Tuple { parameter: 'Intercept', parameterEstimate: -7.6495, standardError: 0.1492, pValue: '<0.0001' }, // Average length of stay >= 6.5 days Tuple { parameter: 'Average length of stay >= 6.5', parameterEstimate: 0.4257, standardError: 0.1564, pValue: '0.0065' }, // Average length of stay < 6.5 days Tuple { parameter: 'Average length of stay < 6.5 days', parameterEstimate: 0.0, standardError: 0.0, pValue: 'REFERENT' }, // Proportion of total beds that are ICU < 0.16 Tuple { parameter: 'Proportion of total beds that are ICU < 0.16', parameterEstimate: 0.4189, standardError: 0.1708, pValue: '0.0142' }, // Proportion of total beds that are ICU >= 0.16 Tuple { parameter: 'Proportion of total beds that are ICU >= 0.16', parameterEstimate: 0.0, standardError: 0.0, pValue: 'REFERENT' } }
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 4
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTISIR
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Denominator
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Denominator": "Denominator Initial Population"
    element.extension:
      index: -1
      extension.url:
        value: displaySequence
      extension.value integer:
        value: 5
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  domain resource.extension:
    index: -1
    element.extension:
      index: -1
      extension.url:
        value: libraryName
      extension.value string:
        value: CAUTIElements
    element.extension:
      index: -1
      extension.url:
        value: name
      extension.value string:
        value: Urine Culture With Bacterium
    element.extension:
      index: -1
      extension.url:
        value: statement
      extension.value string:
        value: define "Urine Culture With Bacterium": [Observation: "Urine Culture"] O where O.status = 'final' and exists ( O.component C where C.code in "Bacterium Presence" and C.value >= 10000 '[CFU]/mL' )

index: -1
extension.url:
  value: displaySequence
extension.value integer:
  value: 6

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: UTI
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define "UTI": "Urine Culture With Bacterium" U let DOE: date from start of U.effective.toInterval(), IWP: Interval[DOE - 3 days, DOE + 3 days] where start of U.effective.toInterval() during "Measurement Period" return { urineCultureResult: U, dateOfEvent: DOE, infectionWindowPeriod: IWP }
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 7
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Catheter Inserted Procedure
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define "Catheter Inserted Procedure": [Procedure: "Catheter Inserted"] P where P.status = 'completed'
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 8
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Catheter Removed Procedure
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define "Catheter Removed Procedure": [Procedure: "Catheter Removed"] P where P.status = 'completed'
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 9
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Catheter Usage
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define "Catheter Usage": "Catheter Inserted Procedure" I let catheterRemoved: First( "Catheter Removed Procedure" R where R.performed.toInterval() starts after I.performed.toInterval() sort by start of performed.toInterval() ) return Interval[ date from start of I.performed.toInterval(), date from start of catheterRemoved.performed.toInterval() ]
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 10
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Catheter-Associated UTI
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define "Catheter-Associated UTI": "UTI" U where exists ( "Catheter Usage" Usage where start of Usage before U.dateOfEvent and end of Usage on or after U.dateOfEvent - 1 day and duration in days of Usage > 2 )
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 11
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToInterval
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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]
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 12
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRCommon
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: references
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @description: Returns true if any of the given references are to the given resource @comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references. NOTE: This function assumes resources from the same source server. */ define fluent function references(references List<FHIR.Reference>, resource FHIR.Resource): exists (references R where R.references(resource))
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 13
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRCommon
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: references
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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, '/'))
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 14
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToString
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToString(value string): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 15
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTISIR
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Denominator Observation
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function "Denominator Observation"(location Location): Sum( from (Parameters."Location Parameters"(location)) P, Parameters."Critical Access Hospital Parameters" H where P ~ H.parameter return all H.parameterEstimate ) * Elements."Patient Days"(location)
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 16
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIParameters
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Location Parameters
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @description: Returns the characteristic codes for the given facility */ define function "Location Parameters"(location Location): { 'Intercept', location.averageLengthOfStayParameter(), location.proportionOfBedsICUParameter() }
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 17
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIParameters
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: averageLengthOfStayParameter
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: // These would need to access computed data for these characteristics for the location define fluent function averageLengthOfStayParameter(location Location): 'Average length of stay >= 6.5 days'
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 18
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIParameters
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: proportionOfBedsICUParameter
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define fluent function proportionOfBedsICUParameter(location Location): 'Proportion of total beds that are ICU < 0.16'
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 19
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTIElements
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Patient Days
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function "Patient Days"(location Location): Sum( "Encounter During Measurement Period" E where E.location.location.references(location) return all duration in days of E.period )
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 20
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: CAUTISIR
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: Numerator Observation
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function "Numerator Observation"(): Count(Elements."Catheter-Associated UTI")
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 21
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToString
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToString(value ObservationStatus): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 22
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToConcept
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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 }
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 23
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToCode
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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 }
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 24
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToQuantity
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 25
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToCalendarUnit
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 26
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRCommon
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: toInterval
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: /* @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 dete…
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 27
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToDateTime
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToDateTime(value dateTime): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 28
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToDateTime
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToDateTime(value instant): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 29
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToDate
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToDate(value date): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 30
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

index: -1
element.extension:
  index: -1
  extension.url:
    value: libraryName
  extension.value string:
    value: FHIRHelpers
element.extension:
  index: -1
  extension.url:
    value: name
  extension.value string:
    value: ToString
element.extension:
  index: -1
  extension.url:
    value: statement
  extension.value string:
    value: define function ToString(value ProcedureStatus): value.value
element.extension:
  index: -1
  extension.url:
    value: displaySequence
  extension.value integer:
    value: 31
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition

value: EffectiveDataRequirements

value: active

codeable concept.coding:
  index: -1
  coding.system:
    value: http://terminology.hl7.org/CodeSystem/library-type
  coding.code:
    value: module-definition

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: FHIR model information
related artifact.resource:
  value: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
  link: 4.0
  link: .1

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Library Elements
related artifact.resource:
  value: http://hl7.org/fhir/uv/cqm/Library/CAUTIElements
  link: http://hl7.org/fhir/uv/cqm/Library/CAUTIElements

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Library FHIRHelpers
related artifact.resource:
  value: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
  link: 4.0
  link: .1

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Library FHIRCommon
related artifact.resource:
  value: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
  link: 2.0
  link: .0

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Library Parameters
related artifact.resource:
  value: http://hl7.org/fhir/uv/cqm/Library/CAUTIParameters
  link: http://hl7.org/fhir/uv/cqm/Library/CAUTIParameters

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Value set Urine Culture
related artifact.resource:
  value: http://example.org/ValueSet/urine-culture
  link: http://example.org/ValueSet/urine-culture

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Value set Bacterium Presence
related artifact.resource:
  value: http://example.org/ValueSet/bacterium-presence
  link: http://example.org/ValueSet/bacterium-presence

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Value set Catheter Inserted
related artifact.resource:
  value: http://example.org/ValueSet/catheter-inserted
  link: http://example.org/ValueSet/catheter-inserted

index: -1
related artifact.type:
  value: depends-on
related artifact.display:
  value: Value set Catheter Removed
related artifact.resource:
  value: http://example.org/ValueSet/catheter-removed
  link: http://example.org/ValueSet/catheter-removed

index: -1
parameter definition.name:
  value: Measurement Period
parameter definition.use:
  value: in
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: Period

index: -1
parameter definition.name:
  value: Denominator Initial Population
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: *
parameter definition.type:
  value: Location

index: -1
parameter definition.name:
  value: Numerator
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: -1
parameter definition.name:
  value: Denominator
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: *
parameter definition.type:
  value: Location

index: -1
parameter definition.name:
  value: Numerator Initial Population
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: -1
data requirement.type:
  value: Encounter
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Encounter
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Encounter
data requirement.must support:
  value: period
  index: -1
data requirement.must support:
  value: location
  index: -1

index: -1
data requirement.type:
  value: Location
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Location
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Location

index: -1
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Observation
data requirement.must support:
  value: code
  index: -1
data requirement.must support:
  value: status
  index: -1
data requirement.must support:
  value: component
  index: -1
data requirement.must support:
  value: effective
  index: -1
data requirement.code filter:
  index: -1
  data requirement.code filter.path:
    value: code
  data requirement.code filter.value set:
    value: http://example.org/ValueSet/urine-culture
    link: http://example.org/ValueSet/urine-culture

index: -1
data requirement.type:
  value: Patient
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Patient
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Patient

index: -1
data requirement.type:
  value: Procedure
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Procedure
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Procedure
data requirement.must support:
  value: code
  index: -1
data requirement.must support:
  value: status
  index: -1
data requirement.must support:
  value: performed
  index: -1
data requirement.code filter:
  index: -1
  data requirement.code filter.path:
    value: code
  data requirement.code filter.value set:
    value: http://example.org/ValueSet/catheter-removed
    link: http://example.org/ValueSet/catheter-removed

index: -1
data requirement.type:
  value: Procedure
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Procedure
  index: -1
  link: http://hl7.org/fhir/StructureDefinition/Procedure
data requirement.must support:
  value: code
  index: -1
data requirement.must support:
  value: status
  index: -1
data requirement.must support:
  value: performed
  index: -1
data requirement.code filter:
  index: -1
  data requirement.code filter.path:
    value: code
  data requirement.code filter.value set:
    value: http://example.org/ValueSet/catheter-inserted
    link: http://example.org/ValueSet/catheter-inserted

index: -1
extension.url:
  value: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
extension.value code:
  value: cqi

index: -1
extension.url:
  value: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements
extension.value canonical:
  value: #effective-data-requirements

index: -1
identifier.system:
  value: urn:ietf:rfc:3986
identifier.value:
  value: urn:oid:2.16.840.1.113883.4.642.40.61.29.27

value: 2.0.0-cibuild

value: CAUTISIRExample

value: Example Catheter-Associated Urinary Tract Infection Standardized Infection Ratio (SIR)

value: draft

value: true

value: 2025-08-13

value: HL7 International / Clinical Quality Information

index: -1
contact detail.telecom:
  index: -1
  contact point.system:
    value: url
  contact point.value:
    value: http://www.hl7.org/Special/committees/cqi

value: Example measure illustrating an approach to representing the Catheter-Associated Urinary Tract Infection (CAUTI) Standardized Infection Ratio (SIR) measure. See https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/blob/master/Source/Cooking%20With%20CQL/93/CAUTI.md for more detailed discussion of the example.

index: -1
codeable concept.coding:
  index: -1
  coding.system:
    value: http://unstats.un.org/unsd/methods/m49/m49.htm
  coding.code:
    value: 001

index: -1
codeable concept.coding: http://loinc.org/rdf#57024-2
  index: -1
  coding.system:
    value: http://loinc.org
  coding.code:
    value: 57024-2
  coding.display:
    value: Health Quality Measure Document

value: http://hl7.org/fhir/uv/cqm/Library/CAUTISIR
index: -1
link: http://hl7.org/fhir/uv/cqm/Library/CAUTISIR

index: -1
element.id:
  value: group-1
element.extension:
  index: -1
  extension.url:
    value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.linkId
  extension.value string:
    value: group-1
element.extension:
  index: -1
  extension.url:
    value: http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-populationBasis
  extension.value code:
    value: Location
element.extension:
  index: -1
  extension.url:
    value: http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-scoring
  extension.value codeable concept:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-scoring
      coding.code:
        value: ratio
      coding.display:
        value: Ratio
measure.group.population:
  index: -1
  element.id:
    value: denominator-initial-population
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: denominator-initial-population
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: initial-population
      coding.display:
        value: Initial Population
  measure.group.population.criteria:
    expression.language:
      value: text/cql-identifier
    expression.expression:
      value: Denominator Initial Population
measure.group.population:
  index: -1
  element.id:
    value: denominator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: denominator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference
    extension.value string:
      value: denominator-initial-population
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: denominator
      coding.display:
        value: Denominator
  measure.group.population.criteria:
    expression.language:
      value: text/cql-identifier
    expression.expression:
      value: Denominator
measure.group.population:
  index: -1
  element.id:
    value: denominator-observation
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: denominator-observation
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference
    extension.value string:
      value: denominator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod
    extension.value code:
      value: sum
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: measure-observation
      coding.display:
        value: Measure Observation
  measure.group.population.criteria:
    expression.language:
      value: text/cql-identifier
    expression.expression:
      value: Denominator Observation
measure.group.population:
  index: -1
  element.id:
    value: numerator-initial-population
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: numerator-initial-population
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: initial-population
      coding.display:
        value: Initial Population
  measure.group.population.criteria:
    expression.language:
      value: text/cql-identifier
    expression.expression:
      value: Numerator Initial Population
measure.group.population:
  index: -1
  element.id:
    value: numerator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: numerator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference
    extension.value string:
      value: numerator-initial-population
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: numerator
      coding.display:
        value: Numerator
  measure.group.population.criteria:
    expression.language:
      value: text/cql-identifier
    expression.expression:
      value: Numerator
measure.group.population:
  index: -1
  element.id:
    value: numerator-observation
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/5.0/StructureDefinition/extension-Measure.group.population.linkId
    extension.value string:
      value: numerator-observation
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/cqf-criteriaReference
    extension.value string:
      value: numerator
  element.extension:
    index: -1
    extension.url:
      value: http://hl7.org/fhir/uv/cqm/StructureDefinition/cqm-aggregateMethod
    extension.value code:
      value: sum
  measure.group.population.code:
    codeable concept.coding:
      index: -1
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/measure-population
      coding.code:
        value: measure-observation
      coding.display:
        value: Measure Observation

expression.language:
  value: text/cql-identifier
expression.expression:
  value: Numerator Observation