@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://smart.who.int/immunizations/Library/IMMZD5DTHepatitisAEncounterElements> a fhir:Library ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "IMMZD5DTHepatitisAEncounterElements"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary>
     ] [
       fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary>
     ] [
       fhir:v "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library>
     ] [
       fhir:v "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "extensions" ] ;
     fhir:div [ fhir:v "<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;\">IMMZD5DTHepatitisAEncounterElements</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">IMMZD5DTHepatitisAEncounterElements</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-IMMZD5DTHepatitisAEncounterElements.html\">IMMZD5DTHepatitisAEncounterElements</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 encounter-based elements for Hepatitis A 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-IMMZEncounterElements.html\">IMMZEncounterElements</a></li>\n                  \n                    <li><a href=\"Library-IMMZD5DTHepatitisAElements.html\">IMMZD5DTHepatitisAElements</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>Today</th><th>date</th><th>0</th><th>1</th><th>In</th></tr>\n              \n                <tr><th>EncounterId</th><th>string</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>Draft Medication Request for Hepatitis A dose</th><th>MedicationRequest</th><th>0</th><th>*</th><th>Out</th></tr>\n              \n                <tr><th>The client is currently pregnant</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client is severely immunocompromised</th><th>boolean</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n                <tr><th>The client has a history of severe allergic reactions</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: IMMZD5DTHepatitisAEncounterElements\n  */\nlibrary IMMZD5DTHepatitisAEncounterElements\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 IMMZEncounterElements called Encounter\n\ninclude IMMZD5DTHepatitisAElements called HepatitisAElements\n\nparameter Today Date default Today()\nparameter EncounterId String\n\ncontext Patient\n\n/*\n@internal: Draft Medication Request for Hepatitis A dose\n*/\ndefine \"Draft Medication Request for Hepatitis A dose\":\n  Encounter.\"Draft Medication Request for Patient\" MR\n    where MR.medication in Concepts.\"Hepatitis A-containing vaccines\"\n\n/*\n@input: The client is currently pregnant\n@pseudocode: \"Potential contraindications\" = \"Currently pregnant\"\n@code: The client is currently pregnant-52\n@decision: IMMZ.D5.DT.Hepatitis A contraindications\n*/\ndefine \"The client is currently pregnant\":\n  Encounter.\"The client is pregnant\"\n\n/*\n@input: The client is severely immunocompromised\n@pseudocode: \"Potential contraindications\" = \"Severely immunocompromised\"\n@code: The client is severely immunocompromised-60\n@decision: IMMZ.D5.DT.Hepatitis A contraindications\n*/\ndefine \"The client is severely immunocompromised\":\n  Encounter.\"The client is severely immunocompromised\"\n\n/*\n@input: The client has a history of severe allergic reactions\n@pseudocode: '\"Potential contraindications\" = \"Severe allergic reactions\"\n@code: The client has a history of severe allergic reactions-60\n@decision: IMMZ.D5.DT.Hepatitis A contraindications\n*/\ndefine \"The client has a history of severe allergic reactions\":\n  Encounter.\"The client has history of severe allergic reactions\"\n</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n    </table>\n</div>\n</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:extension ( [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability>
     ] ;
     fhir:value [
       a fhir:Code ;
       fhir:v "computable"
     ]
  ] ) ; # 
  fhir:url [
     fhir:v "http://smart.who.int/immunizations/Library/IMMZD5DTHepatitisAEncounterElements"^^xsd:anyURI ;
     fhir:l <http://smart.who.int/immunizations/Library/IMMZD5DTHepatitisAEncounterElements>
  ] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "IMMZD5DTHepatitisAEncounterElements"] ; # 
  fhir:title [ fhir:v "IMMZD5DTHepatitisAEncounterElements"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v false] ; # 
  fhir:type [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/library-type"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/library-type>
       ] ;
       fhir:code [ fhir:v "logic-library" ]
     ] )
  ] ; # 
  fhir:date [ fhir:v "2026-03-31T13:54:17+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "WHO"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "WHO" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://who.int" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "This library defines encounter-based elements for Hepatitis A used throughout the Immunization CPG"] ; # 
  fhir:relatedArtifact ( [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library WHOConcepts" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/WHOConcepts"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/WHOConcepts>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library WC" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/WHOCommon"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/WHOCommon>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library WE" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/WHOElements"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/WHOElements>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library Common" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/IMMZCommon"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/IMMZCommon>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library Concepts" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/IMMZConcepts"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/IMMZConcepts>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library Encounter" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/IMMZEncounterElements"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/IMMZEncounterElements>
     ]
  ] [
     fhir:type [ fhir:v "depends-on" ] ;
     fhir:display [ fhir:v "Library HepatitisAElements" ] ;
     fhir:resource [
       fhir:v "http://smart.who.int/immunizations/Library/IMMZD5DTHepatitisAElements"^^xsd:anyURI ;
       fhir:l <http://smart.who.int/immunizations/Library/IMMZD5DTHepatitisAElements>
     ]
  ] ) ; # 
  fhir:parameter ( [
     fhir:name [ fhir:v "Today" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "date" ]
  ] [
     fhir:name [ fhir:v "EncounterId" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "string" ]
  ] [
     fhir:name [ fhir:v "Patient" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "Patient" ]
  ] [
     fhir:name [ fhir:v "Draft Medication Request for Hepatitis A dose" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "*" ] ;
     fhir:type [ fhir:v "MedicationRequest" ]
  ] [
     fhir:name [ fhir:v "The client is currently pregnant" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "The client is severely immunocompromised" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "The client has a history of severe allergic reactions" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:type [ fhir:v "boolean" ]
  ] ) ; # 
  fhir:content ( [
     fhir:contentType [ fhir:v "text/cql" ] ;
     fhir:data [ fhir:v "Ci8qCiAgKiBMaWJyYXJ5OiBJTU1aRDVEVEhlcGF0aXRpc0FFbmNvdW50ZXJFbGVtZW50cwogICovCmxpYnJhcnkgSU1NWkQ1RFRIZXBhdGl0aXNBRW5jb3VudGVyRWxlbWVudHMKCnVzaW5nIEZISVIgdmVyc2lvbiAnNC4wLjEnCmluY2x1ZGUgRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnCgppbmNsdWRlIFdIT0NvbmNlcHRzCmluY2x1ZGUgV0hPQ29tbW9uIGNhbGxlZCBXQwppbmNsdWRlIFdIT0VsZW1lbnRzIGNhbGxlZCBXRQoKaW5jbHVkZSBJTU1aQ29tbW9uIGNhbGxlZCBDb21tb24KaW5jbHVkZSBJTU1aQ29uY2VwdHMgY2FsbGVkIENvbmNlcHRzCmluY2x1ZGUgSU1NWkVuY291bnRlckVsZW1lbnRzIGNhbGxlZCBFbmNvdW50ZXIKCmluY2x1ZGUgSU1NWkQ1RFRIZXBhdGl0aXNBRW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b21wcm9taXNlZC02MApAZGVjaXNpb246IElNTVouRDUuRFQuSGVwYXRpdGlzIEEgY29udHJhaW5kaWNhdGlvbnMKKi8KZGVmaW5lICJUaGUgY2xpZW50IGlzIHNldmVyZWx5IGltbXVub2NvbXByb21pc2VkIjoKICBFbmNvdW50ZXIuIlRoZSBjbGllbnQgaXMgc2V2ZXJlbHkgaW1tdW5vY29tcHJvbWlzZWQiCgovKgpAaW5wdXQ6IFRoZSBjbGllbnQgaGFzIGEgaGlzdG9yeSBvZiBzZXZlcmUgYWxsZXJnaWMgcmVhY3Rpb25zCkBwc2V1ZG9jb2RlOiAnIlBvdGVudGlhbCBjb250cmFpbmRpY2F0aW9ucyIgPSAiU2V2ZXJlIGFsbGVyZ2ljIHJlYWN0aW9ucyIKQGNvZGU6IFRoZSBjbGllbnQgaGFzIGEgaGlzdG9yeSBvZiBzZXZlcmUgYWxsZXJnaWMgcmVhY3Rpb25zLTYwCkBkZWNpc2lvbjogSU1NWi5ENS5EVC5IZXBhdGl0aXMgQSBjb250cmFpbmRpY2F0aW9ucwoqLwpkZWZpbmUgIlRoZSBjbGllbnQgaGFzIGEgaGlzdG9yeSBvZiBzZXZlcmUgYWxsZXJnaWMgcmVhY3Rpb25zIjoKICBFbmNvdW50ZXIuIlRoZSBjbGllbnQgaGFzIGhpc3Rvcnkgb2Ygc2V2ZXJlIGFsbGVyZ2ljIHJlYWN0aW9ucyIK"^^xsd:base64Binary ]
  ] ) . # 

# -------------------------------------------------------------------------------------

