source: WorldVistAEHR/trunk/r/SURGERY-SR/SRODLT2.m@ 700

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

initial load of WorldVistAEHR

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