{
  "resourceType" : "Library",
  "id" : "IMMZIND44Logic",
  "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;\">IMMZIND44Logic</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZIND44Logic</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-IMMZIND44Logic.html\">IMMZIND44Logic</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 population criteria logic for the IMMZ.IND.44 indicator 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><code>http://smart.who.int/immunizations/Library/IMMZIndicatorElements</code></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>Measurement Period</th><th>Period</th><th>0</th><th>1</th><th>In</th></tr>\n              \n                <tr><th>Immunization</th><th>Immunization</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Initial Population</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Denominator</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Numerator</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Stratification 1</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Stratification 2</th><th>Reference</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Stratification 3</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Stratification 4</th><th>string</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Stratification 5</th><th>Coding</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: IMMZ.IND.44 Logic\n * Adverse event following immunization (AEFI) cases\n * The total number of adverse events following the administration of vaccines during the reporting period\n * \n * Numerator: Number of AEFI cases during the reporting period\n * Numerator Computation: COUNT of immunization events WHERE &quot;Reaction reported&quot; is &quot;Yes&quot; AND &quot;Date and time of vaccination&quot; is during the reporting period\n * Denominator: Not applicable\n * Denominator Computation: Not applicable\n * \n * Disaggregation\n *  - Vaccine type: BCG, OPV, etc.\n *  - Vaccine manufacturer\n *  - Type of reaction: non-serious, disability, etc.\n *  - Administrative area\n *  - Reaction manifestation: rash, vomiting, etc.\n *\n * References: WHO Immunization facility analysis guide (5)\n * \n * Annotations: –\n */\nlibrary IMMZIND44Logic\n\nusing FHIR version '4.0.1'\n\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOCommon called WC\n\ninclude IMMZCommon called Common\ninclude IMMZConcepts called Concepts\ninclude IMMZIndicatorElements called Elements\n\n\nparameter &quot;Measurement Period&quot; Interval&lt;Date&gt; default Interval[@2025-01-01, @2025-12-31]\n\ncontext Immunization\n\n/*\n * As defined by Member State\n */\ndefine &quot;Initial Population&quot;:\n  true\n\n/*\n@denominator: Not applicable\n@pseudocode: Not applicable\n*/\ndefine &quot;Denominator&quot;:\n  true\n\n/*\n@numerator: Number of AEFI cases during the reporting period\n@pseudocode: COUNT of immunization events WHERE &quot;Reaction reported&quot; is &quot;Yes&quot; AND &quot;Date and time of vaccination&quot; is during the reporting period\n*/\ndefine &quot;Numerator&quot;:\n  exists Elements.&quot;Adverse Events for Immunization&quot;\n\n/*\n@disaggregation: Vaccine type: BCG, OPV, etc.\n                 Vaccine manufacturer\n                 Type of reaction: non-serious, disability, etc.\n                 Administrative area\n                 Reaction manifestation: rash, vomiting, etc.\n*/\ndefine &quot;Stratification 1&quot;:\n  First( Immunization.vaccineCode.coding )\n\ndefine &quot;Stratification 2&quot;:\n  Immunization.manufacturer\n\ndefine &quot;Stratification 3&quot;:\n  First( First (Elements.&quot;Adverse Events for Immunization&quot; ).seriousness.coding )\n\ndefine &quot;Stratification 4&quot;:\n  Elements.GetGeographicRegionForImmunization( Immunization )\n\ndefine &quot;Stratification 5&quot;:\n  First( First (Elements.&quot;Adverse Events for Immunization&quot; ).event.coding )  \n/*\ndefine &quot;Stratification 1&quot;:\n\tElements.&quot;By Geographic Region Stratifier&quot;\n\ndefine &quot;Stratification 2&quot;:\n\tElements.&quot;By Administrative Gender Stratifier&quot;\n\ndefine &quot;Stratification 3&quot;:\n\tElements.&quot;Age Stratifier&quot;\n\ndefine &quot;Stratification 4&quot;:\n\tElements.&quot;By Age Group Stratifier&quot;\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/IMMZIND44Logic",
  "version" : "1.0.0",
  "name" : "IMMZIND44Logic",
  "title" : "IMMZIND44Logic",
  "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 population criteria logic for the IMMZ.IND.44 indicator 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 Elements",
    "resource" : "http://smart.who.int/immunizations/Library/IMMZIndicatorElements"
  }],
  "parameter" : [{
    "name" : "Measurement Period",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "type" : "Period"
  },
  {
    "name" : "Immunization",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "Immunization"
  },
  {
    "name" : "Initial Population",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Denominator",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Numerator",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Stratification 1",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "Coding"
  },
  {
    "name" : "Stratification 2",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "Reference"
  },
  {
    "name" : "Stratification 3",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "Coding"
  },
  {
    "name" : "Stratification 4",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "string"
  },
  {
    "name" : "Stratification 5",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "Coding"
  }],
  "content" : [{
    "contentType" : "text/cql",
    "data" : "LyoKICogTGlicmFyeTogSU1NWi5JTkQuNDQgTG9naWMKICogQWR2ZXJzZSBldmVudCBmb2xsb3dpbmcgaW1tdW5pemF0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