Hello,
Is there a way to make the obsnow function push to the date of the document instead of today's date? I could have sworn in the past, it would put the observation in as the clinical date of the document. Now it is definitely using today's date. Here is my quicktext: {OBSNOW("MCAREANEXAM","medicare cpe","")}
I tried adding DOCUMENT.CLINICALDATE to the end, but it then either does nothing or gives me an error (without quotes does nothing; with quotes says invalid date).
Any suggestions?
Thank you!
Have you tried wrapping the CLINICALDATE with the str() function:
OBSNOW("OBSTERM here", "OBSVALUE here", str(DOCUMENT.CLINICALDATE) )
I pulled this directly off of one of forms and it is something that is currently working in our Production environment without error. Now the Edit Field that the DOCUMENT.CLINICAL_DATE23 is defined as a "Date field", which gives the user a Calendar to select from. If you do not have your Edit Field defined in this manner, then you may have to do it the way James (Hermes) has it listed or something similar.
obsnow("MCAREANEXAM",DOCUMENT.MEDICARE_WELLNESS,DOCUMENT.CLINICAL_DATE23)
This worked! Thank you so much! Was it always this way? We use this to run reports and back document obs terms sometimes (it has been a few years since we did it). I do not recall ever having to put a date field in.
Glad to hear that this resolved your issue. DOCUMENT.CLINICALDATE is actually a coded date field and not a string of text. OBSNOW parameter 3 (date) is looking for a string of text that represents the date of the observation.
For clean and reliable data purposes, use sub(str(DOCUMENT.CLINICALDATE),1,10) instead.
This will remove the space + time stamp from the date string. While the originally suggested method does currently work, at one time it did not. Being internal data symbols, they are subject to change, so best to err on the side of caution here.
Note: GE removed the time stamp functionality from OBSNOW around 208 as it was causing major issues for users who did not understand the fourth argument. It basically overloaded their obstables with duplicate values time stamped with each refresh cycle. Bad stuff, that, and killed our ability to use the same obsterm for serial observations as a result. 🙁