AWCMCPR2 ;VISN7/THM-CPRS MONITOR HTML CODE [07-07-2003] ; 09 Jan 2004 3:43 PM ;;7.3;TOOLKIT;**84**;Jan 9, 2004 ; PART1 ; HTML section that creates java applet data ; Variables are killed in calling program ; W "",! W "",! W "CPRS Response Time Monitor - "_AWCDIVN1_"",! W "",! S AWCY99=$P(^AWC(177100.12,1,0),U),AWCY99=$P($G(^DIC(4,+AWCY99,0)),U) W "

"_AWCY99_"

" W "

","CPRS Response Time Monitor for facility -- "_AWCDIVN1,!,"

" D MENU1 W "",! Q ; PART2 ; W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! W "",! F AWCTYPE=0:0 S AWCTYPE=$O(TMP("AWC",AWCTYPE)) Q:AWCTYPE="" S AWCPCNTR=0 F AWCTIME=-9999:0 S AWCTIME=$O(TMP("AWC",AWCTYPE,AWCTIME)) Q:AWCTIME="" DO .S AWCPCNTR=AWCPCNTR+1,AWCPARAM="VAL"_AWCPCNTR_"_L"_AWCTYPE .W "0:$J(AWCSEC/AWCCNT,0,2),1:0) .I AWCAVG>AWCMXSEC S AWCAVG=AWCMXSEC ;if average is greater than max, set to max .I AWCAVG<0 S AWCAVG=0 ;no values <0 .W +AWCAVG,""">",! ;finish the HTML line .; add the time values for the x-axis S AWCLBCNT=1 F YYY=-99999:0 S YYY=$O(^TMP("AWCTTIM",$J,YYY)) Q:YYY="" DO .S Y=YYY .I Y<0 S Y=9999+Y .; format the time, if necessary .I $L(Y)=1 S Y="000"_Y .I $L(Y)=2 S Y="00"_Y .I $L(Y)=3 S Y="0"_Y .W "",! S AWCLBCNT=AWCLBCNT+1 ; add the remaining values S (AWCLBCNT,AWCVCNTR)=(AWCLBCNT-1) ;label count and value count W !,"",! W "",! W "",!! W "",! W "",! W "","

Response Time In Seconds for the last "_AWCDHRS_" hours

","
",! W "
Last updated: " D NOW^%DTC S Y=% X ^DD("DD") W Y,!,"
",! D CLOSE^%ZISH("AWCCPR1"),^%ZISC K AWCY99 Q ; MENU1 ; java script - makes drop-down menu ; goes in portion of page Q:$O(AWCFDIV(0))="" ;only one division at facility S AWCWEBRT=$P(^AWC(177100.12,1,0),U,15) Q:AWCWEBRT="" ;not set up in param file S AWCWL=$L(AWCWEBRT) I $E(AWCWEBRT,AWCWL,AWCWL)'="/" S AWCWEBRT=AWCWEBRT_"/" W "
",! W "",! W "",! W "
",! Q