We are trying to create multi-line text boxes with pre-populated editable text. For certain text fields the doctors say the same exact thing for each patient with only a couple variables, so they would like the text to be auto filled(not with a button click) with text and then they would edit the couple things they need change. Any one know of a way to do this in VFE?
In the code window, check if your MLEFs are blank, and if so, set them equal to the text you want, putting underscores where the provider needs to fill in.
Sorry kind of new to VFE and learning as we go. When you say code window are you talking about when you double click on the Multi-line text field or another code viewer that I'm not aware of? If so which box am I suppose to edit, everything I see is for populating the chart note. I would like it to appear in the form box.
The code window to the right in the editor.
{!if DOCUMENT.name=="" then
DOCUMENT.name = "text"
endif}
DOCUMENT.name would be your MLEF on the form.
If you have multiple fields:
{!if STR(DOCUMENT.name1, DOCUMENT.name2, etc)=="" then
DOCUMENT.name1 = "text"
DOCUMENT.name2 = "text"
etc…
endif}
I see where you are talking about and even though my question sounded dumb, we are not getting code to show in that box for our forms that we have built thus the reason I wasn't sure where you were talking about. I have searched why it is not showing up and am not coming up with answers. Thanks for the help so far and if you have any insight on this I would greatly appreciate it!!
Thank you very much, I got it working. Do you know the right format for pulling obs terms into the text for example but obviously wrong:
{!if DOCUMENT.name=="" then
DOCUMENT.name = "Patient Age:", {PATIENT.FORMATTEDAGE}, "Patient Name:"
endif}
So then in the multi-line text field it would display all of this and be editable.
DOCUMENT.name = "Patient Age: " + PATIENT.FORMATTEDAGE
or
DOCUMENT.name = CFMT(PATIENT.FORMATTEDAGE, "", "Patient Name: ", "", " ") + CFMT(OBSNOW("obsterm"), "", "Label: ", "", " ") + CFMT(OBSPREV("obsterm"), "", "Label: ", "", " ")
Works amazing thank you for your help!! Still lots to learn but for just picking up VFE for the first time today, I've made an entire custom form for one of our Doctors. Again, thank you!!