As I have mentioned before, I am very new to form building so please go easy!
I am trying to create a form for my group for IUD insertion. In my mind I see a fairly standard procedure note that will more than likely exceed the limit of a quicktext. So, I was wondering if it is possible to place the entire procedure note in an action button using SETVALUE? Then, I would like to have several text documents that populate certain values in the procedure note itself....For instance, "Depth of Uterine Sounding" (5, 6, 7cm, ect) could be pulled in from a seperate dropdown box and populate the procedure note inserted by the SETVALUE button.
Along the same lines of this form, if I want to create a Removal Date for an IUD, I am assuming I just use an action button utilizing ADDDATES. How do I link that to an edit field? Is it as simple as (DOCUMENT.IUDRMDATE==ADDDATES(str(_TODAYSDATE)),"5","0","0") in the MEL connection box of the Action button? Does this need to be in brackets?
I am hoping some of this is covered in the advanced VFE class....I just cant take it until April!
Thanks for being gentle!
Geoff
First lets address the code you posted -
(DOCUMENT.IUDRMDATE==ADDDATES(str(_TODAYSDATE)),"5","0","0")
In an action button you dont need brackets, but its good practice to do so so lets do that first
{DOCUMENT.IUDRMDATE==ADDDATES(str(_TODAYSDATE)),"5","0","0"}
Next the using two equal signs checks to see if the two sides are equal and returns TRUE or FALSE. What you want to do is assign a value (in this case a date) to the document variable IUDRMDATE, so just use one '='
{DOCUMENT.IUDRMDATE = ADDDATES(str(_TODAYSDATE)),"5","0","0"}
The symbol ._TODAYSDATE (you forgot the period too by the way) is in the value format, using the function str() converts it to a str so that ADDDATES() can use it. That part is fine. The ADDDATES() function takes four arguments, the first is the date you want to add to, the next is the years, monthsm, days in that order, so what you have above will add five years. Double check your paranthesis too, all four arguments must be inside the parantthesis for adddates().
{DOCUMENT.IUDRMDATE = ADDDATES(str(_TODAYSDATE),"0","0","5")}
That should do what you want there. So for setting up this form. The note itself will not be able to exceed 2000 characters in a single multiline edit field, so conisder that limitation. The easiest way to do it will be to set up all of the form fields first, and then string everything together in an action button that sets the note
DOCUMENT.FORMFIELD1 has options "1,2,3"
DOCUMENT.FORMFIELD2 has options "4,5,6"
DOCUMENT.FORMFIELD3 has options "7,8,9"
Set an action button to say something like
{DOCUMENT.IUD_NOTE = "Something something " + DOCUMENT.FORMFIELD1 + ". Part two of the note " + DOCUMENT.FORMFIELD3 + " and more text " + DOCUMENT.FORMFIELD3 + ". "}
Where the variable DOCUMENT.IUD_NOTE is the entire procedure note text. Let me know if any of this needs clarification.
Geoff,
Have you looked at the GE Women's Health forms? They have a form that does all of this already.
Send me your email if you need the clinical kit.
Michael,
Thank you so much for your help! That makes so much sense now! Amazing how silly you can feel when someone else walks you through it!!!!! I will be able to try it out over the weekend and I will let you know how it goes!
Geoff