Starter FHIR Implementation Guide
1.0.1 - draft International flag

Starter FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/Starter-FHIR-IG/ and changes regularly. See the Directory of published versions

Library: CQL - Local Common (Experimental)

Official URL: http://jembi.org/fhir/Library/LocalCommon Version: 1.0.1
Active as of 2024-12-11 Computable Name: LocalCommon

Common functions for all CQL calculations.

Title: CQL - Local Common
Id: LocalCommon
Version: 1.0.1
Url: CQL - Local Common
Experimental: true
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2024-12-11 06:22:36+0000
Publisher: Jembi Health Systems
Description:

Common functions for all CQL calculations.

Jurisdiction: 001
Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
Content: text/cql
library LocalCommon version '1.0.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'
//include fhir.cqf.common.FHIRCommon version '4.0.1'

context Patient

define function MostRecent(observations List<Observation>):
  Last(observations O
      sort by effective.value
  )

define function MostRecent(encounters List<Encounter>):
  Last(encounters O
      sort by period.start
  )

define function ObservationDate(observation FHIR.Observation):
  observation O
    return O.effective.value
Content: application/elm+xml
Encoded data (13784 characters)
Content: application/elm+json
Encoded data (23380 characters)