WorldHealthOrganization / smart-anc

WHO Antenatal Care Guidelines IG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validate gestational age calculation

brynrhodes opened this issue · comments

Also to answer Bryn’s question the formula for GA calculation, I’m not sure where that came version came from. From the data dictionary I have the following:

Gestational age from ultrasound: 280 - ({ultrasound_edd} - {today})
Gestational age from last menstrual period (LMP):  (today's date - {lmp}) / 7, shown in weeks and days
Gestational age from symphysis fundal height (SFH) or abdominal palpation: whatever value is entered by the health worker (usually value should be between 4 and 40) 

The trickier part is that equation however is the EDD calculation. So if you need further info, we settled on the following two options (with Nichole Young Lin’s help):

EDD using the first day of the LMP:

  1. Prompt user for the date of the first day of the patient's last menstrual period ("LMP")

  2. Calculate the estimated due date ("EDD") by taking the start date of the last period and adding a duration of 280 calendar days. The output should be a future date. Of course, this should be mapped to a calendar to account for leap years, etc.

Method 1 Example:

LMP Input: 2019/06/01

EDD Output: 2020/03/07

EDD using the ultrasound:

  1. Prompt the user to enter the date of the ultrasound and the estimated gestational age output in weeks (W) and days (D).

  2. Convert the input into days using the expression (7*W + D). For the example below, for input (12 weeks, 4 days), the estimated gestational age ("EGA") in days would be 88.

  3. Calculated the remaining days ("RD") using the expression (280 - EGA), for example, 280 - 88 = 192

  4. Calculate the estimated due date ("EDD") by adding RD days (For example, 192) to today's date, and return the new date (EDD). Of course, this should be mapped to a calendar to account for leap years, etc.

Method 2 Example:

EGA Input: 12 weeks, 4 days; Today's date: 2019/06/13

Calculation: [today + (280-(12*7+4))]

EDD Output: 2019/12/22