Revision [200]

Last edited on 2009-01-06 10:29:25 by SethKrieger
Additions:
(a.provfname + ' ' + a.provlname) AS "Provider",
Deletions:
(a.provfname + ' '+a.provlname) AS "Provider",


Revision [199]

Edited on 2009-01-06 10:29:00 by SethKrieger
Additions:
======Count of Patients and Services by Provider, Pt Category, Service Code======
Give me a count of unique patients and a count of services rendered, grouped by provider, patient category, and service code for a specified date range.
SELECT
(a.provfname + ' '+a.provlname) AS "Provider",
c.categcode AS "Category",
a.srvcode AS "Service",
COUNT(DISTINCT a.ptnum) AS "Pt Count",
COUNT(DISTINCT a.jnum) AS "Srv Count"
FROM
rv_charges a
JOIN patients b ON a.ptnum = b.ptnum
LEFT OUTER JOIN ptcategs c ON b.ptcategnum = c.ptcategnum
WHERE
a.trandate BETWEEN '2008-01-01' AND '2008-12-31'
GROUP BY
"Provider","Category","Service"
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [198]

The oldest known version of this page was created on 2009-01-06 10:25:56 by SethKrieger [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki