SROAPRE2 ;BIR/MAM - EDIT PAGE 2 PREOP ;11/26/07
;;3.0; Surgery ;**38,47,125,153,166**;24 Jun 93;Build 6
D @EMILY Q
1 ; edit renal information
W ! K DIR S X=$P(SRAO(1),"^") I X'="" S DIR("B")=X
S DIR(0)="130,243",DIR("A")="RENAL" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
I X="@" S SRCAT="Renal" D SURE Q:SRSOUT G:'SRYN 1 S $P(^SRF(SRTN,200),"^",37)="" S (SRAX,X)="" D NOREN Q
S SRAX=Y,$P(^SRF(SRTN,200),"^",37)=SRAX I Y["N" D NOREN Q
I Y["Y" D REN
Q
2 ; edit CNS information
W ! K DIR S X=$P(SRAO(2),"^") I X'="" S DIR("B")=X
S DIR(0)="130,210",DIR("A")="CENTRAL NERVOUS SYSTEM" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
I X="@" S SRCAT="Central Nervous System" D SURE Q:SRSOUT G:'SRYN 2 S $P(^SRF(SRTN,200),"^",18)="" S (SRAX,X)="" D NOCNS Q
S SRAX=Y,$P(^SRF(SRTN,200),"^",18)=SRAX I Y["N" D NOCNS Q
I Y["Y" D CNS
Q
3 ; edit nutritional/immune/other info
W ! K DIR S X=$P(SRAO(3),"^") I X'="" S DIR("B")=X
S DIR(0)="130,245",DIR("A")="NUTRITIONAL/IMMUNE/OTHER" D ^DIR K DIR I $D(DUOUT) S SRSOUT=1 Q
I X="@" S SRCAT="Nutritional/Immune/Other" D SURE Q:SRSOUT G:'SRYN 3 S $P(^SRF(SRTN,200),"^",44)="" S (SRAX,X)="" D NONUT Q
S SRAX=Y,$P(^SRF(SRTN,200),"^",44)=SRAX I Y["N" D NONUT Q
I Y["Y" D NUT
Q
REN ; renal
W ! K DR,DIE S DA=SRTN,DIE=130,DR="328T;211T" D ^DIE K DR
S SRACLR=0
Q
NOREN ; no renal problems
F I=38,39 S $P(^SRF(SRTN,200),"^",I)=SRAX
Q
CNS ; cns
W ! K DR,DIE S DIE=130,DA=SRTN,DR="332T;333T;400T;334T;335T;336T;401T;" D ^DIE K DR,DIE
S SRACLR=0
Q
NOCNS ; no CNS problems
F I=19,21,24:1:27,29 S $P(^SRF(SRTN,200),"^",I)=SRAX
Q
NUT ; nutritional/immune/other
W ! K DR,DIE S DIE=130,DA=SRTN,DR="338T;218T;339T;215T;216T;217T;338.1T;338.2T;218.1T;269T" D ^DIE K DA,DIE,DR
S SRACLR=0
Q
NONUT ; no nutritional/immune/other
F I=45:1:50 S $P(^SRF(SRTN,200),"^",I)=SRAX
F I=3,4,8 S $P(^SRF(SRTN,206),"^",I)=SRAX
S:SRAX="N" $P(^SRF(SRTN,200.1),"^",3)=$S($P($G(VADM(5)),"^")="M":"NA",1:"NO")
S:SRAX="" $P(^SRF(SRTN,200.1),"^",3)=""
Q
RET W !! K DIR S DIR(0)="E" D ^DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
SURE W ! K DIR S DIR("A")=" Sure you want to delete all "_SRCAT_" information ? ",DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR S SRYN=Y I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
DEL W !!,?10,"Deleting all "_SRCAT_" information... "
Q
NO2ALL ; set all fields to NO
S SRAX="N",$P(^SRF(SRTN,200),"^",37)=SRAX D NOREN
S $P(^SRF(SRTN,200),"^",18)=SRAX D NOCNS
S $P(^SRF(SRTN,200),"^",44)=SRAX D NONUT
Q
SROAPRE2 ;BIR/MAM - EDIT PAGE 2 PREOP ;11/26/07
+1 ;;3.0; Surgery ;**38,47,125,153,166**;24 Jun 93;Build 6
+2 DO @EMILY
QUIT
1 ; edit renal information
+1 WRITE !
KILL DIR
SET X=$PIECE(SRAO(1),"^")
IF X'=""
SET DIR("B")=X
+2 SET DIR(0)="130,243"
SET DIR("A")="RENAL"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET SRSOUT=1
QUIT
+3 IF X="@"
SET SRCAT="Renal"
DO SURE
IF SRSOUT
QUIT
IF 'SRYN
GOTO 1
SET $PIECE(^SRF(SRTN,200),"^",37)=""
SET (SRAX,X)=""
DO NOREN
QUIT
+4 SET SRAX=Y
SET $PIECE(^SRF(SRTN,200),"^",37)=SRAX
IF Y["N"
DO NOREN
QUIT
+5 IF Y["Y"
DO REN
+6 QUIT
2 ; edit CNS information
+1 WRITE !
KILL DIR
SET X=$PIECE(SRAO(2),"^")
IF X'=""
SET DIR("B")=X
+2 SET DIR(0)="130,210"
SET DIR("A")="CENTRAL NERVOUS SYSTEM"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET SRSOUT=1
QUIT
+3 IF X="@"
SET SRCAT="Central Nervous System"
DO SURE
IF SRSOUT
QUIT
IF 'SRYN
GOTO 2
SET $PIECE(^SRF(SRTN,200),"^",18)=""
SET (SRAX,X)=""
DO NOCNS
QUIT
+4 SET SRAX=Y
SET $PIECE(^SRF(SRTN,200),"^",18)=SRAX
IF Y["N"
DO NOCNS
QUIT
+5 IF Y["Y"
DO CNS
+6 QUIT
3 ; edit nutritional/immune/other info
+1 WRITE !
KILL DIR
SET X=$PIECE(SRAO(3),"^")
IF X'=""
SET DIR("B")=X
+2 SET DIR(0)="130,245"
SET DIR("A")="NUTRITIONAL/IMMUNE/OTHER"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET SRSOUT=1
QUIT
+3 IF X="@"
SET SRCAT="Nutritional/Immune/Other"
DO SURE
IF SRSOUT
QUIT
IF 'SRYN
GOTO 3
SET $PIECE(^SRF(SRTN,200),"^",44)=""
SET (SRAX,X)=""
DO NONUT
QUIT
+4 SET SRAX=Y
SET $PIECE(^SRF(SRTN,200),"^",44)=SRAX
IF Y["N"
DO NONUT
QUIT
+5 IF Y["Y"
DO NUT
+6 QUIT
REN ; renal
+1 WRITE !
KILL DR,DIE
SET DA=SRTN
SET DIE=130
SET DR="328T;211T"
DO ^DIE
KILL DR
+2 SET SRACLR=0
+3 QUIT
NOREN ; no renal problems
+1 FOR I=38,39
SET $PIECE(^SRF(SRTN,200),"^",I)=SRAX
+2 QUIT
CNS ; cns
+1 WRITE !
KILL DR,DIE
SET DIE=130
SET DA=SRTN
SET DR="332T;333T;400T;334T;335T;336T;401T;"
DO ^DIE
KILL DR,DIE
+2 SET SRACLR=0
+3 QUIT
NOCNS ; no CNS problems
+1 FOR I=19,21,24:1:27,29
SET $PIECE(^SRF(SRTN,200),"^",I)=SRAX
+2 QUIT
NUT ; nutritional/immune/other
+1 WRITE !
KILL DR,DIE
SET DIE=130
SET DA=SRTN
SET DR="338T;218T;339T;215T;216T;217T;338.1T;338.2T;218.1T;269T"
DO ^DIE
KILL DA,DIE,DR
+2 SET SRACLR=0
+3 QUIT
NONUT ; no nutritional/immune/other
+1 FOR I=45:1:50
SET $PIECE(^SRF(SRTN,200),"^",I)=SRAX
+2 FOR I=3,4,8
SET $PIECE(^SRF(SRTN,206),"^",I)=SRAX
+3 IF SRAX="N"
SET $PIECE(^SRF(SRTN,200.1),"^",3)=$SELECT($PIECE($GET(VADM(5)),"^")="M":"NA",1:"NO")
+4 IF SRAX=""
SET $PIECE(^SRF(SRTN,200.1),"^",3)=""
+5 QUIT
RET WRITE !!
KILL DIR
SET DIR(0)="E"
DO ^DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT
SURE WRITE !
KILL DIR
SET DIR("A")=" Sure you want to delete all "_SRCAT_" information ? "
SET DIR("B")="NO"
SET DIR(0)="YA"
DO ^DIR
KILL DIR
SET SRYN=Y
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT
DEL WRITE !!,?10,"Deleting all "_SRCAT_" information... "
+1 QUIT
NO2ALL ; set all fields to NO
+1 SET SRAX="N"
SET $PIECE(^SRF(SRTN,200),"^",37)=SRAX
DO NOREN
+2 SET $PIECE(^SRF(SRTN,200),"^",18)=SRAX
DO NOCNS
+3 SET $PIECE(^SRF(SRTN,200),"^",44)=SRAX
DO NONUT
+4 QUIT