Formatting code for TotalAmountInCollections
======Total Amount In Collections======
Back to [[QueryDirectory Query Directory]]
//
Once we change a Patient's Billing Options to "date turned over to collections", this patient now appears as the color red in the Active Patients List.
Is there a way to determine the amount of balance that all those patients in red have--in total?
//
%%(sql)
SELECT
SUM(postedbal - ageunapplied) AS "AmtInCollections"
FROM
ptpayors a
JOIN payors b ON a.payornum = b.payornum
WHERE
b.collectdate IS NOT NULL
%%
----
CategoryQueries
Back to [[QueryDirectory Query Directory]]
//
Once we change a Patient's Billing Options to "date turned over to collections", this patient now appears as the color red in the Active Patients List.
Is there a way to determine the amount of balance that all those patients in red have--in total?
//
%%(sql)
SELECT
SUM(postedbal - ageunapplied) AS "AmtInCollections"
FROM
ptpayors a
JOIN payors b ON a.payornum = b.payornum
WHERE
b.collectdate IS NOT NULL
%%
----
CategoryQueries