How would I assign a data display in VFE to display specific medications if a pt. has hypertension?
Any help would be appreciated.
Thanks,
I would write a function to loop through MEDS_AFTER('delimited'), pull out the GPI, and compare to these and if it matches one of the GPI classes (first two four or six digits), then include it in the result.
Thanks, that is what I was thinking, but would you happen to have an example of how I would code this?
It took me a bit to find it, i wrote this to check for opioids on the med list, just replace the codes in the array, it doesn't matter how many you use, and it should work, I havent used this in production yet...
{fn NarcoticCheck(firekey){
//based on GPI report
local hold = array(
"65","6510","651000","6520","652000","6599","659900","9340","934000","5258","525800","431010","439951","439952","439953","439954")
local temp = getfield(firekey,
"|","")
local tmp
local rslt = ""
for k = 1, k <=size(temp), k = k + 1 do
tmp = getfield(temp[k],
"^","")
if match(hold,sub(tmp[4],1,2))>0 or match(hold,sub(tmp[4],1,4))>0 or match(hold,sub(tmp[4],1,6))>0 then
if rslt <> "" then
rslt = rslt + ", "
endif
rslt = rslt + tmp[1]
endif
endfor
return rslt
}
}
Thanks Michael, I would need to identify if the pt. has a specific diagnosis or problem then check their medication.
I was actually thinking of displaying a visibility region for patients diagnosed with hypertension (I'm sure of this syntax) then searching their meds for specific classifications.
Would you happen to know the syntax for the visibility region?
I'm building a checklist as a guidline for the providers.
Thanks for your help.
If you have CCC you can use
ccc_GET_MED_CLASS_HTN_Rx(meds_after("delimited"))
to display hypertension meds.
From the CCC-fndef-Find-Prob-Meds.ccc file.
{if match(toupper(prob_after()),"ICD-411.")>0
then if useryesno("Patient has a Dx of IVD, AMI, or has had a CABG or PTCA.
Is the patient currently taking aspirin or another antithrombotic?")=="No"
then UPDATE_MEDS( ) else "" endif else "" endif}
The above works for one Dx. I need to search/match several diagnosis. would the code be as simple as adding "OR" ex: "ICD-411" or "ICD-413" or "ICD414"?
I can not get it to work for more than one diagnosis code or problem.
Any help would be appreciated.
You have to wite the whole match function for all of the 'or' statements, like this
{if match(toupper(prob_after()),"ICD-411.")>0 or
match(toupper(prob_after()),"ICD-413")>0 or
match(toupper(prob_after()),"ICD-414")>0
then...
That did it. Thanks.