I have a Rheumatologist who wants a pop up for any patient who
Is on a certain med
Has not had a PPD in the past year
Add to orders
He does not want to have to use the protocols
Any help will be most appreciated.
I have done this much so far. I am not getting any errors but I am also not getting any results.
{if(match(med_active("list")="ORENCIA")or match(med_active("list")="REMICAID")or match(med_active("list")="ENBREL")or match(med_active("list")="HUMIRA"))and (LAST_SIGNED_OBS_VALUEDATE("TB-PPD") == durationdays( str(._todaysdate)) > 356) then(MEL_ADD_ORDER("S", "Immunizations", "PPD", "", fnGetProblemCodes("ICD-795.51"), fnGetProblemDescriptions("dx of", "NONSPEC REACT TUBERCULIN SKIN TEST W/O ACTIVE TB"),"","","","","")) else ""
endif }
The match syntax is incorrect, you need
match(med_active("list"),"ORENCIA")>0
which will return true if the text "ORENCIA" is found in med_active("list")
Thats also the wrong use of durationdays, you need
durationdays(str(._todaysdate),LAST_SIGNED_OBS_VALUEDATE("TB-PPD") ) > 356
which will return true if todays date is greater than 356 (did you mean 365) days from the last signed obsdate, it might also return true if there is no last signed obs date, i would have to test it to be sure
The rest might be okay, start with that
in the mel_add_order, you need to take out the fnGetProblemCodes and fnGetProblemDescriptions. That is not needed if you are manually assigning the code and descriptions.
Should look like this
(MEL_ADD_ORDER("S", "Immunizations", "PPD", "", "ICD-795.51", "dx of", "NONSPEC REACT TUBERCULIN SKIN TEST W/O ACTIVE TB","","","","",""))
How do I also make this into a pop up
userok() or useryesno(), what do you want to popup? You would use the first probably just as a notification, the second option is a prompt, you could use it to ask whether or not the provider wants to add the test