I am tring to use this function to try and push the date from an OBS term to the flowsheet. I have done this:
{OBSNOW("LASTCARDVISI","Today")}
So this puts "Today" on the flow sheet, I want it to say the date "11/29/2013". I am pretty sure I have to do 2 statements and join them, but I can't get it to do what I want. Thanks in advance for your help.
It is dot underscore TODAYSDATE you want - ._TODAYSDATE
DavidShower said:
It is dot underscore TODAYSDATE you want - ._TODAYSDATE
Thanks David
I tried it and it just put ._TODAYSDATE in the field....
Don't put it in quotes.
{OBSNOW("LASTCARDVISI",._TODAYSDATE)}
If that doesn't work it might need to be that the date needs to be converted to a string:
{OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
DavidShower said:
If that doesn't work it might need to be that the date needs to be converted to a string:
{OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
This one did the trick, thanks! I kept trying to put it in quotes....
Laurie
So now on the other form I have to update it already has this in the page close handler:
{OBSNOW("CARETRANSIN","New Patient Visit - Transition of Care Document")} and I want to add this also {OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}, but everything I am tryin is not working... any words of wisdom?
Thanks
Laurie
Can you post one of your code blocks from the page close handler?
DavidShower said:
Can you post one of your code blocks from the page close handler?
Sorry I don't know what you mean by this.
Laurie
Copy all the code you have in one of the page close handler boxes and paste it in a post.
Like:
{OBSNOW("CARETRANSIN","New Patient Visit – Transition of Care Document")} {OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
DavidShower said:
Copy all the code you have in one of the page close handler boxes and paste it in a post.
Like:
{OBSNOW("CARETRANSIN","New Patient Visit – Transition of Care Document")} {OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
That's it for the form I am trying to fix now:
{OBSNOW("CARETRANSIN","New Patient Visit – Transition of Care Document")} {OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
I have tried it with and without quotes, with a + sign and with the word and to join the two.
Thanks
Laurie
I've never seen the page close handler used to set values rather than to test to see if certain values are present and prevent the page from being closed if they are not. Why are you putting this in the page close handler and not in the Watcher Pane?
Putting this in the Watcher Pane would set the values when the form is loaded.
{! OBSNOW("CARETRANSIN","New Patient Visit – Transition of Care Document")} {! OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}
DavidShower said:
I've never seen the page close handler used to set values rather than to test to see if certain values are present and prevent the page from being closed if they are not. Why are you putting this in the page close handler and not in the Watcher Pane?
Putting this in the Watcher Pane would set the values when the form is loaded.
{! OBSNOW("CARETRANSIN","New Patient Visit – Transition of Care Document")} {! OBSNOW("LASTCARDVISI",STR(._TODAYSDATE))}It is in the watcher pane, sorry it's an off Monday. I was looking at the Radio Button for page close handler....
and now I no idea how my response ended up in the quote of your response.....
Laurie
Ok Try what I posted. Putting the exclamation mark at the beginning forces the execution of the statement on page load.