Does anyone know where the table for med classifications is located? I need to pull meds for the ANALGESICS-OPIOD class. I thought maybe MEDICATE_CHAIN (GPI field) but I don't see any consistencies in the #s.These meds are not done through ERX so I can't use that table.
Stacey LaGrange
Software Developer/Analyst
St. Mary's Health System
[email protected]
(207) 777-8410
Not sure if it can be used for your report, but there is a table PRESCRIB that records medication prescribed for a patient.
Here's a report posted to CHUG a while back, I believe by Lee Cooper. Here is a PDF version of the output. The classification is based on the GPI code and the number of digits matching defined classification categories. There's a legend at the bottom that explains how many digits are used for each level of classification.
Edit: I moved this topic to the Trading Post so others won't miss the report.
These are the GPI ranges for controlled & pain related medications.
//OTC ANALGESICS 64100010000307-64991003300320
//OPIOIDS 65100020102003-65995002200320 43997002280310-43997002722020 43101010000310-43101010001210
//NSAIDS 66100007000610 - 66109902200330
//BENZODIAZEPINE 72100010000305 - 72100030006340 60201010100105 - 60204080100315 57100010000305 - 57100070000310
//MM_RELAXERS 75100010000305 - 75990003200320
//SED_HYP 60100010102110 - 60201005000320 57200050000305 - 57200050000310
//ANTIDEPRESSANTS 58030050000315-58300090107050
//AMPHETAMINE 61100020100305 - 61109902107030
//RITALIN 61400016100320-61400020107040
//PROVIGIL 61400024000310-61400024000320
just test the meds GPI and do a compare to see if it's in one of these ranges. The chronic pain management form that this is from is posted here somewhere.
Thanks I did end up writing this formula but now I see I missed some for opiates so I will need to redo this. Where did you find this table? I only knew to use 65 for opiates from trial and error.I had asked GE and they couldn't help me find a table.
IF ({MEDICATE.GPI}) startswith ["65"] AND ({MEDICATE.STOPDATE}) > CurrentDate AND ({MEDICATE.XID}) = 99999999999999997000000000000000000 THEN {MEDICATE.DESCRIPTION}
I used MSQUERY to "download" the ML_MEDICATE table to an excel sheet then just went through it by hand. Sort on the GPI column.
It's messy to go through it by hand but not terribly time-consuming; the GPIs are spread a bit due to things like combination meds. I have used similar strategy to identify, eg, beta blockers, ACEs and ARBs, and so on.
This is something that should be done by or verified by a pharmacist and/or an MD.
Good idea, I do really like MSQUERY for reports like this too, thanks