source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRAR03.m@ 846

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1LRAR03 ;DAL/HOAK NEW ARCHIVE PURGERSET ; 12/12/96 10:16 ;
2 ;;5.2;LAB SERVICE;**111**;Sep 27, 1994
3INIT ; Building block from...\/
4 ; LRCHIVK SLC/RWF - REMOVE OLD LAB DATA ; 12/14/87 15:46 ;
5 Q
6EN ;from LRCHIV
7 U IO W @IOF,"START OF PURGE PASS" D STAMP^LRX
8 S LRDFN=0
9DFN ;
10 S LRDFN=$O(^LAR("Z",LRDFN)) G END:LRDFN="" W "."
11 F LRSS="CH","MI" I $O(^LAR("Z",LRDFN,LRSS,0)) S LRIDT=0,C1=1 D LAB,UPDT
12 S ^LAB(69.9,1,"PURGE LRDFN")=LRDFN G DFN
13LAB ;
14 S LRIDT=$O(^LAR("Z",LRDFN,LRSS,LRIDT)) Q:LRIDT<1
15 ;
16 IF '$D(^LR(LRDFN,LRSS,LRIDT,0)) W !,"Data not found." G LAB
17 ;
18 ; If data in ^LRA matches ^LR purge
19 ;
20 IF ^LAR("Z",LRDFN,LRSS,LRIDT,0)=^LR(LRDFN,LRSS,LRIDT,0) D G LAB
21 . K ^LAR("Z",LRDFN,LRSS,LRIDT),^LR(LRDFN,LRSS,LRIDT)
22 . S ^LR(LRDFN,"T",P1,0)=P1
23 W !,"^LAR and ^LR don't match, Data not purged.",!
24 W " LRDFN = ",LRDFN_" Sub Script = "_LRSS_" LRIDT = "_LRIDT
25 W !?4,"^LR("_LRDFN_","_LRSS_","_LRIDT_",0) = ",^LR(LRDFN,LRSS,LRIDT,0)
26 W !,"^LAR(""Z"","_LRDFN_","_LRSS_","_LRIDT_",0) = ",^LAR("Z",LRDFN,LRSS,LRIDT,0)
27 K ^LAR("Z",LRDFN,LRSS,LRIDT)
28 G LAB
29 Q
30UPDT S X=0,LRCNT=0
31 F I=0:0 S X=$O(^LR(LRDFN,LRSS,X)) Q:X<1 S LRCNT=LRCNT+1
32 I LRCNT=0 S ^LR(LRDFN,LRSS,0)=$S(LRSS="CH":"^63.04D",1:"^63.05DA") Q
33 S $P(^LR(LRDFN,LRSS,0),U,4)=LRCNT
34 Q
35END W !!,"**PURGE PASS DONE ** " D STAMP^LRX Q ;W @IOF G H^XUS
36 Q
37SET ;
38 Q
39 ;CAN BE USED INSTEAD OF dots TO SHOW USER HOW JOB IS PROCEEDING
40 ;
41 ; LRJT0=4th piece of 0 node of file being searched
42 ;F LRI=1:1:70 S DX=LRI*2+2,DY=6 X IOXY D
43JOBTIME ;
44 ;
45 Q:$E(IOST,1,2)'="C-"
46 S OK=1
47 S DX=LRI*2+2,DY=6 X IOXY D
48 . I '$G(LRTIC) S LRTIC=$P((LRJT0/70),".")
49 . Q:(LRI+1)'>LRTIC S LRTIC=LRTIC+$P((LRJT0/70),".") S LRIN=LRIN+1
50 . S DX=2+LRIN,DY=8 X IOXY
51 . W IORVON
52 . W ">"
53 . W IORVOFF
54 . S DX=16,DY=17 X IOXY
55 . W IODHLT,$E((LRIN/LRJT0)*100,1,4),"% of ^LR"
56 . S DX=16,DY=18 X IOXY
57 . W IODHLB,$E((LRIN/LRJT0)*100,1,4),"% of ^LR"
58 . D FLASH
59 I 'OK D SCRNOFF
60 Q
61SCRNON ;
62 QUIT
63FLASH ;
64 QUIT
65SCRNOFF ;
66 QUIT
Note: See TracBrowser for help on using the repository browser.