source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAH717D.m@ 1800

Last change on this file since 1800 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1LAH717D ;SLC/DLG - HITATCHI 717 BUILD DOWNLOAD FILE. ;7/20/90 08:38 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;Call with LRLL = load list to build
4 ;Call with LRTRAY1 = Starting tray number
5 ;Call with LRLL = Auto Instrument pointer
6 ;Call with LRFORCE=1 if send tray and cup.
7 S:$D(ZTQUEUED) ZTREQ="@" S (LRECORD,BLK)="" F I=1:1:42 S BLK=BLK_" "
8A F LRTRAY=LRTRAY1:0 D:$D(^LRO(68.2,LRLL,1,LRTRAY)) TRAY S LRTRAY=$O(^LRO(68.2,LRLL,1,LRTRAY)),LRCUP1=1 Q:LRTRAY'>0
9 S LREND=0 Q
10TRAY F LRCUP=(LRCUP1-1):0 S LRCUP=$O(^LRO(68.2,LRLL,1,LRTRAY,1,LRCUP)) Q:LRCUP'>0 D SAMPLE I $L(LRECORD)>99 D SEND S LRECORD=""
11 I $L(LRECORD),$L(LRECORD)<100 D PAD
12 I C#2 D PAD1
13 Q
14SAMPLE S LRL=^LRO(68.2,LRLL,1,LRTRAY,1,LRCUP,0),LRAA=+LRL,LRAD=$P(LRL,"^",2),LRAN=$P(LRL,"^",3) D TEST
15 I $L(LRECORD)=0 S LRECORD="K"_$E(BLK,1,15)_$E(100000+LRAN,2,6)_$E(BLK,1,42)_X
16 E S LRECORD=LRECORD_"K"_$E(BLK,1,15)_$E(100000+LRAN,2,6)_$E(BLK,1,42)_X
17 Q
18SEND S:'$D(^LA(LRINST,"C")) ^LA(LRINST,"C")=0,^("C",0)=0
19 S (C,^LA(LRINST,"C"))=^LA(LRINST,"C")+1,^("C",C)=LRECORD
20 Q
21TEST S X="" D ZERO
22 F LRTEST=0:0 S LRTEST=$O(^LRO(68.2,LRLL,1,LRTRAY,1,LRCUP,1,LRTEST)) Q:LRTEST'>0 D T2
23 Q
24T2 Q:'$D(^TMP($J,LRTEST))
25 S X1="" F I=0:0 S I=$O(^TMP($J,LRTEST,I)) Q:I'>0 S Y=^(I) S X=$E(X,1,(Y-1))_"1"_$E(X,(Y+1),35)
26 Q
27PAD S X="" D ZERO S LRECORD=LRECORD_"K" F I=$L(LRECORD)+1:1:196 S LRECORD=LRECORD_" "
28 S LRECORD=$E(LRECORD,1,115)_"0000"_$E(LRECORD,120,161)_X D SEND Q
29PAD1 S X="" D ZERO S LRECORD="" F I=1:1:196 S LRECORD=LRECORD_" "
30 S LRECORD="K"_$E(LRECORD,2,17)_"0000"_$E(LRECORD,22,63)_X_"K"_$E(LRECORD,100,115)_"0000"_$E(LRECORD,120,161)_X D SEND Q
31 Q
32ZERO F I=1:1:34 S X=X_"0"
33 S X=X_" " Q
Note: See TracBrowser for help on using the repository browser.