I am currently developing a new exam form and can't quite seem to get the chart translation right. I have a list box for Trauma or No Trauma. The physician would like the chart translation to read "There (has/or has not) been a history of trauma". Please help.
Thank you
Amanda Koenig
Oregon Orthopedic & Sports Medicine
Are those the only two things in the listbox? It sounds like a radio button option might be better since a patient can't have both, but this should work for you
{CFMT(replacestr(replacestr(document.listbox,"No Trauma","has not"),"Trauma","has"),"","There ",""," been a history of trauma.
")}
{if DOCUMENT.TRAUMA = "Trauma" then
fmt("There has been a history of trauma.","")
else
if DOCUMENT.TRAUMA = "No Trauma" then
fmt("There has not been a history of trauma.","")
else
""
endif
""
endif
}
or you could try
{cond
case DOCUMENT.TRAUMA = "Trauma"
fmt("There has been a history of trauma.","")
case DOCUMENT.TRAUMA = "No Trauma"
fmt("There has not been a history of trauma.","")
endcond
}
Thank you for your assistance - that worked. Now one more question - I have a list box for previous treatment with options for Outside Orthopedists, PCP, ER/Urgent Care. I have the text translation formatted if only 1 is chosen, but since there is a high probability it could be more than 1 choice, what is the best way to have the chart translation include all options chosen.
Thank you again for your assistance.
Amanda Koenig
Oregon Orthopedic
you could use either format, it depends how you want it to read on what is easier. The syntax for my function is
{CFMT(document.variablename,formatting for variable,pretext, pretext formatting,post text, post text formatting - optional)} where formatting includes options "B,I,U,2" for bolding, italicized, underline, and size(can be greater than 2 as well) or any combination of them, the empty quotes are for plain text.
If you want to use Davids method just break apart the if statements
{
if DOCUMENT.TRAUMA = "Trauma" then
fmt("There has been a history of trauma.","")
else "" endif
if DOCUMENT.TRAUMA = "No Trauma" then
fmt("There has not been a history of trauma.","")
else "" endif
}
Keep it in one set of brackets if you use VFE otherwise you will get error warnings.