SROMENU ;B'HAM ISC/MAM - OPERATION MENU OPTIONS ;10/13/04
;;3.0; Surgery ;**52,67,69,104,107,100,134**;24 Jun 93
TECH ; sromen-anes tech
G:'$G(SRTN) NO D ^SROLOCK G:SROLOCK END
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR,SRODR S DR="[SROMEN-ANES TECH]",DIE=130,DA=SRTN D ^DIE I $D(SRODR) D ^SROCON1
G END
OP ; sromen-op
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DR="[SROMEN-OPER]",DA=SRTN,ST="OPERATION"_$S(SROLOCK:" **LOCKED",1:"") D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
I $D(SRODR) D ^SROCON1
S SROERR=SRTN G END
COMP ; sromen-comp
K SRODR
G:'$G(SRTN) NO D ^SROLOCK G:SROLOCK END
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR W @IOF,! S DIE=130,DA=SRTN,DR="[SROMEN-COMP]" D ^DIE
I $D(SRODR) D ^SROCON1
G END
SHORT ; sromen-out
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,DR="[SROMEN-OUT]",ST="SHORT SCREEN"_$S(SROLOCK:" **LOCKED",1:"") D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
I $D(SRODR) D ^SROCON1
S SROERR=SRTN G END
PACU ; sromen-pacu
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S DIE=130,DA=SRTN,ST="PACU"_$S(SROLOCK:" **LOCKED",1:""),DR="[SROMEN-PACU]" D EN2^SROVAR,^SRCUSS I $D(Q3("VIEW")) K Q3("VIEW") G END
I $D(SRODR) D ^SROCON1
S SROERR=SRTN D ^SROERR0
G END
POST ; sromen-post
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,ST="POST OPERATION"_$S(SROLOCK:" **LOCKED",1:""),DR="[SROMEN-POST]" D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
I $D(SRODR) D ^SROCON1
S SROERR=SRTN G END
REF ; sromen-refer
K SRODR
G:'$G(SRTN) NO D ^SROLOCK G:SROLOCK END
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
W @IOF K DR S DIE=130,DA=SRTN,DR="[SROMEN-REFER]" W !! D ^DIE
I $D(SRODR) D ^SROCON1
G END
STAFF ; sromen-staff
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,ST="SURGICAL STAFF"_$S(SROLOCK:" **LOCKED",1:""),DR="[SROMEN-STAFF]" D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
I $D(SRODR) D ^SROCON1
S SROERR=SRTN G END
START ; sromen-start
D RT K SRODR
G:'$G(SRTN) NO D ^SROLOCK I SROLOCK S Q3("VIEW")=""
N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,ST="STARTUP"_$S(SROLOCK:" **LOCKED",1:""),DR="[SROMEN-START]" D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
I $D(SRODR) D ^SROCON1
S SROERR=SRTN G END
REV ; review request information (request menu)
K SRNEWOP D ^SROPS D RT G:'$G(SRTN) END
K Y,DR S Q3("VIEW")="",ST="REVIEW REQUEST",DIC=130,DA=SRTN,DR="[SRSREQV]" D EN2^SROVAR,^SRCUSS K DR,SRTN
G END
NO ;
W !!,"An operative procedure must be selected to use this option.",!
W !!,"Press RETURN to continue " R X:DTIME
END ;
I $D(SROERR) D ^SROERR0
I $G(SRTN) D UNLOCK^SROUTL(SRTN)
K SRDTIME D ^SRSKILL W @IOF
Q
RT ; start RT logging
I $G(SRTN),$D(XRTL) S XRTN="SROMENU" D T0^%ZOSV
Q
SROMENU ;B'HAM ISC/MAM - OPERATION MENU OPTIONS ;10/13/04
+1 ;;3.0; Surgery ;**52,67,69,104,107,100,134**;24 Jun 93
TECH ; sromen-anes tech
+1 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
GOTO END
+2 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+3 KILL DR,SRODR
SET DR="[SROMEN-ANES TECH]"
SET DIE=130
SET DA=SRTN
DO ^DIE
IF $DATA(SRODR)
DO ^SROCON1
+4 GOTO END
OP ; sromen-op
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET SRDTIME=DTIME
SET DTIME=3600
SET DIE=130
SET DR="[SROMEN-OPER]"
SET DA=SRTN
SET ST="OPERATION"_$SELECT(SROLOCK:" **LOCKED",1:"")
DO EN2^SROVAR
DO ^SRCUSS
SET DTIME=SRDTIME
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF '$PIECE(^SRF(SRTN,0),"^",20)
DO ^SROPCE1
+6 IF $DATA(SRODR)
DO ^SROCON1
+7 SET SROERR=SRTN
GOTO END
COMP ; sromen-comp
+1 KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
GOTO END
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
WRITE @IOF,!
SET DIE=130
SET DA=SRTN
SET DR="[SROMEN-COMP]"
DO ^DIE
+5 IF $DATA(SRODR)
DO ^SROCON1
+6 GOTO END
SHORT ; sromen-out
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET SRDTIME=DTIME
SET DTIME=3600
SET DIE=130
SET DA=SRTN
SET DR="[SROMEN-OUT]"
SET ST="SHORT SCREEN"_$SELECT(SROLOCK:" **LOCKED",1:"")
DO EN2^SROVAR
DO ^SRCUSS
SET DTIME=SRDTIME
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF '$PIECE(^SRF(SRTN,0),"^",20)
DO ^SROPCE1
+6 IF $DATA(SRODR)
DO ^SROCON1
+7 SET SROERR=SRTN
GOTO END
PACU ; sromen-pacu
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET DIE=130
SET DA=SRTN
SET ST="PACU"_$SELECT(SROLOCK:" **LOCKED",1:"")
SET DR="[SROMEN-PACU]"
DO EN2^SROVAR
DO ^SRCUSS
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF $DATA(SRODR)
DO ^SROCON1
+6 SET SROERR=SRTN
DO ^SROERR0
+7 GOTO END
POST ; sromen-post
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET SRDTIME=DTIME
SET DTIME=3600
SET DIE=130
SET DA=SRTN
SET ST="POST OPERATION"_$SELECT(SROLOCK:" **LOCKED",1:"")
SET DR="[SROMEN-POST]"
DO EN2^SROVAR
DO ^SRCUSS
SET DTIME=SRDTIME
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF '$PIECE(^SRF(SRTN,0),"^",20)
DO ^SROPCE1
+6 IF $DATA(SRODR)
DO ^SROCON1
+7 SET SROERR=SRTN
GOTO END
REF ; sromen-refer
+1 KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
GOTO END
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 WRITE @IOF
KILL DR
SET DIE=130
SET DA=SRTN
SET DR="[SROMEN-REFER]"
WRITE !!
DO ^DIE
+5 IF $DATA(SRODR)
DO ^SROCON1
+6 GOTO END
STAFF ; sromen-staff
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET SRDTIME=DTIME
SET DTIME=3600
SET DIE=130
SET DA=SRTN
SET ST="SURGICAL STAFF"_$SELECT(SROLOCK:" **LOCKED",1:"")
SET DR="[SROMEN-STAFF]"
DO EN2^SROVAR
DO ^SRCUSS
SET DTIME=SRDTIME
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF '$PIECE(^SRF(SRTN,0),"^",20)
DO ^SROPCE1
+6 IF $DATA(SRODR)
DO ^SROCON1
+7 SET SROERR=SRTN
GOTO END
START ; sromen-start
+1 DO RT
KILL SRODR
+2 IF '$GET(SRTN)
GOTO NO
DO ^SROLOCK
IF SROLOCK
SET Q3("VIEW")=""
+3 NEW SRLCK
SET SRLCK=$$LOCK^SROUTL(SRTN)
IF 'SRLCK
GOTO END
+4 KILL DR
SET SRDTIME=DTIME
SET DTIME=3600
SET DIE=130
SET DA=SRTN
SET ST="STARTUP"_$SELECT(SROLOCK:" **LOCKED",1:"")
SET DR="[SROMEN-START]"
DO EN2^SROVAR
DO ^SRCUSS
SET DTIME=SRDTIME
IF $DATA(Q3("VIEW"))
KILL Q3("VIEW")
GOTO END
+5 IF '$PIECE(^SRF(SRTN,0),"^",20)
DO ^SROPCE1
+6 IF $DATA(SRODR)
DO ^SROCON1
+7 SET SROERR=SRTN
GOTO END
REV ; review request information (request menu)
+1 KILL SRNEWOP
DO ^SROPS
DO RT
IF '$GET(SRTN)
GOTO END
+2 KILL Y,DR
SET Q3("VIEW")=""
SET ST="REVIEW REQUEST"
SET DIC=130
SET DA=SRTN
SET DR="[SRSREQV]"
DO EN2^SROVAR
DO ^SRCUSS
KILL DR,SRTN
+3 GOTO END
NO ;
+1 WRITE !!,"An operative procedure must be selected to use this option.",!
+2 WRITE !!,"Press RETURN to continue "
READ X:DTIME
END ;
+1 IF $DATA(SROERR)
DO ^SROERR0
+2 IF $GET(SRTN)
DO UNLOCK^SROUTL(SRTN)
+3 KILL SRDTIME
DO ^SRSKILL
WRITE @IOF
+4 QUIT
RT ; start RT logging
+1 IF $GET(SRTN)
IF $DATA(XRTL)
SET XRTN="SROMENU"
DO T0^%ZOSV
+2 QUIT