SROAC ;B'HAM ISC/MAM - NON-CARDIAC COMPLICATIONS ; 4 MAR 1992 7:55 am
;;3.0; Surgery ;;24 Jun 93
S SRSOUT=0,DFN=$P(^SRF(SRTN,0),"^") D DEM^VADPT S SRANAME=$P(VADM(1),"^")_" ("_VA("PID")_")"
START Q:SRSOUT K SRAO,SRA D ^SROACS
ASK W !!,"Select Postoperative Complication: " R X:DTIME I '$T!("^"[X) G END
I '$D(SRAO(X)),(X'?1N1":"1N),(X'="A"),(X'="NONE") D HELP G:SRSOUT END G START
I X?1N1":"1N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>6)!(Y>Z) D HELP G:SRSOUT END G START
I X="NONE" K DR,DIE S DA=SRTN,DIE=130,DR="[SRA-NOCOMP]" D ^DIE G START
W @IOF,!,SRANAME,! F MOE=1:1:80 W "-"
I X="A" S X="1:6"
W !! I X?1N1":"1N D RANGE G START
I $D(SRAO(X)),+X=X S EMILY=X D ^SROAC2 G START
I $D(SRAO(X)) K DR,DIE S DA=SRTN,DR=$P(SRAO(X),"^",2)_"T",DIE=130 D ^DIE K DR G START
END Q
HELP W @IOF,!!!!,"Enter the number, number/letter combination, or range of numbers you want to",!,"edit. Examples of proper responses are listed below."
W !!,"1. Enter 'A' to update all complications.",!!,"2. Enter a number (1-6) to update the complications in that group. (For",!," example, enter '5' to update all cardiac complications)"
W !!,"3. Enter a number/letter combination to update a specific complication. (To ",!," update Acute Renal Failure, enter '3B')"
W !!,"4. Enter a range of numbers (1-6) separated by a ':' to enter a range of",!," complications. (For example, enter '2:4' to enter all respiratory, urinary",!," tract, and CNS complications)"
W !!,"5. Enter 'NONE' to enter 'NO' for all complications."
W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
Q
RANGE ; range of numbers
S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ^SROAC2
Q
RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
I X["?" W !!,"Enter <RET> to re-display all complication information, or '^' to return to",!,"the previous menu." G RET
Q
SROAC ;B'HAM ISC/MAM - NON-CARDIAC COMPLICATIONS ; 4 MAR 1992 7:55 am
+1 ;;3.0; Surgery ;;24 Jun 93
+2 SET SRSOUT=0
SET DFN=$PIECE(^SRF(SRTN,0),"^")
DO DEM^VADPT
SET SRANAME=$PIECE(VADM(1),"^")_" ("_VA("PID")_")"
START IF SRSOUT
QUIT
KILL SRAO,SRA
DO ^SROACS
ASK WRITE !!,"Select Postoperative Complication: "
READ X:DTIME
IF '$TEST!("^"[X)
GOTO END
+1 IF '$DATA(SRAO(X))
IF (X'?1N1":"1N)
IF (X'="A")
IF (X'="NONE")
DO HELP
IF SRSOUT
GOTO END
GOTO START
+2 IF X?1N1":"1N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>6)!(Y>Z)
DO HELP
IF SRSOUT
GOTO END
GOTO START
+3 IF X="NONE"
KILL DR,DIE
SET DA=SRTN
SET DIE=130
SET DR="[SRA-NOCOMP]"
DO ^DIE
GOTO START
+4 WRITE @IOF,!,SRANAME,!
FOR MOE=1:1:80
WRITE "-"
+5 IF X="A"
SET X="1:6"
+6 WRITE !!
IF X?1N1":"1N
DO RANGE
GOTO START
+7 IF $DATA(SRAO(X))
IF +X=X
SET EMILY=X
DO ^SROAC2
GOTO START
+8 IF $DATA(SRAO(X))
KILL DR,DIE
SET DA=SRTN
SET DR=$PIECE(SRAO(X),"^",2)_"T"
SET DIE=130
DO ^DIE
KILL DR
GOTO START
END QUIT
HELP WRITE @IOF,!!!!,"Enter the number, number/letter combination, or range of numbers you want to",!,"edit. Examples of proper responses are listed below."
+1 WRITE !!,"1. Enter 'A' to update all complications.",!!,"2. Enter a number (1-6) to update the complications in that group. (For",!," example, enter '5' to update all cardiac complications)"
+2 WRITE !!,"3. Enter a number/letter combination to update a specific complication. (To ",!," update Acute Renal Failure, enter '3B')"
+3 WRITE !!,"4. Enter a range of numbers (1-6) separated by a ':' to enter a range of",!," complications. (For example, enter '2:4' to enter all respiratory, urinary",!," tract, and CNS complications)"
+4 WRITE !!,"5. Enter 'NONE' to enter 'NO' for all complications."
+5 WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
+6 QUIT
RANGE ; range of numbers
+1 SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
IF SRSOUT
QUIT
DO ^SROAC2
+2 QUIT
RET IF SRSOUT
QUIT
WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 IF X["?"
WRITE !!,"Enter <RET> to re-display all complication information, or '^' to return to",!,"the previous menu."
GOTO RET
+2 QUIT