WHO Immunization Implementation Guide
1.0.0 - release
WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 1.0.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/132/merge and changes regularly. See the Directory of published versions
| Draft as of 2026-03-31 |
{
"resourceType" : "Library",
"id" : "IMMZD18STyphoidTCVLogic",
"meta" : {
"profile" : [
🔗 "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"🔗 ,
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"🔗 ,
"http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"🔗 ,
"http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"
]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n<div>\n <table class=\"grid dict\">\n \n \n <tr>\n <th scope=\"row\"><b>Title: </b></th>\n <td style=\"padding-left: 4px;\">IMMZD18STyphoidTCVLogic</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Id: </b></th>\n <td style=\"padding-left: 4px;\">IMMZD18STyphoidTCVLogic</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Version: </b></th>\n <td style=\"padding-left: 4px;\">1.0.0</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Url: </b></th>\n <td style=\"padding-left: 4px;\"><a href=\"Library-IMMZD18STyphoidTCVLogic.html\">IMMZD18STyphoidTCVLogic</a></td>\n </tr>\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Status: </b></th>\n <td style=\"padding-left: 4px;\">draft</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Type: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p style=\"margin-bottom: 5px;\">\n <b>system: </b> <span><a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a></span>\n </p>\n \n \n <p style=\"margin-bottom: 5px;\">\n <b>code: </b> <span>logic-library</span>\n </p>\n \n \n \n \n \n </td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Date: </b></th>\n <td style=\"padding-left: 4px;\">2026-03-31 13:54:17+0000</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Publisher: </b></th>\n <td style=\"padding-left: 4px;\">WHO</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Description: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>This library defines decision support logic for the IMMZ.D18.S.Typhoid.TCV schedule table in the Immunization CPG</p>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Related Artifacts: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p><b>Dependencies</b></p>\n <ul>\n \n <li><a href=\"Library-WHOCommon.html\">WHOCommon</a></li>\n \n <li><a href=\"Library-IMMZCommon.html\">IMMZCommon</a></li>\n \n <li><a href=\"Library-IMMZConcepts.html\">IMMZConcepts</a></li>\n \n <li><a href=\"Library-IMMZEncounterElements.html\">IMMZEncounterElements</a></li>\n \n <li><a href=\"Library-IMMZD2DTTyphoidEncounterElements.html\">IMMZD2DTTyphoidEncounterElements</a></li>\n \n </ul>\n \n \n \n \n \n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Parameters: </b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>\n \n <tr><th>Today</th><th>date</th><th>0</th><th>1</th><th>In</th></tr>\n \n <tr><th>Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>One typhoid dose from primary series was administered. The primary series has been completed</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>TCV dose 1 Expiration</th><th>date</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>TCV dose 1</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>TCV dose 1 Due Date</th><th>date</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>TCV dose 1 Create</th><th>string</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>TCV dose 1 Overdue</th><th>Resource</th><th>0</th><th>1</th><th>Out</th></tr>\n \n <tr><th>Test Validation</th><th>Resource</th><th>0</th><th>1</th><th>Out</th></tr>\n \n </table>\n </td>\n </tr>\n \n\n \n\n \n \n <tr>\n <td colspan=\"2\">\n <table>\n <tr><th><a id=\"cql-content\"><b>Content: </b></a> text/cql</th></tr>\n <tr><td><pre><code class=\"language-cql\">/*\n * Library: IMMZD18STyphoidTCVLogic (IMMZ.D18.S.Typhoid.TCV schedule)\n * Schedule Table: Typhoid conjugate vaccine (TCV), 1 dose schedule\n */\nlibrary IMMZD18STyphoidTCVLogic\n\nusing FHIR version '4.0.1'\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOCommon called WC\n\ninclude IMMZCommon called Common\ninclude IMMZConcepts called Concepts\n\ninclude IMMZEncounterElements called IE\ninclude IMMZD2DTTyphoidEncounterElements called Encounter\n\nparameter Today Date default Today()\n\n\ncontext Patient\n\n\n/*\n@output: TCV dose 1\n@description: Provision of the TCV dose 1\n@trigger: Child's birth\n@pseudo: \n@triggerDate: "Date of birth"\n*/\ndefine "TCV dose 1":\n Encounter."No typhoid primary series doses were administered"\n and not "One typhoid dose from primary series was administered. The primary series has been completed"\n and "TCV dose 1 Expiration" after day of Today\n\n\n/*\n@output: TCV dose 1 Create\n@create: TCV dose 1 should be provided if the client's age is over 6 months, and the region recommends typhoid vaccination.\n*/\ndefine "TCV dose 1 Create":\n if "TCV dose 1"\n then 'TCV dose 1 should be provided if the client\\'s age is over 6 months, and the region recommends typhoid vaccination.' + '\nDue Date: ' + ToString("TCV dose 1 Due Date") + '\nExpiration: ' + ToString("TCV dose 1 Expiration")\n else ''\n\n\n/*\n@dynamicValue: TCV dose 1 Due Date\n@pseudocode: "Date of birth" + 6 months\n*/\ndefine "TCV dose 1 Due Date":\n if "TCV dose 1" then Patient.birthDate + 6 months\n else null\n\n\n/*\n@dynamicValue: TCV dose 1 Overdue\n@pseudocode: To be determined by Member States; however, there is no recommended overdue date and individuals are always eligible to be vaccinated.\n*/\ndefine "TCV dose 1 Overdue":\n null\n\n\n/*\n@dynamicValue: TCV dose 1 Expiration\n@pseudocode: "Date of birth" + 45 years\n*/\ndefine "TCV dose 1 Expiration":\n Patient.birthDate + 45 years\n\n \n/*\n@complete: One typhoid dose from primary series was administered. The primary series has been completed\n@pseudocode: "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "Typhoid vaccines")\n*/\ndefine "One typhoid dose from primary series was administered. The primary series has been completed":\n Encounter."One typhoid primary series dose was administered"\n\n\n\n/*\n@test: Test expected results based on example patients\n*/\ndefine "Test Validation":\n case\n when Patient.id = 'Typhoid08.1' then "TCV dose 1"\n when Patient.id = 'Typhoid09.2' then "TCV dose 1"\n when Patient.id = 'Typhoid10.2' then not "TCV dose 1"\n when Patient.id = 'Typhoid11.1' then "One typhoid dose from primary series was administered. The primary series has been completed"\n else 'No test case set'\n end\n</code></pre></td></tr>\n </table>\n </td>\n </tr>\n \n \n \n </table>\n</div>\n</div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
"valueCode" : "computable"
}
],
"url" : "http://smart.who.int/immunizations/Library/IMMZD18STyphoidTCVLogic",
"version" : "1.0.0",
"name" : "IMMZD18STyphoidTCVLogic",
"title" : "IMMZD18STyphoidTCVLogic",
"status" : "draft",
"experimental" : false,
"type" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "logic-library"
}
]
},
"date" : "2026-03-31T13:54:17+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"description" : "This library defines decision support logic for the IMMZ.D18.S.Typhoid.TCV schedule table in the Immunization CPG",
"relatedArtifact" : [
{
"type" : "depends-on",
"display" : "Library WC",
"resource" : "http://smart.who.int/immunizations/Library/WHOCommon"
},
{
"type" : "depends-on",
"display" : "Library Common",
"resource" : "http://smart.who.int/immunizations/Library/IMMZCommon"
},
{
"type" : "depends-on",
"display" : "Library Concepts",
"resource" : "http://smart.who.int/immunizations/Library/IMMZConcepts"
},
{
"type" : "depends-on",
"display" : "Library IE",
"resource" : "http://smart.who.int/immunizations/Library/IMMZEncounterElements"
},
{
"type" : "depends-on",
"display" : "Library Encounter",
"resource" : "http://smart.who.int/immunizations/Library/IMMZD2DTTyphoidEncounterElements"
}
],
"parameter" : [
{
"name" : "Today",
"use" : "in",
"min" : 0,
"max" : "1",
"type" : "date"
},
{
"name" : "Patient",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "Patient"
},
{
"name" : "One typhoid dose from primary series was administered. The primary series has been completed",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
},
{
"name" : "TCV dose 1 Expiration",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "date"
},
{
"name" : "TCV dose 1",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
},
{
"name" : "TCV dose 1 Due Date",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "date"
},
{
"name" : "TCV dose 1 Create",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "string"
},
{
"name" : "TCV dose 1 Overdue",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "Resource"
},
{
"name" : "Test Validation",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "Resource"
}
],
"content" : [
{
"contentType" : "text/cql",
"data" : "LyoKICogTGlicmFyeTogSU1NWkQxOFNUeXBob2lkVENWTG9naWMgKElNTVouRDE4LlMuVHlwaG9pZC5UQ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