Written by Joe Cocuzzo, Senior VP of Report Writing Services - iatricSystems
A MEDITECH 6.0 customer recently requested our help to speed up a report she was using to find all accounts with a final abstract date of T-1. Her report, using the “abs.status.x” index was taking several hours to compile, and this was causing issues for some outside vendor.
The reason for the long compile time is easy to understand — “abs.status.x” does not have a status date subscript. So her report was going through all accounts in ABS.PAT with a status of “FINAL,” which could be tens to hundreds of thousands of records.
Fortunately, there is a way to write a pretty speedy report that can get all abstracts finalized within a date range by taking advantage of the fact that ABS puts transactions on the “Admissions Transfer Queue” when data needs to be sent from ABS to other modules.
Although I knew there would be one or more transactions on “the AAXQ” I could exploit, I was not sure how to pick out those transactions.
Step 1 was to find an example patient, so I wrote a quick ABS.PAT report as follows:
Detail Segment: main
Index: dis.date.x
On the output, I included the field @adm.urn.
Step 2 is to write a quick ADM.PAT report to find all the AAXQ transactions for one of the patients found for the date their abtract was made final.
In a start macro, I needed to convert the NPR format date YYYYMMDD to an “S(0)” value (number of seconds since 3/1/1980).
Since %Z.date.clinical gives you number of days since 3/1/80, and since there are 86400 seconds in a day (24*60*60)…
On the output I put the fields that seemed likely to allow me to find the change to FINAL:
So, if you go through the transfer queue for the desired date range and then pick out patients with a xfer.type of “ABS” and a xfer.abtract.status of “FINAL,” it looks like you could have a very speedy report that would get the same patients as a report that goes through every “FINAL” abstract from the beginning of time and checks the abs.status.date.
I copied the site’s report from this:
To this:
I left the selections on the original report:
Then I added the one in the screenshot below. Adding this Select Field will allow me to use a start macro to go through the ADM transfer queue to make a list of the adm.urn’s for all patients with an xfer.type of ABS and a xfer.abs.status of FINAL in the date range desired. Leaving the abs.status.date selection on the report will guard against pickup up accounts with some other kind of transfer queue transaction that that has type of ABS and status of FINAL.
The start macro looks like this:
If you need more help…
The Report Writing team can help you fix reports, create new ones, make old ones faster…Simply reach out to your Iatric Systems Account Executive or our NPR report writing team at reportwriting@iatric.com to discuss how we can help support your team!