{
  "resourceType": "Library",
  "id": "IMMZIndicatorElements",
  "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;\">IMMZIndicatorElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZIndicatorElements</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-IMMZIndicatorElements.html\">IMMZIndicatorElements</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        <tr>\n            <th scope=\"row\"><b>Experimental: </b></th>\n            <td style=\"padding-left: 4px;\">true</td>\n        </tr>\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 indicator-based elements and terminologies used throughout the Immunization CPG indicators</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-IMMZConcepts.html\">IMMZConcepts</a></li>\n                  \n                    <li><a href=\"Library-IMMZAgeConcepts.html\">IMMZAgeConcepts</a></li>\n                  \n                    <li><a href=\"Library-IMMZCommon.html\">IMMZCommon</a></li>\n                  \n                    <li><a href=\"Library-IMMZElements.html\">IMMZElements</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">AdministrativeGender</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>Measurement Period</th><th>Period</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>Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Newborn By Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Infant By Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Toddler By Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Child By Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Adolescent By Age Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>By Age Group Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>By Administrative Gender Stratifier</th><th>Coding</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>By Geographic Region Stratifier</th><th>string</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Patient Deceased During Measurement Period</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Patient Born During Measurement Period</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Patient Under 12 Months Old During Measurement Period</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Patient Under 2 Years Old During Measurement Period</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Doses Administered to Patient During Measurement Period</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Adverse Events During Measurement Period</th><th>AdverseEvent</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Immunizations And Adverse Events During Measurement Period</th><th>Resource</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Pentavalent Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Pentavalent Doses Administered to Patient During Measurement Period</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Measles and Rubella Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Measles and Rubella Doses Administered to Patient During Measurement Period</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>COVID-19 Doses Administered to Patient During Measurement Period</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Adverse Events for Immunization</th><th>AdverseEvent</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Immunizations with Adverse Events During Measurement Period</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Adverse Event Reactions During Measurement Period</th><th>AdverseEvent</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Data Requirements:</b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>\n              \n                <tr>\n                  <th>AdverseEvent</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/AdverseEvent</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>AdverseEvent</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/AdverseEvent</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Location</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Location</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n                <tr>\n                  <th>Location</th>\n                  <th>http://hl7.org/fhir/StructureDefinition/Location</th>\n                  <th/>\n                  <th>\n                    \n                  </th>\n                </tr>\n              \n            </table>\n          </td>\n        </tr>\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 * Immunization Indicator Elements by Patients as Context\n */\n\nlibrary IMMZIndicatorElements\n\nusing FHIR version '4.0.1'\n\ninclude FHIRHelpers version '4.0.1'\n\ninclude WHOConcepts\ninclude WHOCommon called WC\n\ninclude IMMZConcepts called Concepts\ninclude IMMZAgeConcepts called Age\ninclude IMMZCommon called Common\ninclude IMMZElements called Elements\n\n\n\ncodesystem &quot;Administrative Gender Codes&quot;: 'http://hl7.org/fhir/administrative-gender'\ncode &quot;Males&quot; : 'male' from &quot;Administrative Gender Codes&quot; display 'Males'\ncode &quot;Females&quot; : 'female' from &quot;Administrative Gender Codes&quot; display 'Females'\ncode &quot;Other&quot; : 'other' from &quot;Administrative Gender Codes&quot; display 'Other/NA'\n\nparameter &quot;Measurement Period&quot; Interval&lt;Date&gt; default Interval[@2025-01-01, @2025-12-31]\n\ncontext Patient\n\n/*\n@stratifier: Age in Years\n*/\ndefine &quot;Age Stratifier&quot;:\n  case\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 1 then Age.&quot;P0Y--P1Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 2 then Age.&quot;P1Y--P2Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 3 then Age.&quot;P2Y--P3Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 4 then Age.&quot;P3Y--P4Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 5 then Age.&quot;P4Y--P5Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 6 then Age.&quot;P5Y--P6Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 7 then Age.&quot;P6Y--P7Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 8 then Age.&quot;P7Y--P8Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 9 then Age.&quot;P8Y--P9Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 10 then Age.&quot;P9Y--P10Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 11 then Age.&quot;P10Y--P11Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 12 then Age.&quot;P11Y--P12Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 13 then Age.&quot;P12Y--P13Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 14 then Age.&quot;P13Y--P14Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 15 then Age.&quot;P14Y--P15Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 16 then Age.&quot;P15Y--P16Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 17 then Age.&quot;P16Y--P17Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 18 then Age.&quot;P17Y--P18Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 19 then Age.&quot;P18Y--P19Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 20 then Age.&quot;P19Y--P20Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 21 then Age.&quot;P20Y--P21Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 22 then Age.&quot;P21Y--P22Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 23 then Age.&quot;P22Y--P23Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 24 then Age.&quot;P23Y--P24Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 25 then Age.&quot;P24Y--P25Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 26 then Age.&quot;P25Y--P26Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 27 then Age.&quot;P26Y--P27Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 28 then Age.&quot;P27Y--P28Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 29 then Age.&quot;P28Y--P29Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 30 then Age.&quot;P29Y--P30Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 31 then Age.&quot;P30Y--P31Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 32 then Age.&quot;P31Y--P32Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 33 then Age.&quot;P32Y--P33Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 34 then Age.&quot;P33Y--P34Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 35 then Age.&quot;P34Y--P35Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 36 then Age.&quot;P35Y--P36Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 37 then Age.&quot;P36Y--P37Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 38 then Age.&quot;P37Y--P38Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 39 then Age.&quot;P38Y--P39Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 40 then Age.&quot;P39Y--P40Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 41 then Age.&quot;P40Y--P41Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 42 then Age.&quot;P41Y--P42Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 43 then Age.&quot;P42Y--P43Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 44 then Age.&quot;P43Y--P44Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 45 then Age.&quot;P44Y--P45Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 46 then Age.&quot;P45Y--P46Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 47 then Age.&quot;P46Y--P47Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 48 then Age.&quot;P47Y--P48Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 49 then Age.&quot;P48Y--P49Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 50 then Age.&quot;P49Y--P50Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 51 then Age.&quot;P50Y--P51Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 52 then Age.&quot;P51Y--P52Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 53 then Age.&quot;P52Y--P53Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 54 then Age.&quot;P53Y--P54Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 55 then Age.&quot;P54Y--P55Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 56 then Age.&quot;P55Y--P56Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 57 then Age.&quot;P56Y--P57Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 58 then Age.&quot;P57Y--P58Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 59 then Age.&quot;P58Y--P59Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 60 then Age.&quot;P59Y--P60Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 61 then Age.&quot;P60Y--P61Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 62 then Age.&quot;P61Y--P62Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 63 then Age.&quot;P62Y--P63Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 64 then Age.&quot;P63Y--P64Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 65 then Age.&quot;P64Y--P65Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 66 then Age.&quot;P65Y--P66Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 67 then Age.&quot;P66Y--P67Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 68 then Age.&quot;P67Y--P68Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 69 then Age.&quot;P68Y--P69Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 70 then Age.&quot;P69Y--P70Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 71 then Age.&quot;P70Y--P71Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 72 then Age.&quot;P71Y--P72Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 73 then Age.&quot;P72Y--P73Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 74 then Age.&quot;P73Y--P74Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 75 then Age.&quot;P74Y--P75Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 76 then Age.&quot;P75Y--P76Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 77 then Age.&quot;P76Y--P77Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 78 then Age.&quot;P77Y--P78Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 79 then Age.&quot;P78Y--P79Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 80 then Age.&quot;P79Y--P80Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 81 then Age.&quot;P80Y--P81Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 82 then Age.&quot;P81Y--P82Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 83 then Age.&quot;P82Y--P83Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 84 then Age.&quot;P83Y--P84Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 85 then Age.&quot;P84Y--P85Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 86 then Age.&quot;P85Y--P86Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 87 then Age.&quot;P86Y--P87Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 88 then Age.&quot;P87Y--P88Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 89 then Age.&quot;P88Y--P89Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 90 then Age.&quot;P89Y--P90Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 91 then Age.&quot;P90Y--P91Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 92 then Age.&quot;P91Y--P92Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 93 then Age.&quot;P92Y--P93Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 94 then Age.&quot;P93Y--P94Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 95 then Age.&quot;P94Y--P95Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 96 then Age.&quot;P95Y--P96Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 97 then Age.&quot;P96Y--P97Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 98 then Age.&quot;P97Y--P98Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 99 then Age.&quot;P98Y--P99Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 100 then Age.&quot;P99Y--P100Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt;= 100 then Age.&quot;P100Y--P9999Y&quot;\n    else null\n  end\n\n/* \n@stratifier: Infant disaggregations by age\n*/\ndefine &quot;Newborn By Age Stratifier&quot;:\n    case \n        when AgeInHoursAt(end of &quot;Measurement Period&quot;) &lt;= 24 then Age.&quot;PT0H--PT24H&quot;\n        when AgeInWeeksAt(end of &quot;Measurement Period&quot;) &lt;= 2 then Age.&quot;PT24H--P2W&quot;\n        when AgeInWeeksAt(end of &quot;Measurement Period&quot;) &gt; 2 then Age.&quot;P2W--P9999Y&quot;\n        else null\n    end\n\n/*\n@stratifier: Infant disaggregations by age\n*/\ndefine &quot;Infant By Age Stratifier&quot;:\n    case \n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 1 then Age.&quot;P0Y--P1Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt;= 1 then Age.&quot;P1Y--P9999Y&quot;\n        else null\n    end\n\n/* \n@stratifier: Toddler By Age Stratifiers\n*/\ndefine &quot;Toddler By Age Stratifier&quot;:\n    case \n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 1 then Age.&quot;P0Y--P1Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 2 then Age.&quot;P1Y--P2Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt;= 2 then Age.&quot;P2Y--P9999Y&quot;\n        else null\n    end\n\n/* \n@stratifier: Child By Age Stratifiers\n*/\ndefine &quot;Child By Age Stratifier&quot;:\n    case \n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 1 then Age.&quot;P0Y--P1Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 3 then Age.&quot;P1Y--P3Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 6 then Age.&quot;P3Y--P6Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 13 then Age.&quot;P6Y--P13Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt;= 13 then Age.&quot;P13Y--P9999Y&quot;\n        else null\n    end\n\n/* \n@stratifier: Adolescent By Age Stratifiers\n*/\ndefine &quot;Adolescent By Age Stratifier&quot;:\n    case \n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 9 then Age.&quot;P0Y--P9Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt;= 14 then Age.&quot;P9Y--P15Y&quot;\n        when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt; 14 then Age.&quot;P15Y--P9999Y&quot;\n        else null\n    end\n\n/*\n@stratifier: Age Group Stratifier\n*/\ndefine &quot;By Age Group Stratifier&quot;:\n  case \n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 18 then Age.&quot;P0Y--P18Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 30 then Age.&quot;P18Y--P30Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 50 then Age.&quot;P30Y--P50Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &lt; 70 then Age.&quot;P50Y--P70Y&quot;\n    when AgeInYearsAt(end of &quot;Measurement Period&quot;) &gt;= 70 then Age.&quot;P70Y--P9999Y&quot;\n    else null\n  end\n\n/*\n@stratifier: By Administrative Gender of Patient Stratifier\n*/\ndefine &quot;By Administrative Gender Stratifier&quot;:\n    case \n        when Patient.gender = 'male' then &quot;Males&quot;\n        when Patient.gender = 'female' then &quot;Females&quot;\n        else &quot;Other&quot;\n    end\n\n/*\n@stratifier: By Geographic Region of Patient Stratifier\n*/\ndefine &quot;By Geographic Region Stratifier&quot;:\n    First(Patient.address A where A.use in { 'home' }).state\n\n/** \n * @dataElement Patient is deceased\n */\ndefine &quot;Patient Deceased During Measurement Period&quot;:\n  case \n    when Patient.deceased is FHIR.boolean then Patient.deceased as FHIR.boolean\n    when Patient.deceased is FHIR.dateTime then Patient.deceased as FHIR.dateTime before end of &quot;Measurement Period&quot;\n    else false\n  end\n\n/** \n * Patient was born during measurement period\n */\ndefine &quot;Patient Born During Measurement Period&quot;:\n    Patient.birthDate during &quot;Measurement Period&quot;\n\n/** \n * Patient is &lt; 12 months old at the end of the measurement period\n */\ndefine &quot;Patient Under 12 Months Old During Measurement Period&quot;:\n    Patient.birthDate less than 12 months before end of &quot;Measurement Period&quot;\n\n/** \n * Patient is &lt; 12 years old at the end of the measurement period\n */\ndefine &quot;Patient Under 2 Years Old During Measurement Period&quot;:\n    Patient.birthDate less than 2 years before end of &quot;Measurement Period&quot;\n\n/** \n * @define Doses which were administered during the measurement period\n */\ndefine &quot;Doses Administered to Patient During Measurement Period&quot;:\n  Elements.&quot;Doses Administered to Patient&quot;  I\n    where I.occurrence.toInterval() starts during &quot;Measurement Period&quot;\n\ndefine &quot;Adverse Events During Measurement Period&quot;:\n  [AdverseEvent] AE\n    where AE.date.toInterval() starts during &quot;Measurement Period&quot;\n/*\n  [Observation: WHOConcepts.&quot;Adverse Events&quot;] O\n    where O.effective.toInterval() during &quot;Measurement Period&quot;\n*/\n\ndefine &quot;Immunizations And Adverse Events During Measurement Period&quot;:\n  from\n    &quot;Doses Administered to Patient During Measurement Period&quot; I,\n    &quot;Adverse Events During Measurement Period&quot; O\n  where I.reaction.detail.references(O)\n  return { immunization: I, adverseEvent: O }\n\ndefine &quot;Pentavalent Doses Administered to Patient&quot;:\n  Elements.&quot;Doses Administered to Patient&quot; I \n    where I.vaccineCode in Concepts.&quot;Pentavalent vaccines&quot;\n\ndefine &quot;Pentavalent Doses Administered to Patient During Measurement Period&quot;:\n  &quot;Pentavalent Doses Administered to Patient&quot; I\n    where I.occurrence.toInterval() starts during &quot;Measurement Period&quot;\n\ndefine &quot;Measles and Rubella Doses Administered to Patient&quot;:\n  Elements.&quot;Doses Administered to Patient&quot; I \n    where I.vaccineCode in Concepts.&quot;Measles and rubella-containing vaccines&quot;\n\ndefine &quot;Measles and Rubella Doses Administered to Patient During Measurement Period&quot;:\n  &quot;Measles and Rubella Doses Administered to Patient&quot; I\n    where I.occurrence.toInterval() starts during &quot;Measurement Period&quot;\n\ndefine &quot;COVID-19 Doses Administered to Patient During Measurement Period&quot;:\n  &quot;Doses Administered to Patient During Measurement Period&quot; I \n    where I.vaccineCode in Concepts.&quot;COVID-19 vaccines&quot;\n\ndefine &quot;Adverse Events for Immunization&quot;:\n  [AdverseEvent] AE\n    where AE.actuality = 'actual'\n\n/** \n * @define Adverse events for immunizations which occurred during (or observed) during measurement period\n */\ndefine &quot;Immunizations with Adverse Events During Measurement Period&quot;:\n  &quot;Immunizations And Adverse Events During Measurement Period&quot; I\n    return I.immunization\n\n/** \n * @define Adverse events for immunizations which occurred during (or observed) during measurement period\n */\ndefine &quot;Adverse Event Reactions During Measurement Period&quot;:\n  &quot;Immunizations And Adverse Events During Measurement Period&quot; I\n    return I.adverseEvent\n\n/** \n * @function\n * @param immunization The immunization record for which the location should be retrieved\n * @return FHIR.address The location that the immunization event occurred\n */\ndefine function GetGeographicRegionForImmunization(immunization Immunization):\n  (\n    [Location] L\n        where immunization.location.references(L)\n  ).only().address.state\n\n/** \n * @function\n * @param immunization The immunization record for which the location should be retrieved\n * @return FHIR.name The name of the location that the immunization event occurred\n */\ndefine function GetLocationNameForImmunization(immunization Immunization):\n  (\n    [Location] L\n        where immunization.location.references(L)\n  ).only().name\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 (513728 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-measles/Library/IMMZIndicatorElements",
  "version": "0.2.0",
  "name": "IMMZIndicatorElements",
  "title": "IMMZIndicatorElements",
  "status": "draft",
  "experimental": true,
  "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 indicator-based elements and terminologies used throughout the Immunization CPG indicators",
  "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 Concepts",
      "resource": "http://smart.who.int/immunizations/Library/IMMZConcepts"
    },
    {
      "type": "depends-on",
      "display": "Library Age",
      "resource": "http://smart.who.int/immunizations/Library/IMMZAgeConcepts"
    },
    {
      "type": "depends-on",
      "display": "Library Common",
      "resource": "http://smart.who.int/immunizations/Library/IMMZCommon"
    },
    {
      "type": "depends-on",
      "display": "Library Elements",
      "resource": "http://smart.who.int/immunizations/Library/IMMZElements"
    },
    {
      "type": "depends-on",
      "display": "Code System Administrative Gender Codes",
      "resource": "http://hl7.org/fhir/administrative-gender"
    }
  ],
  "parameter": [
    {
      "name": "Measurement Period",
      "use": "in",
      "min": 0,
      "max": "1",
      "type": "Period"
    },
    {
      "name": "Patient",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Patient"
    },
    {
      "name": "Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "Newborn By Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "Infant By Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "Toddler By Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "Child By Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "Adolescent By Age Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "By Age Group Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "By Administrative Gender Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "Coding"
    },
    {
      "name": "By Geographic Region Stratifier",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "string"
    },
    {
      "name": "Patient Deceased During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Patient Born During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Patient Under 12 Months Old During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Patient Under 2 Years Old During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Doses Administered to Patient During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Adverse Events During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "AdverseEvent"
    },
    {
      "name": "Immunizations And Adverse Events During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Resource"
    },
    {
      "name": "Pentavalent Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Pentavalent Doses Administered to Patient During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Measles and Rubella Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Measles and Rubella Doses Administered to Patient During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "COVID-19 Doses Administered to Patient During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Adverse Events for Immunization",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "AdverseEvent"
    },
    {
      "name": "Immunizations with Adverse Events During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Adverse Event Reactions During Measurement Period",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "AdverseEvent"
    }
  ],
  "dataRequirement": [
    {
      "type": "AdverseEvent",
      "profile": [
        "http://hl7.org/fhir/StructureDefinition/AdverseEvent"
      ]
    },
    {
      "type": "AdverseEvent",
      "profile": [
        "http://hl7.org/fhir/StructureDefinition/AdverseEvent"
      ]
    },
    {
      "type": "Location",
      "profile": [
        "http://hl7.org/fhir/StructureDefinition/Location"
      ]
    },
    {
      "type": "Location",
      "profile": [
        "http://hl7.org/fhir/StructureDefinition/Location"
      ]
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZIndicatorElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZIndicatorElements.elm.xml"
    }
  ]
}
