Good Afternoon,
I am trying to have my vital signs record in the chart translation who records the blood pressure. For instance, we do have 3 spots for blood pressure. I would like it that if the nurse took the blood pressure the first time, it would put in USER.REALNAME and TIMESTAMP. Then the nurse puts the document on hold and the MD then opens it up and does blood pressure number 2 and enters in that USER.REALNAME and TIMESTAMP. So the chart translation would essentially look like:
Blood Pressure #1: 120/80 mm Hg ........Todd Schroeder 12:02 PM
Blood Pressure #1: 126/81 mm Hg .........Jonathan Wynn, MD 12:09 PM
I tried something very simple with:
{IF OBSNOW("BP Systolic") <> "" AND OBSNOW("BP DIASTOLIC") <> "" THEN "............"+USER.REALNAME+" "+TIMESTAMP()+" " ELSE "" ENDIF}
The problem is whenever anyone opens up the form it will put that users name in both section.
Does anyone have any suggestions?
just put an action button next to the fields and put the user and timestamp code in there.
I thought about that but it is "too many extra clicks" for the MD's. They would like it to be automatic.
If your BP#1 & BP#2 fields are tied directly to the same obsterms, you might have issues. Try disconnecting the fields from the obsterms and check the field names when adding the user/timestamp.
BP #1, BP #2 and BP #3 are all connected to different OBS terms.
Where I have tried to do this I use a seperate document variable, write something like
{!document.bp1nametime}
{!document.bp2nametime}
{!document.bp3nametime}
{if document.bp1nametime == "" then
IF OBSNOW("BP Systolic") <> "" AND OBSNOW("BP DIASTOLIC") <> "" THEN document.bp1nametime = "............"+USER.REALNAME+" "+TIMESTAMP()+"" ELSE "" ENDIF
endif}
And then in your text translation include the document variable in a cfmt expression like -
{CFMT(OBSNOW("BP SYSTOLIC"),"","Blood Pressure #1: ","",document.bp1nametime + "
")}
I am trying to do it that way but have been unsuccessful thus far. I have declared the document variables and updated the chart translation and still getting nothing.
I just tested it on a blank form and it worked fine for me. Try some or all of these steps:
1. double check that the document variables are spelled the same
2. test to make sure the document variable is declared properly by adding an edit field to the form with the same name
3. test whether the code is running and if anything is going into the variable you can add a userok(document.bp1nametime) temporarily right before the last endif
Let me know if you still need help or you can email me the form and I will take a look
Mike