| calculate_pregnancy_due_date | R Documentation |
Calculates the Estimated Due Date (EDD) and current gestational age based on various clinical inputs. The calculator supports methods using the Last Menstrual Period (LMP), Date of Conception, or IVF Transfer dates (3-day or 5-day).
calculate_pregnancy_due_date(input_date, method = "LMP", cycle_length = 28)
input_date |
Date or String (YYYY-MM-DD). The reference date corresponding to the chosen method (e.g., the date of the LMP). |
method |
String. The method used for calculation. Options: "LMP": Last Menstrual Period (Standard Naegele's Rule). "Conception": Date of conception/ovulation. "IVF_3_Day": Date of 3-day embryo transfer. "IVF_5_Day": Date of 5-day embryo transfer. |
cycle_length |
Numeric. The length of the patient's menstrual cycle in days. Only applicable when method is "LMP". Defaults to 28. |
A list containing:
Estimated_Due_Date |
The calculated date of delivery (40 weeks). |
Gestational_Age |
The current gestational age in weeks and days based on the system date. |
Current_Trimester |
The current trimester (1st, 2nd, or 3rd). |
American College of Obstetricians and Gynecologists. Method for Estimating Due Date. Committee Opinion No. 700. Obstet Gynecol. 2017;129(5):e150-e154.
# Example 1: Standard LMP (28 day cycle)
calculate_pregnancy_due_date("2023-01-01", "LMP")
# Example 2: Long Cycle (30 days)
calculate_pregnancy_due_date("2023-01-01", "LMP", 30)
# Example 3: IVF 5-Day Transfer
calculate_pregnancy_due_date("2023-01-15", "IVF_5_Day")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.