Revision [404]

Last edited on 2010-05-05 17:01:55 by admin
Additions:
======Patients Seen In Period With Insurance And Provider======
Is there a query that will list all clients that were seen in a certain time frame along with name of insurance for a specific provider?
Adjust the desired date range and provider code in the WHERE clause below.
SELECT DISTINCT
a.lastname,
a.firstname,
a.id,
a.provcode,
(IF c.payortype = 'I' THEN c.payorname ELSE '' ENDIF) AS "Insurance"
FROM
rv_charges a
JOIN ptpayors b ON a.ptpayornum = b.ptpayornum
JOIN payors c ON b.payornum = c.payornum
WHERE
trandate BETWEEN '2002-01-01' AND '2002-01-31'
AND a.provcode = '3'
ORDER BY
a.lastname, a.firstname, a.id
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [403]

The oldest known version of this page was created on 2010-05-05 16:58:57 by admin [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki