Page 1 of 1

Printing out notes for the day

Posted: Tue Apr 23, 2013 5:51 am
by spolevoy
Most of our notes are Autonotes, filled out by DAs. I don't always (as in never) check what they write...and I don't think it's a good idea.
It would be great if we could print out notes for the day for review.
I found query #633 Procedure Notes for date range including group notes which seems to fit my needs almost perfectly, except the notes don't word wrap in the field for printing.
Is there a way to change the query so that the words wrap, and also add Provider field and sort by it?

thanks!
steve

Re: Printing out notes for the day

Posted: Tue Apr 23, 2013 9:08 am
by jsalmon
This would be a good feature request and I'm surprised that no one has created one for it yet. I guess it's not that important and they all just do the work around which would be to Export the query results and print it using Excel, Open Office's Calc, etc.

Re: Printing out notes for the day

Posted: Tue Apr 23, 2013 10:05 am
by spolevoy
Jason - I am looking online to see if there is a command in SQL to word wrap, but I can't find it. Is there a simple way to add a line of code to the query, or does it have to go in as a feature request?

Re: Printing out notes for the day

Posted: Tue Apr 23, 2013 1:10 pm
by jsalmon
Oh no, it's not the SQL that needs to be changed, it's the way Open Dental displays and prints the information. If you don't feel like exporting the results to manipulate them outside of Open Dental then I believe it needs to be entered as a feature request. I can't think of another way to accomplish your goal.

Re: Printing out notes for the day

Posted: Wed Apr 24, 2013 3:42 pm
by dentalba
I am also interested in being able to easily review notes at the end of the day. It is too tedious to go patient by patient at the end of the day to do this. What report are you running and how do I export it? I would be very interested in this as a feature.

Re: Printing out notes for the day

Posted: Wed Apr 24, 2013 8:51 pm
by jsalmon
spolevoy is most likely using the user query window: http://opendental.com/manual/queryoverview.html and copying query #633 from our query examples page: http://opendentalsoft.com:1942/ODQueryL ... yList.aspx and running it. Once the results are showing, you can export the results to a file so that you can open it in excel or a similar program. To do so, click the export button in the bottom right of the User Query window.

Re: Printing out notes for the day

Posted: Mon Apr 29, 2013 3:28 pm
by spolevoy
jsalmon wrote:spolevoy is most likely using the user query window: http://opendental.com/manual/queryoverview.html and copying query #633 from our query examples page: http://opendentalsoft.com:1942/ODQueryL ... yList.aspx and running it. Once the results are showing, you can export the results to a file so that you can open it in excel or a similar program. To do so, click the export button in the bottom right of the User Query window.
Right, just made the change in bold below to make it today.

Follow this syntax for yesterday or any day from today
SET @FROMDate=DATE_SUB(CurDate(), INTERVAL X Day), @ToDate=DATE_SUB(CurDate(), INTERVAL X Day); where X is the days before today - change it to whatever you need.

It comes out without a word wrap. Doing through Excel is too many clicks.
The easiest way to get it in viewable format is Submit- Export - select Save to Desktop and add .doc at the end of the name of the file, and then just print the Word file. Word will automatically wrap it.

This is the query I use.

/*633 procnotes for date range including group notes*/
SET @FromDate=DATE(curdate()), @ToDate=DATE(curdate());
SELECT ProcDate, LEFT(CONCAT(tmp1.LName,', ',tmp1.FName),25) AS PatName,
ToothNum AS 'T#', Surf, ProcCode, AbbrDesc,
(CASE WHEN NOT ISNULL(tmp1.NoteEntered) THEN (SELECT pn.Note FROM procnote pn WHERE tmp1.ProcNum=pn.ProcNum AND pn.EntryDateTime=tmp1.NoteEntered) Else 'None' END) AS 'Note'
FROM
(
SELECT MAX(procnote.EntryDateTime) AS 'NoteEntered', procedurelog.ProcDate, provider.LName AS `Dr`,patient.PatNum,patient.LName,patient.FName,procedurelog.ToothNum,
procedurelog.Surf,procedurelog.ProcNum, procedurecode.ProcCode,procedurecode.AbbrDesc
FROM procedurelog
INNER JOIN procedurecode ON procedurelog.CodeNum=procedurecode.CodeNum
INNER JOIN provider ON provider.ProvNum=procedurelog.ProvNum
INNER JOIN patient ON patient.PatNum=procedurelog.PatNum
LEFT JOIN procnote ON procnote.ProcNum=procedurelog.ProcNum
WHERE procedurelog.ProcDate BETWEEN @FromDate AND @ToDate
AND (procedurelog.ProcStatus = '2' /*complete*/ OR procedurelog.ProcStatus = '3' /*EC for group notes*/)
GROUP BY procedurelog.ProcNum
) tmp1
Order BY LName ASC, ProcCode ASC