I saw this method to use the action button to calculate return to clinic in 3 months:
{ADDDATES(str(._TODAYSDATE),"0","0","90")}
Could the same method be used to calculate when labs are due based on previous lab date? I tried the following, but it didn't work:
{ADDDATES(str(LAST_SIGNED_OBS_VALUEDATE("BG FASTING")),"0","0","90")}
Many thanks!
{ADDDATES(str(LAST_SIGNED_OBS_VALUEDATE("BG FASTING")),"0","0","90")}
Remove VALUE, you just need the date. If it still doesn't work then remove the str() function, Im not sure if LAST_SIGNED_OBS_DATE() returns a date or a string...
Also, and this is just a technical point, but you are pulling up a date 90 days into the future, not three months, if you want three months end it with .... "0","3","0")} The last three arguments are ..."years","Months","Days")}
This is what I use to calculate a next due date for an A1c in 91 days. I use it as a quick text though, not for a button:
{ADDDATES(LASTOBSDATE("HGBA1C"),"0","0","91")}'
Dan
Thank you both! I am working on a lab monitoring form for antipsychotic medications. This works great!
Laura Albus
Student Support Services Systems Specialist
Milton Hershey School
I am trying to build a form as well and I need to calculate a date. I used :
(ADDDATES(LASTOBSDATE("DBT EY CK DT"),"0","12","0")) ENDIF ENDIF }
and this gives me due 12 months from the today's date not from the date that is entered on the date field. What am I doing wrong? I am pretty new to this form building gig.
LASTOBSDATE() returns the date the observation was made including the current update. Sounds like you want the contents of the field, which would be OBSNOW() for the current update.
That worked! Thanks!