I am using an action button to add a problem to the problem list
{MEL_ADD_PROBLEM("DX OF", "Atrial Flutter", "ICD-427.32", str(._TODAYSDATE))}
The issue is if the problem is already on the list it will appear twice ... how can I ask it to check and only add the problem if it is not already on the problem list ?
Thank you in advance for any and all assistance.
Rosemary Lust RN
Here is some code that I use to add problems with it checking to see if the problem is already on the problem list.
{fn ProblCOPD(){if match(prob_after("list"),"496")>0 then "" else if PROB_ACTIVE() <> "496" THEN MEL_ADD_PROBLEM("dx of", "COPD", "ICD-496", str(._TODAYSDATE), "", "") else "" endif endif ""}
This will add COPD to the problem list only if it is not already on the list. The first part
is matching the problem code to the problem list and if it see it, it will not add it.
if match(prob_after("list"),"496")>0 then ""
If there is no match, it then adds the problem:
MEL_ADD_PROBLEM("dx of", "COPD", "ICD-496", str(._TODAYSDATE), "", "")
Here is an example of what we use all the time:
If (Match(Prob_after(),
"995.51") = 0) then
MEL_ADD_PROBLEM(
"dx of", "Child abuse, emotional", "ICD-995.51", str(._TODAYSDATE), "", "")
ghome = ghome +
"Emotional abuse" +hret
else
"" endif
Sorry for not editing it properly.
We do this as a runprocess.
Ignore "ghome" - I use it to let the users know what was actually added (vs nothing added because all duplicates) and display it under the button.
Can someone write this again..... the ones posted do not seem to be working...
What version of centricity?
Centricity 10
Hmm. It should work with cps 10 but there has been so many things that used to work in 9.5 that 10 doesnt like to do.
Irregardless, here is my code again and it does work. One thing, when you copy it from here, make sure that you past it into wordpad or notepad before copying it to the form or you may just want to type it out into VFE like it is shown here. That sometimes works also.
{if MATCH(PROB_AFTER("LIST"),"737.11")=0 THEN
MEL_ADD_PROBLEM("dx of","Kyphosis due to radiation","ICD-737.11", str(._TODAYSDATE),"","")
ELSE "" ENDIF}
it worked!! Thank you!!
Your welcome.