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

: Z.Functions - TTL Representation

Active as of 2023-10-04

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:Library ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "zfunctions"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<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/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>dob</td><td>in</td><td/><td/><td>date</td></tr><tr><td>dob</td><td>in</td><td/><td/><td>date</td></tr><tr><td>sex</td><td>in</td><td/><td/><td>string</td></tr><tr><td>height</td><td>in</td><td/><td/><td>decimal</td></tr><tr><td>length</td><td>in</td><td/><td/><td>decimal</td></tr><tr><td>weight</td><td>in</td><td/><td/><td>decimal</td></tr><tr><td>zscore</td><td>in</td><td/><td/><td>decimal</td></tr><tr><td>WAZ</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WLZ</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WHZ</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WA</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WL</td><td>out</td><td/><td/><td>decimal</td></tr><tr><td>WH</td><td>out</td><td/><td/><td>decimal</td></tr></table><h2>Contents</h2><p><code>text/cql</code></p><pre><code class=\"language-sql\">/*\n@author: Patrick Delcroix\n@description: This library is part of the project EmCare\n*/\nlibrary zfunctions version '1.0.313+build.456'\nusing FHIR version '4.0.1'\ninclude FHIRHelpers version '4.0.1' called FHIRHelpers \ninclude WeightForAge version '1.0.4' called wfa\ninclude WeightForLength version '1.0.4' called wfl\ninclude WeightForHeight version '1.0.4' called wfh\n\nparameter &quot;sex&quot; String\nparameter &quot;dob&quot; Date\nparameter &quot;ageindays&quot; Date\nparameter &quot;height&quot; Decimal\nparameter &quot;length&quot; Decimal\nparameter &quot;weight&quot; Decimal\nparameter &quot;zscore&quot; Decimal\n\ncontext Patient\n\ndefine &quot;AgeInDays&quot;:\n    case\n        when Patient is not null then AgeInDays()\n        when  &quot;dob&quot; is not null then (difference in days between &quot;dob&quot; and Today())\n        else &quot;ageindays&quot;\n    end\n\ndefine &quot;Sex&quot;:\n    case\n        when Patient is not null then Patient.gender.value\n        else &quot;sex&quot;\n    end\n\ndefine &quot;WAZ&quot;:\n    wfa.generateZScoreWeightForAge(&quot;Sex&quot;, &quot;AgeInDays&quot; , &quot;weight&quot;)\n\ndefine &quot;WA&quot;:\n    wfa.generateWeightFromAge(&quot;Sex&quot;, &quot;AgeInDays&quot; , &quot;zscore&quot;) \n\ndefine &quot;WLZ&quot;:\n    wfl.generateZScoreWeightForLength(&quot;Sex&quot;, &quot;length&quot; , &quot;weight&quot;)\n\ndefine &quot;WL&quot;:\n    wfl.generateWeightFromLength(&quot;Sex&quot;, &quot;length&quot; , &quot;zscore&quot;)\n\ndefine &quot;WHZ&quot;:\n    wfh.generateZScoreWeightForHeight(&quot;Sex&quot;, &quot;height&quot; , &quot;weight&quot;)\n\ndefine &quot;WH&quot;:\n    wfh.generateWeightFromHeight(&quot;Sex&quot;, &quot;height&quot; , &quot;zscore&quot;)</code></pre></div>"
  ] ; # 
  fhir:url [ fhir:v "https://fhir.dk.swisstph-mis.ch/matchbox/fhir//Library/zfunctions"^^xsd:anyURI] ; # 
  fhir:identifier ( [
fhir:use [ fhir:v "official" ] ;
fhir:value [ fhir:v "Zfunctions" ]
  ] ) ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "zfunctions"] ; # 
  fhir:title [ fhir:v "Z.Functions"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:type [
    ( fhir:coding [
fhir:system [ fhir:v "http://hl7.org/fhir/ValueSet/library-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "logic-library" ]     ] )
  ] ; # 
  fhir:date [ fhir:v "2023-10-04T12:32:21+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "WHO"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "WHO" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://who.int" ]     ] )
  ] ) ; # 
  fhir:relatedArtifact ( [
fhir:type [ fhir:v "depends-on" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/who/anc-cds/Library/FHIRHelpers"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/who/anc-cds/Library/FHIRHelpers>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:resource [
fhir:v "https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforage"^^xsd:anyURI ;
fhir:link <https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforage>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:resource [
fhir:v "https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/anthrobase"^^xsd:anyURI ;
fhir:link <https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/anthrobase>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:resource [
fhir:v "https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforlength"^^xsd:anyURI ;
fhir:link <https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforlength>     ]
  ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:resource [
fhir:v "https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforheight"^^xsd:anyURI ;
fhir:link <https://fhir.dk.swisstph-mis.ch/matchbox/fhir/Library/weightforheight>     ]
  ] ) ; # 
  fhir:parameter ( [
fhir:name [ fhir:v "dob" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "date" ]
  ] [
fhir:name [ fhir:v "dob" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "date" ]
  ] [
fhir:name [ fhir:v "sex" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "string" ]
  ] [
fhir:name [ fhir:v "height" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "length" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "weight" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "zscore" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WAZ" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WLZ" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WHZ" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WA" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WL" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] [
fhir:name [ fhir:v "WH" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:type [ fhir:v "decimal" ]
  ] ) ; # 
  fhir:content ( [
fhir:id [ fhir:v "ig-loader-zfunctions.cql" ] ;
fhir:contentType [ fhir:v "text/cql" ] ;
fhir:data [ fhir:v "LyoKQGF1dGhvcjogUGF0cmljayBEZWxjcm9peApAZGVzY3JpcHRpb246IFRoaXMgbGlicmFyeSBpcyBwYXJ0IG9mIHRoZSBwcm9qZWN0IEVtQ2FyZQoqLwpsaWJyYXJ5IHpmdW5jdGlvbnMgdmVyc2lvbiAnMS4wLjMxMytidWlsZC40NTYnCnVzaW5nIEZISVIgdmVyc2lvbiAnNC4wLjEnCmluY2x1ZGUgRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnIGNhbGxlZCBGSElSSGVscGVycyAKaW5jbHVkZSBXZWlnaHRGb3JBZ2UgdmVyc2lvbiAnMS4wLjQnIGNhbGxlZCB3ZmEKaW5jbHVkZSBXZWlnaHRGb3JMZW5ndGggdmVyc2lvbiAnMS4wLjQnIGNhbGxlZCB3ZmwKaW5jbHVkZSBXZWlnaHRGb3JIZWlnaHQgdmVyc2lvbiAnMS4wLjQnIGNhbGxlZCB3ZmgKCnBhcmFtZXRlciAic2V4IiBTdHJpbmcKcGFyYW1ldGVyICJkb2IiIERhdGUKcGFyYW1ldGVyICJhZ2VpbmRheXMiIERhdGUKcGFyYW1ldGVyICJoZWlnaHQiIERlY2ltYWwKcGFyYW1ldGVyICJsZW5ndGgiIERlY2ltYWwKcGFyYW1ldGVyICJ3ZWlnaHQiIERlY2ltYWwKcGFyYW1ldGVyICJ6c2NvcmUiIERlY2ltYWwKCmNvbnRleHQgUGF0aWVudAoKZGVmaW5lICJBZ2VJbkRheXMiOgogICAgY2FzZQogICAgICAgIHdoZW4gUGF0aWVudCBpcyBub3QgbnVsbCB0aGVuIEFnZUluRGF5cygpCiAgICAgICAgd2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