Hello! I am having an issue adding a problem from a listbox when selecting multiple problems. If I only choose the problem I am looking to add, it works fine. I tried to use the "match" function, but could not get it to work.
{
if obsnow("PAST MED HX")== "High blood pressure" then
MEL_ADD_PROBLEM("hx of", "Hypertension NOS", "ICD-401.9", str(._TODAYSDATE), "", "")
else ""
endif
}
Any help would be appreciated.
Thanks!
match() is the way to go
match(obsnow("PAST MED HX"), "High blood pressure")>0
I would also add
match(PROB_AFTER("LIST"),"ICD-401.9")==0
to make sure hypertension is not already on the problem list -
{
if match(obsnow("PAST MED HX"), "High blood pressure")>0 and
match(PROB_AFTER("LIST"),"ICD-401.9")==0 then
MEL_ADD_PROBLEM("hx of", "Hypertension NOS", "ICD-401.9", str(._TODAYSDATE), "", "")
else ""
endif
}
Thank you sir! That did it.