Has anyone done anything with this? Looks like I will need to write (unless someone has already written and will share) some MEL programming to read through the huge array of returned data from the function, to print a nicely formatted 'sentence' for each immunization.
Had been hoping that there would be an option to simply return a few key pieces in English, but can't seem to find any options for this or any other commands.
Thanks.
~Joe
I'd like to know that answer, too! Would also like to know if anyone has code written to launch the new HTML form from within the "old" form versions. Thanks!
I use this in a text translation to pull the latest of all vaccines given:
This goes on the right hand fn window:
{!fn fnTextTransImmunHx() {
local hold = getfield(IMMUN_GETLIST("", "last"), "|", "")
local temp
local rslt = ""
for i = 1, i <= size(hold), i = i + 1 do
temp = getfield(hold[i], "^", "")
if (rslt <> "") then
rslt = rslt
endif
rslt = rslt + cfmt(temp[3] + " Vaccine", "U") + if temp[4] <> "" then " - " else "" endif + temp[4] + /*if temp[24] <> "" then " - " else "" endif + temp[24] +*/ " - " + temp[30] + if temp[18] <> "" then " - " else "" endif + temp[18] + " " + temp [19] + " - " + if temp[7] == "Y" then "was given" else if temp[7] == "N" then "declined" else if temp[7] == "U" then "Undetermined please update in Immunization Management" else "" endif endif endif + if temp[8] <> "" then " - " else "" endif + temp[8] + "
"
endfor
return cfmt(rslt, ",1")
}}
This in my text translation:
{fnTextTransImmunHx()}
I use it also for data displays but remove the formatting
The mdObject converts immunizations array into simple JSON Immunization object. It's open source project. You can get demo.html page and .js file right from https://github.com/mdObject/GECentricity or use NuGet Install-Package mdObject.Centricity to install js files only.
The demo.html page uses AngularJS to parse $mdObject.patient.immunizations. No MEL call in your HTML files. You do not have to use Angular. You can just use the $mdObject without any framework.
Where do you enter the Mel code? I have tried to create a text component and a letter and do not get any information.
Thank you,
Carolyn
I don't have much experience using text components and letters I do know they don't seem to evaluate MEL the same as forms. Nor did they make the MEL functions for Immunizations very friendly.
If anybody has had success pulling vaccines into a letter that would be great! Please share.
I am getting an error message when I use this in a text component...did not expect RETURN after the endfor.
Any thoughts?