Creating Levey-Jennings charts on a PC.
For many years laboratory professionals have used Levey - Jennings charts to represent quality control efforts. Preparing the charts by hand is a laborious and time-consuming undertaking. Fortunately, most new-generation laboratory analyzers are equipped with the computerized capability for producing them on demand.
What about laboratorians who have older analyzers? Can the manual method be simplified? I was faced with this problem when I assumed my current position several years ago.
Quality control results for isoenzymes were being tabulated, but not being graphed. A considerable amount of time was required to examine the data for trend analysis. In addition, requirements from CAP and the Florida Department of Health and Rehabilitative Services included graphs. Since I had previously developed ways to use microcomputers for other laboratory purposes, such as method comparisons and linearities, I turned my attention to this problem.
I used a spreadsheet program, Lotus 1-2-3, release 2 (Lotus Development Corp., Cambridge, Mass.). Other programs with similar capabilities include Quattro and Quattro Pro (Borland International, Scotts Valley, Calif.) and Excel (Microsoft Corp., Redmond, Wash.). The commands and macro generation procedures differ slightly for each of these programs, so to use one in conjunction with the program described in this article, consult the manual for details.
The hardware required is relatively simple: an IBM-compatible PC with sufficient memory to run the program; graphics video capability, to display the graph on the screen before printing; and a graphics printer.
I designed my macros for eight analytes, LDH 1-5 and CPK 1-3. You can modify the macros for use with other analytes by editing the names and data locations. These macros will not perform any calculations themselves; to do this, you must have the means and values for [+ or -] 1 SD and [+ or -] 2 SD. You can enter data daily or at any other convenient interval. * Load and define. First, load Lotus 1-2-3 in the normal manner. Reminders are included in the first cell of each line of the spreadsheet. You will have to define two ranges now and four more later. Type:
/RNC month <ENTER> F13 <ENTER>
/RNC lot# <ENTER> C13
The command </RNC> stands for "call menu, range name create." The first line creates a range called MONTH in cell F13. The second line creates a range called LOT # in cell C13. * Worksheet. Move down in the worksheet. Leave enough room for all the tables you will need. It is simplest to treat the video screen as one page wide and move down to the next "page." After much trial and error, I found I needed nearly 350 lines. Therefore, I selected line 400 as the starting point for the macros. After some shifting and editing, the starting point moved to line 403. You can reach that location by pressing function key 5 (F5) and typing A403 <ENTER>.
A few words on the conventions used by the Lotus 1-2-3 macro language will be appropriate here. Certain lines must be preceded by an apostrophe ('). The apostrophe does not appear in the text but is used as a flag to tell the program that the line is to be treated as text, not acted upon. For example, if a date is entered as '07/25/90, it will appear, correctly, as 07/25/90. If it is entered without the apostrophe, however, the program will mistakenly interpret the slashes as division signs. Use the apostrophe to precede any line beginning with a slash (/), a backslash (\), quotation marks (``), or an Arabic number.
Here is the way I have organized this section of the program. Comments are listed in column A, overlapping as needed into column B. The name of the macro is in column C. The actual program is in column D, overlapping as far as necessary into columns E through H. At least one blank line must be inserted between each macro. Since the macros are not case sensitive, you may enter the information in either uppercase or lowercase letters.
Starting with the cursor in cell A403, we will create the range name MACRO. Using the GOTO function (key F5) followed by MACRO will reach this location for editing. Type the keystrokes:
Move the cursor to the right, to column C. Enter <\A> by typing as follows, remembering to begin with an apostrophe:
\A<ENTER> * Name the program. Now it's time to name the program to be entered in column D. When the \A macro is requested, the programming instructions in the next column will be accessed. Type the following keystrokes, which signify "call menu, range name label, right column":
Type the programming commands exactly as they appear. It's easier to do this first and enter comments later. The tilde (|) is the macro equivalent of <ENTER>.
Continue until you have entered all three macros. Use the same procedure as above to name the macros\P and \G. When you're finished, save the file.
Type the keystrokes for "menu, file, save" and enter the file name. This file will become the master template for your charts. I used the name ISOMSTR (for "isoenzyme master") followed by a number to identify the version, such as /FSISOMSTR1.
This is necessary in case you change lots of control or need to adjust ranges. The graph macro, \G, includes a command to set the upper and lower limits for each graph (see "Formatting attractive graphs," above). I used values representing [+ or -] 4 SD, which provide a readable graph. This window goes just far enough beyond [+ or -] 1 and [+ or -] 2 to include outliers. Limits may have to be changed if there is a change in lot number or a shift in QC.
Only one entry in all these macros is hardware dependent: the print macro, \P, which has an entry for compressed print. My program is set up for IBM printers. If you are using a different brand, consult your printer manual for the correct notation.
Now the hard work is done. * Enter data. Call the master worksheets as follows:
Alternatively, you can type /FR, move the cursor to the file name you want, and press <ENTER>.
Call the table creation macro, \A, by holding the <ALT> key while pressing A. Prompts will appear - first for the lot number and expiration date of the control, then for the data month and year. Press <ENTER> after each entry. Next you will be asked for statistical values for each analyte. After providing these, save the file. An example is shown in Figure I.
One crucial rule of thumb is to save early and save often. The more frequently you save your work, the less will be lost in the event of a power failure or an accidental dropping of something on the keyboard.
Select a name other than ISOMSTR1, such as JAN90ISO. Each time you save the file with its working name, Lotus will detect the existence of a file bearing the same name, from the last time you saved it. When a prompt appears asking you to cancel (C) or replace (R), choose R. The latest version will replace the saved file.
At the end of the month, use the print macro, \P, to print your data tables. Hold down the <ALT> key while pressing P; then create the graphs.
Holding down <ALT>, press G. The macro will stop at a prompt to enter the first title. The name of the graph will already be inserted. Type the month and year and press <ENTER>. The macro will continue until the graph is displayed. Press any key to continue to the next graph in the series.
Save the file again. Exit Lotus 1-2-3. * Print. Graphs cannot be printed directly from Lotus 1-2-3. You must first exit the spreadsheet module and load PrintGraph, a program supplied as part of the 1-2-3 package. Select the graphs you wish to print, set your printer to start at the top of the page, and press A and G. The printer will stop when all the graphs have been completed. Figure I illustrates the graph derived from the data displayed. The full series includes seven more data sets and graphs. * Caveats. If you keep data for multiple months on the same disk, whether a floppy disk or a hard drive, delete each set of graphs before creating the next, through either Lotus or DOS. Use filenames such as LDH-1.PIC.
To obtain the best appearance for the printed graphs or to change their ranges, you may have to adjust the upper and lower graph limits. The tables allow for 35 entries in case you have to wait a few days before changing lots.
|Printer friendly Cite/link Email Feedback|
|Publication:||Medical Laboratory Observer|
|Date:||Nov 1, 1990|
|Previous Article:||One MT's role in an IVF program.|
|Next Article:||Controlling overutilization of the lab.|