FHIRHelpers
type: Library
node role: treeRoot
id:
  v: FHIRHelpers
text:
  status:
    v: extensions
  div:
    v: Metadata Version 0.5.3 Status Draft Jurisdiction 001 from http://unstats.un.org/unsd/methods/m49/m49.htm Steward (Publisher) HL7 International - [Some] Work Group Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Parameters Parameter None Library Content CQL Content /*#xD; @author: Bryn Rhodes#xD; @description: This library defines functions to convert between FHIR #xD; data types and CQL system-defined types, as well as functions to support#xD; FHIRPath implementation. For more information, the FHIRHelpers wiki page:#xD; https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers#xD; @allowFluent: true#xD; */#xD; library FHIRHelpers version '4.0.1'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; define function ToInterval(period FHIR.Period):#xD; if period is null then#xD; null#xD; else#xD; if period."start" is null then#xD; Interval(period."start".value, period."end".value]#xD; else#xD; Interval[period."start".value, period."end".value]#xD; #xD; define function ToCalendarUnit(unit System.String):#xD; case unit#xD; when 'ms' then 'millisecond'#xD; when 's' then 'second'#xD; when 'min' then 'minute'#xD; when 'h' then 'hour'#xD; when 'd' then 'day'#xD; when 'wk' then 'week'#xD; when 'mo' then 'month'#xD; when 'a' then 'year'#xD; else unit#xD; end#xD; #xD; define function ToQuantity(quantity FHIR.Quantity):#xD; case#xD; when quantity is null then null#xD; when quantity.value is null then null#xD; when quantity.comparator is not null then#xD; Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')#xD; when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'#xD; or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then#xD; System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }#xD; else#xD; Me…
contained: Parameters
  id:
    v: options
  parameter:
    name:
      v: translatorVersion
    value: String
      v: 3.27.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: JSON
  parameter:
    name:
      v: format
    value: String
      v: XML
  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
    l: cqf-cqlOptions
  value: Reference
    l: options
    reference:
      v: #options
extension:
  url:
    v: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem
    l: cqfm-softwaresystem
  value: Reference
    l: cqf-tooling
    reference:
      v: Device/cqf-tooling
url:
  v: http://hl7.org/fhir/Library/FHIRHelpers
  l: FHIRHelpers
version:
  v: 0.5.3
name:
  v: FHIRHelpers
status:
  v: draft
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
      l: library-type
    code:
      v: logic-library
date:
  v: 2025-12-10T03:14:19+00:00
publisher:
  v: HL7 International - [Some] Work Group
contact:
  telecom:
    system:
      v: url
    value:
      v: http://hl7.org/Special/committees/[something]
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
content:
  content type:
    v: text/cql
  url:
    v: http://somewhere.org/fhir/uv/mycontentig/FHIRHelpers.cql
    l: FHIRHelpers.cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json