source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XUCSXRT.m@ 1608

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1XUCSXRT ;SFISC/HVB - CROSS-SITE RTs for 486 SITES ;2/18/96 15:07
2 ;;7.3;TOOLKIT;**14**;Dec 15, 1995
3A Q:'$$CHKF^XUCSUTL S U="^" S:'$D(DT) DT=$$HTFM^XLFDT($H,1)
4 S XUCSEND=0 D A3^XUCSUTL3 G XIT:XUCSEND
5 S %ZIS="Q" D ^%ZIS I POP S POP=0 G XIT
6 I $D(IO("Q")) D G XIT
7 . S ZTSAVE("XUCS*")="",ZTRTN="DQ^XUCSXRT",ZTDESC="MPM X-SITE RT REPORT",ZTIO=ION
8 . S %DT="AEFRX",%DT("A")="Queue for what DATE/TIME? ",%DT("B")="NOW",%DT(0)="NOW" D ^%DT K %DT
9 . I +Y'<0 S ZTDTH=Y D ^%ZTLOAD,HOME^%ZIS
10 . K IO("Q")
11 U IO W:$E(IOST)="C" #
12DQ ; Dequeue entry point
13 K RT S X=0 F S X=$O(^XUCS(8987.2,X)) Q:X]"@"!(X="") S NODE=^(X,0) D:$E(NODE,4,5)="CS"&($D(^XUCS(8987.2,X))>1)
14 . S FMDT=XUCSBD F S FMDT=$O(^XUCS(8987.2,"C",FMDT)) Q:FMDT="" Q:$D(^(FMDT,X))
15 . Q:FMDT="" S Y=$O(^XUCS(8987.2,"C",FMDT,X,0))-1
16 . F S Y=$O(^XUCS(8987.2,X,1,Y)) Q:Y]"@"!(Y="") S FMDT=^(Y,0) Q:FMDT>(XUCSED+.24) D:FMDT>XUCSBD&($D(^(5))>1)
17 . . I $E($P(FMDT,".",2),1,2)<12,XUCSRT="P" Q
18 . . I $E($P(FMDT,".",2),1,2)>11,XUCSRT="A" Q
19 . . S $P(RT(NODE),"^",18)=$P($G(RT(NODE)),"^",18)+1
20 . . S $P(RT(NODE),"^",19)=$P(RT(NODE),"^",19)+$P(FMDT,"^",3)
21 . . F I=1:1:17 S $P(RT(NODE),"^",I)=$P(RT(NODE),"^",I)+$P(^XUCS(8987.2,X,1,Y,5,I,0),"^",3)
22P S Y=XUCSBD D DD^%DT S BD=Y,Y=XUCSED D DD^%DT S ED=Y D HDR
23 S (NODE,OSITE)="" F S NODE=$O(RT(NODE)) Q:NODE="" D
24 . S SITE=$E(NODE,1,3) I SITE'=OSITE S OSITE=SITE D:$Y>(IOSL-7) HFF W !?1,$P($G(^DIC(4,SITE,0)),"^"),!
25 . S SUM=0 F I=1:1:12 S SUM=SUM+$P(RT(NODE),"^",I)
26 . I SUM S (GT30,CUM)=0,CNT=$P(RT(NODE),"^",18),SET=$P(RT(NODE),"^",19) D
27 . . F I=13:1:17 S GT30=GT30+$P(RT(NODE),"^",I)
28 . . W $J(NODE,7),$J(CNT,4,0),$J(SUM+GT30/SET,5,1)
29 . . S (I,SEET)=0 F M=0.3,1.4,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,15,25 S I=I+1,SEET=SEET+($P(RT(NODE),"^",I)*M)
30 . . W $J(SEET/SUM,6,2),?23
31 . . F I=1:1:12 S CUM=CUM+$P(RT(NODE),"^",I) S PCT=CUM/SUM*100 I PCT<99.9,I'=8,I'=9 W $J(PCT,5,1)
32 . . S GT30PCT=GT30/(GT30+SUM)*100 W:GT30PCT>0.045 ?73,$J(GT30PCT,4,2) W !
33XIT I $E($G(IOST))'="C",'$D(ZTQUEUED) D ^%ZISC
34 K BD,CNT,CUM,ED,FMDT,GT30,GT30PCT,I,M,NODE,OSITE,PCT,RT,SEET,SET,SITE,SUM
35 K X,XUCSBD,XUCSED,XUCSEND,XUCSRT,Y
36 Q
37HFF W #
38HDR W ?4,"MPM X-Site Response Time Report for ",BD," to ",ED," (",$S(XUCSRT="A":"AM)",XUCSRT="P":"PM)",1:"AM&PM)")
39 W !?2,"Node",?9,"N",?13,"R/S",?19,"RT",?24,"<1S <2S <3S <4S <5S <6S <7S <10 <20 <30 ",?74,">30"
40 W !?1 F I=1:1:76 W "="
41 W ! Q
Note: See TracBrowser for help on using the repository browser.