source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRNITEGL.m@ 1250

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1LRNITEGL ;SLC/FHS - LOAD INTERGRITY FILE 69.91 ; 4/7/89 00:05 ;
2 ;;5.2;LAB SERVICE;**153**;Sep 27, 1994
3LOAD ;load routines into ^LAB(69.91,VNODE
4 D STOP S LOAD=1 D VER^LRNITEG G STOP:Y<0
5 S %ZIS="Q" D ^%ZIS G STOP:POP I $D(IO("Q")) S ZTRTN="QUE^LRNITEGL",ZTDESC="Loading LR INTEGRITY file #69.91 ",ZTIO=ION F I="LOAD","VNODE","VER","VERDAT" S ZTSAVE(I)=""
6 I $D(IO("Q")) D ^%ZTLOAD G STOP
7 U IO
8QUE ;
9 S U="^",XLOAD=^%ZOSF("LOAD"),DIF="^TMP(""LRNITEG"""_","_$J_",",LROSYS=$S(^%ZOSF("OS")["M/VX"!(^%ZOSF("OS")["M/11")!(^%ZOSF("OS")["Open"):"^ROUTINE(ROU)",1:"^ (ROU)")
10 S DA(1)=VNODE,DIE="^LAB(69.91,"_DA(1)_",""ROU"",",DIC(0)="L",DLAYGO=69 S:'$D(@(DIE_"0)")) @(DIE_"0)")="^69.911^^" S DA=$S($D(@(DIE_"0)")):+$P(^(0),U,3)+1,1:1) S CNT=$S(DA=1:1,1:+$P(@(DIE_"0)"),U,4)+1)
11 S (DIC(0),ROU)="LR" F CNT=CNT:1 S ROU=$O(@LROSYS) Q:$E(ROU,1)'="L" W !,ROU D GLB
12 S $P(@(DIE_"0)"),U,3)=DA,CNT=CNT-1,$P(^(0),U,4)=CNT W !!,"TOTAL = ",CNT,@IOF S:$D(ZTQUEUED) ZTREQ="@" G STOP
13GLB ; Stuff new routine in to global using auto load [if it doesn,t already exist] in global
14 Q:$E(ROU,1,5)="LRINI"!($E(ROU,1,5)="LRLSI")
15 K ER2,^TMP("LRNITEG",$J) S X=ROU,XCNP=0 X XLOAD I '$D(^TMP("LRNITEG",$J,2,0)) S CNT=CNT-1 W !?10,"ONLY ONE LINE IN ROUTINE ",! Q
16 I $P(^TMP("LRNITEG",$J,2,0),";",4)'["LAB" S ER2=1 D ER2 S CNT=CNT-1 Q
17 I $P(^TMP("LRNITEG",$J,2,0),";",3)'=VER D ER2 S CNT=CNT-1 Q
18 I $D(@(DIE_"""B"","""_ROU_""")")) S CNT=CNT-1 Q
19GLB1 I $D(@(DIE_DA_",0)")) S DA=DA+1 G GLB1
20 K ^TMP("LRNITEG",$J) S DR=".01///^S X="""_ROU_""";" D ^DIE
21 S $P(@(DIE_"0)"),U,3)=DA,$P(^(0),U,4)=CNT Q
22STOP ; clean-up
23 D ^%ZISC K DIC,DIE,%ZIS,ER2
24 K A,BIT,CNT,DLAYGO,DIF,ER,I,II,IX,L,LN,LOAD,LROSYS,NT,ROU,SIZE,VER,VERDDT,VNODE,XBIT,XCMP,XCNP,XLOAD,XSIZE,XTEST,YBIT,^TMP("LRNITEG",$J) Q
25ER2 ; Error msg when the version being loaded do not match the version selected for auto loading
26 I $D(ER2) W !?10,ROU," WAS NOT LOADED",! K ER2 Q
27 W !?10,ROU," is version ",$S($L($P(^TMP("LRNITEG",$J,2,0),";",3)):$P(^(0),";",3),1:"Unknown ")," NOT LOADED",$C(7),! Q
Note: See TracBrowser for help on using the repository browser.