FHIRHelpers
type: Library
node role: treeRoot
id:
  v: FHIRHelpers
text:
  status:
    v: extensions
  div: Id: FHIRHelpers Version: 1.0.0-ballot Url: FHIRHelpers Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-03-28 21:02:54+0000 Publisher: HL7 International / Patient Care Description: FHIR helper expressions Jurisdiction: US Related Artifacts: Dependencies http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1 Content: text/cql library FHIRHelpers version '4.4.000' using FHIR version '4.0.1' /* @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] /* @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 /* @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 er…
contained: Parameters
  id:
    v: options
  parameter:
    name:
      v: translatorVersion
    value: string
      v: 3.11.0
  parameter:
    name:
      v: option
    value: string
      v: EnableAnnotations
  parameter:
    name:
      v: option
    value: string
      v: EnableLocators
  parameter:
    name:
      v: option
    value: string
      v: DisableListDemotion
  parameter:
    name:
      v: option
    value: string
      v: DisableListPromotion
  parameter:
    name:
      v: format
    value: string
      v: XML
  parameter:
    name:
      v: format
    value: string
      v: JSON
  parameter:
    name:
      v: analyzeDataRequirements
    value: boolean
      v: false
  parameter:
    name:
      v: collapseDataRequirements
    value: boolean
      v: true
  parameter:
    name:
      v: compatibilityLevel
    value: string
      v: 1.5
  parameter:
    name:
      v: enableCqlOnly
    value: boolean
      v: false
  parameter:
    name:
      v: errorLevel
    value: string
      v: Info
  parameter:
    name:
      v: signatureLevel
    value: string
      v: Overloads
  parameter:
    name:
      v: validateUnits
    value: boolean
      v: true
  parameter:
    name:
      v: verifyOnly
    value: boolean
      v: false
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
  value: Reference
    reference:
      v: #options
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
  value: code
    v: pc
url:
  v: http://hl7.org/fhir/us/pco/Library/FHIRHelpers
version:
  v: 1.0.0-ballot
name:
  v: FHIRHelpers
status:
  v: draft
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
    code:
      v: logic-library
date:
  v: 2025-03-28T21:02:54+00:00
publisher:
  v: HL7 International / Patient Care
contact:
  name:
    v: HL7 International / Patient Care
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/patientcare
  telecom:
    system:
      v: email
description:
  v: FHIR helper expressions
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: US
    display:
      v: United States of America
related artifact:
  type:
    v: depends-on
  display:
    v: FHIR model information
  resource:
    v: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
    link: 4.0
    link: .1
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json