SMART DAK Cervical Cancer Screening
0.0.1 - ci-build

SMART DAK Cervical Cancer Screening, published by Dan Heslinga (independent contributor). This guide is not an authorized publication; it is the continuous build for version 0.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/dhes/smart-dak-cxca/ and changes regularly. See the Directory of published versions

Library: CXCAD2DTHPVResultRoutingLogic

Official URL: http://smart.who.int/cxca/Library/CXCAD2DTHPVResultRoutingLogic Version: 0.0.1
Draft as of 2026-05-14 Computable Name: CXCAD2DTHPVResultRoutingLogic

CQL logic library for routing decisions after an HPV high-risk DNA test result returns. Implements the three-outcome decision tree from A/641 (2020) Fig 2.4: HPV negative → routine; HPV+ with negative cytology → repeat HPV in 12 months; HPV+ with cytology ≥ ASC-US → refer to colposcopy. Source CQL is at input/cql/CXCAD2DTHPVResultRoutingLogic.cql.

Title: CXCAD2DTHPVResultRoutingLogic
Id: CXCAD2DTHPVResultRoutingLogic
Version: 0.0.1
Url: CXCAD2DTHPVResultRoutingLogic
Status: draft
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2026-05-14 00:50:23+0000
Publisher: Dan Heslinga (independent contributor)
Description:

CQL logic library for routing decisions after an HPV high-risk DNA test result returns. Implements the three-outcome decision tree from A/641 (2020) Fig 2.4: HPV negative → routine; HPV+ with negative cytology → repeat HPV in 12 months; HPV+ with cytology ≥ ASC-US → refer to colposcopy. Source CQL is at input/cql/CXCAD2DTHPVResultRoutingLogic.cql.

Parameters:
NameTypeMinMaxIn/Out
HPVResultPositiveboolean01In
CytologyResultASCUSorWorseboolean01In
PatientPatient01Out
Route — HPV negative, return to routineboolean01Out
Route — HPV+, cytology negative, repeat HPV in 12 monthsboolean01Out
Route — HPV+, cytology ≥ ASC-US, refer to colposcopyboolean01Out
Content: text/cql
/*
 * Library: CXCAD2DTHPVResultRoutingLogic
 *
 * Decision: What to do with a returned HPV high-risk DNA test result
 * L2 Source: A/641 (2020) Fig 2.4 — HPV pathway result routing tree
 * Trigger: HPV result available for an HPV-screened patient
 *
 * THE ROUTING TREE:
 *
 *   HPV result returns
 *      ↓
 *   ┌──────────────────────────────────┐
 *   │ HPV negative                     │ → return to routine screening
 *   ├──────────────────────────────────┤
 *   │ HPV positive                     │ → re-read the saved cytology slide
 *   │   ↓                              │
 *   │   Cytology < ASC-US (NILM)       │ → repeat HPV in 12 months
 *   │   ↓ (then if HPV+ again)         │
 *   │   → refer to colposcopy          │
 *   │                                  │
 *   │   Cytology ≥ ASC-US              │ → refer to colposcopy directly
 *   └──────────────────────────────────┘
 *
 * This library encodes the IMMEDIATE three-outcome decision (HPV negative /
 * HPV+ with negative cytology / HPV+ with abnormal cytology). The 12-month
 * repeat-HPV cycle is encoded as the routing outcome; tracking and timer-
 * based recall happens via the recall/scheduling layer (chunk 7 — deferred).
 *
 * Each routing outcome maps to a CXCA.D code (DE34/DE35/DE36).
 */

library CXCAD2DTHPVResultRoutingLogic version '0.0.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

// Placeholders — to be replaced with FHIR queries via the shared CXCAElements
// layer. Real implementation:
//   HPVResultPositive: Observation with code = CXCA.D#DE3 and value = CXCA.D#DE8
//   CytologyResultASCUSorWorse: Observation with code = CXCA.D#DE13 and value
//     in {DE30 ASC-US, DE31 ASC-H, DE32 LSIL, DE33 HSIL} (Bethesda ≥ ASC-US)
parameter "HPVResultPositive" Boolean default false
parameter "CytologyResultASCUSorWorse" Boolean default false

context Patient

// =============================================================================
// Routing rules — three mutually-exclusive outcomes per A/641 Fig 2.4
// =============================================================================

/*
 * @output: CXCA.D#DE34 "Route: return to routine screening"
 * @bindingness: legal
 * HPV result is negative — no further investigation indicated.
 */
define "Route — HPV negative, return to routine":
  not "HPVResultPositive"

/*
 * @output: CXCA.D#DE35 "Route: repeat HPV test in 12 months"
 * @bindingness: legal
 * HPV result is positive but the cytology re-read shows no significant
 * cellular abnormality (NILM / less than ASC-US). Per Fig 2.4, do not refer
 * to colposcopy yet — recheck HPV in 12 months. If still positive at recheck,
 * the next evaluation will route to colposcopy.
 */
define "Route — HPV+, cytology negative, repeat HPV in 12 months":
  "HPVResultPositive"
    and not "CytologyResultASCUSorWorse"

/*
 * @output: CXCA.D#DE36 "Route: refer to colposcopy"
 * @bindingness: legal
 * HPV result is positive and cytology re-read shows ≥ ASC-US (any of
 * ASC-US, ASC-H, LSIL, HSIL per Bethesda 2014). Refer to colposcopy
 * directly per A/641 Fig 2.4 (Op.Inst. 5.6 covers the colposcopy procedure).
 */
define "Route — HPV+, cytology ≥ ASC-US, refer to colposcopy":
  "HPVResultPositive"
    and "CytologyResultASCUSorWorse"
Content: application/elm+xml
Encoded data (14956 characters)