WHO Antenatal Care Guideline Implementation Guide
0.3.0 - CI Build International flag

WHO Antenatal Care Guideline Implementation Guide, published by World Health Organization (WHO). This guide is not an authorized publication; it is the continuous build for version 0.3.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-anc/ and changes regularly. See the Directory of published versions

: ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling - XML Representation

Active as of 2025-06-24

Raw xml | Download


<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="ANCDT28"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
<div>
    <table class="grid dict">
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">ANCDT28</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="PlanDefinition-ANCDT28.html">ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling</a></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">0.3.0</td>
        </tr>
        

        
        <tr>
            <th scope="row">
                <b>
                    
                        Official
                    
                </b>
            </th>
            <td style="padding-left: 4px;">
                
                <p style="margin-bottom: 5px;">
                    <span>ANC.DT.28</span>
                </p>
                
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling</td>
        </tr>
        

        

        

        

        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="http://terminology.hl7.org/6.4.0/CodeSystem-plan-definition-type.html">http://terminology.hl7.org/CodeSystem/plan-definition-type</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>eca-rule</span>
                        </p>
                        
                        
                    
                
                
            </td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2025-06-24 13:58:48-0600</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">World Health Organization (WHO)</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Description: </b></th>
            <td style="padding-left: 4px;"><div><p>If the woman has risk factors for developing gestational diabetes mellitus (GDM), provide counselling to reduce risk of developing GDM</p>
</div></td>
        </tr>
        

        

        

        
        <tr>
            <th scope="row"><b>Use Context: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    <tr>
                        <th><b>code</b></th>
                        <th><b>value</b></th>
                    </tr>
                    
                        <tr>
                            <td>task</td>
                            <td/>
                        </tr>
                    
                </table>
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Jurisdiction: </b></th>
            <td style="padding-left: 4px;">001</td>
        </tr>
        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Libraries: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    
                    <tr>
                        <td><a href="Library-ANCDT28.html">ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling</a></td>
                    </tr>
                    
                </table>
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Actions: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    
                    <tr>
                        <td>
                            
                            <b> ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling:</b> 
                            
                            <br/>
                            
                            <b>When:</b>
                            
                            <i>Named Event:</i> ANC.B9. Conduct laboratory tests and imaging
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b>
                            <table class="grid-dict">
                                
                                <tr>
                                    <td>
                                        
                                        The woman is considered at risk for GDM if she has any of the following risk factors: 
– BMI of 30 kg/m2 or more
– Previous GDM
– Previous macrosomia 
– Glycosuria on dipstick testing is ++ or above on one occasion OR + on two or more occasions

Please provide appropriate counseling for GDM risk mitigation, including: 
– Reasserting dietary interventions
– Reasserting physical activity during pregnancy
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        (((((((&quot;BMI&quot; ≥ 30)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Gestational diabetes mellitus&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Macrosomia&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+&quot; ON MORE THAN ONE TEST ACROSS PREGNANCY)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))
                                        
                                        <i>(Should Provide counselling on gestational diabetes mellitus (GDM) risk)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                            </table>
                            
                        </td>
                    </tr>
                    
                </table>
            </td>
        </tr>
        
    </table>
</div>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="http://smart.who.int/anc/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library ContactData"/>
        <resource
                  value="http://smart.who.int/anc/Library/ANCContactDataElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library WC"/>
        <resource value="http://smart.who.int/anc/Library/WHOCommon"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Cx"/>
        <resource value="http://smart.who.int/anc/Library/ANCConcepts"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PatientData"/>
        <resource value="http://smart.who.int/anc/Library/ANCDataElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Gestational diabetes mellitus (GDM) diagnosis"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de169"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Gestational diabetes mellitus (GDM) diagnosis - Negative Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de171"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Diabetes mellitus (DM) during pregnancy diagnosis"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de172"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set BMI"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b8-de4"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Past pregnancy complications"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de34"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Past pregnancy complications - Gestational diabetes mellitus Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de43"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Past pregnancy complications - Macrosomia Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de45"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Urine dipstick result - glucose"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de150"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Urine dipstick result - glucose - 2 plus Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de153"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Urine dipstick result - glucose - 3 plus Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de154"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Urine dipstick result - glucose - 4 plus Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de155"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Urine dipstick result - glucose - 1 plus Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de152"/>
      </relatedArtifact>
      <parameter>
        <name value="encounter"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name
              value="Should Provide counselling on gestational diabetes mellitus (GDM) risk"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b9-de169"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b9-de172"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b8-de4"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b6-de34"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b9-de150"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Gestational diabetes mellitus (GDM) diagnosis"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE169 Gestational diabetes mellitus (GDM) diagnosis
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Whether the woman has gestational diabetes mellitus (GDM)
*/
define &quot;Gestational diabetes mellitus (GDM) diagnosis&quot;:
  WC.Only(
  [Observation: Cx.&quot;Gestational diabetes mellitus (GDM) diagnosis&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.CodeableConcept"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="0"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Diabetes mellitus (DM) during pregnancy diagnosis"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE172 Diabetes mellitus (DM) during pregnancy diagnosis
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Whether the woman has developed diabetes mellitus during pregnancy
*/
define &quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot;:
  WC.Only(
  [Observation: Cx.&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.CodeableConcept"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="1"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="BMI"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B8.DE4 BMI
  @activity: ANC.B8 Physical exam
  @description: Body mass index (BMI): calculated by taking weight in kg divided by the squared height in meters, i.e. kg/(m^2)
*/
define &quot;BMI&quot;:
  WC.Only(
  [Observation: Cx.&quot;BMI&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.Quantity"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="2"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Past pregnancy complications"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE34 Past pregnancy complications
  @activity: ANC.B6 Profile
  @description: Mark whether the woman has had any complications or problems in any previous pregnancy
*/
define &quot;Past pregnancy complications&quot;:
  [Observation: Cx.&quot;Past pregnancy complications&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
    return O.value as FHIR.CodeableConcept"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="3"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Urine dipstick result - glucose"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE150 Urine dipstick result - glucose
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Dipstick test results – glucose
*/
define &quot;Urine dipstick result - glucose&quot;:
  WC.Only(
  [Observation: Cx.&quot;Urine dipstick result - glucose&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.CodeableConcept"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="4"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Urine dipstick result - glucose"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE150 Urine dipstick result - glucose
  @activity: ANC.B9. Conduct laboratory tests and imaging
  @description: Dipstick test results – glucose
*/
define &quot;Urine dipstick result - glucose&quot;:
  [Observation: Cx.&quot;Urine dipstick result - glucose&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="5"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT28"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Should Provide counselling on gestational diabetes mellitus (GDM) risk"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
(((((((&quot;BMI&quot; ≥ 30)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Gestational diabetes mellitus&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Macrosomia&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+&quot; ON MORE THAN ONE TEST ACROSS PREGNANCY)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))
*/
define &quot;Should Provide counselling on gestational diabetes mellitus (GDM) risk&quot;:
  ContactData.&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; in Cx.&quot;Gestational diabetes mellitus (GDM) diagnosis - Negative Choices&quot;
    and ContactData.&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; in Cx.&quot;Gestational diabetes mellitus (GDM) diagnosis - Negative Choices&quot;
    and (
      ContactData.&quot;BMI&quot; &gt;= 30
        or ContactData.&quot;Past pregnancy complications&quot; in Cx.&quot;Past pregnancy complications - Gestational diabetes mellitus Choices&quot;
        or ContactData.&quot;Past pregnancy complications&quot; in Cx. &quot;Past pregnancy complications - Macrosomia Choices&quot;
        or ContactData.&quot;Urine dipstick result - glucose&quot; in Cx. &quot;Urine dipstick result - glucose - 2 plus Choices&quot;
        or ContactData.&quot;Urine dipstick result - glucose&quot; in Cx. &quot;Urine dipstick result - glucose - 3 plus Choices&quot;
        or ContactData.&quot;Urine dipstick result - glucose&quot; in Cx. &quot;Urine dipstick result - glucose - 4 plus Choices&quot;
        or (Count(PatientData.&quot;Urine dipstick result - glucose&quot; O where O.value in Cx. &quot;Urine dipstick result - glucose - 1 plus Choices&quot;) &gt; 1)
    )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="6"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToConcept"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="7"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToCode"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="8"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="WHOCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Only"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function Only(observations List&lt;Observation&gt;):
  singleton from observations"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="9"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToString"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToString(value ObservationStatus): value.value"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="10"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToBoolean"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToBoolean(value boolean): value.value"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="11"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="WHOCommon"/>
    </extension>
    <extension url="name">
      <valueString value="ModifierExtension"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: Returns the single WHO core modifier extension (if present) on the given resource with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function ModifierExtension(domainResource DomainResource, id String):
  singleton from ModifierExtensions(domainResource, id)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="12"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="WHOCommon"/>
    </extension>
    <extension url="name">
      <valueString value="ModifierExtensions"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: Returns any WHO core modifier extensions defined on the given resource with the specified id.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define function ModifierExtensions(domainResource DomainResource, id String):
  domainResource.modifierExtension E
	  where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id)
		return E"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="13"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToString"/>
    </extension>
    <extension url="statement">
      <valueString value="define function ToString(value uri): value.value"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="14"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToString"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToString(value string): value.value"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="15"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToQuantity"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')
    end"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="16"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="FHIRHelpers"/>
    </extension>
    <extension url="name">
      <valueString value="ToCalendarUnit"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="17"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" id="effective-data-requirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
    <valueReference>🔗 
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <url value="http://smart.who.int/anc/PlanDefinition/ANCDT28"/>
  <identifier>
    <use value="official"/>
    <value value="ANC.DT.28"/>
  </identifier>
  <version value="0.3.0"/>
  <name value="ANCDT28"/>
  <title
         value="ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling"/>
  <type>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
      <code value="eca-rule"/>
    </coding>
  </type>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2025-06-24T13:58:48-06:00"/>
  <publisher value="World Health Organization (WHO)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.who.int"/>
    </telecom>
  </contact>
  <description
               value="If the woman has risk factors for developing gestational diabetes mellitus (GDM), provide counselling to reduce risk of developing GDM"/>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="task"/>
      <display value="Workflow Task"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system value="http://smart.who.int/anc/CodeSystem/activity-codes"/>
        <code value="ANC.B9."/>
        <display value="Conduct laboratory tests and imaging"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <library value="http://smart.who.int/anc/Library/ANCDT28"/>
  <action>
    <title
           value="ANC.DT.28 Gestational diabetes mellitus (GDM) risk counselling"/>
    <trigger>
      <type value="named-event"/>
      <name value="ANC.B9. Conduct laboratory tests and imaging"/>
    </trigger>
    <action id="1">
      <title
             value="Provide counselling on gestational diabetes mellitus (GDM) risk"/>
      <description
                   value="Provide counselling on gestational diabetes mellitus (GDM) risk"/>
      <textEquivalent
                      value="The woman is considered at risk for GDM if she has any of the following risk factors: 
– BMI of 30 kg/m2 or more
– Previous GDM
– Previous macrosomia 
– Glycosuria on dipstick testing is ++ or above on one occasion OR + on two or more occasions

Please provide appropriate counseling for GDM risk mitigation, including: 
– Reasserting dietary interventions
– Reasserting physical activity during pregnancy"/>
      <documentation>
        <type value="citation"/>
        <label value="WHO ANC recommendations (2016): B.1.4 (2)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="(((((((&quot;BMI&quot; ≥ 30)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Gestational diabetes mellitus&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Past pregnancy complications&quot; = &quot;Macrosomia&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;++++&quot;)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;)))
  OR ((&quot;Urine dipstick result – glucose&quot; = &quot;+&quot; ON MORE THAN ONE TEST ACROSS PREGNANCY)
  AND (&quot;Gestational diabetes mellitus (GDM) diagnosis&quot; = &quot;GDM negative&quot;)
  AND (&quot;Diabetes mellitus (DM) during pregnancy diagnosis&quot; = &quot;DM negative&quot;))"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Provide counselling on gestational diabetes mellitus (GDM) risk"/>
        </expression>
      </condition>
    </action>
  </action>
</PlanDefinition>