I'm new to form building and need some help with visibilities.
How do I make a visibility field show only if a patient is diabetic?
I'm making a new physical exam form, and I want a button to appear on diabetic patients to go to a separate diabetic foot exam.
Thanks,
Chris McCracken, M.D.
I use this quite frequently. You will need to use the "match" MEL code and compare the problem list with either an ICD10 code, or the name of a problem.
Here is my code for checking if a patient is diabetic:
{fn HasDiabetes(){
dmprobsArray = getfield(PROB_AFTER("comma"),",","")
for c = 1, c < size(dmprobsArray),c = c + 1 do
tmpstr = toupper(dmprobsArray[c])
if (match(tmpstr,"DIABETES") > 0 AND match(tmpstr,"FH") == 0 AND match(tmpstr,"PRE") == 0) then
return TRUE
endif
endfor
return false
}}
this code checks each problem on their problem list, and matches ithe word Diabetes, while excluding the term FH and PRE so that we do not get Family History or Pre-Diabetes codes. for a more simple check, you can just put this in a visibility field:
{match(PROB_AFTER("comma"),"Diabetes") >0 OR match(PROB_AFTER("comma"),"ICD10-E1") >0}
Please let me know if you need help setting this up in your form. you can email me at [email protected]
Thank you! I tried the visibility option and it seems to work. Do you have a link to the break down on how each of those techniques works? I'm happy to cut and paste but I'd like to understand the mechanism for the next time. I'm not quite sure how to utilize the top function method.
Thanks again!
If you go to the Centricity Help File, you can find most of the MEL codes and how to use them. there is even a whole category devoted to data symbols that you can use in the program.
I have made a word document about my function, and I have tried to break it down as best I can. I do not know what your level of programming knowledge is, so I apologize if I over/under explain things. Please let me know if you have any questions.
here is the word document:
Using the HasDiabetes function
Thank you, and happy building! 🙂
Dan