Revision [429]

Last edited on 2010-11-12 17:09:15 by SethKrieger
Additions:
======Patients By Rendering Provider======
I need a report that lists by rendering provider the names of any patients who had a service by that provider—and I need to set the date parameters and choose the therapist I want that info on.
Here's the query, which is easy enough. Just adjust the conditions in the WHERE clause
for the desired date range and provider codes.
SELECT
DISTINCT pr.provcode, pt.lastname, pt.firstname, pt.id
FROM
providers pr
JOIN jcharges jc ON pr.providernum = jc.providernum
JOIN journal jou ON jc.jnum = jou.jnum
JOIN patients pt ON jou.ptnum = pt.ptnum
WHERE
jou.trandate BETWEEN '2010-01-01' AND '2010-12-31'
AND pr.provcode IN ('VB1','VB2','VB3')
ORDER BY
pr.provcode, pt.lastname, pt.firstname, pt.id
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [428]

The oldest known version of this page was created on 2010-11-12 17:04:29 by SethKrieger [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki