FHIR Clinical Guidelines (v1.0.0) (STU1)

This page is part of the Clinical Guidelines (v1.0.0: STU 1) based on FHIR R4. This is the current published version. For a full list of available versions, see the Directory of published versions

Library-ANCRecommendationA2

Formats: XML, JSON, Turtle

Related Artifacts

documentationWHO guideline for a positive pregnancy experiencehttps://www.who.int/reproductivehealth/publications/maternal_perinatal_health/anc-positive-pregnancy-experience/en/
depends-onWHO Antenatal Care Guidelines Common Logic

Contents

application/cql

library ANC_Recommendation_A2 version '0.0.0'

using FHIR version '3.0.0'

include FHIRHelpers version '3.0.0'

codesystem OpenMRSEntity: 'http://openmrs.org/concepts'

code LMP: '1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' from OpenMRSEntity display 'Date of last menstrual period'
code UltrasoundGA: '165220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' from OpenMRSEntity display 'Gestational age in weeks from ultrasound'
code FundalHeight: '1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' from OpenMRSEntity display 'FUNDAL HEIGHT'
code "Weeks of gestational age": '1438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' from OpenMRSEntity display 'Weeks of gestational age'
code "Hb": 'TBD' from OpenMRSEntity display 'Hb' 

context Patient

/*
IAF - Iron and Folic Acid Supplements

RECOMMENDATION A.2.1: Daily oral iron and folic acid supplementation with 30 mg to
60 mg of elemental iron and 400 μg (0.4 mg) folic acid is recommended for pregnant
women to prevent maternal anaemia, puerperal sepsis, low birth weight, and preterm birth. 
(Recommended)

RECOMMENDATION A.2.2: Intermittent oral iron and folic acid supplementation with 120 mg
of elemental iron and 2800 μg (2.8 mg) of folic acid once weekly is recommended for pregnant
women to improve maternal and neonatal outcomes if daily iron is not acceptable due to sideeffects,
and in populations with an anaemia prevalence among pregnant women of less than
20%. (Context-specific recommendation)

On every contact,
  if anaemia detected
    recommend 120 mg of elemental iron daily (Recommendation A.2.1)
  else if population anaemia prevalence >= 40%
    recommend 60 mg of elemental iron and 400 ug of folic acid, daily (Recommendation A.2.1)
  else if population anaemia prevalence < 20% or daily iron not acceptable due to side-effects
    recommend intermittent oral iron: 120 mg of oral iron, and 2.8 ug of folic acid, weekly (Recommendation A.2.2)
  else
    recommend 30 to 60 mg of elemental iron and 400 ug of folic acid, daily (Recommendation A.2.1)
  check iron-intake compliance;
  check iron-side effects;
  
Has Anaemia
  Hb Concentration < 11 g/dL and Gestational Age < 12 weeks or Gestational Age > 28 weeks
  Hb Concentration < 10.5 g/dL and Gestational Age between 13 weeks and 27 weeks
*/

define "Has Anaemia":
  if "Gestational Age in Weeks" between 13 weeks and 27 weeks then
    "Hb Concentration" < 10.5 'g/dL'
  else
    "Hb Concentration" < 11 'g/dL'
    
//define GestationalAgeFromLMP:
  // Calculate from LMP if known
  // Observation from Ultrasound
  // Observation from SFH or abdominal palpitation
  // If Gestational Age and Estimated Due Date are calculated from different values, health worker should select gestational age
  
define "Gestational Age in Weeks":
  First(
    ["Observation": "Weeks of gestational age"] O
    sort by (effective as FHIR.dateTime) descending
  ).value as Quantity
  
define "Hb Concentration":
  First(["Observation": "Hb"]).value
  
    

application/elm+xml

<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:qdm43="urn:healthit-gov:qdm:v4_3" xmlns:qdm53="urn:healthit-gov:qdm:v5_3" xmlns:a="urn:hl7-org:cql-annotations:r1">
   <annotation startLine="62" startChar="5" endLine="62" endChar="47" message="Could not resolve membership operator for terminology target of the retrieve." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <annotation startLine="67" startChar="9" endLine="67" endChar="29" message="Could not resolve membership operator for terminology target of the retrieve." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
   <identifier id="ANC_Recommendation_A2" version="0.0.0"/>
   <schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
   <usings>
      <def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
      <def localIdentifier="FHIR" uri="http://hl7.org/fhir" version="3.0.0"/>
   </usings>
   <includes>
      <def localIdentifier="FHIRHelpers" path="FHIRHelpers" version="3.0.0"/>
   </includes>
   <codeSystems>
      <def name="OpenMRSEntity" id="http://openmrs.org/concepts" accessLevel="Public"/>
   </codeSystems>
   <codes>
      <def name="LMP" id="1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" display="Date of last menstrual period" accessLevel="Public">
         <codeSystem name="OpenMRSEntity"/>
      </def>
      <def name="UltrasoundGA" id="165220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" display="Gestational age in weeks from ultrasound" accessLevel="Public">
         <codeSystem name="OpenMRSEntity"/>
      </def>
      <def name="FundalHeight" id="1439AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" display="FUNDAL HEIGHT" accessLevel="Public">
         <codeSystem name="OpenMRSEntity"/>
      </def>
      <def name="Weeks of gestational age" id="1438AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" display="Weeks of gestational age" accessLevel="Public">
         <codeSystem name="OpenMRSEntity"/>
      </def>
      <def name="Hb" id="TBD" display="Hb" accessLevel="Public">
         <codeSystem name="OpenMRSEntity"/>
      </def>
   </codes>
   <statements>
      <def name="Patient" context="Patient">
         <expression xsi:type="SingletonFrom">
            <operand dataType="fhir:Patient" xsi:type="Retrieve"/>
         </expression>
      </def>
      <def name="Gestational Age in Weeks" context="Patient" accessLevel="Public">
         <expression strict="false" xsi:type="As">
            <operand path="value" xsi:type="Property">
               <source xsi:type="First">
                  <source xsi:type="Query">
                     <source alias="O">
                        <expression dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
                           <codes xsi:type="ToList">
                              <operand name="Weeks of gestational age" xsi:type="CodeRef"/>
                           </codes>
                        </expression>
                     </source>
                     <sort>
                        <by direction="asc" xsi:type="ByExpression">
                           <expression strict="false" xsi:type="As">
                              <operand name="effective" xsi:type="IdentifierRef"/>
                              <asTypeSpecifier name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
                           </expression>
                        </by>
                     </sort>
                  </source>
               </source>
            </operand>
            <asTypeSpecifier name="fhir:Quantity" xsi:type="NamedTypeSpecifier"/>
         </expression>
      </def>
      <def name="Hb Concentration" context="Patient" accessLevel="Public">
         <expression path="value" xsi:type="Property">
            <source xsi:type="First">
               <source dataType="fhir:Observation" codeProperty="code" xsi:type="Retrieve">
                  <codes xsi:type="ToList">
                     <operand name="Hb" xsi:type="CodeRef"/>
                  </codes>
               </source>
            </source>
         </expression>
      </def>
      <def name="Has Anaemia" context="Patient" accessLevel="Public">
         <expression xsi:type="If">
            <condition asType="t:Boolean" xsi:type="As">
               <operand xsi:type="And">
                  <operand xsi:type="GreaterOrEqual">
                     <operand name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                        <operand name="Gestational Age in Weeks" xsi:type="ExpressionRef"/>
                     </operand>
                     <operand value="13" unit="weeks" xsi:type="Quantity"/>
                  </operand>
                  <operand xsi:type="LessOrEqual">
                     <operand name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                        <operand name="Gestational Age in Weeks" xsi:type="ExpressionRef"/>
                     </operand>
                     <operand value="27" unit="weeks" xsi:type="Quantity"/>
                  </operand>
               </operand>
            </condition>
            <then xsi:type="Less">
               <operand name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <operand asType="fhir:Quantity" xsi:type="As">
                     <operand name="Hb Concentration" xsi:type="ExpressionRef"/>
                  </operand>
               </operand>
               <operand value="10.5" unit="g/dL" xsi:type="Quantity"/>
            </then>
            <else xsi:type="Less">
               <operand name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
                  <operand asType="fhir:Quantity" xsi:type="As">
                     <operand name="Hb Concentration" xsi:type="ExpressionRef"/>
                  </operand>
               </operand>
               <operand value="11" unit="g/dL" xsi:type="Quantity"/>
            </else>
         </expression>
      </def>
   </statements>
</library>