I have recently developed a form and the providers are asking that the information from the form flows to the patient instructions. It is a simple form with 6 measurements for Compression Stockings and each value is linked to a OBS term. So I would want the text about Compression Stockings and then all of the measurements.
Is this possible?
Thanks
The obs term used in the Patient Instructions-CCC form is called INSTRUCTIONS. You would need to put all the information into that obs term.
Would require some coding, but it is certainly possible. As David suggested, insert a function in your custom form to populate the INSTRUCTIONS OBS term once all measurement values have been inserted. You could add a button to the form labeled "Update Patient Instructions" that would call this function. The function would look something like this (string could be constructed on one line but I broke it out for readability):
{fn GenPatientInstruct()
{
local strInstructions
//construct patient instructions
strInstructions = "Here is some text about the compression stockings followed by the measurements:\r\n"
strInstructions = strInstructions + "\tMeasurement 1: " + OBSNOW("Measure1") + "\r\n"
strInstructions = strInstructions + "\tMeasurement 2: " + OBSNOW("Measure2") + "\r\n"
strInstructions = strInstructions + "\tMeasurement 3: " + OBSNOW("Measure3") + "\r\n"
strInstructions = strInstructions + "\tMeasurement 4: " + OBSNOW("Measure4") + "\r\n"
strInstructions = strInstructions + "\tMeasurement 5: " + OBSNOW("Measure5") + "\r\n"
strInstructions = strInstructions + "\tMeasurement 6: " + OBSNOW("Measure6")
//save patient instruction string to OBS term
OBSNOW("INSTRUCTIONS", strInstructions)
}
}
The output from the function would look like:
Here is some text about the compression stockings followed by the measurements:
Measurement 1: [some value]
Measurement 2: [some value]
Measurement 3: [some value]
Measurement 4: [some value]
Measurement 5: [some value]
Measurement 6: [some value]
Thank you for the assistance with the coding. I am still trying to learn more complex VFE building..
I have added the string as you demonstrated and entered the appropriate values. But I 'm not sure how to add the button and call this function. Can you give me some assistance on that as well?
Thank you again. If you prefer to email me: [email protected]
Sure. See attached screenshot. Remember to change the placeholders "Measure 1", "Measure 2", etc. for the particular OBS terms you are using. Add a button to your form and when you view the properties; select RUNPROCESS for the connection type. In the text area is where you enter the MEL code that you want to run, which in this case is simply calling a function. The function contains the code that constructs the textual instructions and stores in the appropriate OBS term.
Happy coding!
THANK YOU THANK YOU!! It works like a charm.
The only problem is the patient instructions numbers each value if I put in the line return at the end of each value in the function.
1. Left Calf
2. Right Calf
3. Left Thigh
4. Right Thigh
etc....
But the information you gave me helped a lot.
Interesting. Are you using the CCC form for viewing or printing patient instructions? I suspect they have a function embedded to add numbers in front of hard returns.
Some providers are still using it to Print and give to patients. I have looked at the handout and can't determine where the coding is embedded to make it do that.
Thanks for all of your help.