I have a form that I would like to see autogenerate an order when a check box is selected. Any ideas on how to do this? I can send the form to someone if needed.
thanks,
Abbey
Something like this would work.
{if document.checkbox <> "" then MEL_ADD_ORDER("T", "XRay", "Ribs, Unilat, 2 Views", "", "","", "", "", "", "", "") ELSE "" ENDIF}
The text in red would need to be configured for whatever order you are wanting to push.
First one is type of order (T=Test)
Second is Category the order is in (Xray category under test)
Third is the name of the test.
Thank you!! I will try that!
Would it also be possible to add a future order date to something like this? For example, the physician orders lipids in 6 months. If we build an order set for lipids in six months, and this is selected, can the order date be 6 months from today?
Yes you could do that. It would look like this:
{if document.checkbox <> "" then MEL_ADD_ORDER("T", "XRay", "Ribs, Unilat, 2 Views", "", "","", "", "", "", "", ADDDATES(str(._TODAYSDATE),"","6","")) ELSE "" ENDIF}
ADDDATES works like this
ADDDATE("<date here>", "<# of days>","<# of months>","<# of years>")
The ._TODAYSDATE will return the current date and to use it with ADDDATES you have to convert it to a string. The str(._TODAYSDATE) returns a string value so that ADDDATES can evaluate and work properly.
Thank you Ernie. Is it possible to add this code in the orders module, or would we have to build an new order form in VFE to have this code work?
It would need to be in a form or quicktext