Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate gestational age calculation #23

Open
brynrhodes opened this issue Oct 13, 2020 · 0 comments
Open

Validate gestational age calculation #23

brynrhodes opened this issue Oct 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@brynrhodes
Copy link
Collaborator

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

@brynrhodes brynrhodes added the enhancement New feature or request label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant