Below is MEL language we have been using for some time to automatically add hypertension or diabetes to a patient’s problem list if the either problem is in the patients past medical history:
{if match(obsany("PAST MED HX"), "Hypertension")>0 and
match(PROB_AFTER("LIST"), "ICD-401.1")==0 then MEL_ADD_PROBLEM("hx of", "Hypertension", "ICD-401.1", str(._TODAYSDATE),"","")
else "" endif}
{if match(obsany("PAST MED HX"), "Diabetes")>0 and
match(PROB_AFTER("LIST"), "ICD-250.00")==0 then MEL_ADD_PROBLEM("hx of", "Diabetes", "ICD-250.00", str(._TODAYSDATE),"","")
else "" endif}
Today, for some reason, both problems are being added to the problem list multiple times during the visit. It appears the diagnosis is being added each time the Office Visit is opened.
Not sure why this started happening out of the blue 🙁 Any thoughts?
Have you tried to change your match functions to the ICD10 code? That may be the issue.
I did try changing the codes to an ICD10 code (that was my first thought) but still had the same issue. Do you know do we still use ICD- in front of the ICD10 codes?
ICD-250.00 = Diabetes mellitus without mention of complication, type II or unspecified type, not stated as uncontrolled
ICD10-E11.9 = Type 2 diabetes mellitus without complications
Try adding both codes in your mel_add_problem, see if that helps
MEL_ADD_PROBLEM("hx of", "Diabetes", "ICD-250.00|ICD10-E11.9", str(._TODAYSDATE),"","")
I think the issue might be your usage of Prob_after. Is this only happening when the clinical list changes are not signed when exiting the document?
you would use ICD10-xxx.xxxx instead of ICD-xxx.xx
We have seen some similar things that result from some MEL functions evaluating to NULL when you enter or bring a document off hold. Look at your trace and see if that is what is happening. We are trying to figure out how to get around this.
David,
We worked with another office and added the code below to the form.
{
! if (formStarted<>"" and obsany("PAST MED HX")<>"") then
if match(obsany("PAST MED HX"), "Hypertension")>0 and
match(PROB_AFTER("LIST"), "ICD-401.1")==0 then MEL_ADD_PROBLEM("hx of", "Hypertension", "ICD-401.1", str(._TODAYSDATE),"","")
else "" endif
if match(obsany("PAST MED HX"), "Diabetes")>0 and
match(PROB_AFTER("LIST"), "ICD-250.00")==0 then MEL_ADD_PROBLEM("hx of", "Diabetes", "ICD-250.00", str(._TODAYSDATE),"","")
else "" endif
if match(obsnow("SMOK ADVICE"), "yes")>0 and
match(PROB_AFTER("LIST"), "ICD-305.1")==0 then MEL_ADD_PROBLEM("dx of", "Disorder, tobacco use", "ICD-305.1", str(._TODAYSDATE),"","")
else "" endif
if val(OBSNOW("BMI"))>= "40" and
match(PROB_AFTER("LIST"), "ICD-278.01")==0 then MEL_ADD_PROBLEM("dx of", "Morbid obesity", "ICD-278.01", str(._TODAYSDATE),"","")
else "" endif
if match(obsany("PAST MED HX"), "HIV")>0 and
match(PROB_AFTER("LIST"), "ICD-042")==0 then MEL_ADD_PROBLEM("dx of", "Human immunodeficiency virus [HIV]", "ICD-042", str(._TODAYSDATE),"","")
else "" endif
if match(obsany("PAST MED HX"), "Hepatitis C")>0 and
match(PROB_AFTER("LIST"), "ICD-070.51")==0 then MEL_ADD_PROBLEM("dx of", "Hepatitis C, acute", "ICD-070.51", str(._TODAYSDATE),"","")
else "" endif
else
endif
}
We also added a visibility region within the form using the code:
false
Within that visibility form, we posted a date display with a MEL Expression of:
formStarted="COMPLETE"
That solved our issue! Magic Mike strikes again!!! 🙂