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.15 Behaviour counselling required - XML Representation

Active as of 2025-06-24

Raw xml | Download


<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="ANCDT15"/>
  <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;">ANCDT15</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="PlanDefinition-ANCDT15.html">ANC.DT.15 Behaviour counselling required</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.15</span>
                </p>
                
            </td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">ANC.DT.15 Behaviour counselling required</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>Depending on the woman's behaviours reported during the first contact and the woman's reported persistent behaviours, additional counselling may or may not be required</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-ANCDT15.html">ANC.DT.15 Behaviour counselling required</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.15 Behaviour counselling required:</b> 
                            
                            <br/>
                            
                            <b>When:</b>
                            
                            <i>Named Event:</i> ANC.B10. Counselling, in-facility management &amp; treatment 
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b>
                            <table class="grid-dict">
                                
                                <tr>
                                    <td>
                                        
                                        Lowering daily caffeine intake during pregnancy is recommended to reduce the risk of pregnancy loss and low-birth-weight neonates.

This includes any product, beverage or food containing caffeine (e.g. brewed coffee, tea, cola-type soft drinks, caffeinated energy drinks, chocolate, caffeine tablets); caffeine-containing teas (black tea and green tea) and soft drinks (colas and iced tea) usually contain less than 50 mg per 250 ml serving
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        ((((((((((&quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant or espresso)&quot;)
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50g) of chocolate&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot;))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant, or espresso)&quot; ON MORE THAN ONE CONTACT))
  OR (IF  &quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50 g) of chocolate&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;High caffeine intake&quot;)
                                        
                                        <i>(Should Conduct counselling on caffeine reduction)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Health-care providers should routinely offer advice and psychosocial interventions for tobacco cessation to all pregnant women who are either current tobacco users or recent tobacco quitters
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        ((((&quot;Tobacco use&quot; = TRUE)
  OR (IF &quot;Tobacco use&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Recently quit tobacco products&quot; = TRUE))
  OR (IF &quot;Recently quit tobacco products&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;Current tobacco use or recently quit&quot;)
                                        
                                        <i>(Should Conduct counselling on tobacco cessation)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Provide pregnant women, their partners and other household members with advice and information about the risks of second-hand smoke (SHS) exposure from all forms of smoked tobacco, as well as strategies to reduce SHS in the home
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        ((&quot;Exposure to second&quot;hand smoke&quot; = TRUE)
  OR (IF &quot;Exposure to second-hand smoke&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Exposure to second-hand smoke in the home&quot;)
                                        
                                        <i>(Should Conduct counselling on second-hand smoke)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Advise to use condoms to prevent Zika, HIV and other STIs; if necessary, reassure it is OK to continue to have sex during pregnancy
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        ((((&quot;Contraceptive use of male condoms&quot; = FALSE)
  OR (&quot;Contraceptive use of female condoms&quot; = FALSE))
  OR (IF &quot;Contraceptive use of male condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (IF &quot;Contraceptive use of female condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;No condom use during sex&quot;)
                                        
                                        <i>(Should Conduct counselling on condom use)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Health-care providers should at the earliest opportunity advise pregnant women dependent on alcohol or drugs to cease their alcohol or drug use and offer, or refer them to, detoxification services under medical supervision, where necessary and applicable
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        (((((&quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot;)
  OR (IF  &quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Alcohol use&quot;))
  OR (&quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot;))
  OR (IF &quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Substance use&quot;)
                                        
                                        <i>(Should Conduct counselling on alcohol/substance use)</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 ContactData"/>
        <resource
                  value="http://smart.who.int/anc/Library/ANCContactDataElements"/>
      </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 FHIRHelpers"/>
        <resource value="http://smart.who.int/anc/Library/FHIRHelpers|4.0.1"/>
      </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 PatientData"/>
        <resource value="http://smart.who.int/anc/Library/ANCDataElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Daily caffeine intake"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de139"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Daily caffeine intake - More than 2 cups of coffee Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de140"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Daily caffeine intake - More than 4 cups of tea Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de141"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Daily caffeine intake - More than 12 bars of chocolate Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de142"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Daily caffeine intake - More than one can of soda or energy drink Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de143"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Daily caffeine intake - None of the above daily caffeine intake Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de144"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Persistent behaviours"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-ded9"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - High caffeine intake Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de10"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de146"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use - Alcohol Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de148"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - Alcohol use Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de15"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use - Marijuana Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de151"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use - Cocaine Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de149"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use - Injectable drugs Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de150"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Current alcohol and/or other substance use - Other (specify) Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de152"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - Substance use Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de16"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Tobacco use"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de153"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Recently quit tobacco products"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de154"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - Recently quit tobacco products Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de12"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Exposure to second-hand smoke"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de155"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - Exposure to second-hand smoke Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de13"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Contraceptive use of male condoms"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de160"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Contraceptive use of female condoms"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de161"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Persistent behaviours - No condom use during sex Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b7-de14"/>
      </relatedArtifact>
      <parameter>
        <name value="encounter"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on caffeine reduction"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on alcohol/substance use"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on tobacco cessation"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on second-hand smoke"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on condom use"/>
        <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"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://smart.who.int/anc/ValueSet/anc-b6-de139"/>
        </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-de146"/>
        </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-de153"/>
        </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-de154"/>
        </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-de155"/>
        </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-de160"/>
        </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-de161"/>
        </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-b7-ded9"/>
        </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="Daily caffeine intake"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE139 Daily caffeine intake
  @activity: ANC.B6 Profile
  @description: Assesses whether the woman consumes more than 300 mg of caffeine per day
*/
define &quot;Daily caffeine intake&quot;:
  [Observation: Cx.&quot;Daily caffeine intake&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="0"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Daily caffeine intake"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE139 Daily caffeine intake
  @activity: ANC.B6. Collect woman's profile and history
  @description: Assesses whether the woman consumes more than 300 mg of caffeine per day
*/
define &quot;Daily caffeine intake&quot;:
  [Observation: Cx.&quot;Daily caffeine intake&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="1"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Persistent behaviours"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B7.DED9 Persistent behaviours
  @activity: ANC.B7 Symptoms &amp; Follow-up
  @description: Which of the following behaviours persist? Select which of the following behaviours persist after being reported during last contact
*/
define &quot;Persistent behaviours&quot;:
  [Observation: Cx.&quot;Persistent behaviours&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="2"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT15"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on caffeine reduction"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
((((((((((&quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant or espresso)&quot;)
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50g) of chocolate&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot;))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant, or espresso)&quot; ON MORE THAN ONE CONTACT))
  OR (IF  &quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50 g) of chocolate&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;High caffeine intake&quot;)
*/
define &quot;Should Conduct counselling on caffeine reduction&quot;:
  ContactData.&quot;Daily caffeine intake&quot; O in Cx.&quot;Daily caffeine intake - More than 2 cups of coffee Choices&quot;
    or ContactData.&quot;Daily caffeine intake&quot; in Cx.&quot;Daily caffeine intake - More than 4 cups of tea Choices&quot;
    or ContactData.&quot;Daily caffeine intake&quot; in Cx.&quot;Daily caffeine intake - More than 12 bars of chocolate Choices&quot;
    or ContactData.&quot;Daily caffeine intake&quot; in Cx.&quot;Daily caffeine intake - More than one can of soda or energy drink Choices&quot;
    or ContactData.&quot;Daily caffeine intake&quot; in Cx.&quot;Daily caffeine intake - None of the above daily caffeine intake Choices&quot;
    or (Count(PatientData.&quot;Daily caffeine intake&quot; O where O.value in Cx.&quot;Daily caffeine intake - More than 2 cups of coffee Choices&quot;) &gt;= 2)
    or (Count(PatientData.&quot;Daily caffeine intake&quot; O where O.value in Cx.&quot;Daily caffeine intake - More than 4 cups of tea Choices&quot;) &gt;= 2)
    or (Count(PatientData.&quot;Daily caffeine intake&quot; O where O.value in Cx.&quot;Daily caffeine intake - More than 12 bars of chocolate Choices&quot;) &gt;= 2)
    or (Count(PatientData.&quot;Daily caffeine intake&quot; O where O.value in Cx.&quot;Daily caffeine intake - More than one can of soda or energy drink Choices&quot;) &gt;= 2)
    or (Count(PatientData.&quot;Daily caffeine intake&quot; O where O.value in Cx.&quot;Daily caffeine intake - None of the above daily caffeine intake Choices&quot;) &gt;= 2)
    or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - High caffeine intake Choices&quot;"/>
    </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="Current alcohol and/or other substance use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE146 Current alcohol and/or other substance use
  @activity: ANC.B6 Profile
  @description: Whether or not the woman currently consumes any alcohol or substances
*/
define &quot;Current alcohol and/or other substance use&quot;:
  [Observation: Cx.&quot;Current alcohol and/or other substance use&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="4"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Current alcohol and/or other substance use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE146 Current alcohol and/or other substance use
  @activity: ANC.B6. Collect woman's profile and history
  @description: Whether or not the woman currently consumes any alcohol or substances
*/
define &quot;Current alcohol and/or other substance use&quot;:
  [Observation: Cx.&quot;Current alcohol and/or other substance use&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="ANCDT15"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Should Conduct counselling on alcohol/substance use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
(((((&quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot;)
  OR (IF  &quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Alcohol use&quot;))
  OR (&quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot;))
  OR (IF &quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Substance use&quot;)
*/
define &quot;Should Conduct counselling on alcohol/substance use&quot;:
  ContactData.&quot;Current alcohol and/or other substance use&quot; in Cx.&quot;Current alcohol and/or other substance use - Alcohol Choices&quot;
    or (
      Count(
        PatientData.&quot;Current alcohol and/or other substance use&quot; O
          where O.value as FHIR.CodeableConcept in Cx.&quot;Current alcohol and/or other substance use - Alcohol Choices&quot;
      ) &gt;= 2
    )
    or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - Alcohol use Choices&quot;
    or ContactData.&quot;Current alcohol and/or other substance use&quot; in Cx.&quot;Current alcohol and/or other substance use - Marijuana Choices&quot;
    or ContactData.&quot;Current alcohol and/or other substance use&quot; in Cx.&quot;Current alcohol and/or other substance use - Cocaine Choices&quot;
    or ContactData.&quot;Current alcohol and/or other substance use&quot; in Cx.&quot;Current alcohol and/or other substance use - Injectable drugs Choices&quot;
    or ContactData.&quot;Current alcohol and/or other substance use&quot; in Cx.&quot;Current alcohol and/or other substance use - Other (specify) Choices&quot;
    or (
      Count(
        PatientData.&quot;Current alcohol and/or other substance use&quot; O
          where O.value as FHIR.CodeableConcept in Cx.&quot;Current alcohol and/or other substance use - Marijuana Choices&quot;
            or O.value as FHIR.CodeableConcept in Cx.&quot;Current alcohol and/or other substance use - Cocaine Choices&quot;
            or O.value as FHIR.CodeableConcept in Cx.&quot;Current alcohol and/or other substance use - Injectable drugs Choices&quot;
            or O.value as FHIR.CodeableConcept in Cx.&quot;Current alcohol and/or other substance use - Other (specify) Choices&quot;
      ) &gt;= 2
    )
    or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - Substance use Choices&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="6"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Tobacco use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE153 Tobacco use
  @activity: ANC.B6 Profile
  @description: Whether the woman uses tobacco products
*/
define &quot;Tobacco use&quot;:
  WC.Only(
  [Observation: Cx.&quot;Tobacco use&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.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="7"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Tobacco use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE153 Tobacco use
  @activity: ANC.B6. Collect woman's profile and history
  @description: Whether the woman uses tobacco products
*/
define &quot;Tobacco use&quot;:
  [Observation: Cx.&quot;Tobacco use&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="8"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Recently quit tobacco products"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE154 Recently quit tobacco products
  @activity: ANC.B6 Profile
  @description: Whether the woman has recently quit using any tobacco products
*/
define &quot;Recently quit tobacco products&quot;:
  WC.Only(
  [Observation: Cx.&quot;Recently quit tobacco products&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.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="9"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Recently quit tobacco products"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE154 Recently quit tobacco products
  @activity: ANC.B6. Collect woman's profile and history
  @description: Whether the woman has recently quit using any tobacco products
*/
define &quot;Recently quit tobacco products&quot;:
  [Observation: Cx.&quot;Recently quit tobacco products&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="10"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT15"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on tobacco cessation"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
((((&quot;Tobacco use&quot; = TRUE)
  OR (IF &quot;Tobacco use&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Recently quit tobacco products&quot; = TRUE))
  OR (IF &quot;Recently quit tobacco products&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;Current tobacco use or recently quit&quot;)
*/
define &quot;Should Conduct counselling on tobacco cessation&quot;:
  ContactData.&quot;Tobacco use&quot; is true
     or (Count(PatientData.&quot;Tobacco use&quot; O where O.value = true) &gt;= 2)
     or ContactData.&quot;Recently quit tobacco products&quot; is true
     or (Count(PatientData.&quot;Recently quit tobacco products&quot; O where O.value = true) &gt;= 2)
     or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - Recently quit tobacco products Choices&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="11"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Exposure to second-hand smoke"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE155 Exposure to second-hand smoke
  @activity: ANC.B6 Profile
  @description: Anyone in the household smokes tobacco products – whether the woman is exposed to second-hand smoke from anyone in her household
*/
define &quot;Exposure to second-hand smoke&quot;:
  WC.Only(
  [Observation: Cx.&quot;Exposure to second-hand smoke&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.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="12"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Exposure to second-hand smoke"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE155 Exposure to second-hand smoke
  @activity: ANC.B6. Collect woman's profile and history
  @description: Anyone in the household smokes tobacco products – whether the woman is exposed to second-hand smoke from anyone in her household
*/
define &quot;Exposure to second-hand smoke&quot;:
  [Observation: Cx.&quot;Exposure to second-hand smoke&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="13"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT15"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on second-hand smoke"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
((&quot;Exposure to second&quot;hand smoke&quot; = TRUE)
  OR (IF &quot;Exposure to second-hand smoke&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Exposure to second-hand smoke in the home&quot;)
*/
define &quot;Should Conduct counselling on second-hand smoke&quot;:
  ContactData.&quot;Exposure to second-hand smoke&quot; is true
    or (Count(PatientData.&quot;Exposure to second-hand smoke&quot; O where O.value = true) &gt;= 2)
    or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - Exposure to second-hand smoke Choices&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="14"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Contraceptive use of male condoms"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE160 Contraceptive use of male condoms
  @activity: ANC.B6 Profile
  @description: Whether or not the woman (and her partner) use male condoms during sex
*/
define &quot;Contraceptive use of male condoms&quot;:
  WC.Only(
  [Observation: Cx.&quot;Contraceptive use of male condoms&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.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="15"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Contraceptive use of male condoms"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE160 Contraceptive use of male condoms
  @activity: ANC.B6. Collect woman's profile and history
  @description: Whether or not the woman (and her partner) use male condoms during sex
*/
define &quot;Contraceptive use of male condoms&quot;:
  [Observation: Cx.&quot;Contraceptive use of male condoms&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
    return O.value as FHIR.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="16"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Contraceptive use of female condoms"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE161 Contraceptive use of female condoms
  @activity: ANC.B6 Profile
  @description: Whether or not the woman (and her partner) use female condoms during sex
*/
define &quot;Contraceptive use of female condoms&quot;:
  WC.Only(
  [Observation: Cx.&quot;Contraceptive use of female condoms&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.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="17"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Contraceptive use of female condoms"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE161 Contraceptive use of female condoms
  @activity: ANC.B6. Collect woman's profile and history
  @description: Whether or not the woman (and her partner) use female condoms during sex
*/
define &quot;Contraceptive use of female condoms&quot;:
  [Observation: Cx.&quot;Contraceptive use of female condoms&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
    return O.value as FHIR.boolean"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="18"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT15"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on condom use"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
((((&quot;Contraceptive use of male condoms&quot; = FALSE)
  OR (&quot;Contraceptive use of female condoms&quot; = FALSE))
  OR (IF &quot;Contraceptive use of male condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (IF &quot;Contraceptive use of female condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;No condom use during sex&quot;)
*/
define &quot;Should Conduct counselling on condom use&quot;:
  ContactData.&quot;Contraceptive use of male condoms&quot; is false
     or (Count(PatientData.&quot;Contraceptive use of male condoms&quot; O where O.value = false) &gt;= 2)
     or ContactData.&quot;Contraceptive use of female condoms&quot; is false
     or (Count(PatientData.&quot;Contraceptive use of female condoms&quot; O where O.value = false) &gt;= 2)
     or ContactData.&quot;Persistent behaviours&quot; in Cx.&quot;Persistent behaviours - No condom use during sex Choices&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="19"/>
    </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="20"/>
    </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="21"/>
    </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="22"/>
    </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="23"/>
    </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="24"/>
    </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="25"/>
    </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="26"/>
    </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="27"/>
    </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="28"/>
    </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/ANCDT15"/>
  <identifier>
    <use value="official"/>
    <value value="ANC.DT.15"/>
  </identifier>
  <version value="0.3.0"/>
  <name value="ANCDT15"/>
  <title value="ANC.DT.15 Behaviour counselling required"/>
  <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="Depending on the woman's behaviours reported during the first contact and the woman's reported persistent behaviours, additional counselling may or may not be required "/>
  <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.B10."/>
        <display
                 value="Counselling, in-facility management &amp; treatment "/>
      </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/ANCDT15"/>
  <action>
    <title value="ANC.DT.15 Behaviour counselling required"/>
    <trigger>
      <type value="named-event"/>
      <name
            value="ANC.B10. Counselling, in-facility management &amp; treatment "/>
    </trigger>
    <action id="1">
      <title value="Conduct counselling on caffeine reduction"/>
      <description value="Conduct counselling on caffeine reduction"/>
      <textEquivalent
                      value="Lowering daily caffeine intake during pregnancy is recommended to reduce the risk of pregnancy loss and low-birth-weight neonates.

This includes any product, beverage or food containing caffeine (e.g. brewed coffee, tea, cola-type soft drinks, caffeinated energy drinks, chocolate, caffeine tablets); caffeine-containing teas (black tea and green tea) and soft drinks (colas and iced tea) usually contain less than 50 mg per 250 ml serving"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): A.10. Restricting caffeine intake (3)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="((((((((((&quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant or espresso)&quot;)
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50g) of chocolate&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot;))
  OR (&quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot;))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 2 cups of coffee (brewed, filter, instant, or espresso)&quot; ON MORE THAN ONE CONTACT))
  OR (IF  &quot;Daily caffeine intake&quot; = &quot;More than 4 cups of tea&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than 12 bars (50 g) of chocolate&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;More than one can of soda or energy drink&quot; ON MORE THAN ONE CONTACT))
  OR (IF &quot;Daily caffeine intake&quot; = &quot;None of the above daily caffeine intake&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;High caffeine intake&quot;)"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Conduct counselling on caffeine reduction"/>
        </expression>
      </condition>
    </action>
    <action id="2">
      <title value="Conduct counselling on tobacco cessation"/>
      <description value="Conduct counselling on tobacco cessation"/>
      <textEquivalent
                      value="Health-care providers should routinely offer advice and psychosocial interventions for tobacco cessation to all pregnant women who are either current tobacco users or recent tobacco quitters"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): B.1.5. Tobacco use (3)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="((((&quot;Tobacco use&quot; = TRUE)
  OR (IF &quot;Tobacco use&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Recently quit tobacco products&quot; = TRUE))
  OR (IF &quot;Recently quit tobacco products&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistant behaviours&quot; = &quot;Current tobacco use or recently quit&quot;)"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Conduct counselling on tobacco cessation"/>
        </expression>
      </condition>
    </action>
    <action id="3">
      <title value="Conduct counselling on second-hand smoke"/>
      <description value="Conduct counselling on second-hand smoke"/>
      <textEquivalent
                      value="Provide pregnant women, their partners and other household members with advice and information about the risks of second-hand smoke (SHS) exposure from all forms of smoked tobacco, as well as strategies to reduce SHS in the home"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): B.1.5. Tobacco use (3)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="((&quot;Exposure to second&quot;hand smoke&quot; = TRUE)
  OR (IF &quot;Exposure to second-hand smoke&quot; = TRUE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Exposure to second-hand smoke in the home&quot;)"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Conduct counselling on second-hand smoke"/>
        </expression>
      </condition>
    </action>
    <action id="4">
      <title value="Conduct counselling on condom use"/>
      <description value="Conduct counselling on condom use"/>
      <textEquivalent
                      value="Advise to use condoms to prevent Zika, HIV and other STIs; if necessary, reassure it is OK to continue to have sex during pregnancy"/>
      <documentation>
        <type value="citation"/>
        <label value="Pregnancy management with Zika (2017) (19)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="((((&quot;Contraceptive use of male condoms&quot; = FALSE)
  OR (&quot;Contraceptive use of female condoms&quot; = FALSE))
  OR (IF &quot;Contraceptive use of male condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (IF &quot;Contraceptive use of female condoms&quot; = FALSE ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;No condom use during sex&quot;)"/>
          <language value="text/cql-identifier"/>
          <expression value="Should Conduct counselling on condom use"/>
        </expression>
      </condition>
    </action>
    <action id="5">
      <title value="Conduct counselling on alcohol/substance use"/>
      <description value="Conduct counselling on alcohol/substance use"/>
      <textEquivalent
                      value="Health-care providers should at the earliest opportunity advise pregnant women dependent on alcohol or drugs to cease their alcohol or drug use and offer, or refer them to, detoxification services under medical supervision, where necessary and applicable"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): B.1.6. Substance use (3)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="(((((&quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot;)
  OR (IF  &quot;Current alcohol and/or other substance use&quot; = &quot;Alcohol&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Alcohol use&quot;))
  OR (&quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot;))
  OR (IF &quot;Current alcohol and/or other substance use&quot; = &quot;Marijuana&quot; AND/OR &quot;Cocaine&quot; AND/OR &quot;Crack&quot; AND/OR &quot;Injectable drugs&quot; AND/OR &quot;Other substance use (specify)&quot; ON MORE THAN ONE CONTACT))
  OR (&quot;Persistent behaviours&quot; = &quot;Substance use&quot;)"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Conduct counselling on alcohol/substance use"/>
        </expression>
      </condition>
    </action>
  </action>
</PlanDefinition>