I have recently started using VFE. I am working on a form that will allow providers to order tests by clicking a button or checking a box. I would also like some text to populate in an editable box on the form (but not in the text translation). I would then have that boxed linked to print in a patient handout.
Maybe there is an easier way and I am making this too difficult???
I have done similar, I think.
An edit field, allowing the user to type something in that will then be stored to an OBS term.
An action button to: write the order. See this example, although it uses a coupe of document variables instead of OBS.
{
MEL_ADD_ORDER("S", "Return to Clinic", "RTC in 2 weeks", "", "", "", DOCUMENT.RTCLENGTH+" "+DOCUMENT.RTCWHOM+" Interpreter: "+DOCUMENT.RTCINTERP+" "+DOCUMENT.RTCBP, "", "", "", "")
}
If you store the variables to OBS, then you can merge OBS fields into handouts.
{if LASTOBSVALUE("PMH PCPCOMM") <> "" then "Comments: " +LASTOBSVALUE('PMH PCPCOMM') else "" endif}
I am not sure I understand.
In the image here I have checked a couple of boxes. Those check boxes are attached to document variables that provide output on the text side. The buttons beside the check boxes will place the actual test order. I would like the info that appears on the text side when the box is checked, to also appear in the multi-line edit field labeled "Screening and test for.......". I have that edit field attached to an OBS term that will pull info to a handout. I think I need to set an action button to get the info from the checked boxes to populate in the edit field box but I am not sure how to set that button to do so?
Does that make sense?
(You can ignore the data field and button below the edit field. Those are features I have been playing with but are not a permanent part of the form)
Set your action button to RUNPROCESS and use something like this:
{MEL_ADD_ORDER(your order goes here)}
{OBSNOW("multiline edit field",document.box)}
It's still not populating in that box...
This is what I have my button set to RUNPROCESS with the following:
MEL_ADD_ORDER("S", "Injections", "Flu Injection High dose 65+", "", "ICD10-Z23", "Flu vaccine", "", "", "", "", "")
{!document.INFLUENZA_IM =" "}
{OBSNOW("MCRWELLHOGVN",document.box)}
What am I missing??
For {!document.INFLUENZA_IM =" "}, it does not need to be a watcher expression because you are using an action button to instatiate the command.
For {OBSNOW("MCRWELLHOGVN",document.box)}, is DOCUMENT.BOX the actual name of the document variable whose value you want to push to the obsterm? or did you forget to change that to the appropriate document variable name
Dummy me did forget to change that to the appropriate variable name....
It is still not working exactly as I would like but I am getting closer 🙂 Thanks for all your help!
Ok good! If you need any help, let me know. feel free to email me your form if you would like for me to take a look. [email protected]
Okay. I have 13 potential checkboxes that I would like to populate text in a multiline edit field. I have it working so that they are populating. However if one is not checked it is leaving a blank line in the edit field for that unchecked statement. I have tried to write some MEL to document nothing if a box is not checked but it is not working. I am just working on 3 of the check boxes at the moment to make sure I get those set up right before I move on. Here is what I have
{OBSNOW("MCRWELLHOGVN",
if DOCUMENT.INFLUENZA_IM <>"" then DOCUMENT.INFLUENZA_IM else "" + HRET
+ if DOCUMENT.PNEUMOCCOCAL <> "" then DOCUMENT.PNEUMOCOCCAL else "" + HRET
+ if DOCUMENT.HEPB <> "" then DOCUMENT.HEPB else "" + HRET
endif endif endif)}
This is my first attempt at writing MEL like this so I am sure I am missing something major.
Got it to work! I was missing () around each variable statement.