How do you or can you make the translation so that when multiple things are selected it will automatically number them like it does in the ccc patient instructions form
Patient Instructions:
1) Patient needs to make an appointment in 2 weeks.
2) Patient instructed to stop at the Imaging department for testing today.
Based on your visit today, {._TodaysDate}, with Dr Xxxxx, he has recommended the following:
{ccc_add_num_with_carriage_ret(obsany("Instructions"))}
Your current medications include:
{ccc_add_num_with_carriage_ret(Meds_Format())}
Please contact us at 602-386-1100 if you have any questions or concerns.
We don't use CCC forms, but it's the same process in VFE. They're just using a function to loop through the items selected, creating an array and then using the orinal count or index in the loop to number the items, placing the paren after the number and a return after each item.
Here's part of one we use. Where you see n + ".", it is assigning the index as the number to display followed by a period, so the result is a numbered list.
...
for n=1, n<=size(list_arr), n=n+1
do
local rec_sz= size(getfield(concat_all(document.plan_append2, document.plan_append3), ",", ""))
if result <> "" then result = result + hret + n + ". " + replacestr(list_arr[n], ",", hret)
else result= hret + if obs == "y" and rec=="y" and rec_sz >1 then "The following observations and recommendations were made:" + hret + n + ". " + replacestr(list_arr[n], ",", hret)
else if obs == "y" and rec=="y" and rec_sz ==1 then "The following observation and recommendation was made:" + hret + n + ". " + replacestr(list_arr[n], ",", hret)
etc.
that is what i wanted was a formula for VFE to populate like the ccc form thank you. So my next question is do i do this in my handout template or in my form template or both because what i really want is when i print the 5 year plan for the medicare patients i want the handout to be numbered as well
Depends. If the information is being pushed to an obsterm already numbered then just call the obs. If it is pushed to obsterm without numbers, you'll need the function in the letter to do the numbering if letter is printed outside of an update. If the letter is always printed while the update is open the fn can live on the form, which you'd have to do if you're not pushing the data to an obsterm.
here is part of my handout
Based on your visit today, your provider recommended the following:
{(obsany("WGTMGMTCOUNS"))}
{(obsany("MGMT PLAN 1"))}
{(obsany("MGMT PLAN 3"))}
{(obsany("FALLRSKASSES"))}
{(obsany("MGMT PLAN 4"))}
{(obsany("MGMT PLAN 5"))}
{(obsany("MGMT PLAN 6"))}
{(obsany("MGMT PLAN 7"))}