SROCMP2 ;BIR/MAM - PERIOPERATIVE OCCURRENCES REPORT ;02/02/06
;;3.0;Surgery;**38,50,153,175**;24 Jun 93;Build 6
HDR ; print heading
I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
I SRHDR D HDR2 Q:SRSOUT S SRHDR=0
W:$Y @IOF W !,?(132-$L(SRINST)\2),SRINST,?120,"PAGE ",PAGE
W !,?58,"SURGICAL SERVICE",?100,"REVIEWED BY: ",!,?53,"PERIOPERATIVE OCCURRENCES"_$S(SRBOTH1="I":"-INTRAOP",SRBOTH1="P":"-POSTOP",SRBOTH1="B":"-INTRAOP/POSTOP",1:""),?100,"DATE REVIEWED: "
W !,?(132-$L(SRFRTO)\2),SRFRTO,?100,SRPRINT
W !!!,?1,"PATIENT",?29,$S(SRSEL=2:"SURGICAL SPECIALTY",1:"ATTENDING SURGEON"),?80,"OCCURRENCE(S) - (DATE)",?125,"OUTCOME"
W !,?3,"ID#",?29,$S(SRSEL=3:"SURGICAL SPECIALTY",1:"PRINCIPAL OPERATION"),?80,"TREATMENT",!,"OPERATION DATE",?29,$S(SRSEL=3:"PRINCIPAL OPERATION",1:""),!
F I=1:1:132 W "="
S PAGE=PAGE+1 I '$D(^TMP("SR",$J)) Q
N SRY S SRY=$S(SRSEL=2:"ATTENDING",SRSEL=3:"CATEGORY",1:"SPECIALTY")_": "_SRSS W !,?(132-$L(SRY)\2),SRY,! F LINE=1:1:132 W "-"
Q
HDR2 ; more heading
F I=$Y:1:IOSL-9 W !
W ! F LINE=1:1:IOM W "-"
W !,"OUTCOMES: U - UNRESOLVED, I - IMPROVED, W - WORSE, D - DEATH"
W:SRBOTH1="B" !,?11,"'*' Represents Postoperative Occurrences" W ! F LINE=1:1:IOM W "-"
S SRHDR=0 I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROCMP2 1364 printed Nov 22, 2024@17:52:45 Page 2
SROCMP2 ;BIR/MAM - PERIOPERATIVE OCCURRENCES REPORT ;02/02/06
+1 ;;3.0;Surgery;**38,50,153,175**;24 Jun 93;Build 6
HDR ; print heading
+1 IF $DATA(ZTQUEUED)
DO ^SROSTOP
IF SRHALT
SET SRSOUT=1
QUIT
+2 IF SRHDR
DO HDR2
if SRSOUT
QUIT
SET SRHDR=0
+3 if $Y
WRITE @IOF
WRITE !,?(132-$LENGTH(SRINST)\2),SRINST,?120,"PAGE ",PAGE
+4 WRITE !,?58,"SURGICAL SERVICE",?100,"REVIEWED BY: ",!,?53,"PERIOPERATIVE OCCURRENCES"_$SELECT(SRBOTH1="I":"-INTRAOP",SRBOTH1="P":"-POSTOP",SRBOTH1="B":"-INTRAOP/POSTOP",1:""),?100,"DATE REVIEWED: "
+5 WRITE !,?(132-$LENGTH(SRFRTO)\2),SRFRTO,?100,SRPRINT
+6 WRITE !!!,?1,"PATIENT",?29,$SELECT(SRSEL=2:"SURGICAL SPECIALTY",1:"ATTENDING SURGEON"),?80,"OCCURRENCE(S) - (DATE)",?125,"OUTCOME"
+7 WRITE !,?3,"ID#",?29,$SELECT(SRSEL=3:"SURGICAL SPECIALTY",1:"PRINCIPAL OPERATION"),?80,"TREATMENT",!,"OPERATION DATE",?29,$SELECT(SRSEL=3:"PRINCIPAL OPERATION",1:""),!
+8 FOR I=1:1:132
WRITE "="
+9 SET PAGE=PAGE+1
IF '$DATA(^TMP("SR",$JOB))
QUIT
+10 NEW SRY
SET SRY=$SELECT(SRSEL=2:"ATTENDING",SRSEL=3:"CATEGORY",1:"SPECIALTY")_": "_SRSS
WRITE !,?(132-$LENGTH(SRY)\2),SRY,!
FOR LINE=1:1:132
WRITE "-"
+11 QUIT
HDR2 ; more heading
+1 FOR I=$Y:1:IOSL-9
WRITE !
+1 WRITE !
FOR LINE=1:1:IOM
WRITE "-"
+2 WRITE !,"OUTCOMES: U - UNRESOLVED, I - IMPROVED, W - WORSE, D - DEATH"
+3 if SRBOTH1="B"
WRITE !,?11,"'*' Represents Postoperative Occurrences"
WRITE !
FOR LINE=1:1:IOM
WRITE "-"
+4 SET SRHDR=0
IF $EXTRACT(IOST)'="P"
WRITE !!,"Press RETURN to continue, or '^' to quit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+5 QUIT