Hello All,
I have a form that outputs different values in dropdown lists based on forms in the visit, age of patient and other variables. I needed to add an option if the visit was taking place in a nursing home. Since we already had separate encounter types and document templates for our nursing home visits I thought the simplest solution would be to define a variable in a text component and load the text component in the document template that the nursing home encounter uses. This is all that I have in the text component:
{
gNursingHomeVisit = "x"
""
}
In my form I then look to see if there is a value in gNursingHomeVisit. If so, I show the nursing home values in my drop down. If not, then I show the other set of values that I have.
Everything works great when you load the form. However, when you put the form on hold and then take it off again gNursingHomeVisit returns a NULL value per a MEL trace. Are text components only loaded of first load and not again? Any suggestions?
Thanks,
Brad
You might try writing it like this:
{'{gNursingHomeVisit = “x” “”}'}
If that doesn't work you might have to load your text component from a form in the visit or assign the value to a document variable in a form. Wiser heads may have a better answer.
Hi David, Thanks for the feedback. I tried what you suggested and got a mel error. However, I think it has got me started on the right track. I modified it to this and it worked... kind of: {'{gNursingHomeVisit = “x”}'}
Everything works the way I would intend, the only problem is I get an "x" in the note output. I tried doing this:
{ {'{gNursingHomeVisit = “x”}'} "" }
However the variable does not assign. Since our nursing home visits use the same forms as our office visits, I can't pull in the variable in an elegant way. For the moment I have form at the end of the nursing home visits that says to the user "This form is intentionally blank. Do not remove from the visit." This form is defining the variable for me. That's why doing this in a text component would be preferred.
Thanks for your help.
Brad
After some additional trial and error I think I found a reasonable solution since the text component will only seem to fire once on visit load:
{
OBSNOW("OBSTERM NAME","x")
""
}
I can dump a flag into an obs term since that will stick after the visit has been put on hold. In the end if I need to do reporting on these types of visits it gives me another avenue for counting them besides what the provider billed.
Brad