'Save Query' option

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

'Save Query' option

Post by wjstarck » Wed Oct 31, 2007 7:15 am

Hello OD friends-

It'd be nice if we could have the option to save queries of the same name and have them replace the current version.

For example, I use

SELECT referral.LName as RefLName, referral.FName as RefFName, patient.LName as PatLName, patient.FName as PatFName, patient.Gender as Sex, referral.Title as RefTitle, referral.Address as RefAddress,referral.Address2 as RefAddress2, referral.City as RefCity, referral.ST as RefST, referral.Zip as RefZip
FROM patient,referral,refattach
WHERE patient.PatNum=refattach.PatNum
AND referral.ReferralNum=refattach.ReferralNum
AND refattach.IsFrom='1'
AND refattach.RefDate >= '2007-10-01'
AND refattach.RefDate < '2007-12-31'
AND referral.NotPerson = '0'
ORDER BY RefLName, RefFName

and so I will occasionally have to go in and change refattach.RefDate to a more recent date to cut down on the size of the exported list.

Right now, I have to 'Add to Favorites' and then go in and delete the prior version. It sure would simplify things if I had a 'Save Query' button (with a popup asking if I want to replace previous version) to speed things along.

Happy Halloween!

:twisted:
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

sparkly
Posts: 149
Joined: Tue Jun 26, 2007 8:13 pm
Location: IL

Post by sparkly » Wed Oct 31, 2007 8:13 pm

ummm, why don't you just change the date before you 'submit query' and leave the saved/favorites query file alone?
it doesn't sound like you're using it to keep track of the last date you ran the query, and it's easier to find the 'last date run' by looking at the last file you generated...

User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Fri Nov 02, 2007 5:52 am

Because then I have fiddle with it every time I run the query, which is multiple times throughout the day.

Besides, one should always have 'Save' and 'Save As' options. It pretty much expected behavior :P
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

V Suite
Posts: 136
Joined: Sun Aug 19, 2007 6:56 pm

Post by V Suite » Sun Jan 13, 2008 2:56 am

You can apparently edit the queries in Favorites. Double click and make changes. Then press Ok twice.

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Sun Jan 13, 2008 7:21 am

I know the behavior of that section is old and annoying. But it's low priority.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
Jorgebon
Posts: 502
Joined: Mon Jun 18, 2007 2:25 pm
Location: Mayaguez, PR
Contact:

Post by Jorgebon » Sun Jan 13, 2008 10:17 am

I made a small change to your query so you don't have to go in and change the dates all the time. It will now calculate a period of time of 3 months (today minus a 3 month interval) so every day you can get the previous 3 months' referrals. I used a 3 month interval, but you can change that to whatever you want:

SELECT referral.LName as RefLName, referral.FName as RefFName, patient.LName as PatLName, patient.FName as PatFName, patient.Gender as Sex, referral.Title as RefTitle, referral.Address as RefAddress,referral.Address2 as RefAddress2, referral.City as RefCity, referral.ST as RefST, referral.Zip as RefZip
FROM patient,referral,refattach
WHERE patient.PatNum=refattach.PatNum
AND referral.ReferralNum=refattach.ReferralNum
AND refattach.IsFrom='1'
AND refattach.RefDate > curdate() - INTERVAL 3 MONTH
AND referral.NotPerson = '0'
ORDER BY RefLName, RefFName

Jorge Bonilla, DMD

User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Post by wjstarck » Thu Jan 17, 2008 8:06 am

Nice- thanks!
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply