source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRLL1.m@ 1042

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1LRLL1 ;SLC/RWF - LOAD LIST SCAN. ;2/19/91 10:42 ;
2 ;;5.2;LAB SERVICE;**116**;Sep 27, 1994
3L1 ;
4 L +^LRO(68.2,LRINST,3) I $S($D(^LRO(68.2,LRINST,3)):^(3),1:0) W !,"Waiting for another build to finish.",$C(7),!!?5,"Type '^' to stop waiting." L -^LRO(68.2,LRINST,3) R X:DTIME G L1:X'[U Q
5 G QUEUE:$D(IO("Q")) S (LRPCUP,LRAN,LRCNT)=0
6 S ^LRO(68.2,LRINST,3)=1
7LP D BUILD
8 I $D(LRALL) S LRPROF=$O(^LRO(68.2,LRINST,10,LRPROF)) I LRPROF>0 D PROF^LRLL3 G LP
9 S ^LRO(68.2,LRINST,3)=0 L -^LRO(68.2,LRINST,3) I LRCNT=0 W !,"NO ENTRYS ADDED",$C(7) G END
10 S ^LRO(68.2,LRINST,2)=DT_U_$P(^LRO(68.2,LRINST,2),U,2,3)_U_LRTRAY_U_LRCUP
11 W !!,"LOAD LIST IS NOW SET UP"
12 K LRCTRL,LRDSPEC,^TMP($J) D EN1^LRLLP G END ;GO PRINT
13BUILD W !!,"STARTING PROFILE ",$P(^LRO(68.2,LRINST,10,LRPROF,0),U,1)," SCAN",!
14 I '$D(LRSTAR) S LRAD1=LRAD,LRAN=LRST-.01 F S LRAN=$O(^LRO(68,LRAA,1,LRAD,1,LRAN)),LRADD=1 Q:LRAN<1!(LRAN>LRLLT) I $D(^(LRAN,0))#2 S LRDFN=+^(0),LRDPF=$P(^(0),U,2),LRIDT=9999999-$S($D(^(3)):^(3),1:0) D TCHK
15 I $D(LRSTAR) S LRAD1=$E(LRSTAR,1,3)-1_"0000" S A=0 F S LRAD1=$O(^LRO(68,LRAA,1,LRAD1)) Q:LRAD1<1!(LRAD1>LRWDTL) D AC
16 I $O(^TMP($J,-1,0))="" W !,"NO ENTRY FOUND!",! Q
17 F LRIIX=0:0 S LRIIX=$O(^LRO(68.2,LRINST,10,LRPROF,4,LRIIX)) Q:LRIIX<1 S LRIFN=+^(LRIIX,0),LRCT=LRIFN D CTRLTST^LRLL3 S LRTST=$P(X,U,2,99) D GNCUP^LRLL2,LRCTRL^LRLL4
18 W !,"SCAN DONE." D ^LRLL2
19 Q
20TC1 IF '$P(T1,U,3),'$P(T1,U,5),$D(LRTP(+T1)),(LRTP(+T1)=LRSP!(LRTP(+T1)=""))
21 S:'$T&('LRSPLIT) E=1 I $T S LRTSL(I1)=T1,LRUS=$S(LRUS>$P(T1,U,2):+$P(T1,U,2),1:LRUS) Q
22 Q
23TCHK ;CHECK THAT TEST ORDERED IS IN PROFILE
24 Q:'$D(^LRO(68,LRAA,1,LRAD1,1,LRAN,3)) I 'LRLLP(1) Q:'$P(^(3),U,3)
25 K LRTSL S E=0,LRUS=$S($P(^LRO(68,LRAA,1,LRAD1,1,LRAN,0),U,3)'=LRAD1:LRHOLD,1:99),LRSP=$S($D(^(5,1,0)):+^(0),1:0) Q:$D(LRDSPEC(LRSP))
26 S I1=0 F S I1=$O(^LRO(68,LRAA,1,LRAD1,1,LRAN,4,I1)) Q:I1<1 S T1=^(I1,0) I '$L($P(^(0),U,3)) D TC1 Q:E
27 Q:'$D(LRTSL)!E X LRURX I $T S ^TMP($J,-1,LRUS,LRAN)=LRAA_U_LRAD1_U_LRAN_U_LRPROF_U_LRSP S I=0 F S I=$O(LRTSL(I)) Q:I<1 S ^TMP($J,-1,LRUS,LRAN,I)=LRTSL(I)
28 Q
29AC S LRTK=LRSTAR-.00001 F S LRTK=$O(^LRO(68,LRAA,1,LRAD1,1,"E",LRTK)) Q:LRTK<1!(+LRLST>1&(LRTK\1>+LRLST)) D AC1
30 Q
31AC1 S LRAN=0 F S LRAN=$O(^LRO(68,LRAA,1,LRAD1,1,"E",LRTK,LRAN)) Q:LRAN<1 I $D(^LRO(68,LRAA,1,LRAD1,1,LRAN,0))#2 S LRADD=1,LRDFN=+^(0),LRDPF=$P(^(0),U,2),LRIDT=9999999-$S($D(^(3)):^(3),1:0) D TCHK
32 Q
33QUEUE L -^LRO(68.2,LRINST,3) W ! S IOP="Q" D ^%ZIS I POP K IO("Q") G L1
34 I '$D(IO("Q")) G L1
35 S ZTRTN="DQ^LRLL1",ZTDESC="Load list",ZTSAVE("LR*")="" D ^%ZTLOAD K ZTSK S IOP=IO(0) D ^%ZIS D KILL^LRLLP Q
36DQ S U="^" U IO I $S($D(^LRO(68.2,LRINST,3)):^(3),1:0) S ZTDTH="120S",ZTIO="",ZTDESC="REQUEUE OF LOAD/WORK LIST " D REQ^%ZTLOAD Q
37 L +^LRO(68.2,LRINST,3):2 I '$T S ZTDTH="120S",ZTIO="",ZTDESC="REQUEUE OF LOAD/WORK LIST" D REQ^%ZTLOAD Q
38 S:$D(ZTQUEUED) ZTREQ="@" G L1
39LOCK L -^LRO(68.2,LRINST,3) L +^LRO(68,LRAA,.7) I '$D(LRAA(LRAA)),$S($D(^LRO(68,LRAA,.7)):^(.7),1:0) W:'$D(ZTQUEUED) !,"Waiting for access to the accession area" L -^LRO(68,LRAA,.7) H 30 G LOCK
40 S ^LRO(68,LRAA,.7)=1,LRAA(LRAA)="" L -^LRO(68,LRAA,.7) Q
41END ;from LRLL
42 K LRAA,LRDEF,LRTRANS,LRTYPE,LRURX,LRTP,LRST,LRDSPEC,LRFULL,LRHOLD,LRINST,LRLLINIT,LRLLP,LRLLT,LRMAXCUP,LRPROF,X,Y,LRAA,LRAD,LRADD,LRAD1
43 K LRIIX,LRPTRAY,LRLL1,LRLLX,LRPCUP,B,DOUT,E,I1,J1,LRCNT,LRCT,LRIFN,LRIO,LRLL2,LRLL3,LRLST,LRNOLABL,LRODT,LRPGM,LRSP,LRSPLIT,LRSTART,LRTI,LRTIME,LRTK,LRTRACNT,LRTST,LRUS,LRWDTL,T1
44 D KILL^LRLL Q
Note: See TracBrowser for help on using the repository browser.