Microcomputer Applications and Technology =

Microcomputer
and Technology
Applications
=
Laboratory Tests for Fibrinogen
Our laboratory tests for fibrinogen were performed using the fibrometer and the fibrinogen kits supplied by
Dade and General Diagnostics. Both kits supply the
thrombin and a fibrinogen standard, which is run at different dilutions (concentrations). One of the kits includes
log/log graph paper to plot the calibration points and the
resulting curve.
After many technologists complained about how difficult the graph that showed the fibrinogen values was to
read because of the very fine lines, I decided that a computer-generated table would be a faster and more accurate
way of obtaining the results.
The technologist performs the test in duplicate, takes
the average of the two readings (in seconds), and finds the
corresponding fibrinogen value (in milligrams per deciliter) from the table, which is kept at the work station.
This program was written for the Commodore 64 and
includes several useful features. It allows any number of
standards greater than 2 to be entered for the calculation
of the curve, or the curve data can be directly entered. If
standard readings were entered, the program compares
them against the calculated curve and displays the values
recovered, the slope, y intercept, and coefficient of correlation. At this point, the data may be accepted or rejected.
"If a table is wanted, the operator is prompted to enter
information on the reagent used (lot number, expiration
date, and upper and lower linearity limits).—Antonino
Pira, MT(ASCP), California Medical Center Laboratory,
Los Angeles.
5 REM FIBRINOGEN TABLE
10 REM PROGRAM WRITTEN BY TONY PIRA 7-83, MODIFIED
3-85
30 PRINT CHR$(147) : REM CLEAR SCREEN
OO D p INIX"**** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "
34 PRINT"
QC
FIBRINOGEN"
pQIklT"**************************************************"
38 PRINT "THIS PROGRAM WILL GENERATE A
FIBRINOGEN TABLE";
40 PRINT "FROM RAW DATA OR FROM A GIVEN SLOPE AND
Y INTERCEPT.":PRINT" "
44 CLR : PRINT" "
46 PRINT'1. RAW DATA" : PRINT"2. SLOPE AND Y INTERCEPT"
: PRINT"3. QUIT"
52 PRINT" " : INPUT D
56 ON D GOTO 60,101, 3000
58 PRINT" ":PRINT"YOU MUST SELECT EITHER 1,2, OR
3.":GOTO 44
60 PRINT" ":PRINT"HOW MANY POINTS IN THE CURVE
?":PRINT" ":INPUT P
62 IFP = < 2 G O T 0 68
66 DIM SF(P),SS(P),S1(P),S2(P),S3(P),S4(P),S5(P),RCV(P) : GOTO
1110
68 PRINT"2 POINTS ARE SUFFICIENT TO DEFINE A LINEBUT
AT LEAST A THIRD POINT";
70 PRINT"MUST BE INCLUDED AS A CHECK. PLEASE REFER
TO FIBRINOGEN";
72 PRINT'CURVE PROCEDURE." : GOTO 44
80 PRINT" ":PRINT"DO YOU WANT TO:":PRINT" "
82 PRINT'1. REINPUT CURVE DATA"
84 PRINT"2. PRINT A TABLE BASED ON THESE DATA"
86 PRINT"3. STOP"
88 INPUT D : IF D<1 OR D>3 THEN GOTO 80
90 ON D GOTO 44,130,3000
100 REM * " * " " SLOPE AND Y INTER INFO INPUT * " " * "
101 PRINT"" : PRINT'WHAT IS THE SLOPE?" : INPUT M:M2 = M
120 PRINT'WHAT IS THE Y INTERCEPT?" : INPUT I:I2=I
125 GOTO 80
128 REM "
** REAGENTS INFO INPUT * " " * " * *
130 PRINT'WHAT IS THE THROMBIN LOT #?" : INPUT LOS :
PRINT " "
140 PRINT"EXPIRATION DATE? MONTH, YEAR" : INPUT MO$,
YE : PRINT " "
145 PRINT'WHAT IS THE FIBRINOGEN LINEARITY RANGE IN
MG/DL? (HIGH,LOW)"
147 INPUT HF.LF : IF HF = <LF GOTO 145
150 GOTO 2150
1105 REM ******** CALIBRATION POINTS INFO INPUT ********
1110 PRINT" ":PRINT"ENTER THE CONCENTRATION OF
FIBRINOGEN IN MG/DL FOLLOWED BY"; 1112 PRINT'THE CORRESPONDING SECONDS. EXAMPLE:
440,3.5" : PRINT" "
1120 FOR N = 1 TO P
1122 PRINT'STANDARD" N : INPUT SF(N),SS(N) : PRINT" "
1130 X =(LOG(SF(N))/LOG(10)) : Y = (LOG(SS(N))/LOG(10))
1140 S1=S1+(X*Y) :S2 = S2 + X :S3 = S3 + (X»X) :S4 = S4 + Y :
S5='S5 + (Y*Y) :NEXT
1198 REM ******** CALCULATION AND DISPLAY OF ****"**
1199 REM
SLOPE, Y INTERCEPT, COEF. OF COR. *****
1200 M = ((S1 - (S2*S4)/P)/(S3 - (S2*S2)/P))
1201 M1% = (M + 0.00005)*10000:M2 = M1%/10000
1202 I = ((S4 - M*S2)/P)
1203 11 % = (IH- 0.0005)*1000:12 = 11 %/1000
1204 R = ((S1 - (S2*S4)/P)/(SQR((S3 - (S2*S2)/P)*(S5 - (S4*S4)/
P))))
1205 R1% = (R + 0.00005)*10000:R2 = R1%/10000
1210 PRINT-COEFFICIENT OF CORRELATION . . . . ";R2
1212 PRINT'SLOPE
";M2
1214 PRINT'Y INTERCEPT
";I2
1218 REM *******
** CALIBRATION POINTS
COMPARED AGAINST CURVE ******
1219 REM ••********""«•*"*» RECOVERED VALUES AND
% RECOVERY DISPLAYED ******
1220 PRINT" ":PRINT"STANDARDS RECOVRD FROM CURVE
%":PRINT" "
1225 FORN = 1 TOP
1230 RCV (N) = EXP(LOG(10)*(((LOG(SS(N))/LOG(10))-I)/M)) :
RVD%=RCV(N)
1231 SR% = (RCV(N)/SF(N))M000:RP = (SR%/10)
1235 PRINTSF(N),SS(N),RVD%,RP:NEXT
1240 FOR N = 1 TO 2000 : NEXT : GOTO 80
2140 REM " " * * * " • TABLE HEADING PRINTED * " " " * * *
2150 OPEN 4,4 : PRINT#4, CHR$(27)CHR$(56):PRINT#4,
CHR$(30)
LABORATORY MEDICINE • VOL. 17, NO. 6, JUNE 1986 361
2155 PRINT#4," CALIFORNIA MEDICAL CENTER
LABORATORY, LOS ANGELES."
2156 PRINT#4," " : PRINT#4, " "
2158 PRINT#4,CHR$(31)"
FIBRINOGEN"
2159 PRINT#4,CHR$(30) : PRINT#4, " "
2161 PRINT#4,"THROMBIN LOT #"LO$", EXP. "MO$", "YE".";
2162 PRINT#4," SLOPE "M2", Y INT. "12"." : PRINT#4," "
2165 PRINT#4,"BELOW CORRESPONDING SECONDS FIND
FIBRINOGEN VALUES IN MG/DL";
2166 PRINT#4,"IF FIBRINOGEN > 800 OR < 50 MG/DL
CONSULT PROCEDURAL MANUAL."
2169 PRINT#4," " : PRINT#4," " : GOTO 2210
2205 REM « " « « » * • * » * * * * * " * " * " " * PRINTS SECONDS ROW,
1 SEC/LINE *******
2210 Y% = EXP(LOG(10)*(((LOG(HF)/LOG(10))*M) + I)) : Y = Y%
2215 A = Y
2220 N = 0
2225 IF A = >10 GOTO 2232
2230 PRINT#4,A;"
";
2231 GOTO 2238
2232 PRINT#4,A;" ";
2238 A = A*10
2240 A = ( A + 1 ) : C = A/10 : N = N + 1
2242 IF C>10 THEN GOTO 2254
2250 PRINT#4,C;" ";
2252 GOTO 2260
2254 PRINT#4,C;" ";
2260 IF N = 9 GOTO 2310
2270 GOTO 2240
2308 R E M . . « . . * „ . . . . . . . . * « . CALCULATES & PRINTS
FIBRINOGEN CONCENTRATION ****
2310 A = Y
2320 N = 0
2328 REM LINE 2330 DEFINES FUNCTION WHICH CONVERTS
SECONDS TO MG/DL
2330 DEF FN MG(A) = EXP(LOG(10)*(((LOG(A)/LOG(10))-I)/M))
2332 B = FN MG(A)
2340 B = B + 0.5:C% = B
2342 IF C%>HF GOTO 2500
2344 IF C%<LF GOTO 2720
2346 IF C%<100 GOTO 2352
2350 PRINT#4,C%;" ";
2351 GOTO 2360
2352
2360
2370
2380
2400
2410
2420
2500
2510
2718
2720
2722
2724
2726
2800
2804
3000
3020
PRINT#4,C%;" ";
A = A + 0.1 : N = N + 1
IF N = 10 GOTO 2400
GOTO 2330
Y = Y+1
PRINT#4, "
GOTO 2215
PRINT#4, "
";
GOTO 2360
REM ***"•"***
*** END OF TABLE
PRINT#4, "
PRINT#4, "
" : PRINT#4,
: PRINT#4, "
PRINT#4, "DATA FOR THE PREPARATION OF THIS
TABLE WERE OBTAINED BY:"
PRINT#4, "
" : PRINT#4, "NAME
DATE
"
PRINT#4, "
" : CLOSE 4
PRINT CHR$(147) : PRINT'1. REPEAT" : PRINT"2. QUIT":
INPUT D
ON D GOTO 30,3000
PRINT CHR$(147):PRINT"GOOD BYE": FOR N = 1 TO
2000;NEXT;PRINTCHR$(147)
END
Sample Report
CALIFORNIA MEDICAL CENTER LABORATORY, LOS ANGELES.
FIBRINOGEN
THROMBIN LOT #4W033, EXP. APR, 86 .
SLOPE -.9715 , Y INT. 3.185 .
BELOW CORRESPONDING SECONDS FIND FIBRINOGEN VALUES IN MG/DL. IF FIBRINOGEN
>800 OR <50 MG/DL CONSULT PROCEDURAL MANUAL.
2
2.1
2.2
2.3
2.4
772
25
740
2.6
711
2.7
684
2.8
658
2.9
635
3
613
3.1
593
3.2
574
3.3
556
3.4
539
3.5
523
3.6
508
3.7
494
3.8
481
3.9
468
4
456
4.1
445
4.2
434
4.3
423
4.4
413
4.5
404
4.6
395
4.7
386
4.8
378
4.9
370
5
363
5.1
355
5.2
348
5.3
341
5.4
335
5.5
329
5.6
323
5.7
317
5.8
311
5.9
306
3 6 2 LABORATORY MEDICINE • VOL. 17, NO. 6, JUNE 1986