<?xml version="1.0" encoding="UTF-8"?>

<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="CXCAMNGD2DTScreeningEligibility-Programmatic"/>
  <meta>
    <profile value="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition"/>
  </meta>
  <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;">CXCAMNGD2DTScreeningEligibility-Programmatic</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="PlanDefinition-CXCAMNGD2DTScreeningEligibility-Programmatic.html">CXCAMNG.D2.DT — Mongolia Programmatic Screening Eligibility (30/40 ages)</a></td>
        </tr>
        

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

        

        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">CXCAMNG.D2.DT — Mongolia Programmatic Screening Eligibility (30/40 ages)</td>
        </tr>
        

        

        
        <tr>
            <th scope="row"><b>Status: </b></th>
            <td style="padding-left: 4px;">draft</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/7.1.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;">2026-05-14 00:50:23+0000</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">Dan Heslinga (independent contributor)</td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Description: </b></th>
            <td style="padding-left: 4px;"><div><p>Mongolia overlay PlanDefinition encoding the April 2025 Cervical Cancer Elimination Programme launch's announced HPV screening ages (30 and 40). NOT a legally-binding rule — A/641 (2020) section 2.2 remains binding with 35/45 ages. Tagged bindingness = programmatic. Pairs with the legal-binding CXCAD2DTScreeningEligibility PlanDefinition; both reference the same CQL Library, each firing on a different rule.</p>
</div></td>
        </tr>
        

        

        

        

        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Libraries: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    
                    <tr>
                        <td><a href="Library-CXCAD2DTScreeningEligibilityLogic.html">CXCAD2DTScreeningEligibilityLogic</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> Recommend HPV high-risk DNA screening at programmatic target age (Mongolia overlay):</b> Per the April 2025 Cervical Cancer Elimination Programme launch, Mongolia announced HPV screening at ages 30 and 40. If the client is at one of those programmatic target ages, has not had a hysterectomy, and has not been screened in the current cycle, create a proposed ServiceRequest for HPV high-risk DNA testing. Note: this is a programmatic position only; A/641 section 2.2 (35/45) remains legally binding.
                            
                            <br/>
                            
                            
                            <b>If:</b>
                            
                            <i>Applicability:</i>
                            
                            <i>(Client is due for HPV screening (programmatic))</i>
                            <br/>
                            
                            
                            
                            
                            <b>Then:</b> <i>Definition:</i> <a href="ActivityDefinition-CXCAD2HPVScreeningServiceRequest.html">CXCAD2 — HPV Screening Service Request</a><br/>
                            
                            
                            
                        </td>
                    </tr>
                    
                </table>
            </td>
        </tr>
        
    </table>
</div>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CXCAD2DTScreeningEligibilityLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Client age"/>
        </extension>
        <extension url="statement">
          <valueString value="// =============================================================================&#xA;// Helper definitions&#xA;// =============================================================================&#xA;&#xA;/*&#xA; * Client age in years at the encounter date.&#xA; */&#xA;define &quot;Client age&quot;:&#xA;  AgeInYearsAt(Today)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CXCAD2DTScreeningEligibilityLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Client is at programmatic target age (30 or 40)"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; * The client is at one of the programmatic-overlay target ages per the&#xA; * April 2025 Cervical Cancer Elimination Programme launch announcement&#xA; * (ages 30 and 40).&#xA; */&#xA;define &quot;Client is at programmatic target age (30 or 40)&quot;:&#xA;  &quot;Client age&quot; = 30 or &quot;Client age&quot; = 40"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CXCAElements"/>
        </extension>
        <extension url="name">
          <valueString value="Hysterectomy Procedures"/>
        </extension>
        <extension url="statement">
          <valueString value="// =============================================================================&#xA;// Hysterectomy history&#xA;// =============================================================================&#xA;&#xA;/*&#xA; * @internal: All recorded hysterectomy procedures for this patient,&#xA; *   filtered to status = completed.&#xA; */&#xA;define &quot;Hysterectomy Procedures&quot;:&#xA;  [Procedure] P&#xA;    where P.status = 'completed'&#xA;      and exists (P.code.coding C where C.code = 'DE45'&#xA;                                     and C.system = 'http://smart.who.int/cxca/CodeSystem/CXCA.D')"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CXCAElements"/>
        </extension>
        <extension url="name">
          <valueString value="Has Had Hysterectomy"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; * The patient has a documented completed hysterectomy.&#xA; *&#xA; * NOTE: A/641 section 2.2 only excludes hysterectomy for non-cervical-cancer indication&#xA; * with a documented negative post-op vaginal-smear cytology. This define&#xA; * captures only the hysterectomy fact; the indication and post-op cytology&#xA; * checks live in higher-layer logic that combines this define with others.&#xA; */&#xA;define &quot;Has Had Hysterectomy&quot;:&#xA;  exists &quot;Hysterectomy Procedures&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CXCAD2DTScreeningEligibilityLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Client is due for HPV screening (programmatic)"/>
        </extension>
        <extension url="statement">
          <valueString value="// =============================================================================&#xA;// Programmatic-overlay eligibility — April 2025 launch's 30/40 announcement&#xA;// Bindingness: programmatic (Mongolia overlay)&#xA;// =============================================================================&#xA;&#xA;/*&#xA; * @output: CXCA.D#DE4 &quot;Due for HPV screening&quot;&#xA; * @bindingness: programmatic — Mongolia overlay&#xA; * @source: WHO Mongolia news release, 22 April 2025.&#xA; */&#xA;define &quot;Client is due for HPV screening (programmatic)&quot;:&#xA;  &quot;Client is at programmatic target age (30 or 40)&quot;&#xA;    and not Elements.&quot;Has Had Hysterectomy&quot;&#xA;    and not &quot;HasRecentHPVScreening&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </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 ProcedureStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </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="6"/>
        </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="7"/>
        </extension>
      </extension>
      <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="FHIR model information"/>
        <resource value="http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Elements"/>
        <resource value="http://smart.who.int/cxca/Library/CXCAElements"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <parameter>
        <name value="Today"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="date"/>
      </parameter>
      <parameter>
        <name value="HasRecentHPVScreening"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Client is due for HPV screening (programmatic)"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="status"/>
        <mustSupport value="code"/>
        <mustSupport value="code.coding"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="status"/>
        <mustSupport value="code"/>
        <mustSupport value="code.coding"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension url="http://smart.who.int/cxca/StructureDefinition/cxca-bindingness">
    <valueCoding>
      <system value="http://smart.who.int/cxca/CodeSystem/CXCA.Bindingness"/>
      <code value="programmatic"/>
      <display value="Programmatic — announced position not yet binding"/>
    </valueCoding>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url value="http://smart.who.int/cxca/PlanDefinition/CXCAMNGD2DTScreeningEligibility-Programmatic"/>
  <version value="0.0.1"/>
  <name value="CXCAMNGD2DTScreeningEligibilityProgrammatic"/>
  <title value="CXCAMNG.D2.DT — Mongolia Programmatic Screening Eligibility (30/40 ages)"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
      <code value="eca-rule"/>
    </coding>
  </type>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2026-05-14T00:50:23+00:00"/>
  <publisher value="Dan Heslinga (independent contributor)"/>
  <contact>
    <name value="Dan Heslinga (independent contributor)"/>
    <telecom>
      <system value="url"/>
      <value value="https://github.com/dhes"/>
    </telecom>
  </contact>
  <description value="Mongolia overlay PlanDefinition encoding the April 2025 Cervical Cancer Elimination Programme launch's announced HPV screening ages (30 and 40). NOT a legally-binding rule — A/641 (2020) section 2.2 remains binding with 35/45 ages. Tagged bindingness = programmatic. Pairs with the legal-binding CXCAD2DTScreeningEligibility PlanDefinition; both reference the same CQL Library, each firing on a different rule."/>
  <library value="http://smart.who.int/cxca/Library/CXCAD2DTScreeningEligibilityLogic"/>
  <action>
    <title value="Recommend HPV high-risk DNA screening at programmatic target age (Mongolia overlay)"/>
    <description value="Per the April 2025 Cervical Cancer Elimination Programme launch, Mongolia announced HPV screening at ages 30 and 40. If the client is at one of those programmatic target ages, has not had a hysterectomy, and has not been screened in the current cycle, create a proposed ServiceRequest for HPV high-risk DNA testing. Note: this is a programmatic position only; A/641 section 2.2 (35/45) remains legally binding."/>
    <condition>
      <kind value="applicability"/>
      <expression>
        <language value="text/cql-identifier"/>
        <expression value="Client is due for HPV screening (programmatic)"/>
      </expression>
    </condition>
    <definitionCanonical value="http://smart.who.int/cxca/ActivityDefinition/CXCAD2HPVScreeningServiceRequest"/>
  </action>
</PlanDefinition>