<?xml version='1.0' encoding='UTF-8'?>
<Library xmlns="http://hl7.org/fhir" xmlns:html="http://www.w3.org/1999/xhtml">
  <id value="IMMZD2DTVaricellaElements" />
  <meta>
    <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" />
    <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" />
    <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" />
    <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" />
  </meta>
  <text>
    <status value="extensions" /><html:div><html:p><html:b style="color: maroon">Exception parsing generated Narrative (see /tmp/liquid-217cea8a-4ab6-4a39-9c7e-62fe812f3d26.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '
/*
  * Library: IMMZD2DTVaricellaElements
  */
library IMMZD2DTVaricellaElements

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

include WHOConcepts
include WHOCommon called WC
include WHOElements called WE

include IMMZCommon called Common
include IMMZConcepts called Concepts
include IMMZElements called Elements


context Patient

/*
@internal: Varicella containing Doses Administered to Patient
*/
define "Varicella Doses Administered to Patient":
  Elements."Doses Administered to Patient" I
  where
    I.vaccineCode in Concepts."Varicella-containing vaccines"

/*
@internal: Varicella containing Doses Administered to Patient that are in the Primary series
*/
define "Varicella Primary Series Doses Administered to Patient":
  "Varicella Doses Administered to Patient".seriesPrimary()

/*
@internal: Number of Varicella Primary Series doses
*/
define "Number of Varicella Primary Series Doses Administered":
  Count("Varicella Primary Series Doses Administered to Patient")

/*
@input: Client's age is less than 12 months
@pseudocode: Today's date − "Date of birth" ' at line 240 column 46</html:b></html:p></html:div>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability">
    <valueCode value="computable" />
  </extension>
  <url value="http://smart.who.int/immunizations/Library/IMMZD2DTVaricellaElements" />
  <version value="1.0.0" />
  <name value="IMMZD2DTVaricellaElements" />
  <title value="IMMZD2DTVaricellaElements" />
  <status value="draft" />
  <experimental value="false" />
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type" />
      <code value="logic-library" />
    </coding>
  </type>
  <date value="2026-10-02T09:24:37+00:00" />
  <publisher value="WHO" />
  <contact>
    <name value="WHO" />
    <telecom>
      <system value="url" />
      <value value="http://who.int" />
    </telecom>
  </contact>
  <description value="This library defines context-independent elements for Varicella used throughout the Immunization CPG" />
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WHOConcepts" />
    <resource value="http://smart.who.int/immunizations/Library/WHOConcepts" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WC" />
    <resource value="http://smart.who.int/immunizations/Library/WHOCommon" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WE" />
    <resource value="http://smart.who.int/immunizations/Library/WHOElements" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Common" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZCommon" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Concepts" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZConcepts" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Elements" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZElements" />
  </relatedArtifact>
  <parameter>
    <name value="Patient" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="Patient" />
  </parameter>
  <parameter>
    <name value="Varicella Doses Administered to Patient" />
    <use value="out" />
    <min value="0" />
    <max value="*" />
    <type value="Immunization" />
  </parameter>
  <parameter>
    <name value="Varicella Primary Series Doses Administered to Patient" />
    <use value="out" />
    <min value="0" />
    <max value="*" />
    <type value="Immunization" />
  </parameter>
  <parameter>
    <name value="Number of Varicella Primary Series Doses Administered" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="integer" />
  </parameter>
  <parameter>
    <name value="Client's age is less than 12 months" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="No varicella primary series dose was administered" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Cient's age is more than or equal to 12 months" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Live vaccine was administered in the past 4 weeks" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="No live vaccine was administered in the past 4 weeks" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="One varicella primary series dose was administered" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="No varicella primary series doses were administered" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Date of Latest Varicella Dose" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="date" />
  </parameter>
  <parameter>
    <name value="The latest varicella dose administered less than 4 weeks ago" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="The latest varicella dose administered more than 4 weeks ago" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Two varicella primary series doses were administered" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <content>
    <contentType value="text/cql" />
    <url value="Library-IMMZD2DTVaricellaElements.cql" /></content>
  <content>
    <contentType value="application/elm+xml" />
    <url value="Library-IMMZD2DTVaricellaElements.elm.xml" /></content>
</Library>