SROAT0T ;B'HAM ISC/MAM - ATTENDING SURGEON CUMULATIVE ; [ 05/11/04 2:33 PM ]
;;3.0;Surgery;**50,129,182**;24 Jun 93;Build 49
I SRBOTH D PAGE I SRSOUT Q
D HDR Q:SRSOUT W !!,?1,"TOTAL CASES",?16,"ATTENDING CODE",!,?1,"-----------",?16,"--------------"
S (HDR,CODE)="" F S CODE=$O(^TMP("SRTOT",$J,CODE)) Q:CODE="" D PRINT
W !!,?1,$J(^TMP("SRTOT",$J),6),?16,"TOTAL CASES FROM "_$E(SRSD,4,5)_"/"_$E(SRSD,6,7)_"/"_$E(SRSD,2,3)_" TO "_$E(SRED,4,5)_"/"_$E(SRED,6,7)_"/"_$E(SRED,2,3)
Q
PRINT I 'CODE S SRCODE="ATTENDING/RES SUP CODE NOT ENTERED"
I CODE S Y=CODE,C=$P(^DD(130,.166,0),"^",2) D Y^DIQ S SRCODE=Y
W !,?1,$J(^TMP("SRTOT",$J,CODE),6),?16,SRCODE
Q
HDR ; print heading
I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
I +$Y W @IOF
W !,?(80-$L(SRINST)\2),SRINST,!,?32,"SURGICAL SERVICE",!,?22,"ATTENDING SURGEON CUMULATIVE REPORT"
W !,?(80-$L(SRFRTO)\2),SRFRTO
I $E(IOST)="P" W !,?30,SRPRINT,!!,?8,"REVIEWED BY: ",?53,"DATE REVIEWED: "
W ! F LINE=1:1:80 W "="
W !!,?(80-$L(SRATT)\2),SRATT,!,?(80-$L(SRATT)\2),SRATT1
Q
PAGE S X="" I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
I X["?" W !!,"Enter RETURN to continue printing the report, or '^' to exit from this option." G PAGE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROAT0T 1280 printed Dec 13, 2024@02:42 Page 2
SROAT0T ;B'HAM ISC/MAM - ATTENDING SURGEON CUMULATIVE ; [ 05/11/04 2:33 PM ]
+1 ;;3.0;Surgery;**50,129,182**;24 Jun 93;Build 49
+2 IF SRBOTH
DO PAGE
IF SRSOUT
QUIT
+3 DO HDR
if SRSOUT
QUIT
WRITE !!,?1,"TOTAL CASES",?16,"ATTENDING CODE",!,?1,"-----------",?16,"--------------"
+4 SET (HDR,CODE)=""
FOR
SET CODE=$ORDER(^TMP("SRTOT",$JOB,CODE))
if CODE=""
QUIT
DO PRINT
+5 WRITE !!,?1,$JUSTIFY(^TMP("SRTOT",$JOB),6),?16,"TOTAL CASES FROM "_$EXTRACT(SRSD,4,5)_"/"_$EXTRACT(SRSD,6,7)_"/"_$EXTRACT(SRSD,2,3)_" TO "_$EXTRACT(SRED,4,5)_"/"_$EXTRACT(SRED,6,7)_"/"_$EXTRACT(SRED,2,3)
+6 QUIT
PRINT IF 'CODE
SET SRCODE="ATTENDING/RES SUP CODE NOT ENTERED"
+1 IF CODE
SET Y=CODE
SET C=$PIECE(^DD(130,.166,0),"^",2)
DO Y^DIQ
SET SRCODE=Y
+2 WRITE !,?1,$JUSTIFY(^TMP("SRTOT",$JOB,CODE),6),?16,SRCODE
+3 QUIT
HDR ; print heading
+1 IF $DATA(ZTQUEUED)
DO ^SROSTOP
IF SRHALT
SET SRSOUT=1
QUIT
+2 IF +$Y
WRITE @IOF
+3 WRITE !,?(80-$LENGTH(SRINST)\2),SRINST,!,?32,"SURGICAL SERVICE",!,?22,"ATTENDING SURGEON CUMULATIVE REPORT"
+4 WRITE !,?(80-$LENGTH(SRFRTO)\2),SRFRTO
+5 IF $EXTRACT(IOST)="P"
WRITE !,?30,SRPRINT,!!,?8,"REVIEWED BY: ",?53,"DATE REVIEWED: "
+6 WRITE !
FOR LINE=1:1:80
WRITE "="
+7 WRITE !!,?(80-$LENGTH(SRATT)\2),SRATT,!,?(80-$LENGTH(SRATT)\2),SRATT1
+8 QUIT
PAGE SET X=""
IF $EXTRACT(IOST)'="P"
WRITE !!,"Press RETURN to continue, or '^' to quit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 IF X["?"
WRITE !!,"Enter RETURN to continue printing the report, or '^' to exit from this option."
GOTO PAGE
+2 QUIT