IMMZD2DTBCG
type: PlanDefinition
node role: treeRoot
id:
  v: IMMZD2DTBCG
meta:
  profile:
    v: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition
    l: cpg-recommendationdefinition
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition
    l: crmi-shareableplandefinition
  profile:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition
    l: crmi-publishableplandefinition
text:
  status:
    v: extensions
  div:
    v: Id: IMMZD2DTBCG Url: IMMZ.D2.DT.BCG Version: 0.2.0 Title: IMMZ.D2.DT.BCG Status: draft Type: system: http://terminology.hl7.org/CodeSystem/plan-definition-type code: eca-rule Date: 2026-03-29 17:23:09+0000 Publisher: WHO Description: IMMZ.D2.DT.BCG IMMZ.D2.DT.BCG Knowledge Capability: computable Related Artifacts: References WHO recommendations for routine immunization - summary tables (January 2025) Libraries: IMMZD2DTBCGLogic Actions: Determine if the client is due for BCG.: Determine if the client is due for BCG vaccine according to the national immunization protocol. If: Applicability: Client is due for BCG vaccination (Client is due for BCG vaccination) Then: Definition: IMMZD2DTMR Dynamic Values: status: ('draft') intent: ('proposal') medication: (Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE1', display: 'BCG vaccines' } }, display: 'BCG vaccines' }) Check for Guidance for the patient regarding IMMZ.D2.DT.BCG.: Show Guidance for the patient regarding IMMZ.D2.DT.BCG. If: Applicability: Has Guidance (Has Guidance) Then: Definition: IMMZ.D2.DT.CR Dynamic Values: status: ('active') payload.contentString: (Guidance) category.coding: (Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }) priority: (Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' })
contained: Library
  id:
    v: effective-data-requirements
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE204
      display:
        v: HIV status
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE205
      display:
        v: HIV-positive
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE210
      display:
        v: Currently on ART
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE249
      display:
        v: Immunologically stable
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE246
      display:
        v: TB infection test result
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE248
      display:
        v: Negative
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE250
      display:
        v: Clinically well
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
        l: IMMZ.D
      code:
        v: DE247
      display:
        v: Positive
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: IMMZElements
    extension:
      url:
        v: name
        l: name
      value: String
        v: Doses Administered to Patient
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: /** * @dataElement All Doses Administered to Patient */ define "Doses Administered to Patient": [Immunization] I where I.status = 'completed' and I.isSubpotent is not true
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 0
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: IMMZD2DTBCGElements
    extension:
      url:
        v: name
        l: name
      value: String
        v: BCG Doses Administered to Patient
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: /* @internal: BCG containing Doses Administered to Patient */ define "BCG Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."BCG vaccines"
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 1
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: IMMZD2DTBCGElements
    extension:
      url:
        v: name
        l: name
      value: String
        v: BCG Primary Series Doses Administered to Patient
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: /* @internal: BCG containing Doses Administered to Patient that are in the Primary series */ define "BCG Primary Series Doses Administered to Patient": "BCG Doses Administered to Patient".seriesPrimary()
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 2
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: BCG Primary Series Doses Administered to Patient
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: BCG containing Doses Administered to Patient that are in the Primary series */ define "BCG Primary Series Doses Administered to Patient": BCGElements."BCG Primary Series Doses Administered to Patient".onOrBefore(Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 3
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Number of BCG Primary Series Doses Administered
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Number of BCG Primary Series doses */ define "Number of BCG Primary Series Doses Administered": Count("BCG Primary Series Doses Administered to Patient")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 4
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: No BCG primary series dose was administered
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: No BCG primary series dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "BCG vaccines" and "Type of dose" = "Primary series") = 0 @code: No BCG primary series dose was administered-112 @decision: IMMZ.D2.DT.BCG */ define "No BCG primary series dose was administered": "Number of BCG Primary Series Doses Administered" = 0
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 5
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Current Patient Age In Days
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /** * @dataElement Patient age in days */ define "Current Patient Age In Days": AgeInDaysAt(Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 6
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's age is less than or equal to 28 days
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's age is less than or equal to 28 days @pseudocode: Today's date − "Date of birth" ≤ 28 days @code: Client's age is less than or equal to 28 days-40 @decision: IMMZ.D2.DT.BCG */ define "Client's age is less than or equal to 28 days": Encounter."Current Patient Age In Days" <= 28
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 7
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: HIV status Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: HIV Status Observation */ define "HIV status Observation": ([Observation: Concepts."HIV status"]).complete()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 8
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's HIV status is positive
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's HIV status is positive @pseudocode: "HIV status" = "HIV-positive" */ define "Client's HIV status is positive": exists( (Elements."HIV status Observation".encounterOrOnBefore(EncounterId, Today)) O where O.value ~ Concepts."HIV-positive" )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 9
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's HIV status is negative or unknown
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's HIV status is negative or unknown @pseudocode: "HIV status" ≠ "HIV-positive" */ define "Client's HIV status is negative or unknown": not "Client's HIV status is positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 10
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's HIV status is negative or unknown
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's HIV status is negative or unknown @pseudocode: "HIV status" ≠ "HIV-positive" @code: Client's HIV status is negative or unknown-29 @decision: IMMZ.D2.DT.BCG */ define "Client's HIV status is negative or unknown": Encounter."Client's HIV status is negative or unknown"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 11
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Live Attenuated Vaccines
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @dataElement: Live attenuated vaccines */ define "Live Attenuated Vaccines": "Doses Administered to Patient" I where I.vaccineCode in Concepts."Live Attenuated"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 12
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Live Attenuated Vaccines
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @dataElement Live attenuated vaccines */ define "Live Attenuated Vaccines": Elements."Live Attenuated Vaccines" I where I.occurrence.toInterval() same day or before Today
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 13
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: No live vaccine was administered
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: No live vaccine was administered @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) IS NULL */ define "No live vaccine was administered": not exists("Live Attenuated Vaccines")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 14
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: No live vaccine was administered
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: No live vaccine was administered @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) IS NULL @code: No live vaccine was administered-90 @decision: IMMZ.D2.DT.BCG */ define "No live vaccine was administered": Encounter."No live vaccine was administered"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 15
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 1
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 1 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 1": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is negative or unknown" and Encounter."No live vaccine was administered"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 16
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's HIV status is positive
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's HIV status is positive @pseudocode: "HIV status" = "HIV-positive" @code: Client's HIV status is positive-29 @decision: IMMZ.D2.DT.BCG */ define "Client's HIV status is positive": Encounter."Client's HIV status is positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 17
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Currently on ART Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Currently on ART Observation */ define "Currently on ART Observation": ([Observation: Concepts."Currently on ART"] O sort by end of effective.toInterval() desc).complete()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 18
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Currently on ART Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Currently on ART Observation */ define "Currently on ART Observation": Elements."Currently on ART Observation".encounterOrOnBefore(EncounterId, Today).mostRecent()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 19
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is currently receiving antiretroviral therapy
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is currently receiving antiretroviral therapy @pseudocode: "Currently on ART" = TRUE */ define "Client is currently receiving antiretroviral therapy": "Currently on ART Observation" is not null and "Currently on ART Observation".value = true
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 20
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is currently receiving antiretroviral therapy
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is currently receiving antiretroviral therapy @pseudocode: "Currently on ART" = TRUE @code: Client is currently receiving antiretroviral therapy-25 @decision: IMMZ.D2.DT.BCG */ define "Client is currently receiving antiretroviral therapy": Encounter."Client is currently receiving antiretroviral therapy"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 21
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Immunologically stable Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Immunologically stable Observation */ define "Immunologically stable Observation": ([Observation: Concepts."Immunologically stable"] O sort by end of effective.toInterval() desc).complete()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 22
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Immunologically stable Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Immunologically stable Observation */ define "Immunologically stable Observation": Elements."Immunologically stable Observation".encounterOrOnBefore(EncounterId, Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 23
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is immunologically stable
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is immunologically stable @pseudocode: "Immunologically stable" = TRUE */ define "Client is immunologically stable": exists("Immunologically stable Observation") and First("Immunologically stable Observation").value = true
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 24
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is immunologically stable
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is immunologically stable @pseudocode: "Immunologically stable" = TRUE @code: Client is immunologically stable-31 @decision: IMMZ.D2.DT.BCG */ define "Client is immunologically stable": Encounter."Client is immunologically stable"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 25
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 2
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 2 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 2": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."No live vaccine was administered"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 26
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Current Patient Age In Years
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /** * @dataElement Patient age in years */ define "Current Patient Age In Years": AgeInYearsAt(Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 27
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's age is between 28 days and 5 years
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's age is between 28 days and 5 years @pseudocode: 28 days < Today's date − "Date of birth" < 5 years @code: Client's age is between 28 days and 5 years-50 @decision: IMMZ.D2.DT.BCG */ define "Client's age is between 28 days and 5 years": 28 < Encounter."Current Patient Age In Days" and Encounter."Current Patient Age In Years" < 5
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 28
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: TB infection test result Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: TB infection test result Observation */ define "TB infection test result Observation": ([Observation: Concepts."TB infection test result"] O sort by end of effective.toInterval() desc).complete()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 29
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: TB infection test result Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Immunologically stable Observation */ define "TB infection test result Observation": Elements."TB infection test result Observation".encounterOrOnBefore(EncounterId, Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 30
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is negative
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is negative @pseudocode: "TB infection test result" = "Negative" */ define "Client's TB infection test result is negative": exists("TB infection test result Observation") and First( "TB infection test result Observation" ).value ~ Concepts."TB-Negative"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 31
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is negative
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is negative @pseudocode: "TB infection test result" = "Negative" @code: Client's TB infection test result is negative-39 @decision: IMMZ.D2.DT.BCG */ define "Client's TB infection test result is negative": Encounter."Client's TB infection test result is negative"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 32
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Date of Latest Live Attenuated Vaccine
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @dataElement Date and time of last live attenuated vaccine */ define "Date of Latest Live Attenuated Vaccine": date from start of "Live Attenuated Vaccines".mostRecent().occurrence.toInterval()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 33
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Live vaccine was administered in the last 4 weeks
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Live vaccine was administered in the last 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) < 4 weeks */ define "Live vaccine was administered in the last 4 weeks": "Date of Latest Live Attenuated Vaccine" is not null and duration in weeks between "Date of Latest Live Attenuated Vaccine" and Today < 4
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 34
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: No live vaccine was administered in the last 4 weeks
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: No live vaccine was administered in the last 4 weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) ≥ 4 weeks */ define "No live vaccine was administered in the last 4 weeks": not("Live vaccine was administered in the last 4 weeks")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 35
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: No live vaccine was administered in the last four weeks
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: No live vaccine was administered in the last four weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) ≥ 4 weeks @code: No live vaccine was administered in the last four weeks-92 @decision: IMMZ.D2.DT.BCG */ define "No live vaccine was administered in the last four weeks": Encounter."No live vaccine was administered in the last 4 weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 36
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 3
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 3 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 3": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is negative" and Encounter."No live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 37
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinically well Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Clinically well Observation */ define "Clinically well Observation": ([Observation: Concepts."Clinically well"] O sort by end of effective.toInterval() desc).complete()
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 38
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinically well Observation
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @internal: Clinically well Observation */ define "Clinically well Observation": Elements."Clinically well Observation".encounterOrOnBefore(EncounterId, Today)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 39
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is clinically well
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is clinically well @pseudocode: "Clinically well" = TRUE */ define "Client is clinically well": exists("Clinically well Observation") and First( "Clinically well Observation" ).value = true
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 40
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is clinically well
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is clinically well @pseudocode: "Clinically well" = TRUE @code: Client is clinically well-24 @decision: IMMZ.D2.DT.BCG */ define "Client is clinically well": Encounter."Client is clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 41
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 4
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 4 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 4": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."No live vaccine was administered in the last four weeks" and Encounter."Client is clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 42
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's age is more than 5 years
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's age is more than 5 years @pseudocode: Today's date − "Date of birth" ≥ 5 years @code: Client's age is more than 5 years-40 @decision: IMMZ.D2.DT.BCG */ define "Client's age is more than 5 years": Encounter."Current Patient Age In Years" >= 5
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 43
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 5
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 5 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 5": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is negative" and Encounter."No live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 44
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Case 6
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Case 6 @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination Case 6": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."No live vaccine was administered in the last four weeks" and Encounter."Client is clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 45
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination @pseudocode: "Immunization recommendation status" = "Due" */ define "Client is due for BCG vaccination": "Client is due for BCG vaccination Case 1" or "Client is due for BCG vaccination Case 2" or "Client is due for BCG vaccination Case 3" or "Client is due for BCG vaccination Case 4" or "Client is due for BCG vaccination Case 5" or "Client is due for BCG vaccination Case 6"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 46
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is due for BCG vaccination Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is due for BCG vaccination Guidance @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client is within age range, HIV status is not positive and no live vaccine was administered. Check for contraindications. @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client is immunologically stable and no live vaccine was administered. Check for contraindications. @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client's TB test result is negative and no live vaccine was administered in the past 4 weeks. Check for contraindications. @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client is receiving ART, clinically well and immunologically stable. No live vaccine was administered in the last 4 weeks. Check for contraindications. @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client's TB test result is negative and no live vaccine was administered in the past 4 weeks. Check for contraindications. @guidance = Should vaccinate client with first BCG dose as no BCG dose was administered, client is receiving ART, clinically well and immunologically stable. No live vaccine was administered in the past 4 weeks. Check for contraindications */ define "Client is due for BCG vaccination Guidance": case when "Client is due for BCG vaccination Case 1" then 'Should vaccinate client with first BCG dose as no BCG dose was administered, client is within age range, HIV status is not positive and no live vaccine was administered. Check for contraindications.' when "Client is due for BCG vaccination Case 2" then 'Should vaccinate client with first BCG dose as no BCG dose was administered, client is immunologically stable and no live vaccine was administered. Check for contraindications.' when "Client is due for BCG vaccination Case 3" then 'Should vaccinate client with first BCG …
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 47
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Live vaccine was administered in the last four weeks
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Live vaccine was administered in the last four weeks @pseudocode: Today's date − latest "Date and time of vaccination" (where "Live vaccine" = TRUE) < 4 weeks @code: Live vaccine was administered in the last four weeks-92 @decision: IMMZ.D2.DT.BCG */ define "Live vaccine was administered in the last four weeks": Encounter."Live vaccine was administered in the last 4 weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 48
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 1
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 1 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 1": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is negative or unknown" and Encounter."Live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 49
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 2
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 2 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 2": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."Live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 50
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not immunologically stable
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is not immunologically stable @pseudocode: "Immunologically stable" = FALSE */ define "Client is not immunologically stable": exists("Immunologically stable Observation") and First("Immunologically stable Observation").value = false
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 51
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not immunologically stable
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is not immunologically stable @pseudocode: "Immunologically stable" = FALSE @code: Client is not immunologically stable-32 @decision: IMMZ.D2.DT.BCG */ define "Client is not immunologically stable": Encounter."Client is not immunologically stable"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 52
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 3
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 3 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 3": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is not immunologically stable"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 53
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is currently not receiving antiretroviral therapy
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is currently not receiving antiretroviral therapy @pseudocode: "Currently on ART" = FALSE */ define "Client is currently not receiving antiretroviral therapy": "Currently on ART Observation" is null or "Currently on ART Observation".value = false
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 54
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is currently not receiving antiretroviral therapy
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is currently not receiving antiretroviral therapy @pseudocode: "Currently on ART" = FALSE @code: Client is currently not receiving antiretroviral therapy-26 @decision: IMMZ.D2.DT.BCG */ define "Client is currently not receiving antiretroviral therapy": Encounter."Client is currently not receiving antiretroviral therapy"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 55
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 4
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 4 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 4": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is less than or equal to 28 days" and Encounter."Client's HIV status is positive" and Encounter."Client is currently not receiving antiretroviral therapy"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 56
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 5
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 5 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 5": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is negative" and Encounter."Live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 57
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is positive
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is positive @pseudocode: "TB infection test result" = "Positive" */ define "Client's TB infection test result is positive": exists("TB infection test result Observation") and First( "TB infection test result Observation" ).value ~ Concepts."TB-Positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 58
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is positive
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is positive @pseudocode: "TB infection test result" = "Positive" @code: Client's TB infection test result is positive-39 @decision: IMMZ.D2.DT.BCG */ define "Client's TB infection test result is positive": Encounter."Client's TB infection test result is positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 59
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 6
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 6 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 6": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 60
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 7
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 7 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 7": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is not immunologically stable"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 61
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not clinically well
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is not clinically well @pseudocode: "Clinically well" = FALSE */ define "Client is not clinically well": exists("Clinically well Observation") and First( "Clinically well Observation" ).value = false
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 62
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not clinically well
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client is not clinically well @pseudocode: "Clinically well" = FALSE @code: Client is not clinically well-25 @decision: IMMZ.D2.DT.BCG */ define "Client is not clinically well": Encounter."Client is not clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 63
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 8
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 8 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 8": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is not clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 64
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 9
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 9 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 9": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."Live vaccine was administered in the last four weeks" and Encounter."Client is clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 65
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 10
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 10 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 10": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently not receiving antiretroviral therapy"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 66
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 11
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 11 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 11": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is negative" and Encounter."Live vaccine was administered in the last four weeks"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 67
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 12
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 12 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 12": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is positive"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 68
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 13
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 13 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 13": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is not immunologically stable"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 69
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 14
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 14 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 14": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is not clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 70
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 15
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 15 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 15": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently receiving antiretroviral therapy" and Encounter."Client is immunologically stable" and Encounter."Live vaccine was administered in the last four weeks" and Encounter."Client is clinically well"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 71
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Case 16
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Case 16 @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination Case 16": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is positive" and Encounter."Client is currently not receiving antiretroviral therapy"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 72
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination @pseudocode: "Immunization recommendation status" = "Not due" */ define "Client is not due for BCG vaccination": "Client is not due for BCG vaccination Case 1" or "Client is not due for BCG vaccination Case 2" or "Client is not due for BCG vaccination Case 3" or "Client is not due for BCG vaccination Case 4" or "Client is not due for BCG vaccination Case 5" or "Client is not due for BCG vaccination Case 6" or "Client is not due for BCG vaccination Case 7" or "Client is not due for BCG vaccination Case 8" or "Client is not due for BCG vaccination Case 9" or "Client is not due for BCG vaccination Case 10" or "Client is not due for BCG vaccination Case 11" or "Client is not due for BCG vaccination Case 12" or "Client is not due for BCG vaccination Case 13" or "Client is not due for BCG vaccination Case 14" or "Client is not due for BCG vaccination Case 15" or "Client is not due for BCG vaccination Case 16"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 73
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Client is not due for BCG vaccination Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Client is not due for BCG vaccination Guidance @guidance = Should not vaccinate client with first BCG dose as live vaccine was administered in the last 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as live vaccine was administered in the last 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as client is not immunologically stable. Check for any vaccines due and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as ART has not been started. Check for any vaccines due and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as live vaccine was administered in the past 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for the first dose. @guidance = Should not vaccinate client with first BCG dose as client's TB infection test result is positive. Consider evaluating for TB disease or for TB preventive treatment (TPT) eligibility (once TB disease is ruled out). @guidance = Should not vaccinate client with first BCG dose as client is not immunologically stable. Check for any vaccines due, and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as client is not clinically well. Check for any vaccines due, and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as live vaccine was administered in the past 4 weeks. Check for any vaccines due and inform the caregiver of when to come back for the first BCG dose. @guidance = Should not vaccinate client with first BCG dose as client is not currently receiving ART…
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 74
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is unknown (test not done or no result yet)
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is unknown (test not done or no result yet) @pseudocode: "TB infection test result" IS NULL */ define "Client's TB infection test result is unknown (test not done or no result yet)": not exists( "TB infection test result Observation" ) or ( not ("Client's TB infection test result is negative") and not ("Client's TB infection test result is positive") )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 75
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: Client's TB infection test result is unknown (test not done or no result yet)
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: Client's TB infection test result is unknown (test not done or no result yet) @pseudocode: "TB infection test result" IS NULL @code: Client's TB infection test result is unknown (test not done or no result yet)-34 @decision: IMMZ.D2.DT.BCG */ define "Client's TB infection test result is unknown (test not done or no result yet)": Encounter."Client's TB infection test result is unknown (test not done or no result yet)"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 76
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinical judgement is required. Create clinical note. Case 1
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Clinical judgement is required. Create clinical note. Case 1 @pseudocode: "Immunization recommendation status" = "Further evaluation needed" */ define "Clinical judgement is required. Create clinical note. Case 1": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is between 28 days and 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is unknown (test not done or no result yet)"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 77
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinical judgement is required. Create clinical note. Case 2
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Clinical judgement is required. Create clinical note. Case 2 @pseudocode: '"Immunization recommendation status" = "Further evaluation needed" */ define "Clinical judgement is required. Create clinical note. Case 2": Encounter."No BCG primary series dose was administered" and Encounter."Client's age is more than 5 years" and Encounter."Client's HIV status is negative or unknown" and Encounter."Client's TB infection test result is unknown (test not done or no result yet)"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 78
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinical judgement is required. Create clinical note.
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Clinical judgement is required. Create clinical note. @pseudocode: "Immunization recommendation status" = "Further evaluation needed" */ define "Clinical judgement is required. Create clinical note.": "Clinical judgement is required. Create clinical note. Case 1" or "Clinical judgement is required. Create clinical note. Case 2"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 79
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Clinical judgement is required. Create clinical note. Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: Clinical judgement is required. Create clinical note. Guidance @guidance = Recommend the client to perform TB infection testing. Re-evaluate client once the test result is available. @guidance = Recommend the client to perform TB infection testing. Re-evaluate client once the test result is available. */ define "Clinical judgement is required. Create clinical note. Guidance": case when "Clinical judgement is required. Create clinical note. Case 1" then 'Recommend the client to perform TB infection testing. Re-evaluate client once the test result is available.' when "Clinical judgement is required. Create clinical note. Case 2" then 'Recommend the client to perform TB infection testing. Re-evaluate client once the test result is available.' else '' end
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 80
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGEncounterElements
extension:
  url:
    v: name
    l: name
  value: String
    v: One BCG primary series dose was administered
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @input: One BCG primary series dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "BCG vaccines" and "Type of dose" = "Primary series") = 1 @code: One BCG primary series dose was administered-112 @decision: IMMZ.D2.DT.BCG */ define "One BCG primary series dose was administered": "Number of BCG Primary Series Doses Administered" = 1
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 81
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: BCG immunization schedule is complete
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: BCG immunization schedule is complete @pseudocode: '"Immunization recommendation status" = "Complete" "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "BCG vaccines") */ define "BCG immunization schedule is complete": Encounter."One BCG primary series dose was administered"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 82
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: BCG immunization schedule is complete Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @output: BCG immunization schedule is complete Guidance @guidance: BCG immunization schedule is complete. One BCG primary series dose was administered. Check for any vaccines due. */ define "BCG immunization schedule is complete Guidance": 'BCG immunization schedule is complete. One BCG primary series dose was administered. Check for any vaccines due.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 83
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @dynamicValue: Guidance */ define "Guidance": case when "Client is due for BCG vaccination" then "Client is due for BCG vaccination Guidance" when "Client is not due for BCG vaccination" then "Client is not due for BCG vaccination Guidance" when "Clinical judgement is required. Create clinical note." then "Clinical judgement is required. Create clinical note. Guidance" when "BCG immunization schedule is complete" then "BCG immunization schedule is complete Guidance" else '' end
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 84
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZD2DTBCGLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Has Guidance
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Has Guidance": "Guidance" is not null and "Guidance" != ''
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 85
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: onOrBefore
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /** * @description: Gets immunizations on or before a date */ define fluent function onOrBefore(immunizations List<Immunization>, beforeDate Date): immunizations I where I.occurrence.toInterval() same day or before beforeDate
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 86
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: seriesPrimary
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /** * @description: Gets the doses from the primary series */ define fluent function seriesPrimary(immunizations List<Immunization>): immunizations I where exists( I.protocolApplied pa where pa.series = 'Primary series' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 87
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value string): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 88
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ImmunizationStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 89
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToBoolean
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToBoolean(value boolean): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 90
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToConcept
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToConcept(concept FHIR.CodeableConcept): if concept is null then null else System.Concept { codes: concept.coding C return ToCode(C), display: concept.text.value }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 91
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCode
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToCode(coding FHIR.Coding): if coding is null then null else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 92
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: IMMZCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: encounterOrOnBefore
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /** * @description: Gets observation from an encounter or on or before a date */ define fluent function encounterOrOnBefore(observations List<Observation>, EncounterId String, beforeDate Date): observations O where (O.encounter.references(EncounterId) or O.effective.toInterval() starts same day or before beforeDate)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 93
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WHOCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: references
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @description: Returns true if the given reference is to the given resourceId @comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference. NOTE: This function assumes resources from the same source server. */ define fluent function references(reference FHIR.Reference, resourceId String): resourceId = Last(Split(reference.reference, '/'))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 94
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WHOCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: complete
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define fluent function complete(observations List<Observation>): observations O where O.status in { 'final', 'amended', 'corrected' }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 95
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ObservationStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 96
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WHOCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: mostRecent
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define fluent function mostRecent(observations List<Observation>): Last( observations O sort by issued )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 97
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WHOCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: mostRecent
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define fluent function mostRecent(immunizations List<Immunization>): Last( immunizations I sort by start of occurrence.toInterval() )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 98
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

v: EffectiveDataRequirements

v: active

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/library-type
    l: library-type
  code:
    v: module-definition

type:
  v: depends-on
display:
  v: FHIR model information
resource:
  v: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
  l: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo

type:
  v: depends-on
display:
  v: Library Encounter
resource:
  v: http://smart.who.int/immunizations/Library/IMMZD2DTBCGEncounterElements
  l: IMMZD2DTBCGEncounterElements

type:
  v: depends-on
display:
  v: Library Common
resource:
  v: http://smart.who.int/immunizations/Library/IMMZCommon
  l: IMMZCommon

type:
  v: depends-on
display:
  v: Library WC
resource:
  v: http://smart.who.int/immunizations/Library/WHOCommon
  l: WHOCommon

type:
  v: depends-on
display:
  v: Library BCGElements
resource:
  v: http://smart.who.int/immunizations/Library/IMMZD2DTBCGElements
  l: IMMZD2DTBCGElements

type:
  v: depends-on
display:
  v: Library FHIRHelpers
resource:
  v: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
  l: http://fhir.org/guides/cqf/common/Library/FHIRHelpers

type:
  v: depends-on
display:
  v: Library Elements
resource:
  v: http://smart.who.int/immunizations/Library/IMMZElements
  l: IMMZElements

type:
  v: depends-on
display:
  v: Library FHIRHelpers
resource:
  v: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
  l: http://fhir.org/guides/cqf/common/Library/FHIRHelpers

type:
  v: depends-on
display:
  v: Library Concepts
resource:
  v: http://smart.who.int/immunizations/Library/IMMZConcepts
  l: IMMZConcepts

type:
  v: depends-on
display:
  v: Library Encounter
resource:
  v: http://smart.who.int/immunizations/Library/IMMZEncounterElements
  l: IMMZEncounterElements

type:
  v: depends-on
display:
  v: Library Common
resource:
  v: http://smart.who.int/immunizations/Library/IMMZCommon
  l: IMMZCommon

type:
  v: depends-on
display:
  v: Library Elements
resource:
  v: http://smart.who.int/immunizations/Library/IMMZElements
  l: IMMZElements

type:
  v: depends-on
display:
  v: Library WC
resource:
  v: http://smart.who.int/immunizations/Library/WHOCommon
  l: WHOCommon

type:
  v: depends-on
display:
  v: Library Concepts
resource:
  v: http://smart.who.int/immunizations/Library/IMMZConcepts
  l: IMMZConcepts

type:
  v: depends-on
display:
  v: Code system IMMZD
resource:
  v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
  l: IMMZ.D

type:
  v: depends-on
display:
  v: Value set BCG vaccines
resource:
  v: http://smart.who.int/immunizations/ValueSet/IMMZ.Z.DE1
  l: IMMZ.Z.DE1

type:
  v: depends-on
display:
  v: Value set Live Attenuated
resource:
  v: http://smart.who.int/immunizations/ValueSet/IMMZ.Z.LiveAttenuated
  l: IMMZ.Z.LiveAttenuated

name:
  v: Today
use:
  v: in
min:
  v: 0
max:
  v: 1
type:
  v: date

name:
  v: EncounterId
use:
  v: in
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Guidance
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Has Guidance
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Client is due for BCG vaccination
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE204
    display:
      v: HIV status

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode
must support:
  v: occurrence

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE210
    display:
      v: Currently on ART

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE249
    display:
      v: Immunologically stable

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE246
    display:
      v: TB infection test result

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE250
    display:
      v: Clinically well

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode
must support:
  v: occurrence

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode
must support:
  v: occurrence

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE210
    display:
      v: Currently on ART

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE249
    display:
      v: Immunologically stable

type:
  v: Immunization
profile:
  v: http://hl7.org/fhir/StructureDefinition/Immunization
  l: Immunization
must support:
  v: status
must support:
  v: isSubpotent
must support:
  v: vaccineCode
must support:
  v: occurrence

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE246
    display:
      v: TB infection test result

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
code filter:
  path:
    v: code
  code:
    system:
      v: http://smart.who.int/immunizations/CodeSystem/IMMZ.D
      l: IMMZ.D
    code:
      v: DE250
    display:
      v: Clinically well

url:
  v: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability
  l: cpg-knowledgeCapability
value: Code
  v: computable

url:
  v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements
  l: crmi-effectiveDataRequirements
value: Canonical
  v: #effective-data-requirements
  l: effective-data-requirements

v: 0.2.0

v: IMMZD2DTBCG

v: IMMZ.D2.DT.BCG

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/plan-definition-type
    l: plan-definition-type
  code:
    v: eca-rule

v: draft

v: false

v: 2026-03-29T17:23:09+00:00

v: WHO

name:
  v: WHO
telecom:
  system:
    v: url
  value:
    v: http://who.int

v: IMMZ.D2.DT.BCG IMMZ.D2.DT.BCG

type:
  v: citation
citation:
  v: WHO recommendations for routine immunization - summary tables (January 2025)

extension:
  url:
    v: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-rationale
    l: cpg-rationale
  value: Markdown
    v: Neonates born to women of unknown HIV status should be vaccinated as the benefits of BCG vaccination outweigh the risks. Neonates of unknown HIV status born to HIV-infected women should be vaccinated if they have no clinical evidence suggestive of HIV infection.
title:
  v: Determine if the client is due for BCG.
description:
  v: Determine if the client is due for BCG vaccine according to the national immunization protocol.
condition:
  kind:
    v: applicability
  expression:
    description:
      v: Client is due for BCG vaccination
    language:
      v: text/cql-identifier
    expression:
      v: Client is due for BCG vaccination
definition: Canonical
  v: http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTMR
  l: IMMZD2DTMR
dynamic value:
  path:
    v: status
  expression:
    language:
      v: text/cql-expression
    expression:
      v: 'draft'
dynamic value:
  path:
    v: intent
  expression:
    language:
      v: text/cql-expression
    expression:
      v: 'proposal'
dynamic value:
  path:
    v: medication
  expression:
    language:
      v: text/cql-expression
    expression:
      v: Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE1', display: 'BCG vaccines' } }, display: 'BCG vaccines' }

title:
  v: Check for Guidance for the patient regarding IMMZ.D2.DT.BCG.
description:
  v: Show Guidance for the patient regarding IMMZ.D2.DT.BCG.
condition:
  kind:
    v: applicability
  expression:
    description:
      v: Has Guidance
    language:
      v: text/cql-identifier
    expression:
      v: Has Guidance
definition: Canonical
  v: http://smart.who.int/immunizations/ActivityDefinition/IMMZD2DTCR
  l: IMMZD2DTCR
dynamic value:
  path:
    v: status
  expression:
    language:
      v: text/cql-expression
    expression:
      v: 'active'
dynamic value:
  path:
    v: payload.contentString
  expression:
    language:
      v: text/cql-identifier
    expression:
      v: Guidance
dynamic value:
  path:
    v: category.coding
  expression:
    description:
      v: Category of communication
    language:
      v: text/cql-expression
    expression:
      v: Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }
dynamic value:
  path:
    v: priority
  expression:
    description:
      v: Alert priority
    language:
      v: text/cql-expression
    expression:
      v: Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }