Welcome to Health Care POV | sign in | join
Stepwise Success

Quick and Dirty, Part Four

Published March 25, 2008 10:04 AM by Scott Warner

We've seen that the lowly batch file can help capture quality data with little programming. Let's examine how this batch file works. Here it is:

@ECHO OFF
ECHO 1 - Smith
ECHO 2 - Jones
ECHO 3 - Doe
ECHO .
SET /P CHOICE=Enter choice
SET /P ACCT=Enter account
ECHO %CHOICE% %ACCT% %DATE% %TIME% >> NODX.LOG

ECHO--this "echoes" what immediately follows, usually to the screen.

SET /P--SET assigns an "environmental variable," used by Windows to track directory names, file locations, devices and so on. But they can be used on the fly in batch files, too. Adding /P prompts the user. Thus, CHOICE is a variable that stores what the user types in after the prompt Enter choice.

Variables need a percent sign (%) on either side. Note %DATE% and %TIME%, already defined by Windows. What's tricky is the ">>" just before the file name. This redirection operator tells Windows to append the ECHO to a file. Without a redirection, the ECHO defaults to the screen.

The graph shows our initial raw data collection, imported into Excel. Note the peaks, which represent real-time interruptions for our phlebotomists and the offices. Most importantly, they are patient delays. This kind of data helps make quality data relevant.

 

I encourage you to play around with the batch file or share your own success. It's quick and dirty--and it works.

posted by Scott Warner
tags:

1 comments

"If you are thinking of starting a blog--work related or not--ask first. There are likely opinions about

February 19, 2009 11:16 AM

leave a comment



To prevent comment spam, please type the code you see below into the code field before submitting your comment. If you cannot read the numbers in the image, reload the page to generate a new one.

Captcha
Enter the security code below: