{
  "resourceType": "Library",
  "id": "IMMZD2DTPneumococcalElements",
  "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;\">IMMZD2DTPneumococcalElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZD2DTPneumococcalElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">0.2.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-IMMZD2DTPneumococcalElements.html\">IMMZD2DTPneumococcalElements</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-25 23:30:34+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 context-independent elements for Pneumococcal used throughout 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-WHOConcepts.html\">WHOConcepts</a></li>\n                  \n                    <li><a href=\"Library-WHOCommon.html\">WHOCommon</a></li>\n                  \n                    <li><a href=\"Library-WHOElements.html\">WHOElements</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-IMMZElements.html\">IMMZElements</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>Patient</th><th>Patient</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Pneumococcal Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Pneumococcal Primary Series Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Number of Pneumococcal Primary Series Doses Administered</th><th>integer</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is less than 6 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>No pneumococcal primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is between 6 weeks and 5 years</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>One pneumococcal primary series dose was administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is less than or equal to 5 years</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Date of First Pneumococcal Dose</th><th>date</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The first pneumococcal dose was administered within 24 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Date of Latest Pneumococcal Dose</th><th>date</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered less than 8 weeks ago</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered more than 8 weeks ago</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The first pneumococcal dose was administered after 24 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client is at high risk for pneumococcal infection</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client is not at high risk for pneumococcal infection</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Two pneumococcal primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Pneumococcal Booster Series Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Number of Pneumococcal Booster Series Doses Administered</th><th>integer</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>No pneumococcal booster dose was administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The first pneumococcal dose was administered within 12 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The first pneumococcal dose was administered after 12 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>One pneumococcal booster dose was administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is less than 12 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client's HIV status is positive</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client had preterm birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is more than or equal to 12 months and less than 24 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered within 12 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered after 12 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client's HIV status is negative or unknown</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client did not have preterm birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is more than or equal to 24 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Two pneumococcal booster doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is more than 5 years</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is less than or equal to five years</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered less than 4 weeks ago</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The latest pneumococcal dose was administered more than 4 weeks ago</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The first pneumococcal dose was administered at 12–24 months post birth</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Three pneumococcal primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client's age is less than 24 months</th><th>boolean</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/*\n  * Library: IMMZD2DTPneumococcalElements\n  */\nlibrary IMMZD2DTPneumococcalElements\n\nusing FHIR version '4.0.1'\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOConcepts\ninclude WHOCommon called WC\ninclude WHOElements called WE\n\ninclude IMMZCommon called Common\ninclude IMMZConcepts called Concepts\ninclude IMMZElements called Elements\n\n\ncontext Patient\n\n/*\n@internal: Pneumococcal containing Doses Administered to Patient\n*/\ndefine &quot;Pneumococcal Doses Administered to Patient&quot;:\n  Elements.&quot;Doses Administered to Patient&quot; I\n  where\n    I.vaccineCode in Concepts.&quot;Pneumococcal vaccines&quot;\n\n/*\n@internal: Pneumococcal containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Pneumococcal Primary Series Doses Administered to Patient&quot;:\n  &quot;Pneumococcal Doses Administered to Patient&quot;.seriesPrimary()\n\n/*\n@internal: Number of Pneumococcal Primary Series doses\n*/\ndefine &quot;Number of Pneumococcal Primary Series Doses Administered&quot;:\n  Count(&quot;Pneumococcal Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: The client's age is less than 6 weeks\n@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 6 weeks\n@code: The client's age is less than 6 weeks-40\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is less than 6 weeks&quot;:\n  Elements.&quot;Current Patient Age In Weeks&quot; &lt; 6\n\n/*\n@input: No pneumococcal primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0\n@code: No pneumococcal primary series doses were administered-121\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;No pneumococcal primary series doses were administered&quot;:\n  &quot;Number of Pneumococcal Primary Series Doses Administered&quot; = 0\n\n/*\n@input: The client's age is between 6 weeks and 5 years\n@pseudocode: 6 weeks ≤ Today's date − &quot;Date of birth&quot; ≤ 5 years\n@code: The client's age is between 6 weeks and 5 years-50\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is between 6 weeks and 5 years&quot;:\n  6 &lt;= Elements.&quot;Current Patient Age In Weeks&quot;\n  and Elements.&quot;Current Patient Age In Years&quot; &lt;= 5\n\n/*\n@input: One pneumococcal primary series dose was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1\n@code: One pneumococcal primary series dose was administered-121\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;One pneumococcal primary series dose was administered&quot;:\n  &quot;Number of Pneumococcal Primary Series Doses Administered&quot; = 1\n\n/*\n@input: The client's age is less than or equal to 5 years\n@pseudocode: 'Today's date − &quot;Date of birth&quot; ≤ 5 years\n@code: The client's age is less than or equal to 5 years-41\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n*/\ndefine &quot;The client's age is less than or equal to 5 years&quot;:\n  Elements.&quot;Current Patient Age In Years&quot; &lt;= 5\n\n/*\n@input: The first pneumococcal dose was administered within 24 months post birth\n@pseudocode: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) − &quot;Date of birth&quot; &lt; 24 months\n@code: The first pneumococcal dose was administered within 24 months post birth-109\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n*/\ndefine &quot;The first pneumococcal dose was administered within 24 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &lt; 24\n\n/*\n@input: The latest pneumococcal dose was administered less than 8 weeks ago\n@pseudocode: Today's date − &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) &lt; 8 weeks\n@code: The latest pneumococcal dose was administered less than 8 weeks ago-104\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered less than 8 weeks ago&quot;:\n  &quot;Date of Latest Pneumococcal Dose&quot; is not null\n    and duration in weeks between &quot;Date of Latest Pneumococcal Dose&quot; and Now() &lt; 8\n\n/*\n@input: The latest pneumococcal dose was administered more than 8 weeks ago\n@pseudocode: Today's date − &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) ≥ 8 weeks\n@code: The latest pneumococcal dose was administered more than 8 weeks ago-104\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered more than 8 weeks ago&quot;:\n  not &quot;The latest pneumococcal dose was administered less than 8 weeks ago&quot;\n\n/*\n@input: The first pneumococcal dose was administered after 24 months post birth\n@pseudocode: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) − &quot;Date of birth&quot; ≥ 24 months\n@code: The first pneumococcal dose was administered after 24 months post birth-109\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The first pneumococcal dose was administered after 24 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &gt;= 24\n\n/*\n@input: Client is at high risk for pneumococcal infection\n@pseudocode: &quot;At high risk for pneumococcal infection&quot; = TRUE\n@code: Client is at high risk for pneumococcal infection-48\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client is at high risk for pneumococcal infection&quot;:\n  Elements.&quot;Client is at high risk for pneumococcal infection&quot;\n\n/*\n@input: Client is not at high risk for pneumococcal infection\n@pseudocode: &quot;At high risk for pneumococcal infection&quot; = FALSE\n@code: Client is not at high risk for pneumococcal infection-49\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client is not at high risk for pneumococcal infection&quot;:\n  Elements.&quot;Client is not at high risk for pneumococcal infection&quot;\n\n/*\n@input: Two pneumococcal primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2\n@code: Two pneumococcal primary series doses were administered-121\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Two pneumococcal primary series doses were administered&quot;:\n  &quot;Number of Pneumococcal Primary Series Doses Administered&quot; = 2\n\n/*\n@input: No pneumococcal booster dose was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 0\n@code: No pneumococcal booster dose was administered-119\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;No pneumococcal booster dose was administered&quot;:\n  &quot;Number of Pneumococcal Booster Series Doses Administered&quot; = 0\n\n/*\n@input: The first pneumococcal dose was administered within 12 months post birth\n@pseudocode: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; AND &quot;Dose number&quot; = 1) − &quot;Date of birth&quot; &lt; 12 months\n@code: The first pneumococcal dose was administered within 12 months post birth-131\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The first pneumococcal dose was administered within 12 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &lt; 12\n\n/*\n@input: The first pneumococcal dose was administered after 12 months post birth\n@pseudocode: &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; AND &quot;Dose number&quot; = 1) − &quot;Date of birth&quot; ≥ 12 months\n@code: The first pneumococcal dose was administered after 12 months post birth-131\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The first pneumococcal dose was administered after 12 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &gt;= 12\n\n/*\n@input: One pneumococcal booster dose was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 1\n@code: One pneumococcal booster dose was administered-119\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;One pneumococcal booster dose was administered&quot;:\n  &quot;Number of Pneumococcal Booster Series Doses Administered&quot; = 1\n\n/*\n@input: The client's age is less than 12 months\n@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 12 months\n@code: The client's age is less than 12 months-42\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n*/\ndefine &quot;The client's age is less than 12 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &lt; 12\n\n/*\n@input: Client's HIV status is positive\n@pseudocode: &quot;HIV status&quot; = &quot;HIV-positive&quot;\n@code: Client's HIV status is positive-29\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client's HIV status is positive&quot;:\n  Elements.&quot;Client's HIV status is positive&quot;\n\n/*\n@input: Client had preterm birth\n@pseudocode: &quot;Preterm birth&quot; = TRUE\n@code: Client had preterm birth-22\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client had preterm birth&quot;:\n  Elements.&quot;Client was a premature infant at birth&quot;\n\n/*\n@input: The client's age is more than or equal to 12 months and less than 24 months\n@pseudocode: 12 months ≤ Today's date − &quot;Date of birth&quot; &lt; 24 months\n@code: The client's age is more than or equal to 12 months and less than 24 months-54\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n*/\ndefine &quot;The client's age is more than or equal to 12 months and less than 24 months&quot;:\n  12 &lt;= Elements.&quot;Current Patient Age In Months&quot;\n  and Elements.&quot;Current Patient Age In Months&quot; &lt; 24\n\n/*\n@input: The latest pneumococcal dose was administered within 12 months post birth\n@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) − &quot;Date of birth&quot; &lt; 12 months\n@code: The latest pneumococcal dose was administered within 12 months post birth-116\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered within 12 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of Latest Pneumococcal Dose&quot;) &lt; 12\n\n/*\n@input: The latest pneumococcal dose was administered after 12 months post birth\n@pseudocode: Latest &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) − &quot;Date of birth&quot; ≥ 12 months\n@code: The latest pneumococcal dose was administered after 12 months post birth-116\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered after 12 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of Latest Pneumococcal Dose&quot;) &gt;= 12\n\n/*\n@input: Client's HIV status is negative or unknown\n@pseudocode: &quot;HIV status&quot; ≠ &quot;HIV-positive&quot;\n@code: Client's HIV status is negative or unknown-29\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client's HIV status is negative or unknown&quot;:\n  Elements.&quot;Client's HIV status is negative or unknown&quot;\n\n/*\n@input: Client did not have preterm birth\n@pseudocode: &quot;Preterm birth&quot; ≠ TRUE\n@code: Client did not have preterm birth-22\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Client did not have preterm birth&quot;:\n  Elements.&quot;Client was not a premature infant at birth&quot;\n\n/*\n@input: The client's age is more than or equal to 24 months\n@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 24 months\n@code: The client's age is more than or equal to 24 months-42\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is more than or equal to 24 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &gt;= 24\n\n/*\n@input: Two pneumococcal booster doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Booster dose&quot;) = 2\n@code: Two pneumococcal booster doses were administered-119\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n*/\ndefine &quot;Two pneumococcal booster doses were administered&quot;:\n  &quot;Number of Pneumococcal Booster Series Doses Administered&quot; = 2\n\n/*\n@input: The client's age is more than 5 years\n@pseudocode: Today's date − &quot;Date of birth&quot; &gt; 5 years\n@code: The client's age is more than 5 years-40\n@decision: IMMZ.D2.DT.Pneumococcal.2 doses with booster dose: 2 primary doses with a booster dose (2p+1)\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is more than 5 years&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &gt; 5\n\n/*\n@input: The client's age is less than or equal to five years\n@pseudocode: Today's date − &quot;Date of birth&quot; ≤ 5 years\n@code: The client's age is less than or equal to five years-40\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is less than or equal to five years&quot;:\n  &quot;The client's age is less than or equal to 5 years&quot;\n\n/*\n@input: The latest pneumococcal dose was administered less than 4 weeks ago\n@pseudocode: Today's date − &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) &lt; 4 weeks\n@code: The latest pneumococcal dose was administered less than 4 weeks ago-104\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered less than 4 weeks ago&quot;:\n  &quot;Date of Latest Pneumococcal Dose&quot; is not null\n    and duration in weeks between &quot;Date of Latest Pneumococcal Dose&quot; and Now() &lt; 4\n\n/*\n@input: The latest pneumococcal dose was administered more than 4 weeks ago\n@pseudocode: Today's date − &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) ≥ 4 weeks\n@code: The latest pneumococcal dose was administered more than 4 weeks ago-104\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The latest pneumococcal dose was administered more than 4 weeks ago&quot;:\n  not &quot;The latest pneumococcal dose was administered less than 4 weeks ago&quot;\n\n/*\n@input: The first pneumococcal dose was administered at 12–24 months post birth\n@pseudocode: 12 months ≤ &quot;Date and time of vaccination&quot; (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot;) − &quot;Date of birth&quot; &lt; 24 months\n@code: The first pneumococcal dose was administered at 12–24 months post birth-121\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The first pneumococcal dose was administered at 12–24 months post birth&quot;:\n  AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &gt;= 12\n  and AgeInMonthsAt(&quot;Date of First Pneumococcal Dose&quot;) &lt; 24\n\n/*\n@input: Three pneumococcal primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Pneumococcal vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 3\n@code: Three pneumococcal primary series doses were administered-121\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;Three pneumococcal primary series doses were administered&quot;:\n  &quot;Number of Pneumococcal Primary Series Doses Administered&quot; = 3\n\n/*\n@input: The client's age is less than 24 months\n@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 24 months\n@code: The client's age is less than 24 months-42\n@decision: IMMZ.D2.DT.Pneumococcal.3 doses: 3 primary doses (3p+0)\n*/\ndefine &quot;The client's age is less than 24 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &lt; 24\n\n/*\n@internal: Date of First Pneumococcal Dose\n*/\ndefine &quot;Date of First Pneumococcal Dose&quot;:\n  date from start of &quot;Pneumococcal Doses Administered to Patient&quot;.earliest().occurrence.toInterval()\n\n/*\n@internal: Date of Latest Pneumococcal Dose\n*/\ndefine &quot;Date of Latest Pneumococcal Dose&quot;:\n  date from start of &quot;Pneumococcal Doses Administered to Patient&quot;.mostRecent().occurrence.toInterval()\n\n/*\n@internal: Pneumococcal Booster Series Doses Administered to Patient\n*/\ndefine &quot;Pneumococcal Booster Series Doses Administered to Patient&quot;:\n  &quot;Pneumococcal Doses Administered to Patient&quot;.seriesBooster()\n\n/*\n@internal: Number of Pneumococcal Booster Series Doses Administered\n*/\ndefine &quot;Number of Pneumococcal Booster Series Doses Administered&quot;:\n  Count(&quot;Pneumococcal Booster Series Doses Administered to Patient&quot;)\n</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><b>Content: </b> application/elm+xml</th></tr>\n              <tr><td><pre><code>Encoded data (129344 characters)</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\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/IMMZD2DTPneumococcalElements",
  "version": "0.2.0",
  "name": "IMMZD2DTPneumococcalElements",
  "title": "IMMZD2DTPneumococcalElements",
  "status": "draft",
  "experimental": false,
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/library-type",
        "code": "logic-library"
      }
    ]
  },
  "date": "2026-03-25T23:30:34+00:00",
  "publisher": "WHO",
  "contact": [
    {
      "name": "WHO",
      "telecom": [
        {
          "system": "url",
          "value": "http://who.int"
        }
      ]
    }
  ],
  "description": "This library defines context-independent elements for Pneumococcal used throughout the Immunization CPG",
  "relatedArtifact": [
    {
      "type": "depends-on",
      "display": "Library WHOConcepts",
      "resource": "http://smart.who.int/immunizations/Library/WHOConcepts"
    },
    {
      "type": "depends-on",
      "display": "Library WC",
      "resource": "http://smart.who.int/immunizations/Library/WHOCommon"
    },
    {
      "type": "depends-on",
      "display": "Library WE",
      "resource": "http://smart.who.int/immunizations/Library/WHOElements"
    },
    {
      "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/IMMZElements"
    }
  ],
  "parameter": [
    {
      "name": "Patient",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Patient"
    },
    {
      "name": "Pneumococcal Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Pneumococcal Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Pneumococcal Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "The client's age is less than 6 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No pneumococcal primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is between 6 weeks and 5 years",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "One pneumococcal primary series dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is less than or equal to 5 years",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of First Pneumococcal Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The first pneumococcal dose was administered within 24 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of Latest Pneumococcal Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    },
    {
      "name": "The latest pneumococcal dose was administered less than 8 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest pneumococcal dose was administered more than 8 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The first pneumococcal dose was administered after 24 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client is at high risk for pneumococcal infection",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client is not at high risk for pneumococcal infection",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Two pneumococcal primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Pneumococcal Booster Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Pneumococcal Booster Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "No pneumococcal booster dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The first pneumococcal dose was administered within 12 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The first pneumococcal dose was administered after 12 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "One pneumococcal booster dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is less than 12 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's HIV status is positive",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client had preterm birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is more than or equal to 12 months and less than 24 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest pneumococcal dose was administered within 12 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest pneumococcal dose was administered after 12 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's HIV status is negative or unknown",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client did not have preterm birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is more than or equal to 24 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Two pneumococcal booster doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is more than 5 years",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is less than or equal to five years",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest pneumococcal dose was administered less than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The latest pneumococcal dose was administered more than 4 weeks ago",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The first pneumococcal dose was administered at 12–24 months post birth",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Three pneumococcal primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The client's age is less than 24 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD2DTPneumococcalElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD2DTPneumococcalElements.elm.xml"
    }
  ]
}
