Id: IMMZD2DTDTPDelayedOrInterruptedSeries Url: IMMZ.D2.DT.DTP.Delayed or interrupted series Version: 1.0.0 Title: IMMZ.D2.DT.DTP.Delayed or interrupted series Status: draft Type: system: http://terminology.hl7.org/CodeSystem/plan-definition-type code: eca-rule Date: 2026-03-31 13:54:17+0000 Publisher: WHO Description: IMMZ.D2.DT.DTP.Delayed or interrupted series DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age Knowledge Capability: computable Related Artifacts: References WHO recommendations for routine immunization - summary tables (January 2025) Libraries: IMMZD2DTDTPDelayedOrInterruptedSeriesLogic Actions: Determine if the client is due for DTP.: Determine if the client is due for DTP vaccine according to the national immunization protocol. DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age If: Applicability: Client is due for DTP vaccination (Client is due for DTP vaccination) Then: Definition: IMMZD2DTMR Dynamic Values: status: ('draft') intent: ('proposal') medication: (Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE24', display: 'DTP-containing vaccines' } }, display: 'DTP-containing vaccines' }) Determine if the client is due for DTP.: Determine if the client is due for DTP vaccine according to the national immunization protocol. DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age If: Applicability: Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose (Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose) Then: Definition: IMMZD2DTMR Dynamic Values: status: ('draft') intent: ('proposal') medication: (Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE28', display: 'Tetanus and diphtheria-containing vaccines' } }, display: 'Tetanus and diphtheria-containing vaccines' }) Determine if the client is due for DTP.: Determine if the client is due for DTP vaccine according to the national immunization protocol. DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age If: Applicability: Client is due for tetanus and diphtheria booster dose (Client is due for tetanus and diphtheria booster dose) Then: Definition: IMMZD2DTMR Dynamic Values: status: ('draft') intent: ('proposal') medication: (Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE28', display: 'Tetanus and diphtheria-containing vaccines' } }, display: 'Tetanus and diphtheria-containing vaccines' }) Determine if the client is due for DTP.: Determine if the client is due for DTP vaccine according to the national immunization protocol. DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age If: Applicability: Primary DTP series is complete. Client is due for pertussis booster dose (Primary DTP series is complete. Client is due for pertussis booster dose) Then: Definition: IMMZD2DTMR Dynamic Values: status: ('draft') intent: ('proposal') medication: (Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE12', display: 'Pertussis-containing vaccines' } }, display: 'Pertussis-containing vaccines' }) Check for Guidance for the patient regarding IMMZ.D2.DT.DTP.Delayed or interrupted series.: Show Guidance for the patient regarding IMMZ.D2.DT.DTP.Delayed or interrupted series. 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' })
/** * @dataElement All Doses Administered to Patient */ define "Doses Administered to Patient": [Immunization] I where I.status = 'completed' and I.isSubpotent is not true
/* @internal: DTP containing Doses Administered to Patient */ define "DTP Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."DTP-containing vaccines"
DTP Primary Series Doses Administered to Patient
/* @internal: DTP containing Doses Administered to Patient that are in the Primary series */ define "DTP Primary Series Doses Administered to Patient": "DTP Doses Administered to Patient".seriesPrimary()
/* @internal: DTP containing Doses Administered to Patient that are in the Primary series */ define "DTP Primary Series Doses Administered to Patient": DTPElements."DTP Primary Series Doses Administered to Patient".onOrBefore(Today)
Number of DTP Primary Series Doses Administered
/* @internal: Number of DTP Primary Series doses */ define "Number of DTP Primary Series Doses Administered": Count("DTP Primary Series Doses Administered to Patient")
Three DTP primary series doses were administered
/* @input: Three DTP primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "DTP-containing vaccines" and "Type of dose" = "Primary series") = 3 @code: Three DTP primary series doses were administered-123 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy: Determine whether DTP-containing vaccines are needed for pregnant women @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 3 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood DTP doses @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 4 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood DTP doses */ define "Three DTP primary series doses were administered": "Number of DTP Primary Series Doses Administered" = 3
/* @internal: Td Doses Administered to Patient */ define "Td Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."Tetanus and diphtheria-containing vaccines"
Td Booster Series Doses Administered to Patient
/* @internal: Td Booster Series Doses Administered to Patient */ define "Td Booster Series Doses Administered to Patient": "Td Doses Administered to Patient".seriesBooster()
/* @internal: Td Booster Series Doses Administered to Patient */ define "Td Booster Series Doses Administered to Patient": DTPElements."Td Booster Series Doses Administered to Patient".onOrBefore(Today)
Number of Td Booster Series Doses Administered
/* @internal: Number of Td Booster Series Doses Administered */ define "Number of Td Booster Series Doses Administered": Count("Td Booster Series Doses Administered to Patient")
No tetanus and diphtheria booster doses were administered
/* @input: No tetanus and diphtheria booster doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 0 @code: No tetanus and diphtheria booster doses were administered-140 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 3 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood DTP doses */ define "No tetanus and diphtheria booster doses were administered": "Number of Td Booster Series Doses Administered" = 0
/* @internal: DTP containing Doses Administered to Patient */ define "DTP Doses Administered to Patient": DTPElements."DTP Doses Administered to Patient".onOrBefore(Today)
/* @internal: Date of Latest DTP Dose */ define "Date of Latest DTP Dose": date from start of "DTP Doses Administered to Patient".mostRecent().occurrence.toInterval()
The latest DTP dose was administered less than 1 year ago
/* @input: The latest DTP dose was administered less than 1 year ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") < 1 year @code: The latest DTP dose was administered less than 1 year ago-112 @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered less than 1 year ago": "Date of Latest DTP Dose" is not null and duration in years between "Date of Latest DTP Dose" and Today < 1
Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose
/* @output: Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "DTP-containing vaccines") */ define "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."No tetanus and diphtheria booster doses were administered" and Encounter."The latest DTP dose was administered less than 1 year ago"
/* @internal: Pertussis Doses Administered to Patient */ define "Pertussis Doses Administered to Patient": Elements."Doses Administered to Patient" I where I.vaccineCode in Concepts."Pertussis-containing vaccines"
Pertussis Booster Series Doses Administered to Patient
/* @internal: Pertussis Booster Series Doses Administered to Patient */ define "Pertussis Booster Series Doses Administered to Patient": "Pertussis Doses Administered to Patient".seriesBooster()
/* @internal: Pertussis Booster Series Doses Administered to Patient */ define "Pertussis Booster Series Doses Administered to Patient": DTPElements."Pertussis Booster Series Doses Administered to Patient".onOrBefore(Today)
Number of Pertussis Booster Series Doses Administered
/* @internal: Number of Pertussis Booster Series Doses Administered */ define "Number of Pertussis Booster Series Doses Administered": Count("Pertussis Booster Series Doses Administered to Patient")
No pertussis booster doses were administered
/* @input: No pertussis booster doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Pertussis-containing vaccines" and "Type of dose" = "Booster dose") = 0 @code: No pertussis booster doses were administered-127 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "No pertussis booster doses were administered": "Number of Pertussis Booster Series Doses Administered" = 0
/** * @dataElement Patient age in years */ define "Current Patient Age In Years": AgeInYearsAt(Today)
Client's age is between 1 year and 6 years
/* @input: Client's age is between 1 year and 6 years @pseudocode: 1 year ≤ Today's date − "Date of birth" ≤ 6 years @code: Client's age is between 1 year and 6 years-49 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "Client's age is between 1 year and 6 years": 1 <= Encounter."Current Patient Age In Years" and Encounter."Current Patient Age In Years" <= 6
The latest DTP dose was administered less than 6 months ago
/* @input: The latest DTP dose was administered less than 6 months ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") < 6 months @code: The latest DTP dose was administered less than 6 months ago-114 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered less than 6 months ago": "Date of Latest DTP Dose" is not null and duration in months between "Date of Latest DTP Dose" and Today < 6
Primary DTP series is complete. Client is not due for pertussis booster dose
/* @output: Primary DTP series is complete. Client is not due for pertussis booster dose @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "Pertussis-containing vaccines") "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "DTP-containing vaccines") */ define "Primary DTP series is complete. Client is not due for pertussis booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."No pertussis booster doses were administered" and Encounter."Client's age is between 1 year and 6 years" and Encounter."The latest DTP dose was administered less than 6 months ago"
Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance
/* @output: Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance @guidance: Should not vaccinate client with first tetanus and diphtheria booster dose as the latest DTP dose was administered less than 1 year ago. Check for any other vaccines due and inform the caregiver of when to come back for first tetanus and diphtheria booster dose. */ define "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance": 'Should not vaccinate client with first tetanus and diphtheria booster dose as the latest DTP dose was administered less than 1 year ago. Check for any other vaccines due and inform the caregiver of when to come back for first tetanus and diphtheria booster dose.'
Primary DTP series is complete. Client is not due for pertussis booster dose Guidance
/* @output: Primary DTP series is complete. Client is not due for pertussis booster dose Guidance @guidance: Should not vaccinate client with pertussis booster dose as the latest DTP dose was administered less than 6 months ago. Check for any other vaccines due and inform the caregiver of when to come back for pertussis booster dose. */ define "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance": 'Should not vaccinate client with pertussis booster dose as the latest DTP dose was administered less than 6 months ago. Check for any other vaccines due and inform the caregiver of when to come back for pertussis booster dose.'
The latest DTP dose was administered more than 6 months ago
/* @input: The latest DTP dose was administered more than 6 months ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") ≥ 6 months @code: The latest DTP dose was administered more than 6 months ago-114 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered more than 6 months ago": not("The latest DTP dose was administered less than 6 months ago")
Primary DTP series is complete. Client is due for pertussis booster dose
/* @output: Primary DTP series is complete. Client is due for pertussis booster dose @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "Pertussis-containing vaccines") "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "DTP-containing vaccines") */ define "Primary DTP series is complete. Client is due for pertussis booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."No pertussis booster doses were administered" and Encounter."Client's age is between 1 year and 6 years" and Encounter."The latest DTP dose was administered more than 6 months ago"
Primary DTP series is complete. Client is due for pertussis booster dose Guidance
/* @output: Primary DTP series is complete. Client is due for pertussis booster dose Guidance @guidance: Should vaccinate client with pertussis booster dose as no pertussis booster doses were administered, client is within appropriate age range and the latest DTP dose was administered more than 6 months ago. Check for contraindications. */ define "Primary DTP series is complete. Client is due for pertussis booster dose Guidance": 'Should vaccinate client with pertussis booster dose as no pertussis booster doses were administered, client is within appropriate age range and the latest DTP dose was administered more than 6 months ago. Check for contraindications.'
/* @input: Client's age is more than 6 years @pseudocode: Today's date − "Date of birth" > 6 years @code: Client's age is more than 6 years-40 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "Client's age is more than 6 years": Encounter."Current Patient Age In Years" > 6
Pertussis immunization schedule is complete Case 1
/* @output: Pertussis immunization schedule is complete Case 1 @pseudocode: "Immunization recommendation status" = "Complete" (where "Vaccine type" = "Pertussis-containing vaccines") */ define "Pertussis immunization schedule is complete Case 1": Encounter."Three DTP primary series doses were administered" and Encounter."No pertussis booster doses were administered" and Encounter."Client's age is more than 6 years"
One pertussis booster dose was administered
/* @input: One pertussis booster dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Pertussis-containing vaccines" and "Type of dose" = "Booster dose") = 1 @code: One pertussis booster dose was administered-127 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "One pertussis booster dose was administered": "Number of Pertussis Booster Series Doses Administered" = 1
Pertussis immunization schedule is complete Case 2
/* @output: Pertussis immunization schedule is complete Case 2 @pseudocode: "Immunization recommendation status" = "Complete" (where "Vaccine type" = "Pertussis-containing vaccines") */ define "Pertussis immunization schedule is complete Case 2": Encounter."Three DTP primary series doses were administered" and Encounter."One pertussis booster dose was administered"
Pertussis immunization schedule is complete
/* @output: Pertussis immunization schedule is complete @pseudocode: "Immunization recommendation status" = "Complete" (where "Vaccine type" = "Pertussis-containing vaccines") */ define "Pertussis immunization schedule is complete": "Pertussis immunization schedule is complete Case 1" or "Pertussis immunization schedule is complete Case 2"
Pertussis immunization schedule is complete Guidance
/* @output: Pertussis immunization schedule is complete Guidance @guidance = Pertussis immunization schedule is complete. Three DTP primary series doses were administered. Check for any other vaccines due. @guidance = Pertussis immunization schedule is complete. Three DTP primary series doses and one pertussis booster dose were administered. Check for any other vaccines due. */ define "Pertussis immunization schedule is complete Guidance": case when "Pertussis immunization schedule is complete Case 1" then 'Pertussis immunization schedule is complete. Three DTP primary series doses were administered. Check for any other vaccines due.' when "Pertussis immunization schedule is complete Case 2" then 'Pertussis immunization schedule is complete. Three DTP primary series doses and one pertussis booster dose were administered. Check for any other vaccines due.' else '' end
The latest DTP dose was administered more than 1 year ago
/* @input: The latest DTP dose was administered more than 1 year ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") ≥ 1 year @code: The latest DTP dose was administered more than 1 year ago-112 @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered more than 1 year ago": not("The latest DTP dose was administered less than 1 year ago")
Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose
/* @output: Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") "Completed the primary vaccination series" = TRUE (where "Vaccine type" = "DTP-containing vaccines") */ define "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."No tetanus and diphtheria booster doses were administered" and Encounter."The latest DTP dose was administered more than 1 year ago"
Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance
/* @output: Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance @guidance: Should vaccinate client with first tetanus and diphtheria booster dose as the latest DTP dose was administered more than 1 year ago. Check for contraindications. */ define "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance": 'Should vaccinate client with first tetanus and diphtheria booster dose as the latest DTP dose was administered more than 1 year ago. Check for contraindications.'
One tetanus and diphtheria booster dose was administered
/* @input: One tetanus and diphtheria booster dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 1 @code: One tetanus and diphtheria booster dose was administered-140 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy: Determine whether DTP-containing vaccines are needed for pregnant women @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 4 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood DTP doses */ define "One tetanus and diphtheria booster dose was administered": "Number of Td Booster Series Doses Administered" = 1
/* @internal: Td Doses Administered to Patient */ define "Td Doses Administered to Patient": DTPElements."Td Doses Administered to Patient".onOrBefore(Today)
/* @internal: Date of Latest Td Dose */ define "Date of Latest Td Dose": date from start of "Td Doses Administered to Patient".mostRecent().occurrence.toInterval()
The latest tetanus and diphtheria dose was administered less than 1 year ago
/* @input: The latest tetanus and diphtheria dose was administered less than 1 year ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") < 1 year @code: The latest tetanus and diphtheria dose was administered less than 1 year ago-131 @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 3 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood DTP doses @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 4 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood DTP doses */ define "The latest tetanus and diphtheria dose was administered less than 1 year ago": "Date of Latest Td Dose" is not null and duration in years between "Date of Latest Td Dose" and Today < 1
Client is not due for tetanus and diphtheria booster dose
/* @output: Client is not due for tetanus and diphtheria booster dose @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") */ define "Client is not due for tetanus and diphtheria booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."One tetanus and diphtheria booster dose was administered" and Encounter."The latest tetanus and diphtheria dose was administered less than 1 year ago"
Client is not due for tetanus and diphtheria booster dose Guidance
/* @output: Client is not due for tetanus and diphtheria booster dose Guidance @guidance: Should not vaccinate client with second tetanus and diphtheria booster dose as the latest tetanus and diphtheria dose was administered less than 1 year ago. Check for any other vaccines due and inform the caregiver of when to come back for second tetanus and diphtheria booster dose. */ define "Client is not due for tetanus and diphtheria booster dose Guidance": 'Should not vaccinate client with second tetanus and diphtheria booster dose as the latest tetanus and diphtheria dose was administered less than 1 year ago. Check for any other vaccines due and inform the caregiver of when to come back for second tetanus and diphtheria booster dose.'
The latest tetanus and diphtheria dose was administered more than 1 year ago
/* @input: The latest tetanus and diphtheria dose was administered more than 1 year ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") ≥ 1 year @code: The latest tetanus and diphtheria dose was administered more than 1 year ago-131 @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 3 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood DTP doses @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 4 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood DTP doses */ define "The latest tetanus and diphtheria dose was administered more than 1 year ago": not("The latest tetanus and diphtheria dose was administered less than 1 year ago")
Client is due for tetanus and diphtheria booster dose
/* @output: Client is due for tetanus and diphtheria booster dose @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") */ define "Client is due for tetanus and diphtheria booster dose": Encounter."Three DTP primary series doses were administered" and Encounter."One tetanus and diphtheria booster dose was administered" and Encounter."The latest tetanus and diphtheria dose was administered more than 1 year ago"
Client is due for tetanus and diphtheria booster dose Guidance
/* @output: Client is due for tetanus and diphtheria booster dose Guidance @guidance: Should vaccinate client with second tetanus and diphtheria booster dose as the latest tetanus and diphtheria dose was administered more than 1 year ago. Check for contraindications. */ define "Client is due for tetanus and diphtheria booster dose Guidance": 'Should vaccinate client with second tetanus and diphtheria booster dose as the latest tetanus and diphtheria dose was administered more than 1 year ago. Check for contraindications.'
Two tetanus and diphtheria booster doses were administered
/* @input: Two tetanus and diphtheria booster doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines" and "Type of dose" = "Booster dose") = 2 @code: Two tetanus and diphtheria booster doses were administered-140 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy: Determine whether DTP-containing vaccines are needed for pregnant women @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 3 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 3 childhood DTP doses @decision: IMMZ.D2.DT.DTP.Pregnancy starting with 4 doses: Diphtheria and tetanus vaccination schedule in pregnant women who received 4 childhood DTP doses */ define "Two tetanus and diphtheria booster doses were administered": "Number of Td Booster Series Doses Administered" = 2
Tetanus and diphtheria immunization schedule is complete
/* @output: Tetanus and diphtheria immunization schedule is complete @pseudocode: "Immunization recommendation status" = "Complete" (where "Vaccine type" = "Tetanus and diphtheria-containing vaccines") */ define "Tetanus and diphtheria immunization schedule is complete": Encounter."Three DTP primary series doses were administered" and Encounter."Two tetanus and diphtheria booster doses were administered"
Tetanus and diphtheria immunization schedule is complete Guidance
/* @output: Tetanus and diphtheria immunization schedule is complete Guidance @guidance: Tetanus and diphtheria immunization schedule is complete. Three DTP primary series doses and two tetanus and diphtheria booster doses were administered. Check for any other vaccines due. */ define "Tetanus and diphtheria immunization schedule is complete Guidance": 'Tetanus and diphtheria immunization schedule is complete. Three DTP primary series doses and two tetanus and diphtheria booster doses were administered. Check for any other vaccines due.'
No DTP primary series doses were administered
/* @input: No DTP primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "DTP-containing vaccines" and "Type of dose" = "Primary series") = 0 @code: No DTP primary series doses were administered-123 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age @decision: IMMZ.D2.DT.DTP.Pregnancy: Determine whether DTP-containing vaccines are needed for pregnant women */ define "No DTP primary series doses were administered": "Number of DTP Primary Series Doses Administered" = 0
/* @input: Client's age is more than 1 year @pseudocode: Today's date − "Date of birth" > 1 year @code: Client's age is more than 1 year-39 @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "Client's age is more than 1 year": Encounter."Current Patient Age In Years" >= 1
Client is due for DTP vaccination Case 1
/* @output: Client is due for DTP vaccination Case 1 @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is due for DTP vaccination Case 1": Encounter."No DTP primary series doses were administered" and Encounter."Client's age is more than 1 year"
One DTP primary series dose was administered
/* @input: One DTP primary series dose was administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "DTP-containing vaccines" and "Type of dose" = "Primary series") = 1 @code: One DTP primary series dose was administered-123 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "One DTP primary series dose was administered": "Number of DTP Primary Series Doses Administered" = 1
The latest DTP dose was administered less than 4 weeks ago
/* @input: The latest DTP dose was administered less than 4 weeks ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") < 4 weeks @code: The latest DTP dose was administered less than 4 weeks ago-113 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered less than 4 weeks ago": "Date of Latest DTP Dose" is not null and duration in weeks between "Date of Latest DTP Dose" and Today < 4
The latest DTP dose was administered more than 4 weeks ago
/* @input: The latest DTP dose was administered more than 4 weeks ago @pseudocode: Today's date − latest "Date and time of vaccination" (where "Vaccine type" = "DTP-containing vaccines") ≥ 4 weeks @code: The latest DTP dose was administered more than 4 weeks ago-113 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "The latest DTP dose was administered more than 4 weeks ago": not("The latest DTP dose was administered less than 4 weeks ago")
Client is due for DTP vaccination Case 2
/* @output: Client is due for DTP vaccination Case 2 @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is due for DTP vaccination Case 2": Encounter."One DTP primary series dose was administered" and Encounter."The latest DTP dose was administered more than 4 weeks ago"
Two DTP primary series doses were administered
/* @input: Two DTP primary series doses were administered @pseudocode: Count of vaccines administered (where "Vaccine type" = "DTP-containing vaccines" and "Type of dose" = "Primary series") = 2 @code: Two DTP primary series doses were administered-123 @decision: IMMZ.D2.DT.DTP.On-time start: DTP vaccination schedule, on-time start (at ≤ 12 months of age) @decision: IMMZ.D2.DT.DTP.Delayed or interrupted series: DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age */ define "Two DTP primary series doses were administered": "Number of DTP Primary Series Doses Administered" = 2
Client is due for DTP vaccination Case 3
/* @output: Client is due for DTP vaccination Case 3 @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is due for DTP vaccination Case 3": Encounter."Two DTP primary series doses were administered" and Encounter."The latest DTP dose was administered more than 6 months ago"
/* @output: Client is due for DTP vaccination @pseudocode: "Immunization recommendation status" = "Due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is due for DTP vaccination": "Client is due for DTP vaccination Case 1" or "Client is due for DTP vaccination Case 2" or "Client is due for DTP vaccination Case 3"
Client is due for DTP vaccination Guidance
/* @output: Client is due for DTP vaccination Guidance @guidance = Should vaccinate client with first DTP dose as no DTP doses were administered and client's age is more than 1 year. Check for contraindications. @guidance = Should vaccinate client with second DTP dose as the latest DTP dose was administered more than 4 weeks ago. Check for contraindications. @guidance = Should vaccinate client with third DTP dose as the latest DTP dose was administered more than 6 months ago. Check for contraindications. */ define "Client is due for DTP vaccination Guidance": case when "Client is due for DTP vaccination Case 1" then 'Should vaccinate client with first DTP dose as no DTP doses were administered and client\'s age is more than 1 year. Check for contraindications.' when "Client is due for DTP vaccination Case 2" then 'Should vaccinate client with second DTP dose as the latest DTP dose was administered more than 4 weeks ago. Check for contraindications.' when "Client is due for DTP vaccination Case 3" then 'Should vaccinate client with third DTP dose as the latest DTP dose was administered more than 6 months ago. Check for contraindications.' else '' end
Client is not due for DTP vaccination Case 1
/* @output: Client is not due for DTP vaccination Case 1 @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is not due for DTP vaccination Case 1": Encounter."One DTP primary series dose was administered" and Encounter."The latest DTP dose was administered less than 4 weeks ago"
Client is not due for DTP vaccination Case 2
/* @output: Client is not due for DTP vaccination Case 2 @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is not due for DTP vaccination Case 2": Encounter."Two DTP primary series doses were administered" and Encounter."The latest DTP dose was administered less than 6 months ago"
/* @output: Client is not due for DTP vaccination @pseudocode: "Immunization recommendation status" = "Not due" (where "Vaccine type" = "DTP-containing vaccines") */ define "Client is not due for DTP vaccination": "Client is not due for DTP vaccination Case 1" or "Client is not due for DTP vaccination Case 2"
Client is not due for DTP vaccination Guidance
/* @output: Client is not due for DTP vaccination Guidance @guidance = Should not vaccinate client with second DTP dose as the latest DTP dose was administered less than 4 weeks ago. Check for any other vaccines due and inform the caregiver of when to come back for second DTP dose @guidance = Should not vaccinate client with third DTP dose the latest DTP dose was administered less than 6 months ago. Check for any other vaccines due and inform the caregiver of when to come back for third DTP dose. */ define "Client is not due for DTP vaccination Guidance": case when "Client is not due for DTP vaccination Case 1" then 'Should not vaccinate client with second DTP dose as the latest DTP dose was administered less than 4 weeks ago. Check for any other vaccines due and inform the caregiver of when to come back for second DTP dose' when "Client is not due for DTP vaccination Case 2" then 'Should not vaccinate client with third DTP dose the latest DTP dose was administered less than 6 months ago. Check for any other vaccines due and inform the caregiver of when to come back for third DTP dose.' else '' end
/* @dynamicValue: Guidance */ define "Guidance": case // Handling overlaps for Pertussis and Td boosters. when "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is due for pertussis booster dose" then "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose" and "Pertussis immunization schedule is complete" then "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Pertussis immunization schedule is complete Guidance" when "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is due for pertussis booster dose" then "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose" and "Pertussis immunization schedule is complete" then "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Pertussis immunization schedule is complete Guidance" when "Client is not due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Client is not due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is due for pertussis booster dose" then "Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Client is not due for tetanus and diphtheria booster dose" and "Pertussis immunization schedule is complete" then "Client is not due for tetanus and diphtheria booster dose Guidance" + '\n' + "Pertussis immunization schedule is complete Guidance" when "Client is due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Client is due for tetanus and diphtheria booster dose" and "Primary DTP series is complete. Client is due for pertussis booster dose" then "Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Client is due for tetanus and diphtheria booster dose" and "Pertussis immunization schedule is complete" then "Client is due for tetanus and diphtheria booster dose Guidance" + '\n' + "Pertussis immunization schedule is complete Guidance" when "Tetanus and diphtheria immunization schedule is complete" and "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Tetanus and diphtheria immunization schedule is complete Guidance" + '\n' + "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Tetanus and diphtheria immunization schedule is complete" and "Primary DTP series is complete. Client is due for pertussis booster dose" then "Tetanus and diphtheria immunization schedule is complete Guidance" + '\n' + "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Tetanus and diphtheria immunization schedule is complete" and "Pertussis immunization schedule is complete" then "Tetanus and diphtheria immunization schedule is complete Guidance" + '\n' + "Pertussis immunization schedule is complete Guidance" when "Client is due for DTP vaccination" then "Client is due for DTP vaccination Guidance" when "Client is not due for DTP vaccination" then "Client is not due for DTP vaccination Guidance" when "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose" then "Primary DTP series is complete. Client is not due for tetanus and diphtheria booster dose Guidance" when "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose" then "Primary DTP series is complete. Client is due for tetanus and diphtheria booster dose Guidance" when "Client is not due for tetanus and diphtheria booster dose" then "Client is not due for tetanus and diphtheria booster dose Guidance" when "Client is due for tetanus and diphtheria booster dose" then "Client is due for tetanus and diphtheria booster dose Guidance" when "Tetanus and diphtheria immunization schedule is complete" then "Tetanus and diphtheria immunization schedule is complete Guidance" when "Primary DTP series is complete. Client is not due for pertussis booster dose" then "Primary DTP series is complete. Client is not due for pertussis booster dose Guidance" when "Primary DTP series is complete. Client is due for pertussis booster dose" then "Primary DTP series is complete. Client is due for pertussis booster dose Guidance" when "Pertussis immunization schedule is complete" then "Pertussis immunization schedule is complete Guidance" else '' end
define "Has Guidance": "Guidance" is not null and "Guidance" != ''
/** * @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
/* From FHIRCommon 4.1.0: */ /* @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval @comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible representations for timing-valued elements in FHIR, allowing this function to be used across any resource. The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range. The intent of this function is to provide a clear and concise mechanism to treat single elements that have multiple possible representations as intervals so that logic doesn't have to account for the variability. More complex calculations (such as medication request period or dispense period calculation) need specific guidance and consideration. That guidance may make use of this function, but the focus of this function is on single element calculations where the semantics are unambiguous. If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime. If the input is a Period, the result is a DateTime Interval. If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing. If the input is an instant, the result is a DateTime Interval beginning and ending on that instant. If the input is a string, an error is raised indicating a single interval cannot be computed from a string. If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age, and ending immediately prior to when the patient was the given Age plus one year. If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given by the low end of the Range, and ending immediately prior to when the patient was the Age given by the high end of the Range plus one year. NOTE: Due to the complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used with a Timing or String. */ define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>): case when choice is FHIR.dateTime then Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)] when choice is FHIR.Period then FHIRHelpers.ToInterval(choice as FHIR.Period) when choice is FHIR.instant then Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)] when choice is FHIR.Age then Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age), FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year) when choice is FHIR.Range then Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low), FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year) when choice is FHIR.Timing then Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') when choice is FHIR.string then Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported') else null as Interval<DateTime> end
define function ToDateTime(value dateTime): value.value
define function ToInterval(period FHIR.Period): if period is null then null else if period."start" is null then Interval(period."start".value, period."end".value] else Interval[period."start".value, period."end".value]
define function ToDateTime(value instant): value.value
define function ToDate(value date): value.value
define function ToQuantity(quantity FHIR.Quantity): case when quantity is null then null when quantity.value is null then null when quantity.comparator is not null then Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end
define function ToCalendarUnit(unit System.String): case unit when 'ms' then 'millisecond' when 's' then 'second' when 'min' then 'minute' when 'h' then 'hour' when 'd' then 'day' when 'wk' then 'week' when 'mo' then 'month' when 'a' then 'year' else unit end
/** * @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' )
define function ToString(value string): value.value
define function ToString(value ImmunizationStatus): value.value
define function ToBoolean(value boolean): value.value
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 }
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 }
/** * @description: Gets the doses from the Booster series */ define fluent function seriesBooster(immunizations List<Immunization>): immunizations I where exists( I.protocolApplied pa where pa.series = 'Booster dose' )
define fluent function mostRecent(immunizations List<Immunization>): Last( immunizations I sort by start of occurrence.toInterval() )
Value set Tetanus and diphtheria-containing vaccines
IMMZ.D2.DT.DTP.Delayed or interrupted series
IMMZ.D2.DT.DTP.Delayed or interrupted series DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age
WHO recommendations for routine immunization - summary tables (January 2025)
Delayed or interrupted DTP-containing series: for children whose vaccination series has been interrupted, the series should be resumed without repeating previous doses. Children aged between 1 year and 7 years who have not previously been vaccinated should receive 3 doses of vaccine following a 0, 1, 6-month schedule. Two subsequent booster doses using tetanus toxoid with reduced diphtheria toxoid (Td) or Td with acellular pertussis (TdaP) combination vaccines are needed with an interval of at least 1 year between doses. For those starting a tetanus and diphtheria-containing vaccination series in adolescence or adulthood: from 7 years of age only Td combinations should be used. Age-appropriate combinations-containing pertussis vaccine with reduced diphtheria toxoid are also available. If tetanus vaccination is started during adolescence or adulthood, a total of only 5 appropriately spaced doses are required to obtain lifelong protection. Pregnant women and their newborn infants are protected from birth-associated tetanus if the mother received either 6 tetanus-containing vaccine doses during childhood or 5 doses if first vaccinated during adolescence/adulthood (documented by card, immunization registry and/or history) before the time of reproductive age. Vaccination history should be verified in order to determine whether a dose of tetanus-containing vaccine is needed in the current pregnancy. In countries where maternal and neonatal tetanus remains a public health problem, pregnant women for whom reliable information on previous tetanus vaccinations is not available should receive at least 2 doses of tetanus-containing vaccines, preferably Td, with an interval of at least 4 weeks between doses and the second dose at least 2 weeks before the birth. To ensure protection for a minimum of 5 years, a third dose should be given at least 6 months later. A fourth and fifth dose should be given at intervals of at least 1 year, or in subsequent pregnancies, in order to ensure lifelong protection. In countries where maternal and neonatal tetanus is not a public health problem (low prevalence/high-income settings), policy-makers may choose not to include tetanus vaccination among antenatal care interventions if effective tetanus immunization programmes and good post-exposure prophylaxis exist outside of pregnancy. In countries where maternal and neonatal tetanus is not a public health problem, the strategy may be to protect against tetanus via the infant (3 DTP-containing vaccinations) and boosters programme. For more information, see the WHO guide Protecting all against tetanus (5). For children aged under 7 years, diphtheria and tetanus toxoids and whole-cell pertussis (DTwP) or DTaP combinations may be used. For children aged 4 years and older, Td-containing vaccine may be used and is preferred. For children aged 7 years and older, only Td combinations should be used. Age-appropriate combinations-containing pertussis vaccine with low-dose diphtheria antigen are also available. Only aP-containing vaccines should be used for vaccination of persons aged 7 years and older.
Determine if the client is due for DTP vaccine according to the national immunization protocol. DTP vaccination schedule for the following groups: children ≥ 1 year of age with no previous immunization, adolescents and adults with no previous immunization (including pregnant women) and supplementary immunization activities in high-risk areas, for women of reproductive age
Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE24', display: 'DTP-containing vaccines' } }, display: 'DTP-containing vaccines' }
Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE28', display: 'Tetanus and diphtheria-containing vaccines' } }, display: 'Tetanus and diphtheria-containing vaccines' }
The duration of protection following primary immunization varies considerably depending upon factors such as local epidemiology, vaccination schedule and choice of vaccine. Therefore, a booster dose is recommended for children aged 1–6 years, preferably during the second year of life (≥ 6 months after last primary dose), unless otherwise indicated by local epidemiology; the contact could also be used to catch up on any missed doses of other vaccines. This schedule should provide protection for at least 6 years for countries using wP-containing vaccine. For countries using aP-containing vaccine, protection may decline appreciably before 6 years of age. Only aP-containing vaccines should be used for vaccination of persons aged 7 years and older. Although a booster dose in adolescence was shown to decrease disease in adolescents, this is not generally recommended as a means of controlling pertussis in infants. A decision to introduce adolescent and/or adult boosters should only be taken after careful assessment of local epidemiology, estimation of the contribution of adolescents as source of infections of young infants, and selection of adolescents and/or adults as target groups for vaccination. Decisions concerning such programmes should be based on the incidence and cost–effectiveness data. High coverage of routine immunization in infants must be in place prior to the introduction of vaccination of adolescents and adults.
Concept { codes: { Code { system: 'http://smart.who.int/immunizations/CodeSystem/IMMZ.Z', code: 'DE12', display: 'Pertussis-containing vaccines' } }, display: 'Pertussis-containing vaccines' }
Check for Guidance for the patient regarding IMMZ.D2.DT.DTP.Delayed or interrupted series.
Show Guidance for the patient regarding IMMZ.D2.DT.DTP.Delayed or interrupted series.
Code { system: 'http://terminology.hl7.org/CodeSystem/communication-category', code: 'alert' }
Code { system: 'http://hl7.org/fhir/request-priority', code: 'routine' }