Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SROMENU

SROMENU.m

Go to the documentation of this file.
SROMENU ;BIR/MAM - OPERATION MENU OPTIONS ;27 Sep 2013  1:03 PM
 ;;3.0;Surgery;**52,67,69,104,107,100,134,175,177,182,184,205**;24 Jun 93;Build 12
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
 ; RBD - 10/15/13 - PATCH 177 - Code Set labeling issue fixed.
 N SRICDV S SRICDV=$$ICDSTR^SROICD(SRTN)
 ; End 177
 K ^TMP("SR182",$J) ; set by 'AO' x-ref
 ;
 ;;**hard set of POSSIBLE ITEM RETENTION (#630) field in SURGERY (#130) file disabled in SR*3.0*205
 ;S:$P($G(^SRF(SRTN,25)),"^",6)="" $P(^SRF(SRTN,25),"^",6)="Y"
 ;
 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
 D WSXR^SRTOVRF(SRTN)
 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
 ; RBD - 10/15/13 - PATCH 177 - Code set labeling issue fixed.
 N SRICDV S SRICDV=$$ICDSTR^SROICD(SRTN)
 ; End 177
 D ^SROLOCK I SROLOCK S Q3("VIEW")=""
 N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
 K ^TMP("SR182",$J) ; set by 'AO' x-ref
 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
 D WSXR^SRTOVRF(SRTN)
 I '$P(^SRF(SRTN,0),"^",20) D ^SROPCE1
 I $D(SRODR) D ^SROCON1
 S SROERR=SRTN G END
VERF ; Time Out Verified Utilizing Checklist
 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-VERF]",ST="TIME OUT CHECKLIST-1"_$S(SROLOCK:" **LOCKED",1:"") D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
 I $$VER1^SRTOVRF(SRTN) K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,DR="[SROMEN-VERF1]",ST="TIME OUT CHECKLIST-2"_$S(SROLOCK:" **LOCKED",1:"") D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
 I $$VER2^SRTOVRF(SRTN) K DR S SRDTIME=DTIME,DTIME=3600,DIE=130,DA=SRTN,DR="[SROMEN-VERF2]",ST="TIME OUT CHECKLIST-3"_$S(SROLOCK:" **LOCKED",1:"") D EN2^SROVAR,^SRCUSS S DTIME=SRDTIME I $D(Q3("VIEW")) K Q3("VIEW") G END
 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
 ; JAS - 11/13/13 - PATCH 177 - Added next line to fix code set labeling issue.
 K SRICDV S SRICDV=$$ICDSTR^SROICD(SRTN)
 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
 ; RBD - 10/15/13 - PATCH 177 - Code set labeling issue fixed.
 N SRICDV S SRICDV=$$ICDSTR^SROICD(SRTN)
 ; End 177
 D ^SROLOCK I SROLOCK S Q3("VIEW")=""
 N SRLCK S SRLCK=$$LOCK^SROUTL(SRTN) I 'SRLCK G END
 D HWT^SROACL2 ; SR*3*184 change - retrieve height & weight from vital
 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
 N SRICDV S SRICDV=$$ICDSTR^SROICD(SRTN)
 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
AB ; sromen-abort
 D RT K SRODR
 G:'$G(SRTN) NO D ^SROLOCK G:SROLOCK END
 D ABORT^SRSCAN0 D END K DR,SRTN