WHO Immunization Implementation Guide
0.2.0 - ci-build

WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-immunizations/tree/claude/sync-litlfred-2026-11-19 and changes regularly. See the Directory of published versions
Built from commit 71303abd.   Branch: claude/sync-litlfred-2026-11-19.

: IMMZD18SPolioBirthDoseLogic - XML Representation

Draft as of 2026-11-19

Raw xml | Download

Loading XML source…

CQL Source

/*
 * Library: IMMZD18SPolioBirthDoseLogic (IMMZ.D18.S.Polio.Birth dose schedule)
 * Schedule Table: Birth dose schedule (in countries that are poliomyelitis (polio)-endemic countries or countries at high risk for importation and subsequent spread of polio that follow the combined bivalent oral polio vaccine [bOPV]–inactivated polio vaccine [IPV] schedule)
 */
library IMMZD18SPolioBirthDoseLogic

using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'

include WHOCommon called WC

include IMMZCommon called Common
include IMMZConcepts called Concepts

include IMMZEncounterElements called IE
include IMMZD2DTPolioEncounterElements called Encounter

parameter Today Date default Today()


context Patient


/*
@output: bOPV birth dose (a zero dose)
@description: Provision of bOPV birth dose (a zero dose)
@trigger: Child's birth
@pseudo: 
@triggerDate: "Date of birth"
*/
define "bOPV birth dose (a zero dose)":
  not "Polio birth dose (a zero dose) was administered"
  and "bOPV birth dose (a zero dose) Expiration" after day of Today


/*
@output: bOPV birth dose (a zero dose) Create
@create: bOPV birth dose (a zero dose) should be provided within the first week of life and if the client is in a polio-endemic country or a country at high risk for importation and subsequent spread of polio
*/
define "bOPV birth dose (a zero dose) Create":
  if "bOPV birth dose (a zero dose)"
  then 'bOPV birth dose (a zero dose) should be provided within the first week of life and if the client is in a polio-endemic country or a country at high risk for importation and subsequent spread of polio' + '
Due Date: ' + ToString("bOPV birth dose (a zero dose) Due Date") + '
Overdue: ' + ToString("bOPV birth dose (a zero dose) Overdue") + '
Expiration: ' + ToString("bOPV birth dose (a zero dose) Expiration")
  else ''


/*
@dynamicValue: bOPV birth dose (a zero dose) Due Date
@pseudocode: "Date of birth"
*/
define "bOPV birth dose (a zero dose) Due Date":
  if "bOPV birth dose (a zero dose)" then Patient.birthDate
  else null


/*
@dynamicValue: bOPV birth dose (a zero dose) Overdue
@pseudocode: "Date of birth" + 1 day
*/
define "bOPV birth dose (a zero dose) Overdue":
  if "bOPV birth dose (a zero dose)" then Patient.birthDate + 1 day
  else null


/*
@dynamicValue: bOPV birth dose (a zero dose) Expiration
@pseudocode: "Date of birth" + 1 week
*/
define "bOPV birth dose (a zero dose) Expiration":
  Patient.birthDate + 1 week

  
/*
@complete: Polio birth dose (a zero dose) was administered
@pseudocode: Count of vaccines administered (where "Vaccine type" = "Poliovirus-containing vaccines" and "Type of dose" = "Dose 0" AND "Birth dose" = TRUE) = 1
*/
define "Polio birth dose (a zero dose) was administered":
  Encounter."bOPV birth dose (a zero dose) was administered"



/*
@test: Test expected results based on example patients
*/
define "Test Validation":
  case
    when Patient.id = 'Polio08.2' then "bOPV birth dose (a zero dose)"
    when Patient.id = 'Polio09.2' then not "bOPV birth dose (a zero dose)"
    when Patient.id = 'Polio10.1' then not "bOPV birth dose (a zero dose)"
    else 'No test case set'
  end

ELM Content

ELM binary data has been extracted to separate files: