Site icon SOS Resources

Last Payments

You asked for a report that includes last payment information. This information is readily available in the
database, but we have never included it in any of the standard reports.

SELECT
   (a.Lastname + ', ' + a.Firstname) AS "PtName",
   a.id,
   TRIM(c.firstname + ' '+c.payorname) AS "Payor",
   b.lastpaydate,
   b.lastpayamt,
   b.postedbal
FROM
   sos.patients a
   JOIN sos.ptpayors b ON a.ptnum = b.ptnum
   JOIN sos.payors c ON b.payornum = c.payornum
WHERE
   postedbal > 0
Exit mobile version