source: FOIAVistA/trunk/r/SURGERY-SR/SRORUT2.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1SRORUT2 ;B'HAM ISC/MAM - OR UTILIZATION (CONT) ; 11 MAY 1990 1:45 PM
2 ;;3.0; Surgery ;;24 Jun 93
3 S (CNT,OP)=0,Y=SRSD D D^DIQ S SRSDT=Y,Y=SRED D D^DIQ S SREDT=Y
4 S X=$P(SRSDT," ") D MON S SRSDT=X_" "_$P(SRSDT," ",2,5)
5 S X=$P(SREDT," ") D MON S SREDT=X_" "_$P(SREDT," ",2,5)
6 S SRUTL=^TMP("SR",$J),CASES=$P(SRUTL,"^")
7 S SROPT=$P(SRUTL,"^",2),SRPOSS=$P(SRUTL,"^",3),SROT=$P(SRUTL,"^",4),SRUTT=SROPT-SROT
8 S SRPERC=$S(SRPOSS:SRUTT/SRPOSS*100,1:"-") S:SRPERC SRPERC=(SRPERC+.5\1*1)_"%"
9 S HOUR=SROPT\60,MIN=SROPT#60 S HOUR=$S(HOUR>1:HOUR_" hrs",HOUR=1:HOUR_" hr",1:"") S MIN=$S(MIN>1:MIN_" mins",MIN=1:MIN_" min",1:"")
10 D TIMES S SROPTIME=TIME
11 S SROT=$P(SRUTL,"^",4),HOUR=SROT\60,MIN=SROT#60 S HOUR=$S(HOUR>1:HOUR_" hrs",HOUR=1:HOUR_" hr",1:"") S MIN=$S(MIN>1:MIN_" mins",MIN=1:MIN_" min",1:"")
12 D TIMES S SROT=TIME
13 W !!,"TOTAL UTILIZATION FOR",!,"ALL ROOMS",?27,SRPERC,?54,CASES,?72,SROPTIME,?104,SROT,!! F LINE=1:1:132 W "="
14 Q
15TIMES ; put hrs and mins in readable format
16 I +HOUR,'+MIN S TIME=" "_HOUR Q
17 I +HOUR S TIME=HOUR_" and "_MIN Q
18 I +MIN S TIME=MIN
19 S TIME=" 0"
20 Q
21MON S X=$S(X["JAN":"January",X["FEB":"February",X["MAR":"March",X["APR":"April",X["MAY":"May",X["JUN":"June",X["JUL":"July",X["AUG":"August",X["SEP":"September",X["OCT":"October",X["NOV":"November",1:"December")
22 Q
Note: See TracBrowser for help on using the repository browser.