source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRSTATUS.m@ 1553

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1LRSTATUS ;SLC/FHS - TO CHECK SYSTEM STATUS OF AUTO INSTRUMENT JOBS ;11/6/89 12:03
2 ;;5.2;LAB SERVICE;;Sep 27, 1994
3EN ;
4 D CLEAN W !! K DIC,LRPOSX,LRTOTX S (TOT,LAB)=0,DIC="^LAB(62.4,",DIC(0)="AZEQ",U="^",DIC("S")="I +Y<99" D ^DIC G:Y<1 CLEAN
5EN1 ;
6 I '$D(^LA(+Y,"I")) W !!?7,"No data for ",$P(^LAB(62.4,+Y,0),U) S LREND=1 Q
7 W !!?10,"Enter '^' to abort process ",$C(7),!
8 S LAROUT=$P(Y(0),U,3),LRINST=+Y,LRINSTN=$P(Y,U,2)
9 I LRINST#10=1 S LAB=1
10 I 'LAB W !!?10,LRINSTN," has ",^LA(LRINST,"I")," entries ",! S LRTOT=^("I") I $D(^("I",0)) W !?10,"And ",^(0)," have been processed ",! S LRPROS=^(0)
11LAB ;
12 W !!?10,"Checking process has started",!
13 G:LAB SYS R X:.01 G:X="^" CLEAN H 10 W !!,"CHECKING ",LRINSTN,! S TOT=TOT+1 I $D(^LA(LRINST,"I")),^("I")'=LRTOT S LRTOTX=^("I") W !,LRINSTN," is runing, now there are ",LRTOTX," entries in ^LA(",LRINST,! S LRTOT=LRTOTX
14 I '$D(^LA(LRINST,"I")) W !?10,LRINSTN," has been cleared " G CLEAN
15 I '$D(^LA(LRINST,"I",0)) W !?10,LRINSTN," NOT BEEN COMPLETELY SET UP YET " G CLEAN
16 I $D(^LA(LRINST,"I",0)),^LA(LRINST,"I",0)'=LRPROS S LRPROSX=^(0)
17 I $D(LRPROSX),LRPROSX'=LRPROS W !?7,LAROUT," routine is running - Now on entry ",LRPROSX S LRPROS=LRPROSX
18 I TOT=10,'$D(LRTOTX) W $C(7),!!?10,"No data is being processed OUT of ^LA( for ",LRINSTN
19 I TOT=10,'$D(LRPROSX) W $C(7),!!?10,"NO DATA IS BEING PROCESSED INTO ^LA( for ",LRINSTN
20 I TOT=10 G CLEAN
21 G LAB
22 Q
23SYS I '$D(^LA(LRINST,"R")) W !?7,LRINSTN," IS NOT RUNNING ",! G CLEAN
24 S LRTOT=^LA(LRINST,"R")
25SYS1 R X:.01 G:X="^" CLEAN H 10 S TOT=TOT+1 I '$D(^LA(LRINST,"R")) W !," DATA HAS BEEN CLEARED " G CLEAN
26 I ^LA(LRINST,"R")'=LRTOT W !,LRINSTN," IS RUNNING " S LRTOTX=1,LRTOT=^LA(LRINST,"R")
27 W !,"CHECKING " I TOT<10 G SYS1
28 I '$D(LRTOTX) W $C(7),!!,LAROUT," IS NOT RUNNING "
29CLEAN ;
30 K I,DIC,LAB,LAROUT,LRINST,LRPROSX,LRPROS,LRTOT,TOT,LRINSTN,Y Q
Note: See TracBrowser for help on using the repository browser.