This is a bug I noticed for those with NewCrop eRx:
The prescriptions are not coming across to the Issues box at the Encounter level, which is the reason the “Maintain active medication list. ( AMC:170.302(d) )” rule is not being updated with a denominator/numerator.
After doing a little digging, I think I see the fix:
Prescriptions in the ‘prescriptions’ table marked as active need to be carried over to the ‘lists’ table as a medication-type and matched up to a pid.
Please help us. Prescriptions are not showing up under Issues box at the encounter level. We tried looking into this but we need the experts help here. Any help to fix this issue is greatly appreciated.
It is important to note that this is a propective fix, meaning that it will fix the calculations for patients that get medications/prescriptions adjusted after the fix. It will not go back and retrospectively fix patients that had medications/prescriptions adjusted before the fix.
Here is the query to use after applying the patch. Please note, you may need to remove your “prescription_erx” records from the lists_touch table to prevent duplicates.
INSERT INTO lists_touch (pid, type, date)
SELECT patient_id,"prescription_erx", max(date_added)
FROM prescriptions
WHERE active ='1'
GROUP BY patient_id;