WHO Clinical Care in Crisis Implementation Guide for Children
0.1.0 - ci-build
WHO Clinical Care in Crisis Implementation Guide for Children - Local Development build (v0.1.0). See the Directory of published versions
Official URL: https://fhir.dk.swisstph-mis.ch/matchbox/fhir//Library/zfunctions | Version: 0.1.0 | |||
Active as of 2023-10-04 | Computable Name: zfunctions | |||
Other Identifiers: id: Zfunctions (use: OFFICIAL) |
depends-on | http://fhir.org/guides/who/anc-cds/Library/FHIRHelpers |
depends-on | https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforage |
depends-on | anthrobase |
depends-on | https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforlength |
depends-on | https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforheight |
dob | in | date | ||
dob | in | date | ||
sex | in | string | ||
height | in | decimal | ||
length | in | decimal | ||
weight | in | decimal | ||
zscore | in | decimal | ||
WAZ | out | decimal | ||
WLZ | out | decimal | ||
WHZ | out | decimal | ||
WA | out | decimal | ||
WL | out | decimal | ||
WH | out | decimal |
text/cql
/*
@author: Patrick Delcroix
@description: This library is part of the project EmCare
*/
library zfunctions version '1.0.313+build.456'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include WeightForAge version '1.0.4' called wfa
include WeightForLength version '1.0.4' called wfl
include WeightForHeight version '1.0.4' called wfh
parameter "sex" String
parameter "dob" Date
parameter "ageindays" Date
parameter "height" Decimal
parameter "length" Decimal
parameter "weight" Decimal
parameter "zscore" Decimal
context Patient
define "AgeInDays":
case
when Patient is not null then AgeInDays()
when "dob" is not null then (difference in days between "dob" and Today())
else "ageindays"
end
define "Sex":
case
when Patient is not null then Patient.gender.value
else "sex"
end
define "WAZ":
wfa.generateZScoreWeightForAge("Sex", "AgeInDays" , "weight")
define "WA":
wfa.generateWeightFromAge("Sex", "AgeInDays" , "zscore")
define "WLZ":
wfl.generateZScoreWeightForLength("Sex", "length" , "weight")
define "WL":
wfl.generateWeightFromLength("Sex", "length" , "zscore")
define "WHZ":
wfh.generateZScoreWeightForHeight("Sex", "height" , "weight")
define "WH":
wfh.generateWeightFromHeight("Sex", "height" , "zscore")