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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.