Computer Programs in Biomedicine 5 (1976) 259-271

© North-Holland Publishing Company

AN OFF-LINE DATA PROCESSING SYSTEM FOR BIOCHEMISTRY P R O F I L I N G B A S E D O N A 2K P R O G R A M M A B L E C A L C U L A T O R R.M. JAMES Senior Biochemist, Department o f Biochemistry, Lancaster Royal Infirmary, UK

An off-line data processing system based on a Hewlett Packard 2K programmable calculator to be used with a biochemistry profiling system is described. The program is in two sections. A Data Acquisition phase calculates results from Auto Analyser II peak heights after corrections for drift and stores them on magnetic tape cassettes. Quality control statistics are produced. A Reporting phase types the profile results on self-adhesivepre-printed labels to be attached to the test-request form and also prepares a laboratory record sheet. The system is routinely used to process up to 2000 peak heights per day. Non-profile peak heights may also be read using this program. Biochemistry profile Hewlett Packard

2K Calculator Magnetic tape

Auto Analyser II Self-adhesive label

1. Introduction

2. Hardware and software details

The planned introduction of a 16-channel Auto Analyser profiling system in the Biochemistry Department to deal with over 1500 analyses per day showed the requirement for a low-cost data processing system capable of calculating results from Auto Analyser II peak height recordings and producing a suitable report of the profile results. Ramsey and Scott [1,2] have published a program which processes peak heights and immediately outputs the results on strip reports. The program was designed to process 400 to 600 analyses per day although limitations were met due to limited storage capacity. The program described below has been written to accept off-line, the data from Auto Analyser II channels and to store the results obtained on magnetic tape cassettes as a series of profiles. On completion of data entry, the profile results are typed onto selfadhesive preprinted labels which are then attached to the original test-request forms. A record sheet of profile results is also prepared for department reference. Auto Analyser II records of non-profile determinations may be processed with the direct output of resuits by typewriter.

The data processing system consists of a Hewlett Packard 9810A programmable calculator with 2 K program storage, 111 total data storage registers, an integral printer and a Statistics Block. Connected to this is a Hewlett Packard 9865A cassette tape memory unit, a PCD chart reader and digitiser and a Facit Model 3841 output typewriter. The system would function adequately with 51 total data registers and without the statistics block although certain program modification would be necessary. The program is written in Hewlett Packard machine language.

3. Functions of the system To read both profile and non-profile Auto Analyser II peak heights, correct for linear drift and calculate results relative to a point calibration standard. To store the processed results on magnetic tape in the form of a profile or type them out directly on the typewriter. To produce a profile report on self-adhesive labels and a sheet of results for reference. To pro-

260

R.M. James, Off-line processing for biochemistry profiling

vide quality control by the statistical analysis of resuits.

4. Arrangement of the program The program is in two distinct sections. The data acquisition phase includes the input of peak heights, calculation of results, storage on tape and the statistical analysis. The reporting phase involves the loading of results from tape and typing them in the formats described. The first section requires 2K of program storage, the second 1.3K and reprogramming is necessary for the operation of both. However, as the data acquisition phase is completed for all the Auto Analyser channels before reporting commences, reprogramming is necessary only once in a data processing cycle.

5. Organisation of the Auto Analyser runs A specimen of blood is received in the laboratory with a test-request form and both are given an accession number. This number corresponds both to the Auto Analyser cup number and to the magnetic tape storage file number. The patient name, ward and cup number are written onto the laboratory record sheet and the blood serum is separated into numbered auto analyser cups. Correlation between the serum specimen, test-request form and profile result is based solely upon cup number. Each Auto Analyser run may consist of any number of cups, but is divided into a series of blocks of ten cups. A cup containing a calibration standard is placed at every tenth position (cups 0, 10, 20 etc.) with a pooled serum immediately preceding it. As the same tests are carried out on every specimen, the order of cups on each analyser is the same. Using Auto Analyser II machines, the peak height is proportional to the analyte concentration and a single calibration standard can be used. Linearity of analyser response is checked periodically.

6. Mode of storage of results on magnetic tape The magnetic tape is divided into a series of files, each fde containing the profile results of a single pa-

tient and consisting of 18 data registers. The program is arranged such that the tape file number corresponds to the analyser cup number. The position of a result within the file registers is governed by the code number of the determination. The code number is the number of the tape register, e.g., albumin, code number 8, results are always stored in the 8th data register of the file. One data register in each tape file remains unused and has been included to add flexibility for future possible changes.

7. Data acquisition phase The calculator accepts peak heights input via the chart reader, corrects for drift and calculates results, storing up to 9 blocks of results in the calculator data registers at one time. These results may either be stored on magnetic tape, updating each tape file or, upon the keyboard entry of instruction SET FLAG prior to peak height input, may be directly output by the typewriter. Following initialisation of data registers, the FLAG s0tting is tested. If positive, a value of - 1 is stored in data register (A). The calculator prints a request for the initial patient cup number (I) of the set of peak heights to be entered and the instruction code. The instruction code may be: 0 to reprogram with the reporting phase, 999 to print out the results to date of a specified cup number, a test code between 1 and 18 to indicate a profile test for which a standard value has been assigned in the program or any other number to indicate a non-profile test which requires a standard value to be entered via the keyboard by the operator. In the latter case, register (A) is set to - 1 for results to be directly output by the typewriter. Entry of a profile code causes a short letter code to be printed together with the standard value as confirmation of the keyboard entry. 7.1. Peak height entry

The chart reader cursor is fined up with the baseline of the analyser recording and the digitiser setting manually zeroed. Peak height entry must always begin with a calibration standard (fig. 1). This peak height value is stored and the program enters a loop which

261

R.M. James, Off-line processingfor biochemistry profiling

I Initialise registers I

Yes~

icup no. (I) & code

Load program I

~es

J Goto ~abe~ 31

Yes

J Assign standard I I Confirm code

I

Read & store | standard peak height~

_] Read & store -I test pe~c height

(P)

] I Yes

I Calculate & print L drift

I

r

[Oorrect peak heights I for linear drift. I I Calculate results

ITo~ bo l ck~

Yes~

.,..,,~ne

Cv)

Fig. 1.

'1 I

I Print last cuo no.I Set End of -L~ntry I I Flag

No

fro

J Pe~c heights zero l for rest of block

R.M. James, Off.line processing for biochemistry profiling

262

reads and stores successive peak heights until a count indicates that the next calibration standard peak height has been entered. The drift between the two standards is calculated and printed. Entry of a negative peak height by bringing the chart reader cursor below the baseline level is used as a signal that peak height entry has terminated and causes the program

to jump from the loop, set the remaining peak values of that block at zero and to assume zero drift across the final incomplete block. An "End of Entry" Flag is set and the cup number of the last positive peak is printed. A second program loop is entered for the calculation of results from the block of peak heights with

(v)

Yes

oto

bel 01

file (1).

I Load existing file contentsinto calculator 6

I Recall result (I) &

I Place result (I) in correct register.

Stats Block I

Recordprofile onto tape

I

1 Goto

J~O

I

Print tz~mcated Datch IIean, s.d. & no. of results (w)

Fig. 2.

1

R.M. James, Off-line processingfor biochemistry profiling dorrection for linear drift between the calibration standards. Results are stored in the calculator data registers used for storage of the peak heights. The program returns to (P) to await entry of the next block of peak heights unless either nine blocks of peak heights have been entered and the calculator storage capacity is full, or the "End of Entry" Flag is set. The value of register (A) is tested, a zero value allowing recording of results on magnetic tape to commence (fig. 2), a value of - 1 causing a branch to Label C (fig. 4). 7.2. Result storage on tape The initial cup number (I) is recalled and the corresponding tape f'de located and loaded into the calculator profile data registers (fig. 2). The result from cup number (I) is placed in the profile data register specified by the test code number and the amended profile rerecorded in the same tape file. (I) is incremented by one. A value of (I) divisible by 10 causes the tape to advance one file and (I) to be increased by one. Thus a calibration standard file is left unrecorded. If nine blocks of results have been recorded, the program returns to (P). A result of zero signals the program to proceed to the next stage, otherwise it returns to (R). Each result is tested whether it falls within the truncation limits written into the program and specified by the test code number. A result within limits is entered into the calculator statistics block for inclusion in the statistical calculations. Following completion of result recording, the truncated batch mean, standard deviation and number of truncated results are printed to allow the operator to assess the quality of the batch. 7.3. Adjustment o f results Jbr sample dilution etc. This section of program deals with the following situations which commonly occur during the analyser runs: (a) Results from unsuitable specimens. These are cancelled by multiplication by zero. (b) A peak height outside the recording range of the analyser. The analysis is repeated on a dilution of the specimen at the end of the run. (c) A faulty peak recording: The analysis is repeated on the neat specimen at the end of the run. (d) A further parameter (Total Iron Binding Capacity) may be determined by treatment of the speci-

263

men involving a dilution by a factor of 3 followed by analysis for Iron. These determinations are placed at the end of the Iron analyser run. The same procedure is used for all these cases (figs. 3a, 3b). This involves the multiplication of a result by a "dilution" factor and the alteration of its position on the magnetic tape. For all profile codes except Iron, a request is printed for the cup numbers of the "original" and "diluted" specimens and the dilution factor. The factor may be 0, 1 or larger depending upon the circumstances. An Iron test code requires entry of the cup numbers of the TIBC and original Iron determinations, setting an "Iron" Flag. These values are entered by the operator via the keyboard. The calculator has sufficient storage capacity for up to 27 sets of alterations to be entered at one time. A "diluted" cup number of zero is a signal that no dilutions are to be entered or that entry is f'mished. The results from the "diluted" cup numbers are loaded in turn from the magnetic tape and the tape register containing the result zeroed. The results are multiplied by the dilution factor and stored prior to each adjusted result being recorded in the tape file of the "original" cup number. The correct tape register for adjustment is specified by the test code number. Recording of TIBC results is more complex as the storage position of the result in the file is changed from that of Iron to that of TIBC, requiring a change in test code number part way through the program. The main procedure cannot be used for Iron results except for result cancellation although this is unlikely to be required in normal circumstances. If no signal for the end of "dilution" entry has been given after 27 sets of entries, the program automatically executes the tape operations and returns to await more entries. 7.4. Output o f non-profile results The main program branches after the termination of peak height entry depending upon the value of (A) (fig. 4a). Results from non-profile tests or profile tests indicated by the operator are typed across the page together with the cup number. Calibration standard values are omitted. Following the output of nine blocks of results, the program returns to await further peak height entry. Typing of results is halted by the operator.

264

R.M. James, Off-line processingfor biochemistry profiling

(w) (Q)

Yes |PrintTIBC i I IBC / FE

] Print DIT.UTI011S ] DILIT/FACTOR/CONC

LSet Iron FlagI

[

J Enter,print, store L ~I dilutioncup no. F Yes

Dil~t~onfactor I Enter, ~rint, store] dilutionfactor I

L

Enter, ~rint, storeL originaicup no. No

~

~

"

~

I Loaddilutedcup file fromtape I Dilute~result x factor ] Store 0 in place of dilutedresult l

Fig. 3a.

Rec°rdPr°file I onto tape

Yes

, (::)

R.M. James, Off-line processingfor biochemistry profiling

265

(x)

Y e s ~

Load original cud [ no. file from taoe

result in profile [

Record orofile onto tape

lresult in TIBC [profile register

L

[

~o

Fig. 3b.

7.5. Output of urgent results

8.1. Self-adhesive report labels

In response to code 999, the cup number of the profile results required is entered (fig. 4b). The file contents from this sample are loaded from tape and, using a loop program, the test code number and result for each test are printed by the integral printer. If no result is available for any test, a zero is printed after the code number.

After typing of profile results, the label is attached to the test-request form and returned to the ward of origin (fig. 5a). A result may fall into any of three categories: within normal limits and typed in black, outside normal limits and typed in red or, if zero, a space is typed. The first (I) and final (F) cup numbers between which reports are required are entered via the keyboard together with the date of reporting. Tile contents of file (I) are loaded from tape and the cup number and date are typed on the label (fig. 5b). The first profile result is recalled and checked for normality against limits written into the program. An abnormal result causes the program to jump to S/R A which sets the typewriter ribbon to red. The result format is set and S/R B is entered to check if the result is zero and either types the result in the box or types a space. Every result in the profile is recalled in turn, tested for normality and typed in the relevant box on the report label. When the final result has been typed, the typewriter brings the next label into position. If the

8. Reporting phase The reporting phase program (figs. 5a, 5b, 6) is stored in file zero of the magnetic tape containing the profile results and is automatically loaded into the calculator upon entry of the instruction code in the data acquisition program. The program loads the prof'fie results from magnetic tape and outputs them via the typewriter either upon a self-adhesive label mounted on continuous stationery or on the record sheet. The typing of both these formats requires manual setting of typewriter tabs by the operator.

266

R.M. James, Off-line processing for biochemistry profiling

r.ABEL C

I

Recall initial I cun no. (I). ~I

T~rpe cud number - I

I

I

Recall result of I cup no. (I). I I Type resultl

The typewriter is set up by the operator and the program started by the entry of the profile cup number (I) at which typing is to commence. Tape file (I) is located and loaded into calculator registers 1 to 18. Count (a) is set to 1 and the value of (I) tested to set the red or black ribbon. A program loop is set up where (a) specifies the register from which the result is recalled and its format for typing. A space is left if the result equals zero. When all the results in a profile have been typed, the value of (I) is typed as confirmation. (I) is increased by 1 and tested. If divisible by 10, the calibration standard is omitted arid if divisible by 20, the program stops for a new sheet to be placed in the typewriter.

Yes ~ 9. Discussion

I oto

Fig. 4a.

I

LABEL B

I

Enter, print & store required cup no.

I Find & load tape file into calculator I

1

Print code no. & result for each test

Fig. 4b. results of the last cup number (F) have been typed, the program stops, otherwise (I) is incremented by 1 and the program returns to (S). Values of (I) corresponding to calibration standards or pool sera are incremented without the production of a label. The result typed in the Total Globulin box is derived by calculation. 8.2. Laboratory record sheet Each record sheet is prepared at the time of specimen reception as described above (fig. 6). Each sheet contains the results of 18 profiles including two pool sera. The results of a profile are typed in horizontal rows, alternate rows in red and black for ease of readhag.

Two other programs are routinely used with the system but are not described here. A simple loop program zeroes each register of the tape cassette prior to the profiling run. The second program is run at the end of the day to give a fuller statistical analysis of the results than that of the data acquisition program. The magnetic tape cassette has storage for approximately 280 18-channel profiles. In present use, a workload of more than 2000 peak heights per day cannot conveniently be entered into the system. The time required for the recording of nine blocks of results from the calculator is 4.5 minutes. During this period, the operator is free to set up the next chart on the chart reader. In this department, the peak heights are entered in batches of two or three blocks as soon as they are available from the analyser to avoid a backlog building up and causing delay. If typewriter failure occurs, results can be output from tape by the integral printer. A faulty tape unit can be bypassed and results typed directly out. In both cases, transcription of the results would be required. The most likely errors to occur in the use of the system are due to incorrect keyboard entries and missing a peak whilst reading in peak heights. To avoid these, keyboard entries are immediately confirmed on the integral printer, the cup number of the last positive peak height is printed on termination of entry and anomalies in drift readings will be seen. The contents of any file can be quickly checked by entry of code 999.

R.M. James, Off-line processingfor biochemistry profiling

I Initialise 1 registers. IReauest firstl cup no. (I) I

.I.

IEnter (I)l & IReeuest final ]

eu~ no. (P) & IEnter (F)]

I Request aatel & I Dnter date I (s)

~Find file (I) I

I r~oaa :rile ('r)" I from tape

I

I

cup no. &I date on label IT~r~e IRecall result I

~oo__q ooto sir ~ I / ~ e t fo=at

I

&

I ~oto

I

~,/a ~

I tvoe Recall, test & I each resultl

'in the profile I

Yes__4 s~oP I I ~.--~÷1 Eo

Fig.5a.

I,

yo~

I

267

R.M. James, Off-line processing for biochemistry profiling

268

Availability of the program s/a

Set red rlbbon on t?~ew~tter J

A

i, s/R B

A

The program is available from the author.

I Acknowledgment

~

Ye8

A

~en~ blacd~ribbon, ~ey~i~e~ F A Fig. 5b.

The system may be used for grouped analysis in addition to or instead of profiling. A different set of cup numbers would have to be assigned to each test group or different tape cassettes used. A separate report would be typed for'each group.

t

The author wishes to thank Dr P.W. Harvey for his help and encouragement throughout the programming and the writing of the paper.

References [1] P. Scott and A. Ramsey, (Abstract), Scan. J. Clin. Lab. Invest. 29, Suppl. 126 (1972) 15.7. [2] A. Ramsey and P. Scott, Comp. Progr. Biomed. 3 (1973) 175.

R.M. James, Off-line processingfor biochemistry profiling

Initialise registers. 1 Request first cup no. (I)

l

I

Enter & print (I)

'1

3

Find & load

"1

file (1) A

la°l/ Yes 'Set black ribbon I on type~.miter Test a to set ]correct format

,L

L r

[ Set red ribbon on typewriter

I

i Recall result I from register a | i

~Yes I T~peres~lt I

I

,

,

a=a+l

I

I-

Type cup. • ntunber-(I ) I i

No~

I!:

I STOF i Fig.6.

..... I ~y~eaepa°e ]

269

R.M. James, Off-line processing for biochemistry profiling

270

cup No: DATE OF REPORT:

32

15.09.75

Sodium

Potassium

Urea

Creatinine

TeK

mmol/I 133-152

mmol/l 3.5-5.6

mmol/l 2.5-6.7

IJmol/l 60-120

Units Range

3.9

6.8

133

83

Bilirubin

Tot. Protein

Albumin

Tot. Glob.

AIk. Phos.

Asp. Trans.

LDH

Teat

IJmol/I 2-15

g/I 63-82

g/I 35-53

g/I 18-36

mU/ml 21-94

mU/ml 8-40

mU/m[ 92-350

Units Range

14

60

52

28

56

Calcium mmol/I 2.1-2.8

Phosphate mmol/I 0.8-1.4

Urates pmol/I 120-420

1.93

0.89

240

Fig. 7. A self-adhesive report label.

Cholesterol mmol/I 40-6.5

Iron pmol/I 14-27

18

56 TIBC

~mol/I 6-72

48

514 GOT mU/ml 4-28

Tnt Units Range

POOL SERUM

POOL SERUM

NAME

DATE:

W-D

4.0

142

4.7

3.8 5.9

137

!132

4 . 0 24.9 4.1

4.2 4.1

146 159

140 150

4.8

155

5.8

158

158

79

4.2

3.9

135

6.5

7.4

9.0

9.6

6.8

5 . 2 24.2

151

195

165

68

117

517

83

63

4.8

186

188

233

70

108

92

100

111

69

ORE

158 6.5

6.7

7.4

8.8

4.9

126

1~9i 4 . 2

5.5

137

5.7

4.1 11.4

146

U

2.7 11.5

K

145

NA

Fig. 8. Specimen laboratory record sheet.

,~IZP!

10

11

7

6

15

10

14

12

10

15

6

6

5

8

17

8

70

BIL

76

55

64

62

62

56

58

57

54

32

40

32

60 75

52

56

34

34

39

52

41

34

58

42

ALB

62

76

64

64

63

57

71

60

71

72

TP

47

25

32

55

55 28

51

113

59

36

68

25

45

16

27

94

26

54

51

ASP

55

118

56

56

89

47

53

54

38

90

51

102

57

85

ALP

2.28

1.93

2.46

2.28

2.52

2.19

1.82

2.56

2.15

2.15

2.54

2.15

CA

164

254

284

281

229

2.35

2.51

2.24

2.66

1.67

1569! 2 . 5 4

215

514

256

164

391

223

256

286

265

519

281

LDH

1.95

1.35

2.51

1.82

1.06

1.09

2.14

0.89

1.69

2.00

1.25

2.14

0.97

1.81

1.07

1.32

1.70

1.05

P

342

151

218

295

128

178

72

240

143

350

138

477

152

212

229

84

222

140

URA

OHO

31

19

25

20

5

12

24

18

6

52

22

6

14

7'

25

15

17

11

FE

PM

7~

48

41

39

38

37

36

35

34

53

32

31

29

28

27

26

25

24

25

22

21

IBC GGT CUP

AM/

--4

¢%

c~

An off-line data processing system for biochemistry profiling based on a 2K programmable calculator.

An off-line data processing system based on a Hewlett Packard 2K programmable calculator to be used with a biochemistry profiling system is described...
582KB Sizes 0 Downloads 0 Views