Does anyone know how to perform a direct query against the database to obtain the Medication classification for a client the same way you query the information in the "Charts Reports"->Inquiries in CPS?
Sample Parameters
Find: Patients
where Medication Code, Active (Classification lookup) is "ANTIVIRAL COMBINATIONS"
CPS version 12.0.13
If you send me a list of the medications that you are interested in, I will show you how to extract this information.
Although I do know some of the medications, I don't know them all. But the Inquiry function in Chart reports already has predefined tree and branch associations. I just don't know what table maintains the category association. The inquiry tool lets you write a pseudo query in the form of
Select Patients from "table X (s)"where Medications category = "Antiviral" and Medication subcategory = "Antiviral Combined"
If the table or tables that hod the associations can be identified that would be helpful.
Here is the query from SQL tracing of an Antifungual. Looks like it is looking at GPI codes:
SELECT VPATIENTPROFILE.PID,VPATIENTPROFILE.LASTNAME,VPATIENTPROFILE.FIRSTNAME,VPATIENTPROFILE.MIDDLENAME,VPATIENTPROFILE.PSTATUS FROM dbo.vPatientProfile WHERE NOT EXISTS (SELECT EMRNESUBQMEDICATEEMR.PID FROM dbo.MEDICATE EMRNESUBQMEDICATEEMR WHERE EMRNESUBQMEDICATEEMR.GPI LIKE '11%' AND EMRNESUBQMEDICATEEMR.CHANGE = 2 AND EMRNESUBQMEDICATEEMR.STOPDATE > '2017-01-31' AND EMRNESUBQMEDICATEEMR.PID = vPatientProfile.PID)
Hello, I stumbled across this because I have the same issue. I need to run some reports that include the med classification in them. Did you happen to figure out which table it is referenced in? I have scanned over them fairly thoroughly, and short of calling GE directly, am out of ideas.