SROCMP2 ;BIR/MAM - PERIOPERATIVE OCCURRENCES REPORT ;02/02/06
;;3.0; Surgery ;**38,50,153**;24 Jun 93;Build 11
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,!,?58,"SURGICAL SERVICE",?100,"REVIEWED BY: ",!,?53,"PERIOPERATIVE OCCURRENCES",?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 !,?11,"'*' Represents Postoperative Occurrences",! 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
SROCMP2 ;BIR/MAM - PERIOPERATIVE OCCURRENCES REPORT ;02/02/06
+1 ;;3.0; Surgery ;**38,50,153**;24 Jun 93;Build 11
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,!,?58,"SURGICAL SERVICE",?100,"REVIEWED BY: ",!,?53,"PERIOPERATIVE OCCURRENCES",?100,"DATE REVIEWED: "
+4 WRITE !,?(132-$LENGTH(SRFRTO)\2),SRFRTO,?100,SRPRINT
+5 WRITE !!!,?1,"PATIENT",?29,$SELECT(SRSEL=2:"SURGICAL SPECIALTY",1:"ATTENDING SURGEON"),?80,"OCCURRENCE(S) - (DATE)",?125,"OUTCOME"
+6 WRITE !,?3,"ID#",?29,$SELECT(SRSEL=3:"SURGICAL SPECIALTY",1:"PRINCIPAL OPERATION"),?80,"TREATMENT",!,"OPERATION DATE",?29,$SELECT(SRSEL=3:"PRINCIPAL OPERATION",1:""),!
+7 FOR I=1:1:132
WRITE "="
+8 SET PAGE=PAGE+1
IF '$DATA(^TMP("SR",$JOB))
QUIT
+9 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 "-"
+10 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 WRITE !,?11,"'*' Represents Postoperative Occurrences",!
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