Gestational age and expected due date

I was wondering if there are any docs that have figured out how to make a snippet that allows you to figure out gestational age (expressed as weeks and days) and expected due date from a last menstrual period date.

I think its possible to use the formula function just not sure how to use a date in it to calculate another date

1 Like

Hey @Doc_Krieger
Does this work?
I had to look up the formulas :slight_smile:

Last menstrual period date: {formdate: M/D/YY; name=LMP}
{GA=datetimediff({time: YYYY-MM-DD; at={=LMP}; pattern=M/D/YY}, {time: YYYY-MM-DD}, "D")}Gestational age: {=floor(GA/7)} weeks {=remainder(GA,7)} days
Expected due date: {time: M/D/YYYY; at={=LMP}; shift=+280D; pattern=M/D/YY}

1 Like

That's awesome! Thank you so much. This will make my life so much easier!

Is it possible to similarly make a snippet for GA + EDD based on the patient's first-term ultrasound? I'll see if I cant make it work but just curious

So very helpful and Cool!!!

Hi @Doc_Krieger, I missed your last question.
Can you share the formula you'll use to calculate GA and EDD from the patient's first-term ultrasound?

actually made it myself, here it is if anyone else is looking for it:

EDD: {formdate: YYYY-MMM-DD; name=EDD}
{LMP=({time: YYYY-MMM-DD; at={=EDD}; shift=-280D; pattern=YYYY-MMM-DD})}{GA=datetimediff({time: YYYY-MM-DD; at={=LMP}; pattern=YYYY-MMM-DD}, {time: YYYY-MM-DD}, "D")}GA: {=floor(GA/7)} weeks {=remainder(GA,7)} days

1 Like