New Reports

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
SpeedGP
Posts: 26
Joined: Wed Jun 15, 2011 7:37 am

New Reports

Post by SpeedGP » Thu Mar 15, 2012 1:38 pm

Hello, we are moving an office and need a report of all Patients (First name Last name), Address (Standard Street Number Street Zip State), the current one we added only has Zipcode, can you help?

SET @FromDate='2010-03-01' , @ToDate='2012-02-29';
SELECT p.PatNum,p.zip, MAX(pl.ProcDate) AS 'LastSeen' FROM patient p,procedurelog pl
WHERE pl.PatNum=p.PatNum AND
(pl.ProcDate BETWEEN @FromDate AND @ToDate)
AND pl.ProcStatus = '2' AND p.PatStatus=0
GROUP BY pl.PatNum;



Thank you

JimZ
Posts: 113
Joined: Thu Nov 01, 2007 9:16 pm
Location: Pittsburgh, PA
Contact:

Re: New Reports

Post by JimZ » Thu Mar 15, 2012 7:28 pm

The query I use for our patient database is:

SELECT
patient.LName, patient.FName, patient.address, patient.Address2, patient.City, patient.Zip, patient.HmPhone, patient.Birthdate FROM patient
WHERE PatStatus=0
ORDER BY LName

The key is "patient.xxxx". You can add other tables (WirelessPhone, Birthdate, Email, MedUrgNote, etc which would be substituted for the " .xxxx") as needed by placing them into the above list. Just remember to separate these by a comma and space

If you're not good with queries, try going into the Reports screen and select Patients-Raw from the list (right side top). Hold the Ctrl button and select the criteria you need. The only problem with this is the list is not in alphabetical order.

Jim

Post Reply