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.29 HIV risk counselling - XML Representation

Active as of 2025-06-24

Raw xml | Download


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

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

        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">ANC.DT.29 HIV 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 contracting HIV, provide counselling to reduce risk of contracting HIV</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-ANCDT29.html">ANC.DT.29 HIV 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.29 HIV 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>
                                        
                                        If the woman lives in a setting with a generalized HIV epidemic, or her partner is HIV positive, or she injects drugs, or she is a sex worker, then she is at high risk for HIV – counselling should be given to provide prevention options

Provide comprehensive HIV prevention options: 
– STI screening and treatment (syndromic and syphilis)
– Condom promotion
– Risk reduction counselling
– Pre-exposure prophylaxis (PrEP) with emphasis on adherence
– Emphasize importance of follow-up ANC contact visits
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        ((((((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Prevalence of HIV in pregnant women in the catchment area&quot; &gt; 1%))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV status (reported)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV test result&quot; = HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Partner HIV status (confirmed)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Current alcohol and/or other substance use&quot; = &quot;Injectable drugs&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Occupation&quot; = &quot;Employment that puts woman at increased risk for HIV (e.g. sex worker)&quot;))
                                        
                                        <i>(Should Conduct counselling on HIV risk)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Oral pre-exposure prophylaxis (PrEP) containing tenofovir disoproxil fumarate (TDF) should be offered as an additional prevention choice for pregnant women at substantial risk of HIV infection as part of combination prevention approaches.

See &quot;PrEP offering framework&quot; – a suggested prioritization framework for offering PrEP to pregnant and breastfeeding women (below).
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        &quot;Population incidence of HIV in the absence of PrEP&quot; &gt; 3 per 100 person-years
                                        
                                        <i>(Should Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention)</i>
                                        <br/>
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        
                                        Encourage woman to find out the status of her partner(s) or to bring them during the next contact visit to get tested
                                        
                                        <br/>
                                        
                                        
                                        <b>If:</b>
                                        
                                        <i>Applicability:</i>
                                        
                                        (&quot;Partner HIV status (reported)&quot; = &quot;Inconclusive&quot;)
  OR (&quot;Partner HIV test conducted&quot; = FALSE)
                                        
                                        <i>(Should Conduct counselling on HIV risk 2)</i>
                                        <br/>
                                        
                                        
                                        
                                        <b>Then:</b> <i>Additional sub-actions not displayed</i>
                                        
                                    </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 Config"/>
        <resource value="http://smart.who.int/anc/Library/ANCConfig"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library BaseDataElements"/>
        <resource
                  value="http://smart.who.int/anc/Library/ANCBaseDataElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AC"/>
        <resource value="http://smart.who.int/anc/Library/ANCCommon"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Partner HIV status (reported)"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de156"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Partner HIV status (reported) - Inconclusive Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de159"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Partner HIV test result"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de48"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set HIV status"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de45"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set HIV status - HIV negative Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de47"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Partner HIV status (reported) - HIV Positive Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de157"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Partner HIV test result - Partner HIV positive Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de52"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Partner HIV status (confirmed)"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de55"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Partner HIV status (confirmed) - HIV positive Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b9-de56"/>
      </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 - Injectable drugs Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de150"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Occupation - Employment that puts woman at increased risk for HIV (e.g. sex worker) Choices"/>
        <resource value="http://smart.who.int/anc/ValueSet/anc-b6-de11"/>
      </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 HIV risk 2"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Should Conduct counselling on HIV risk"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name
              value="Should Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention"/>
        <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-b6-de156"/>
        </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-de48"/>
        </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-de45"/>
        </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-de55"/>
        </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="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Partner HIV status (reported)"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B6.DE156 Partner HIV status (reported)
  @activity: ANC.B6 Profile
  @description: The HIV status of the woman's partner
*/
define &quot;Partner HIV status (reported)&quot;:
  WC.Only(
  [Observation: Cx.&quot;Partner HIV status (reported)&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="Partner HIV test result"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE48 Partner HIV test result
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Select the result of her partner's HIV test
*/
define &quot;Partner HIV test result&quot;:
  WC.Only(
  [Observation: Cx.&quot;Partner HIV test result&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="ANCDT29"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on HIV risk 2"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
(&quot;Partner HIV status (reported)&quot; = &quot;Inconclusive&quot;)
  OR (&quot;Partner HIV test conducted&quot; = FALSE)
*/
define &quot;Should Conduct counselling on HIV risk 2&quot;:
  ContactData.&quot;Partner HIV status (reported)&quot; in Cx.&quot;Partner HIV status (reported) - Inconclusive Choices&quot;
    or ContactData.&quot;Partner HIV test result&quot; is null"/>
    </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="HIV status"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE45 HIV status
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Calculated field for woman's HIV status
*/
define &quot;HIV status&quot;:
  WC.Only(
  [Observation: Cx.&quot;HIV status&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="3"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCConfig"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Prevalence of HIV in pregnant women in the catchment area"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  Description: The proportion of pregnant women in the health-care facility's
    catchment area who are HIV positive, based on the number of pregnant
    women attending antenatal clinics at the health-care facility
*/
define &quot;Prevalence of HIV in pregnant women in the catchment area&quot;:
  2 '%'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="4"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCContactDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Partner HIV status (confirmed)"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  @dataElement: ANC.B9.DE55 Partner HIV status (confirmed)
  @activity: ANC.B9 Lab tests &amp; imaging
  @description: Partner's confirmed HIV status
*/
define &quot;Partner HIV status (confirmed)&quot;:
  WC.Only(
  [Observation: Cx.&quot;Partner HIV status (confirmed)&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="5"/>
    </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="6"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCBaseDataElements"/>
    </extension>
    <extension url="name">
      <valueString value="Patient Occupation"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: The patient's occupation
*/
define &quot;Patient Occupation&quot;:
  [Patient] P
    return (AC.Extension(P, 'occupation')).value as CodeableConcept"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="7"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT29"/>
    </extension>
    <extension url="name">
      <valueString value="Should Conduct counselling on HIV risk"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
((((((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Prevalence of HIV in pregnant women in the catchment area&quot; &gt; 1%))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV status (reported)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV test result&quot; = HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Partner HIV status (confirmed)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Current alcohol and/or other substance use&quot; = &quot;Injectable drugs&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Occupation&quot; = &quot;Employment that puts woman at increased risk for HIV (e.g. sex worker)&quot;))
*/
define &quot;Should Conduct counselling on HIV risk&quot;:
  ContactData.&quot;HIV status&quot; in Cx.&quot;HIV status - HIV negative Choices&quot;
    and (
      Config.&quot;Prevalence of HIV in pregnant women in the catchment area&quot; &gt; 1 '%'
        or ContactData.&quot;Partner HIV status (reported)&quot; in Cx.&quot;Partner HIV status (reported) - HIV Positive Choices&quot;
        or ContactData.&quot;Partner HIV test result&quot; in Cx.&quot;Partner HIV test result - Partner HIV positive Choices&quot;
        or ContactData.&quot;Partner HIV status (confirmed)&quot; in Cx.&quot;Partner HIV status (confirmed) - HIV positive 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 BaseDataElements.&quot;Patient Occupation&quot; in Cx.&quot;Occupation - Employment that puts woman at increased risk for HIV (e.g. sex worker) Choices&quot;
    )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="8"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCConfig"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Population incidence of HIV in the absence of PrEP"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
  Description: HIV incidence number of cases per 100 person-years
*/
define &quot;Population incidence of HIV in the absence of PrEP&quot;:
  System.Quantity { value: 4, unit: '{Person-years}' }"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="9"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCDT29"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Should Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
&quot;Population incidence of HIV in the absence of PrEP&quot; &gt; 3 per 100 person-years
*/
define &quot;Should Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention&quot;:
  Config.&quot;Population incidence of HIV in the absence of PrEP&quot; &gt; 3 '{Person-Years}'"/>
    </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="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="11"/>
    </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="12"/>
    </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="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 ObservationStatus): 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="ToBoolean"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define function ToBoolean(value boolean): 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="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="16"/>
    </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="17"/>
    </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="18"/>
    </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="19"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Extension"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: Returns the single ANC 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 id.
*/
define function Extension(domainResource DomainResource, id String):
  singleton from &quot;Extensions&quot;(domainResource, id)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="20"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
    <extension url="libraryName">
      <valueString value="ANCCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Extensions"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: Returns any ANC 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 Extensions(domainResource DomainResource, id String):
  domainResource.extension E
	  where E.url = ('http://smart.who.int/anc/StructureDefinition/' + id)
		return E"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="21"/>
    </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/ANCDT29"/>
  <identifier>
    <use value="official"/>
    <value value="ANC.DT.29"/>
  </identifier>
  <version value="0.3.0"/>
  <name value="ANCDT29"/>
  <title value="ANC.DT.29 HIV 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 contracting HIV, provide counselling to reduce risk of contracting HIV"/>
  <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/ANCDT29"/>
  <action>
    <title value="ANC.DT.29 HIV risk counselling"/>
    <trigger>
      <type value="named-event"/>
      <name value="ANC.B9. Conduct laboratory tests and imaging"/>
    </trigger>
    <action id="1">
      <title value="Conduct counselling on HIV risk"/>
      <description value="Conduct counselling on HIV risk"/>
      <textEquivalent
                      value="If the woman lives in a setting with a generalized HIV epidemic, or her partner is HIV positive, or she injects drugs, or she is a sex worker, then she is at high risk for HIV – counselling should be given to provide prevention options

Provide comprehensive HIV prevention options: 
– STI screening and treatment (syndromic and syphilis)
– Condom promotion
– Risk reduction counselling
– Pre-exposure prophylaxis (PrEP) with emphasis on adherence
– Emphasize importance of follow-up ANC contact visits"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): B.1.7, C.7 (2)
Pregnancy, childbirth, postpartum and newborn care guide (IMPAC) (2015): C6 (1)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="((((((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Prevalence of HIV in pregnant women in the catchment area&quot; &gt; 1%))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV status (reported)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Partner HIV test result&quot; = HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Partner HIV status (confirmed)&quot; = &quot;HIV positive&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (Current alcohol and/or other substance use&quot; = &quot;Injectable drugs&quot;)))
  OR ((&quot;HIV status&quot; = &quot;HIV negative&quot;)
  AND (&quot;Occupation&quot; = &quot;Employment that puts woman at increased risk for HIV (e.g. sex worker)&quot;))"/>
          <language value="text/cql-identifier"/>
          <expression value="Should Conduct counselling on HIV risk"/>
        </expression>
      </condition>
    </action>
    <action id="2">
      <title
             value="Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention"/>
      <description
                   value="Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention"/>
      <textEquivalent
                      value="Oral pre-exposure prophylaxis (PrEP) containing tenofovir disoproxil fumarate (TDF) should be offered as an additional prevention choice for pregnant women at substantial risk of HIV infection as part of combination prevention approaches.

See &quot;PrEP offering framework&quot; – a suggested prioritization framework for offering PrEP to pregnant and breastfeeding women (below)."/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): C.7 (2)
Pre-exposure prophylaxis (PrEP) for HIV prevention (2017) (20)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="&quot;Population incidence of HIV in the absence of PrEP&quot; &gt; 3 per 100 person-years"/>
          <language value="text/cql-identifier"/>
          <expression
                      value="Should Conduct counselling on pre-exposure prophylaxis (PrEP) for HIV prevention"/>
        </expression>
      </condition>
    </action>
    <action id="3">
      <title value="Conduct counselling on HIV risk"/>
      <description value="Conduct counselling on HIV risk 2"/>
      <textEquivalent
                      value="Encourage woman to find out the status of her partner(s) or to bring them during the next contact visit to get tested"/>
      <documentation>
        <type value="citation"/>
        <label
               value="WHO ANC recommendations (2016): B.1.7 (2)
Consolidated guidelines on HIV testing services (2015) (6)"/>
      </documentation>
      <condition>
        <kind value="applicability"/>
        <expression>
          <description
                       value="(&quot;Partner HIV status (reported)&quot; = &quot;Inconclusive&quot;)
  OR (&quot;Partner HIV test conducted&quot; = FALSE)"/>
          <language value="text/cql-identifier"/>
          <expression value="Should Conduct counselling on HIV risk 2"/>
        </expression>
      </condition>
      <action>
        <title value="Conduct counselling on HIV risk"/>
      </action>
      <action>
        <title value="Recommended partner HIV test"/>
      </action>
    </action>
  </action>
</PlanDefinition>