{
  "resourceType" : "Library",
  "id" : "IMMZD2DTYellowfeverElements",
  "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;\">IMMZD2DTYellowfeverElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZD2DTYellowfeverElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">1.0.0</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"Library-IMMZD2DTYellowfeverElements.html\">IMMZD2DTYellowfeverElements</a></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Status: </b></th>\n            <td style=\"padding-left: 4px;\">draft</td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>logic-library</span>\n                        </p>\n                        \n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2026-03-31 13:54:17+0000</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Publisher: </b></th>\n            <td style=\"padding-left: 4px;\">WHO</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Description: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>This library defines context-independent elements for Yellow fever 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>Yellow fever Doses Administered to Patient</th><th>Immunization</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>Yellow fever 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 Yellow fever Primary Series Doses Administered</th><th>integer</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>No yellow fever 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 less than 9 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Client's age is more than or equal to 9 months</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>Live vaccine was administered in the past 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 the past 4 weeks</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>One yellow fever primary series dose was administered</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: IMMZD2DTYellowfeverElements\n  */\nlibrary IMMZD2DTYellowfeverElements\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: Yellow fever containing Doses Administered to Patient\n*/\ndefine &quot;Yellow fever Doses Administered to Patient&quot;:\n  Elements.&quot;Doses Administered to Patient&quot; I\n  where\n    I.vaccineCode in Concepts.&quot;Yellow fever vaccines&quot;\n\n/*\n@internal: Yellow fever containing Doses Administered to Patient that are in the Primary series\n*/\ndefine &quot;Yellow fever Primary Series Doses Administered to Patient&quot;:\n  &quot;Yellow fever Doses Administered to Patient&quot;.seriesPrimary()\n\n/*\n@internal: Number of Yellow fever Primary Series doses\n*/\ndefine &quot;Number of Yellow fever Primary Series Doses Administered&quot;:\n  Count(&quot;Yellow fever Primary Series Doses Administered to Patient&quot;)\n\n/*\n@input: No yellow fever primary series doses were administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Yellow fever vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 0\n@code: No yellow fever primary series doses were administered-121\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;No yellow fever primary series doses were administered&quot;:\n  &quot;Number of Yellow fever Primary Series Doses Administered&quot; = 0\n\n/*\n@input: Client's age is less than 9 months\n@pseudocode: Today's date − &quot;Date of birth&quot; &lt; 9 months\n@code: Client's age is less than 9 months-41\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;Client's age is less than 9 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &lt; 9\n\n/*\n@input: Client's age is more than or equal to 9 months\n@pseudocode: Today's date − &quot;Date of birth&quot; ≥ 9 months\n@code: Client's age is more than or equal to 9 months-41\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;Client's age is more than or equal to 9 months&quot;:\n  Elements.&quot;Current Patient Age In Months&quot; &gt;= 9\n\n/*\n@input: Live vaccine was administered in the past 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 past 4 weeks-92\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;Live vaccine was administered in the past 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 the past 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 past 4 weeks-92\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;No live vaccine was administered in the past 4 weeks&quot;:\n  Elements.&quot;No live vaccine was administered in the last 4 weeks&quot;\n\n/*\n@input: One yellow fever primary series dose was administered\n@pseudocode: Count of vaccines administered (where &quot;Vaccine type&quot; = &quot;Yellow fever vaccines&quot; and &quot;Type of dose&quot; = &quot;Primary series&quot;) = 1\n@code: One yellow fever primary series dose was administered-121\n@decision: IMMZ.D2.DT.Yellow fever\n*/\ndefine &quot;One yellow fever primary series dose was administered&quot;:\n  &quot;Number of Yellow fever Primary Series Doses Administered&quot; = 1\n</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n    </table>\n</div>\n</div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
    "valueCode" : "computable"
  }],
  "url" : "http://smart.who.int/immunizations/Library/IMMZD2DTYellowfeverElements",
  "version" : "1.0.0",
  "name" : "IMMZD2DTYellowfeverElements",
  "title" : "IMMZD2DTYellowfeverElements",
  "status" : "draft",
  "experimental" : false,
  "type" : {
    "coding" : [{
      "system" : "http://terminology.hl7.org/CodeSystem/library-type",
      "code" : "logic-library"
    }]
  },
  "date" : "2026-03-31T13:54:17+00:00",
  "publisher" : "WHO",
  "contact" : [{
    "name" : "WHO",
    "telecom" : [{
      "system" : "url",
      "value" : "http://who.int"
    }]
  }],
  "description" : "This library defines context-independent elements for Yellow fever 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" : "Yellow fever Doses Administered to Patient",
    "use" : "out",
    "min" : 0,
    "max" : "*",
    "type" : "Immunization"
  },
  {
    "name" : "Yellow fever Primary Series Doses Administered to Patient",
    "use" : "out",
    "min" : 0,
    "max" : "*",
    "type" : "Immunization"
  },
  {
    "name" : "Number of Yellow fever Primary Series Doses Administered",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "integer"
  },
  {
    "name" : "No yellow fever primary series doses were administered",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Client's age is less than 9 months",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Client's age is more than or equal to 9 months",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "Live vaccine was administered in the past 4 weeks",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "No live vaccine was administered in the past 4 weeks",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  },
  {
    "name" : "One yellow fever primary series dose was administered",
    "use" : "out",
    "min" : 0,
    "max" : "1",
    "type" : "boolean"
  }],
  "content" : [{
    "contentType" : "text/cql",
    "data" : "Ci8qCiAgKiBMaWJyYXJ5OiBJTU1aRDJEVFllbGxvd2ZldmVyRWxlbWVudHMKICAqLwpsaWJyYXJ5IElNTVpEMkRUWWVsbG93ZmV2ZXJFbGVtZW50cwoKdXNpbmcgRkhJUiB2ZXJzaW9uICc0LjAuMScKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjAuMScKCmluY2x1ZGUgV0hPQ29uY2VwdHMKaW5jbHVkZSBXSE9Db21tb24gY2FsbGVkIFdDCmluY2x1ZGUgV0hPRWxlbWV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