source: FOIAVistA/tag/r/SURGERY-SR/SRORATS.m@ 1316

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1SRORATS ;B'HAM ISC/MAM - CANCEL RATES ; 12 DEC 1990 8:30 AM
2 ;;3.0; Surgery ;;24 Jun 93
3 D PAGE S SRSS=0 F S SRSS=$O(^TMP("SRT",$J,SRSS)) Q:SRSS=""!(SRSOUT) D SPEC
4 Q
5SPEC I $Y+4>IOSL D PAGE I SRSOUT Q
6 S SRSSNM=$S(SRSS="ZZ":"SURGICAL SPECIALTY NOT ENTERED",1:SRSS)
7 S X=^TMP("SRT",$J,SRSS),Y=$P(X,"^"),TOTAL=Y+$P(X,"^",3),X=$P(X,"^",2),CANRATE=$S(Y>0:X/Y*100,1:0),CANRATE=CANRATE+.5\1*1
8 S TOTRATE=$S(TOTAL>0:X/TOTAL*100,1:0),TOTRATE=TOTRATE+.5\1*1
9 W !,SRSSNM,?49,$J(TOTRATE,3)," %",?69,$J(CANRATE,3)," %"
10 Q
11PAGE S X="" I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
12 I X["?" W !!,"Enter RETURN to continue printing this report, or '^' to exit from this option." G PAGE
13HDR ; print heading
14 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
15 S X=$E(SRSD,4,5)_"/"_$E(SRSD,6,7)_"/"_$E(SRSD,2,3),Y=$E(SRED,4,5)_"/"_$E(SRED,6,7)_"/"_$E(SRED,2,3),PAGE=PAGE+1 I $Y W @IOF
16 I $E(IOST)="P" W !,?(80-$L(SRINST)\2),SRINST,?70,"PAGE: "_PAGE,!,?32,"SURGICAL SERVICE",!,?20,"CANCELLATION RATE REPORT, SPECIALTY SUMMARY",!,?27,"FROM "_X_" TO "_Y
17 I $E(IOST)="P" S X=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3) W !,?29,"DATE PRINTED: "_X
18 I $E(IOST)="P" W !,?21,"REVIEWED BY:",?45,"DATE REVIEWED:",!
19 W !,?45,"PERCENT AVOIDABLE CANCELLATIONS",!,?43,"-----------------------------------"
20 W !,"SURGICAL SPECIALTY",?43,"SCHEDULED CASES CANCELLED CASES"
21 W ! F LINE=1:1:80 W "="
22 W !!
Note: See TracBrowser for help on using the repository browser.