IMMZCommon
type: Library
node role: treeRoot
id:
  v: IMMZCommon
meta:
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary
    link: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary
    link: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library
    link: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module
    link: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module
text:
  status:
    v: extensions
  div: Title: IMMZCommon Id: IMMZCommon Version: 0.2.0 Url: IMMZCommon Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-07-23 20:56:04+0000 Publisher: WHO Description: This library defines common terminologies and functions used throughout the Immunization CPG Related Artifacts: Dependencies WHOCommon Data Requirements: Type Profile MS Code Filter Medication http://hl7.org/fhir/StructureDefinition/Medication Content: text/cql library IMMZCommon#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include FHIRHelpers version '4.0.1'#xD; include WHOCommon called WC#xD; #xD; /**#xD; * @description Fetches a singleton protocol applied from an immunization#xD; * @comment The protocol list from the immunization#xD; */#xD; define function Only(protocols List<FHIR.Immunization.ProtocolApplied>):#xD; singleton from protocols#xD; #xD; /**#xD; * @description Fetches a singleton protocol applied from an immunization#xD; * @comment The protocol list from the immunization#xD; */#xD; define fluent function only(protocols List<FHIR.Immunization.ProtocolApplied>):#xD; singleton from protocols#xD; #xD; /**#xD; * @description Takes the date choice of a date/string choice (for Immunization date)#xD; */#xD; define function ToDate(choice Choice<FHIR.date, FHIR.string>):#xD; case#xD; when choice is FHIR.date then#xD; choice as FHIR.date#xD; else#xD; Message(null as FHIR.date, true, '1', 'Error', 'Cannot compute a date from a String value')#xD; end#xD; #xD; /**#xD; * @description Takes the date choice of a date/string choice (for Immunization date)#xD; */#xD; define function ToDateTime(choice Choice<FHIR.dateTime, FHIR.string>):#xD; case#xD; when choice is FHIR.dateTime then#xD; choice as FHIR.dateTime#xD; else#xD; Message(null as FHIR.dateTime, true, '1', 'Error', 'Cannot compute a date from a String value')#xD; end#xD; #xD; #xD; /**#xD; * @description Takes a choice of FHIR.string and FHIR.positiveInt and ensures the result is a FHIR.positive…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability
  value: code
    v: computable
url:
  v: http://smart.who.int/immunizations/Library/IMMZCommon
version:
  v: 0.2.0
name:
  v: IMMZCommon
title:
  v: IMMZCommon
status:
  v: draft
experimental:
  v: false
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
    code:
      v: logic-library
date:
  v: 2025-07-23T20:56:04+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
description:
  v: This library defines common terminologies and functions used throughout the Immunization CPG
related artifact:
  type:
    v: depends-on
  display:
    v: Library WC
  resource:
    v: http://smart.who.int/immunizations/Library/WHOCommon
    link: http://smart.who.int/immunizations/Library/WHOCommon
data requirement:
  type:
    v: Medication
  profile:
    v: http://hl7.org/fhir/StructureDefinition/Medication
    link: http://hl7.org/fhir/StructureDefinition/Medication
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml