Revision [190]

This is an old revision of TreatmentPlanReviewsInNextThirtyDays made by SethKrieger on 2008-12-16 15:39:11.
 

Treatment Plan Reviews In Next Thirty Days


Back to Query Directory


Case Manager displays "Next Treatment Plan Review Date" – I would like to print a list of upcoming treatment plan reviews.

The nature of this query allows us to code a dynamic range for the 30 days starting today ...
BETWEEN TODAY() AND (TODAY()+30)
... instead of having to enter a date range every time we run the query.

SELECT
  b.nextreviewdate AS "Next Review",
  (a.lastname+', '+a.firstname+' / '+a.id) AS "Patient",
  c.provcode AS "Primary Provider"
FROM
  patients a
  JOIN v_tpheaders b ON a.ptnum = b.ptnum
  JOIN providers c ON a.providernum = c.providernum
WHERE
   a.flag = 0
   AND a.dischargedate IS NULL
   AND b.nextreviewdate BETWEEN TODAY() AND (TODAY()+30)
ORDER BY "Next Review","Patient"




CategoryQueries
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki