calculating gestational age

24 views
Skip to first unread message

Shreenidhi Sharma

unread,
Jun 3, 2024, 9:21:43 AMJun 3
to Redcap Open
hi all, 

I need some help trying to calculate gestational age in redcap via calculated field. the only information I would have to do this is the estimated due date. 

I used this equation, however, it isn't showing me the right results when I test. 
rounddown(datediff([edd], 'today', 'd', 'mdy'))/7

For an example, if my edd is 12-24-24, my current gestational age would be 9 weeks and 6 days. However, my formula is showing me that the gest_age would be 31 weeks. 

Any thoughts on how I could fix the formula?

Thanks in advance! 
Shreenidhi 

Shreenidhi Sharma

unread,
Jun 3, 2024, 9:47:53 AMJun 3
to Redcap Open
Hi again, 

I have made some progress, but would need some help updating the syntax to make it redcap acceptable: 

The updated formula is this: 
(280 - datediff([edd], 'today', d)) / 7

Thanks! 

Shreenidhi Sharma

unread,
Jun 4, 2024, 3:08:01 PMJun 4
to Scott Marriott, Redcap Open
Thank you so much! 

Shreenidhi 

On Mon, Jun 3, 2024 at 11:23 AM Scott Marriott <smar...@gmail.com> wrote:
We use something like this.

rounddown(sum(280-(datediff([datefield1],[edd],"d","mdy",true)))/7,1)

(.1= Day 1 | .2= Day 2 | .4= Day 3 | .5 = Day 4 | .7 = Day 5 | .8 = Day 6)




--
You received this message because you are subscribed to the Google Groups "Redcap Open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/7f3c0b84-d963-4c8c-9da7-132c1e0bf772n%40googlegroups.com.


--

 Shreenidhi Sharma, MPH

 Data Manager

 Hassenfeld Institute | Brown University School of Public Health

 Pronouns: She/Her/Hers

shreenid...@brown.edu
https://hassenfeld.brown.edu
Reply all
Reply to author
Forward
0 new messages