Well, that's no ordinary rabbit!

They had a dream, or rather a nightmare. Piles and piles of paper. Reams and reams of it every day. And then Meditech added the "Method" line and their nightmares doubled.

Our lab staff finally had enough of printed patient master logs. They wanted to get rid of that old Genicom printer. They wanted a way out from underneath 2000+ pages every day that were just going to be shredded a couple of weeks later. They needed a way to review the logs daily and store them for 2 weeks that involved NO PAPER. They requested that the master logs be downloaded to a network drive where they could  be opened in a text editor and reviewed.

The master logs include what most standard Meditech reports do - lots of graphics commands. At first I was thinking of just stripping the graphics commands from the spooled logs and ftp'ing them somewhere that the lab personnel could access them (see this page for that method) which was basically what they had asked. After opening one in a text editor I decided that plain text was not the answer. A web-based solution seemed to fit better. The pages could be easily accessed, the formatting could be controlled, and we had some disk space on a web server that we were not using.

Initial Challenges

There were some challenges to overcome. I wanted to preserve the bolding and italics of the original logs to make them easier to read. I needed to "fix" the logs since >, <, and & are reserved characters in html. I wanted to get rid of that extra line for every result that says "Method: ..... Analyzer: ....". The web logs needed to be stored sorted by type to make them easier to find. I estimated it would take until about the 6th inning of a Braves game to have something working. It took a bit longer than that. I should have based it on an American League game.

Our master logs are spooled by department. There are about 10 of them - chemistry, hematology, urinalysis, flow, microbiology, body fluids, etc. The first thing I did was create a separate spool group for each type of log. That would allow the report to easily determine where to send the web page based on the spool group it belonged to. On the ftp server I set up folders corresponding to those spool groups. Sorting solved.

I suppose I could have used html type ftp spool groups and come close to my goal, but I wanted more control over the layout of the web pages and their names than that allows. I opted to build the html code in the report. I already had a couple reports that created web pages so much of the html code was already written. None of them had test results on them though. < and > are used in html to indicate the start and end of the tags that are used to build and format a web page. That meant that the report would have to search thru the text of the spooled logs and replace all of those characters with legitimate html code. Or I could just convince the lab techs to stop using results such as <5 or >1000. Right.

The Final Solution

The end result of all this is an advanced version of my ftp standard report code. It just adds the html page headers and footers, puts each page in a table, parses the spool file to replace all the < > & characters, parses the spool file again to either remove the graphics commands or replace them with equivalent html font or line commands, ftp's the file to a folder on a server based on the spool group, deletes the file that it sent 14 days before, emails me if the master logs haven't finished spooling before the report runs, saves 500,000 sheets of paper and 100 printer ribbons each year, frees up space on the lab supervisors' desks, and pours a cup of coffee that's waiting at my desk when I get to work each morning. Ok, so I haven't quite worked out the coffee part. Yet...

Preliminary Checklist

To make use of this (minus the cup of coffee) you will need these things

  1. A secure web server with folders for each type of master log - set up the folders to allow browsing, this will keep you from having to create constantly changing index pages to the actual master log pages.
  2. Ftp access to that web server - user must be allowed to create and delete files at a minimum.
  3. An entry in the MIS FTP Remote Hosts dictionary for the ftp server.
  4. A spool group for each type of master log. If you just create one master log rather than breaking them down by department or if you don't want separate folders on the web site for each department you can use just one spool group.
  5. One NPR report (download links below)
  6. Enough understanding of NPR, html, and ftp to modify the NPR report for your site
  7. Your own coffee (optional)

Required Changes to the NPR Report

Note: The reports have not been updated to handle the new graphics format used in 5.5.

The report modifications should not be difficult.

The first change will be in the start macro. There I set up some variables with the destination folders for each spool group. You will just need to modify the code to use your spool groups and ftp folder names.

The close.up macro will need to be changed so that any error messages are sent to a valid email recipient.

The html macro and the main report should be fine as written.

Most of the changes will be in the custom.ftp macro. I'll briefly mention a few of them here, but review the comments in the macro for more specifics. This is the macro that does most of the work. It adds the html code for the page header and trailer, retrieves the spool file from its hiding place in the MIS.spool.rad directory and converts it to a presentable html format. The most important changes you will need to address are the FTP host mnemonic, the MIS database name, and the ftp folder and filenames. These all need to be changed to match your site.

Final Setup

After you have all the initial setup and report modifications done here is what's left to do.

  1. Schedule the patient master logs to print to their respective spool groups at some time early in the morning.
  2. Schedule the NPR report to run at some time in the morning at a time after the master logs would have completed spooling.
  3. Give the appropriate LAB personnel instructions on how to access the web pages. You can add a link to the web site by adding a routine to their Meditech menu. Change the argument to point to your web site.
  4. Have the LAB staff review the web pages and compare them with the spool files to be sure the data in the web pages is correct.

One final note on the spool groups. I set ours to purge after 7 days for both printed and on print list. That way the spool files are still available for a week should there be any problems with the ftp process or intranet access. They can also be used to verify that the web pages are accurate representations of the actual master logs.

           View a sample Patient Master Log
           Download a sample report (new format for late 4.9 and higher releases)
           Download a sample report (old format for 4.9 and lower releases)

Other Magic Pages

CDS Attributes Emailing Messages Emailing Scheduled Reports
@W. prompts String Manipulation NPR Viewer
Text Edit/View Attribute Meds in an NUR CDS NUI Desktop Icons
Field Attributes Lab results in a CDS Ultimate Message Box
Display Message Attributes Run NPR Report Attribute Multiple Query Checklist
NUR Canned Text in Query Mousetributes LAB TEST VIEW GROUP
OA Msg from PHA Rule FTP Standard Report HTML Pt Master Logs
PCI NPR Report


Don't see what you need?  Visit one of these other sites

Iatric Systems web site
Attributes
NPR tips
NPR reports
Magic and C/S Products
ITNurse.net
Hosted by Daniel Davis
Resources for the IT Nurse
Articles and Discussion Forum
Debbie Kelly web site
Attributes
Meditech tips
Nursing Informatics
Debbie Bate-Travis web site
Attributes
Links to other attribute sites
Links to Nursing Informatics sites
Magic NPR Report Writing
Blogged by John Sharpe
NPR Report Writing Tips

or email me your request (tomt at thomast357.com).