<?xml version='1.0' encoding='UTF-8'?>
<Library xmlns="http://hl7.org/fhir" xmlns:html="http://www.w3.org/1999/xhtml">
  <id value="IMMZD5DTYellowfeverEncounterElements" />
  <meta>
    <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary" />
    <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary" />
    <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library" />
    <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module" />
  </meta>
  <text>
    <status value="extensions" /><html:div><html:p><html:b style="color: maroon">Exception parsing generated Narrative (see /tmp/liquid-371fa90f-d160-4d4f-9ea2-c95fb7014285.html): Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '
/*
  * Library: IMMZD5DTYellowfeverEncounterElements
  */
library IMMZD5DTYellowfeverEncounterElements

using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'

include WHOConcepts
include WHOCommon called WC
include WHOElements called WE

include IMMZCommon called Common
include IMMZConcepts called Concepts
include IMMZEncounterElements called Encounter

include IMMZD5DTYellowfeverElements called YellowfeverElements

parameter Today Date default Today()
parameter EncounterId String

context Patient

/*
@internal: Draft Medication Request for Yellow fever dose
*/
define "Draft Medication Request for Yellow fever dose":
  Encounter."Draft Medication Request for Patient" MR
    where MR.medication in Concepts."Yellow fever vaccines"

/*
@input: Client's age is less than 6 months
@pseudocode: Today's date − "Date of birth" ' at line 225 column 46</html:b></html:p></html:div>
  </text>
  <extension url="http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability">
    <valueCode value="computable" />
  </extension>
  <url value="http://smart.who.int/immunizations/Library/IMMZD5DTYellowfeverEncounterElements" />
  <version value="1.0.0" />
  <name value="IMMZD5DTYellowfeverEncounterElements" />
  <title value="IMMZD5DTYellowfeverEncounterElements" />
  <status value="draft" />
  <experimental value="false" />
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type" />
      <code value="logic-library" />
    </coding>
  </type>
  <date value="2026-10-02T09:24:37+00:00" />
  <publisher value="WHO" />
  <contact>
    <name value="WHO" />
    <telecom>
      <system value="url" />
      <value value="http://who.int" />
    </telecom>
  </contact>
  <description value="This library defines encounter-based elements for Yellow fever used throughout the Immunization CPG" />
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WHOConcepts" />
    <resource value="http://smart.who.int/immunizations/Library/WHOConcepts" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WC" />
    <resource value="http://smart.who.int/immunizations/Library/WHOCommon" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library WE" />
    <resource value="http://smart.who.int/immunizations/Library/WHOElements" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Common" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZCommon" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Concepts" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZConcepts" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library Encounter" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZEncounterElements" />
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on" />
    <display value="Library YellowfeverElements" />
    <resource value="http://smart.who.int/immunizations/Library/IMMZD5DTYellowfeverElements" />
  </relatedArtifact>
  <parameter>
    <name value="Today" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <type value="date" />
  </parameter>
  <parameter>
    <name value="EncounterId" />
    <use value="in" />
    <min value="0" />
    <max value="1" />
    <type value="string" />
  </parameter>
  <parameter>
    <name value="Patient" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="Patient" />
  </parameter>
  <parameter>
    <name value="Draft Medication Request for Yellow fever dose" />
    <use value="out" />
    <min value="0" />
    <max value="*" />
    <type value="MedicationRequest" />
  </parameter>
  <parameter>
    <name value="Client's age is less than 6 months" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Client's age is 6–9 months" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="Client's age is more than or equal to 60 years" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="The client has a history of severe allergic reactions" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="The client is severely immunocompromised" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="The client is currently pregnant" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <parameter>
    <name value="The client is lactating" />
    <use value="out" />
    <min value="0" />
    <max value="1" />
    <type value="boolean" />
  </parameter>
  <content>
    <contentType value="text/cql" />
    <url value="Library-IMMZD5DTYellowfeverEncounterElements.cql" /></content>
  <content>
    <contentType value="application/elm+xml" />
    <url value="Library-IMMZD5DTYellowfeverEncounterElements.elm.xml" /></content>
</Library>