Revision [99]

This is an old revision of ActivePatientsWithZeroBalanceAndNoRecentActivity made by admin on 2008-10-26 16:47:59.
 

Active Patients with Zero Balance and No Recent Activity


Back to Query Directory

Is there a report or query that we can run that will give us a list of the active patients with a zero balance and no activity within the last 31
days?


SELECT
  "name/id",
  lfeedate AS "Last Service",
  priprvcode AS "Primary Provider"
FROM
  rv_patients a
  JOIN PatientBalance b ON a.ptnum = b.ptnum
WHERE
  flag = 0
  AND lfeedate < ( TODAY() - 31 )
  AND b.ptbalance = 0
  AND a.dischargedate IS NULL
ORDER BY "name/id"


Note that "active" is defined in this query as both being in the Active list (flag = 0) AND having no discharge date entered (a.dischargedate IS NULL). If desired, you can remove the latter.


CategoryQueries


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