WHO Antenatal Care Guideline Implementation Guide
0.3.0 - CI Build International flag

WHO Antenatal Care Guideline Implementation Guide, published by World Health Organization (WHO). This guide is not an authorized publication; it is the continuous build for version 0.3.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-anc/ and changes regularly. See the Directory of published versions

Library: ANC.S.01 Contact schedule

Official URL: http://fhir.org/guides/who/anc-cds/Library/ANCS01 Version: 0.3.0
Active as of 2024-02-13 Computable Name: ANCS01
Other Identifiers: ANC.S.01 (use: OFFICIAL)

Logic to support calculation of the contact schedule based on gestational age

Id: ANCS01
Url: ANC.S.01 Contact schedule
Version: 0.3.0
Identifier:

value: ANC.S.01

Name: ANCS01
Title: ANC.S.01 Contact schedule
Status: active
Experimental: false
Type:

system: LibraryType

code: logic-library

Date: 2024-02-13 15:17:14+0000
Publisher: World Health Organization (WHO)
Description: Logic to support calculation of the contact schedule based on gestational age
Jurisdiction: 001
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
encounterstring01in
PatientPatient01out
Estimated due date (EDD) based on last menstrual period (LMP)dateTime01out
Gestational age (GA) based on LMPQuantity01out
Estimated Date of ConceptiondateTime01out
ANC First Contact DatedateTime01out
ANC Second Contact DatedateTime01out
ANC Third Contact DatedateTime01out
ANC Fourth Contact DatedateTime01out
ANC Fifth Contact DatedateTime01out
ANC Sixth Contact DatedateTime01out
ANC Seventh Contact DatedateTime01out
ANC Eighth Contact DatedateTime01out
ANC Anticipated Delivery DatedateTime01out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;; code filter:
path: code
value set: http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de14
Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;; code filter:
path: code
value set: http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de22
Content: text/cql
library ANCS01

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

include ANCConfig called Config
include ANCConcepts called Cx
include ANCDataElements called PatientData
include ANCContactDataElements called ContactData

context Patient

define "Estimated due date (EDD) based on last menstrual period (LMP)":
  ContactData."Last menstrual period (LMP) date" + 280 days

define "Gestational age (GA) based on LMP":
  (days between ContactData."Last menstrual period (LMP) date" and Today()) div 7 'd/wk'

define "Estimated Date of Conception":
  ContactData."Expected date of delivery (EDD)" - 9 months - 7 days

define "ANC First Contact Date":
  "Estimated Date of Conception" + 12 weeks

define "ANC Second Contact Date":
  "Estimated Date of Conception" + 20 weeks

define "ANC Third Contact Date":
  "Estimated Date of Conception" + 26 weeks

define "ANC Fourth Contact Date":
  "Estimated Date of Conception" + 30 weeks

define "ANC Fifth Contact Date":
  "Estimated Date of Conception" + 34 weeks
define "ANC Sixth Contact Date":
  "Estimated Date of Conception" + 36 weeks

define "ANC Seventh Contact Date":
  "Estimated Date of Conception" + 38 weeks

define "ANC Eighth Contact Date":
  "Estimated Date of Conception" + 40 weeks

define "ANC Anticipated Delivery Date":
  ContactData."Expected date of delivery (EDD)"
Content: application/elm+xml
Encoded data (23532 characters)
Content: application/elm+json
Encoded data (39524 characters)