source: WorldVistAEHR/trunk/r/SURGERY-SR/SRODLT1.m@ 691

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

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1SRODLT1 ;B'HAM ISC/ADM - REPORT OF DELAY TIME (CONT) ; 14 FEB 1992 10:45 AM
2 ;;3.0; Surgery ;;24 Jun 93
3 S ^TMP("SR",$J)="0^0" D UTIL
4 D HDR S SRREA=0 F S SRREA=$O(^TMP("SR",$J,SRREA)) Q:'SRREA!(SRSOUT) S REASON=$P(^SRO(132.4,SRREA,0),"^") D DELAY
5 D:'SRSOUT TOTAL
6 Q
7DELAY ; print delay reason data
8 I $Y+5>IOSL D HDR I SRSOUT Q
9 S Y=^TMP("SR",$J,SRREA),SRDLAY=$P(Y,"^"),SRDLT=$P(Y,"^",2)
10 W !,$E(REASON,1,30),?33,$J(SRDLAY,5),?46,$J(SRDLT,5)
11 Q
12TOTAL ; print delay reason totals
13 I $Y+5>IOSL D HDR I SRSOUT Q
14 S Y=^TMP("SR",$J),SRDLAY=$P(Y,"^"),SRDLT=$P(Y,"^",2)
15 W !!,?24,"TOTAL",?32,$J(SRDLAY,6),?45,$J(SRDLT,6)
16 Q
17HDR ; print heading
18 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
19 I SRHDR,$E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit. " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
20 W:$Y @IOF W !,?(80-$L(SRINST)\2),SRINST,?72,"PAGE ",PAGE,!,?29,"Report of Delay Times"
21 W !,?27,"From "_SRSDT_" To "_SREDT,! I $E(IOST)="P" W "Printed: "_SRPRINT,!,?21,"Reviewed by:",?45,"Date Reviewed:",!
22 W !,?34,"# OF",?45,"MINUTES",!,"DELAY REASON",?33,"DELAYS",?45,"DELAYED",! F LINE=1:1:80 W "="
23 S SRHDR=1,PAGE=PAGE+1
24 Q
25UTIL ; set ^TMP
26 S SRREA=0 F S SRREA=$O(^TMP("SR",$J,SRREA)) Q:'SRREA!(SRSOUT) D SET
27 Q
28SET ;
29 S Y=^TMP("SR",$J,SRREA),$P(^TMP("SR",$J),"^")=$P(^TMP("SR",$J),"^")+$P(Y,"^"),$P(^TMP("SR",$J),"^",2)=$P(^TMP("SR",$J),"^",2)+$P(Y,"^",2)
30 Q
Note: See TracBrowser for help on using the repository browser.