In my physical exam form, I have a button to append the speculum exam including Pap Smear onto the genital exam. I want that same button to assign a value to the Obs Term "Pap Done" for monitoring purposes.
I want a function that assigns the value "Pap Smear Performed" to the observation "Pap Done".
Can I use the Set() function for that purpose? If so, how? Is there a better way to trigger a Observation that is used for Data Mapping?
It doesn't have to be visible in the translation or in the form, just behind the scenes tracking.
Thanks,
Chris McCracken, MD
Will something like this work?
{! fn fnPAP(){
obsnow("PAP DONE") == ""
obsnow("PAP DONE") == "Pap Smear Performed on "Visit.Date"."
}}
(I don't remember the exact symbol for the visit date, so that's just a guess.)
Can the obsnow() function be used to set the observation instead of just calling up the observation?
My plan is to call {+fnPAP()+} in the Set Value field of the button along with the text that gets appended to the Genital Exam.
Thanks,
Chris
This should do it:
{obsnow("PAP DONE","Pap Smear Performed on " + DOCUMENT.CLINICALDATE)}
DOCUMENT.CLINICALDATE will give you the date and time for the document. If you want today's date (when the button is clicked) you can use ._TODAYSDATE() instead.
Also for your reference when using OBSNOW to do assignment you want to do:
(obsnow("TERM","VALUE")
If you want to do comparision you want to do something like:
If (obsnow("TERM") == "VALUE") THEN
I hope that is helpful.
Brad