SROAT1T ;B'HAM ISC/MAM - ATTENDING SURGEON CUMULATIVE ; [ 05/11/04 2:33 PM ]
;;3.0;Surgery;**50,129,182**;24 Jun 93;Build 49
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,"DATE PRINTED: ",SRPRINT,!!,?8,"REVIEWED BY: ",?53,"DATE REVIEWED: "
W ! F LINE=1:1:80 W "="
S SRSS=$P(^SRO(137.45,SRSS,0),"^") W !!,?(80-$L(SRSS)\2),SRSS
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROAT1T 1050 printed Oct 16, 2024@18:42:41 Page 2
SROAT1T ;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 DO HDR
if SRSOUT
QUIT
WRITE !!,?1,"TOTAL CASES",?16,"ATTENDING CODE",!,?1,"-----------",?16,"--------------"
+3 SET (HDR,CODE)=""
FOR
SET CODE=$ORDER(^TMP("SRTOT",$JOB,CODE))
if CODE=""
QUIT
DO PRINT
+4 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)
+5 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,"DATE PRINTED: ",SRPRINT,!!,?8,"REVIEWED BY: ",?53,"DATE REVIEWED: "
+6 WRITE !
FOR LINE=1:1:80
WRITE "="
+7 SET SRSS=$PIECE(^SRO(137.45,SRSS,0),"^")
WRITE !!,?(80-$LENGTH(SRSS)\2),SRSS
+8 QUIT