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
New Reports
Re: New Reports
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
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
James Zemencik, DMD
http://www.bridgeville-dentist.com/
http://www.bridgeville-dentist.com/