The NEURO EXAM obs term can have many options attached to it. I need to create a custom form in VFE that takes very specific sensory and monofilament exam items selected from the PE-CCC form, and updates fields on my custom form.
Here is an example of what I get on the PE-CCC form.
NEURO EXAM: weakness noted, decreased sensation to pinprick and monofilament exam positive x8.
If the NEURO EXAM obs term in the current encounter contains "decreased sensation to pinprick" I need a field on the custom form that will update the obsterm NE L4SENS L to have a value of "diminished".
Also, if NEURO EXAM obs term in the current encounter contains "monofilament exam positive x 8" I need it to update the obs term MONOFILAM LF with a value of "normal".
Any help accomplishing this is very much appreciated. Here is my attempt so far. I'm not an advanced MEL user, so I might be way off here. The custom form currently uses radio buttons for the monofilament and sensory fields, but I can change that if need be.
{!If match(OBSNOW("NEURO EXAM"), "decreased sensation to pinprick")>0
then (OBSNOW("NE L4SENS L"), "absent")
else ""
endif}
Your sample looks good, just change
(OBSNOW(“NE L4SENS L”), “absent”)
TO
OBSNOW(“NE L4SENS L”), “absent”)
Use if statements to check for all values you are interested in:
{if match(OBSNOW(“NEURO EXAM”), “decreased sensation to pinprick”)>0 then
OBSNOW(“NE L4SENS L”), “absent”)
endif
if match(OBSNOW(“NEURO EXAM”), “monofilament exam positive x 8”)>0 then
OBSNOW(“MONOFILAM LF”), “normal”)
endif
}
Are you putting this code into a button on your form ? Then add a button, choose RUNPROCESS, and put the code above into the button code.
Thank you so much. I created a button using run process and entered the following code:
If match(OBSNOW("NEURO EXAM"), "decreased sensation to pinprick. ")>0
then OBSNOW("NE L4SENS L"), "absent")
else ""
endif
I received compiler errors until I removed the comma and the right parenthesis in the Then part of the statement. I now have:
If match(OBSNOW("NEURO EXAM"), "decreased sensation to pinprick. ")>0
then OBSNOW("NE L4SENS L") "absent"
else ""
endif
Which doesn't give me any compiler errors, but it is not updating the NE L4SENS L obs term. I ran a MEL trace, and received the following:
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] >{fn6871_1467639644_200()}
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>call FN6871_1467639644_200()
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>call OBSNOW("NEURO EXAM")
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] results>"decreased sensation to pinprick. "
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>call MATCH("decreased sensation to pinprick. ", "decreased sensation to pinprick. ")
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] results>1
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>1 > 0
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] results>TRUE
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>if TRUE
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] results>TRUE
07/04/2016 09:17:15.794 INFO Process Id #7444 ML Thread [MelTrace] execute>call OBSNOW("NE L4SENS L")
07/04/2016 09:17:15.795 INFO Process Id #7444 ML Thread [MelTrace] results>""
07/04/2016 09:17:15.795 INFO Process Id #7444 ML Thread [MelTrace] results>return "absent"
07/04/2016 09:17:15.795 INFO Process Id #7444 ML Thread [MelTrace] execute>end
07/04/2016 09:17:15.795 INFO Process Id #7444 ML Thread [MelTrace] results>"absent"
It looks to me like its a good code, but it's just not updating the new obs term. Any additional guidance you can give me please?
If you are setting a value in the obs term with this statement:
OBSNOW("NE L4SENS L"), "absent")
It should be
OBSNOW("NE L4SENS L", "absent").
Looks like I had a typo
OBSNOW(“NE L4SENS L”), “absent”)
should not have that inner ). Should be
OBSNOW(“NE L4SENS L”, “absent”)
thank you! That fixed it.