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.
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 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...
To make use of this (minus the cup of coffee) you will need these things
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.
After you have all the initial setup and report modifications done here is what's left to do.
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.
Don't see what you
need? Visit one of these other sites
or email me your request (tomt at thomast357.com).