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

: CHE.Z.Score - XML Representation

Active as of 2023-10-04

Raw xml | Download



<Library xmlns="http://hl7.org/fhir">
  <id value="chezscore"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><h2>Related Artifacts</h2><table class="grid"><tr><td>depends-on</td><td><code>http://fhir.org/guides/who/anc-cds/Library/FHIRHelpers</code></td></tr><tr><td>depends-on</td><td><code>https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/chebase</code></td></tr><tr><td>depends-on</td><td><code>https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforage</code></td></tr><tr><td>depends-on</td><td><a href="Library-anthrobase.html">anthrobase</a></td></tr><tr><td>depends-on</td><td><code>https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforlength</code></td></tr><tr><td>depends-on</td><td><code>https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforheight</code></td></tr></table><h2>Parameters</h2><table class="grid"><tr><td>encounter</td><td>in</td><td/><td/><td>Encounter</td></tr><tr><td>pastweight</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>patientsex</td><td>out</td><td/><td/><td>string</td></tr><tr><td>ageatpastweight</td><td>out</td><td/><td/><td>integer</td></tr><tr><td>pastweightzscore</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>pastweightactualised</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WAZ</td><td>out</td><td/><td/><td>decimal</td></tr></table><h2>Data Requirements</h2><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/patient.html">Patient</a> (<a href="http://hl7.org/fhir/R4/patient.html">Patient</a>)</td></tr></table><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a> (<a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>)</td></tr></table><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/observation.html">Observation</a> (<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>)</td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>code</td><td>One of these codes: [not stated] CHE.B6.DE06: CHE.B6.DE06</td></tr></table><h2>Contents</h2><p><code>text/cql</code></p><pre><code class="language-sql">/*
@author: Patrick Delcroix
@description: This library is part of the project CHE
*/
library chezscore version '1.0.313+build.456'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers 
include chebase version '1.0.313+build.456' called Base
include WeightForAge version '1.0.4' called wfa
include WeightForLength version '1.0.4' called wfl
include WeightForHeight version '1.0.4' called wfh



//codesystem &quot;CHE&quot; : 'https://fhir.dk.swisstph-mis.ch/matchbox/fhir/CodeSystem/che-custom-codes'



//code &quot;Weight&quot;: 'CHE.B6.DE06' from &quot;CHE&quot; display 'Weight'
//code &quot;Estimated Weight&quot;: 'CHE.B6.DE08' from &quot;CHE&quot; display 'Estimated Weight'
//code &quot;MUAC&quot;: 'CHE.B6.DE17' from &quot;CHE&quot; display 'MUAC'
//code &quot;Length&quot;: 'CHE.B6.DE12' from &quot;CHE&quot; display 'Length'
//code &quot;Height&quot;: 'CHE.B6.DE09' from &quot;CHE&quot; display 'Height'

parameter &quot;encounterid&quot; String

context Patient

define &quot;Weight&quot;:
  Base.coding('CHE.B6.DE06')
define &quot;Estimated Weight&quot;:
  Base.coding('CHE.B6.DE08')
define &quot;MUAC&quot;:
  Base.coding('CHE.B6.DE17')
define &quot;Length&quot;:
  Base.coding('CHE.B6.DE12')
define &quot;Height&quot;:
  Base.coding('CHE.B6.DE09')
define &quot;Visually assess&quot;:
  Base.coding('CHE.B6.DE18')
define &quot;Underweight&quot;:
  Base.coding('CHE.B6.DE20') 
define &quot;Severely Underweight&quot;:
  Base.coding('CHE.B6.DE21') 

/* pastweight : Previous Weight*/
define &quot;pastweightobs&quot;:
    if AgeInMonths()&lt; 4  then
      Base.GetHistoricObservation(&quot;Weight&quot;, 60)
    else if AgeInMonths()&lt; 6  then
      Base.GetHistoricObservation(&quot;Weight&quot;, 91)
    else if AgeInMonths()&lt; 12  then
      Base.GetHistoricObservation(&quot;Weight&quot;, 121)
    else 
      Base.GetHistoricObservation(&quot;Weight&quot;, 180)

define &quot;pastweight&quot;:
    if &quot;pastweightobs&quot; is not null then
      &quot;pastweightobs&quot;.value
    else null

/* patientsex : Patient sex*/
define &quot;patientsex&quot;:
    if Patient.gender = 'female' then 'female' else 'male'

/* ageatpastweight : Age at Previous Weight*/
define &quot;ageatpastweight&quot;:
    if &quot;pastweight&quot; is not null  then
        (difference in days between Patient.birthDate and ToDate(pastweightobs.issued)) * ( 1.0 as System.Decimal )
    else
     null

/* pastweightzscore : Z-Score at Previous Weight*/
define &quot;pastweightzscore&quot;:
    if &quot;pastweight&quot; is not null  then
      wfa.generateZScoreWeightForAge(&quot;patientsex&quot;, &quot;ageatpastweight&quot; , (&quot;pastweight&quot;.value * ( 1.0 as System.Decimal)))
    else
      null

/* pastweightactualised : Weight from  at Previous Weight*/
define &quot;pastweightactualised&quot;:
    if &quot;pastweightzscore&quot; is not null then
      System.Quantity { value: Round(wfa.generateWeightFromAge(&quot;patientsex&quot;,AgeInDays() * ( 1.0 as System.Decimal ),  &quot;pastweightzscore&quot; ),2), unit: 'kg'} 
    else 
       null



define existingweight:
  Base.GetObsValue(&quot;Weight&quot;)

define existingestimnatedweight:
  if existingweight is null then  
    Base.GetObsValue(&quot;Estimated Weight&quot;)
  else 
    null

define existingheight:
  Base.GetObsValue(&quot;Height&quot;)

define existinglength:
  Base.GetObsValue(&quot;Length&quot;)

define existingmuac:
  Base.GetObsValue(&quot;MUAC&quot;)

define existingvisual:
  Base.GetObsValue(&quot;Visually assess&quot;)
//
define zscorefrommuac:
  if existingmuac is null then null
  else if existingmuac &lt; 115 'mnm' then -3.0
  else if existingmuac &lt; 125 'mnm' then -2.0
  else 0.0

define estimatedweight:
  case  
  when existingweight is not null then null
  when existingestimnatedweight is not null then existingestimnatedweight
  when pastweightactualised is not null then pastweightactualised
  when AgeInMonths()&gt;24 and existingheight then weightfromheight
  when AgeInMonths()&lt;=24 and existinglength then weightfromlength
  else weightfromage
  end

define zscorefromvisual:
    if existingvisual is not null then
      case  
        when existingvisual ~ &quot;Severely Underweight&quot; then -3.0
        when existingvisual ~ &quot;Underweight&quot; then -2.0
        else 0.0
      end
    else  null


define weightfromlength:
    System.Quantity { value: Round(wfl.generateWeightFromLength(&quot;patientsex&quot;,(convert existinglength to 'cm').value * ( 1.0 as System.Decimal ), zscorefrommuac),2), unit: 'kg'}

define weightfromheight:
    System.Quantity { value:Round(wfh.generateWeightFromHeight(&quot;patientsex&quot;,(convert existingheight to 'cm').value * ( 1.0 as System.Decimal ), zscorefrommuac),2), unit: 'kg'}

define weightfromage:
    System.Quantity { value:Round(wfa.generateWeightFromAge(&quot;patientsex&quot;,AgeInDays() * ( 1.0 as System.Decimal ), zscorefrommuac),2), unit: 'kg'}
/*
(convert Base.HasObs(&quot;Weight&quot;) to 'Kg') does not work, so let's assume the weight is in Kg
*/
define &quot;WAZ&quot;:
    if existingweight is not null then
         wfa.generateZScoreWeightForAge(&quot;patientsex&quot;, AgeInDays() , (existingweight.value * ( 1.0 as System.Decimal )))
    else if existingmuac is not null then
        zscorefrommuac
    else if existingvisual then
        zscorefromvisual
    else null

define &quot;WLZ&quot;:
    if existingweight is not null then
         wfl.generateZScoreWeightForLength(&quot;patientsex&quot;, (existinglength.value * ( 1.0 as System.Decimal )) ,  (existingweight.value * ( 1.0 as System.Decimal )))
    else if existingmuac is not null then
        zscorefrommuac
    else if existingvisual then
        zscorefromvisual
    else null

define &quot;WHZ&quot;:
    if existingweight is not null then
         wfh.generateZScoreWeightForHeight(&quot;patientsex&quot;, (existingheight.value * ( 1.0 as System.Decimal )) ,  (existingweight.value * ( 1.0 as System.Decimal )))
    else if existingmuac is not null then
        zscorefrommuac
    else if existingvisual then
        zscorefromvisual
    else null
</code></pre></div>
  </text>
  <url
       value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir//Library/chezscore"/>
  <identifier>
    <use value="official"/>
    <value value="CHEZScore"/>
  </identifier>
  <version value="0.1.0"/>
  <name value="chezscore"/>
  <title value="CHE.Z.Score"/>
  <status value="active"/>
  <type>
    <coding>
      <system value="http://hl7.org/fhir/ValueSet/library-type"/>
      <code value="logic-library"/>
    </coding>
  </type>
  <date value="2023-10-04T12:32:21+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource value="http://fhir.org/guides/who/anc-cds/Library/FHIRHelpers"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/chebase"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforage"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/anthrobase"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforlength"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforheight"/>
  </relatedArtifact>
  <parameter>
    <name value="encounter"/>
    <use value="in"/>
    <type value="Encounter"/>
  </parameter>
  <parameter>
    <name value="pastweight"/>
    <use value="out"/>
    <type value="decimal"/>
  </parameter>
  <parameter>
    <name value="patientsex"/>
    <use value="out"/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="ageatpastweight"/>
    <use value="out"/>
    <type value="integer"/>
  </parameter>
  <parameter>
    <name value="pastweightzscore"/>
    <use value="out"/>
    <type value="decimal"/>
  </parameter>
  <parameter>
    <name value="pastweightactualised"/>
    <use value="out"/>
    <type value="decimal"/>
  </parameter>
  <parameter>
    <name value="WAZ"/>
    <use value="out"/>
    <type value="decimal"/>
  </parameter>
  <dataRequirement>
    <type value="Patient"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
  </dataRequirement>
  <dataRequirement>
    <type value="Encounter"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
  </dataRequirement>
  <dataRequirement>
    <type value="Observation"/>
    <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mustSupport value="code"/>
    <mustSupport value="encounter.reference"/>
    <mustSupport value="encounter"/>
    <mustSupport value="value"/>
    <mustSupport value="status"/>
    <codeFilter>
      <path value="code"/>
      <code>
        <code value="CHE.B6.DE06"/>
      </code>
    </codeFilter>
  </dataRequirement>
  <content id="ig-loader-chezscore.cql">
    <contentType value="text/cql"/>
    <data
          value="LyoKQGF1dGhvcjogUGF0cmljayBEZWxjcm9peApAZGVzY3JpcHRpb246IFRoaXMgbGlicmFyeSBpcyBwYXJ0IG9mIHRoZSBwcm9qZWN0IENIRQoqLwpsaWJyYXJ5IGNoZXpzY29yZSB2ZXJzaW9uICcxLjAuMzEzK2J1aWxkLjQ1NicKdXNpbmcgRkhJUiB2ZXJzaW9uICc0LjAuMScKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMScgY2FsbGVkIEZISVJIZWxwZXJzIAppbmNsdWRlIGNoZWJhc2UgdmVyc2lvbiAnMS4wLjMxMytidWlsZC40NTYnIGNhbGxlZCBCYXNlCmluY2x1ZGUgV2VpZ2h0Rm9yQWdlIHZlcnNpb24gJzEuMC40JyBjYWxsZWQgd2ZhCmluY2x1ZGUgV2VpZ2h0Rm9yTGVuZ3RoIHZlcnNpb24gJzEuMC40JyBjYWxsZWQgd2ZsCmluY2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