How can I write a MEL IF Statement to see if the problem list contains a certain value?
{if match(MEDS_AFTER(),"ICD-300.0")>0 then
your code here...
else "" endif}
reads, if the current (active) medications list contains the text "ICD-300.0" then excute code.
gibsonmi said:
{if match(MEDS_AFTER(),"ICD-300.0")>0 then
your code here...
else "" endif}
reads, if the current (active) medications list contains the text "ICD-300.0" then excute code.
is there a way to say Contains or Like ? And by description and not ICD?
That will do contains, and it will work for descriptions or icd code, it is case-sensitive, but you can get around that by doing (I accidently gave you the med list instead of the problem list the first time, my bad) -
{if match(tolower(PROB_AFTER()),"description text")>0 then ....
The problem list in PROB_AFTER() is formatted like this -
ROUTINE GENERAL MEDICAL EXAM@HEALTH CARE FACL (ICD-V70.0)
ACUTE CYSTITIS (ICD-595.0)
MUSCLE WEAKNESS (GENERALIZED) (ICD-728.87)
So long as the second argument can be found in there then you are good to go. There isnt any kind of robust built in search feature that will let you get close and return search results, you have to know exactly what you are looking for if you are using MEL.
Thanks, so this is what I am trying to do. I am trying to get alerts to popup when a patient chart is open if they meet certain criterias. However, it is not working for me. This is one of my codes I have on the header.
{if(match(prob_prior("LIST"),"ICD-250")> 0 then if userok("Diabetic Food Exam DUE AT EVERY VISIT") <> "TRUE" then "" else "" endif else "" endif}
Am I doing anything wrong?
acantu said:
Thanks, so this is what I am trying to do. I am trying to get alerts to popup when a patient chart is open if they meet certain criterias. However, it is not working for me. This is one of my codes I have on the header.
{if(match(prob_prior("LIST"),"ICD-250")> 0 then if userok("Diabetic Food Exam DUE AT EVERY VISIT") <> "TRUE" then "" else "" endif else "" endif}
Am I doing anything wrong?
You have an extra parenthesis before match, other than that it should work
Still no popup, i have the header set to include Alerts, but nothing. even when i just put userok statement, i don't get a popup, I am using CPS 11
Nevermind, got it to work.