{
  "resourceType": "Library",
  "id": "IMMZD2DTRotavirusElements",
  "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;\">IMMZD2DTRotavirusElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZD2DTRotavirusElements</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-IMMZD2DTRotavirusElements.html\">IMMZD2DTRotavirusElements</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 Rotavirus 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>Rotavirus Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Rotavirus 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 Rotavirus Primary Series Doses Administered</th><th>integer</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>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 rotavirus primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client's age is between 6 weeks and 24 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>No live vaccine was administered in the last 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Live vaccine was administered in the last 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>One rotavirus primary series dose was administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Two rotavirus primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Brand of First Dose</th><th>CodeableConcept</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Brand of Second Dose</th><th>CodeableConcept</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The series administered to the client contains the same product</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The series administered to the client is a mixed series or a series with unknown vaccine products</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Live vaccines was administered in the last 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>No live vaccine was administered in last 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The series contain more than two doses</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Live vaccine was administered in last 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The series contain less than or equal to two doses</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Three rotavirus primary series doses were administered</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client's age is more than 24 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Date of Latest Rotavirus Dose</th><th>date</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: IMMZD2DTRotavirusElements\n  */\nlibrary IMMZD2DTRotavirusElements\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: Rotavirus containing Doses Administered to Patient\n*/\ndefine &quot;Rotavirus Doses Administered to Patient&quot;:\n  Elements.&quot;Doses Administered to Patient&quot; I\n  where\n    I.vaccineCode in Concepts.&quot;Rotavirus vaccines&quot;\n\n/*\n@internal: Rotavirus containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Rotavirus Primary Series Doses Administered to Patient&quot;:\n  &quot;Rotavirus Doses Administered to Patient&quot;.seriesPrimary()\n\n/*\n@internal: Number of Rotavirus Primary Series doses\n*/\ndefine &quot;Number of Rotavirus Primary Series Doses Administered&quot;:\n  Count(&quot;Rotavirus Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: Client's age is less than 6 weeks\n@pseudocode: 'Today's date – &quot;Date of birth&quot; &lt; 6 weeks\n@code: Client's age is less than 6 weeks-41\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;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 rotavirus primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0\n@code: No rotavirus primary series doses were administered-118\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;No rotavirus primary series doses were administered&quot;:\n  &quot;Number of Rotavirus Primary Series Doses Administered&quot; = 0\n\n/*\n@input: Client's age is between 6 weeks and 24 months\n@pseudocode: 6 weeks ≤ Today's date – &quot;Date of birth&quot; &lt; 24 months\n@code: Client's age is between 6 weeks and 24 months-52\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Client's age is between 6 weeks and 24 months&quot;:\n  6 &lt;= Elements.&quot;Current Patient Age In Weeks&quot;\n  and Elements.&quot;Current Patient Age In Months&quot; &lt; 24\n\n/*\n@input: No live vaccine was administered in the last 4 weeks\n@pseudocode: Today's date - latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks\n@code: No live vaccine was administered in the last 4 weeks-92\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;No live vaccine was administered in the last 4 weeks&quot;:\n  Elements.&quot;No live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: Live vaccine was administered in the last 4 weeks\n@pseudocode: Today's date - latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks\n@code: Live vaccine was administered in the last 4 weeks-92\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Live vaccine was administered in the last 4 weeks&quot;:\n  Elements.&quot;Live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: One rotavirus primary series dose was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1\n@code: One rotavirus primary series dose was administered-118\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;One rotavirus primary series dose was administered&quot;:\n  &quot;Number of Rotavirus Primary Series Doses Administered&quot; = 1\n\n/*\n@input: Two rotavirus primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 2\n@code: Two rotavirus primary series doses were administered-118\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Two rotavirus primary series doses were administered&quot;:\n  &quot;Number of Rotavirus Primary Series Doses Administered&quot; = 2\n\n/*\n@input: The series administered to the client is a mixed series or a series with unknown vaccine products\n@pseudocode: &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) ≠ &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)\n@code: The series administered to the client is a mixed series or a series with unknown vaccine products-169\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;The series administered to the client is a mixed series or a series with unknown vaccine products&quot;:\n  not &quot;The series administered to the client contains the same product&quot;\n\n/*\n@input: Live vaccines was administered in the last 4 weeks\n@pseudocode: Today's date - latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks\n@code: Live vaccines was administered in the last 4 weeks-92\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Live vaccines was administered in the last 4 weeks&quot;:\n  Elements.&quot;Live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: No live vaccine was administered in last 4 weeks\n@pseudocode: Today's date - latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) ≥ 4 weeks\n@code: No live vaccine was administered in last 4 weeks-92\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;No live vaccine was administered in last 4 weeks&quot;:\n  Elements.&quot;No live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: The series administered to the client contains the same product\n@pseudocode: &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 1) = &quot;Vaccine brand&quot; (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; AND &quot;Dose number&quot; = 2)\n@code: The series administered to the client contains the same product-169\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;The series administered to the client contains the same product&quot;:\n  &quot;Brand of First Dose&quot; is not null and\n  &quot;Brand of First Dose&quot; ~ &quot;Brand of Second Dose&quot;\n\n/*\n@input: The series contain more than two doses\n@pseudocode: &quot;Total doses in series&quot; &gt; 2\n@code: The series contain more than two doses-27\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;The series contain more than two doses&quot;:\n  ToInteger(&quot;Rotavirus Doses Administered to Patient&quot;.mostRecent().seriesDoses()) &gt; 2\n\n/*\n@input: Live vaccine was administered in last 4 weeks\n@pseudocode: Today's date - latest &quot;Date and time of vaccination&quot; (where &quot;Live vaccine&quot; = TRUE) &lt; 4 weeks\n@code: Live vaccine was administered in last 4 weeks-92\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Live vaccine was administered in last 4 weeks&quot;:\n  Elements.&quot;Live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: The series contain less than or equal to two doses\n@pseudocode: &quot;Total doses in series&quot; ≤ 2\n@code: The series contain less than or equal to two doses-27\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;The series contain less than or equal to two doses&quot;:\n  ToInteger(&quot;Rotavirus Doses Administered to Patient&quot;.mostRecent().seriesDoses()) &lt;= 2\n\n/*\n@input: Three rotavirus primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Rotavirus vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 3\n@code: Three rotavirus primary series doses were administered-118\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Three rotavirus primary series doses were administered&quot;:\n  &quot;Number of Rotavirus Primary Series Doses Administered&quot; = 3\n\n/*\n@input: Client's age is more than 24 months\n@pseudocode: &quot;Date of birth&quot; &gt; 24 months\n@code: Client's age is more than 24 months-27\n@decision: IMMZ.D2.DT.Rotavirus\n*/\ndefine &quot;Client's age is more than 24 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &gt;= 24\n\n/*\n@internal: Date of Latest Rotavirus Dose\n*/\ndefine &quot;Date of Latest Rotavirus Dose&quot;:\n  date from start of &quot;Rotavirus Doses Administered to Patient&quot;.mostRecent().occurrence.toInterval()\n\n/*\n@internal: Brand of First Dose\n*/\ndefine &quot;Brand of First Dose&quot;:\n  First(&quot;Rotavirus Doses Administered to Patient&quot;.getDose('1')).brand()\n\n/*\n@internal: Brand of Second Dose\n*/\ndefine &quot;Brand of Second Dose&quot;:\n  First(&quot;Rotavirus Doses Administered to Patient&quot;.getDose('2')).brand()\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 (68084 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/IMMZD2DTRotavirusElements",
  "version": "0.2.0",
  "name": "IMMZD2DTRotavirusElements",
  "title": "IMMZD2DTRotavirusElements",
  "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 Rotavirus 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": "Rotavirus Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Rotavirus Primary Series Doses Administered to Patient",
      "use": "out",
      "min": 0,
      "max": "*",
      "type": "Immunization"
    },
    {
      "name": "Number of Rotavirus Primary Series Doses Administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "integer"
    },
    {
      "name": "Client's age is less than 6 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No rotavirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is between 6 weeks and 24 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No live vaccine was administered in the last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Live vaccine was administered in the last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "One rotavirus primary series dose was administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Two rotavirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Brand of First Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "CodeableConcept"
    },
    {
      "name": "Brand of Second Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "CodeableConcept"
    },
    {
      "name": "The series administered to the client contains the same product",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The series administered to the client is a mixed series or a series with unknown vaccine products",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Live vaccines was administered in the last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "No live vaccine was administered in last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The series contain more than two doses",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Live vaccine was administered in last 4 weeks",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "The series contain less than or equal to two doses",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Three rotavirus primary series doses were administered",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Client's age is more than 24 months",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "boolean"
    },
    {
      "name": "Date of Latest Rotavirus Dose",
      "use": "out",
      "min": 0,
      "max": "1",
      "type": "date"
    }
  ],
  "content": [
    {
      "contentType": "text/cql",
      "url": "Library-IMMZD2DTRotavirusElements.cql"
    },
    {
      "contentType": "application/elm+xml",
      "url": "Library-IMMZD2DTRotavirusElements.elm.xml"
    }
  ]
}
