source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XDRDSTAT.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: 2.5 KB
Line 
1XDRDSTAT ;SF-IRMFO/IHS/OHPRD/JCM - DISPLAY STATUS OF SEARCH; [ 08/13/92 09:50 AM ] ;08/24/99 10:01
2 ;;7.3;TOOLKIT;**23,30,42**;Apr 25, 1995
3 ;;
4 ;
5START ;
6 N XDRDISP
7 S XDRQFLG=0,XDRDISP=1
8 ;D FILE G:XDRQFLG END
9 W:$D(IOF) @IOF
10 F XDRICNT=0:0 S XDRICNT=$O(^VA(15.1,XDRICNT)) Q:XDRICNT'>0!(XDRQFLG) D
11 . S XDRFL=+XDRICNT
12 . S XDRD(0)=^VA(15.1,XDRICNT,0)
13 . S XDRD(0,0)=$P(^DIC(XDRICNT,0),U)
14 . K X,Y
15 . D DISP
16 ;D DISP
17END D EOJ
18 Q
19 ;
20FILE ;
21 W !!
22 S DIC(0)="QEAZ"
23 S DIC("A")="Select duplicate search file to check status for: "
24 S DIC="^VA(15.1," D ^DIC K DIC,X
25 I Y=-1 S XDRQFLG=1 G FILEX
26 S XDRFL=+Y
27 S XDRD(0)=Y(0),XDRD(0,0)=Y(0,0) K Y
28 W !!
29FILEX Q
30 ;
31ASK ;
32 Q
33 ;
34DISP ;
35 N XLABEL
36 F XDRDI=.02,.03,.04,.05,.07,.08,".10" S Y=$P(XDRD(0),U,+$P(XDRDI,".",2)),C=$P(^DD(15.1,+XDRDI,0),U,2) D Y^DIQ S XDRD(+XDRDI)=Y K Y,DIQ,C
37 I XDRD(.02)["RUN",+$G(^VA(15.1,XDRFL,3))>0,($$NOW^XLFDT()-^VA(15.1,XDRFL,3))>.0015 D
38 . S $P(^VA(15.1,XDRFL,0),U,2)="e"
39 . S XDRD(.02)="ERROR(STOP)"
40 . S $P(^VA(15.1,XDRFL,0),U,10)=$P(^VA(15.1,XDRFL,0),U,10)+$$FMDIFF^XLFDT($P(^(3),U),$P(^(0),U,3),2)
41 . S $P(^VA(15.1,XDRFL,3),U)=""
42 K XDRDI
43 S G=^DIC(XDRFL,0,"GL")_"0)",XDRD("TOT")=$P(@G,U,4) S:XDRD("TOT")<XDRD(.07)!(XDRD(.02)["COMP") XDRD("TOT")=XDRD(.07) S XDRD("%")=$S(XDRD("TOT")>0:$J((XDRD(.07)/XDRD("TOT")*100),5,1),1:0)
44 S XLABEL="Date Completed"
45 I XDRD(.02)["COMP" S XDRD(.03)=XDRD(.04)
46 D
47 . N X,%DT,Y
48 . S XLABEL=" hours:min "
49 . S XDRD(.04)=+XDRD(.1)
50 . I XDRD(.02)["RUN" D
51 . . S X=XDRD(.03),%DT="TS" D ^%DT
52 . . S XDRD(.04)=XDRD(.04)+$$FMDIFF^XLFDT($$NOW^XLFDT(),Y,2)
53 . S T=XDRD(.04)\3600,XDRD(.04)=XDRD(.04)-(T*3600)
54 . S XDRD(.04)=(XDRD(.04)\60)
55 . I XDRD(.04)<10 S XDRD(.04)="0"_XDRD(.04)
56 . S XDRD(.04)=T_":"_XDRD(.04)
57 . S XDRD(.04)=$E(" ",1,(18-$L(XDRD(.04)\2)))_XDRD(.04)
58 W !!!!,?28,"Duplicate ",XDRD(0,0)," Search",!!
59 W "Search Type",?$S(XDRD(.1)>0:13,1:14),"Date ",$S(XDRD(.02)["COMP":"Completed",XDRD(.1)>0:"Restarted",1:"Started"),?32,"Status",?42,XLABEL,?61,"# Records Checked",!
60 S $P(XDRDLINE,"-",18)=""
61 W $E(XDRDLINE,1,11),?13,$E(XDRDLINE,1,14),?32,$E(XDRDLINE,1,6),?42,$E(XDRDLINE,1,14),?61,XDRDLINE,!!
62 W XDRD(.05),?13,$P(XDRD(.03),":",1,2),?32,XDRD(.02),?42,$P(XDRD(.04),":",1,2),?61,XDRD(.07) W:XDRD(.07)]"" "/",XDRD("TOT")," ",XDRD("%"),"%" W !!
63 W !,+$P(^VA(15.1,XDRFL,0),U,12)," Potential Duplicate pairs added to the DUPLICATE RECORD FILE (#15)",!
64 K XDRDLINE
65 I $D(^XTMP("XDRERR",XDRFL)) W !!,"ERROR: ",^(XDRFL),!!
66 I $D(XDRDISP) D
67 .W !!,"Press RETURN to continue or '^' to exit: " R X:DTIME S:'$T X=U
68 .S:X=U XDRQFLG=1
69 .W:$D(IOF) @IOF
70 Q
71 ;
72EOJ ;
73 K XDRD,XDRQFLG
74 Q
Note: See TracBrowser for help on using the repository browser.