SROACCR ;B'HAM ISC/MAM - CARDIAC COMPLICATON DATA ; 5 MAR 1992 10:00 am
;;3.0; Surgery ;;24 Jun 93
I '$D(SRTN) W !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END
S SRACLR=0,SRSOUT=0,DFN=$P(^SRF(SRTN,0),"^") D DEM^VADPT S SRANAME=$P(VADM(1),"^")_" ("_VA("PID")_")"
START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROACRC
ASK W !!,"Select Complication Information to Edit: " R X:DTIME I '$T!("^"[X) G END
S:X="a" X="A" I '$D(SRAO(X)),(X'?.N1":".N),(X'="A"),(X'="NONE") D HELP G:SRSOUT END G START
I X="NONE" K DR S DIE=130,DA=SRTN,DR="[SRISK-CCOMP]" D ^DIE K DR,DIE,DA G START
I X="A" S X=1
I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>13)!(Y>Z) D HELP G:SRSOUT END G START
W @IOF,!,SRANAME,! F MOE=1:1:80 W "-"
I X?.N1":".N D RANGE G START
I $D(SRAO(X)) S EMILY=X W !! D ONE G START
END W @IOF D ^SRSKILL
Q
HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-14) to update the information in that field. (For",!," example, enter '7' to update Mediastinitis)"
W !!,"3. Enter a range of numbers (1-14) separated by a ':' to enter a range of",!," information. (For example, enter '3:5' to update Preoperative MI,",!," Endocarditis, and Renal Failure Requiring Dialysis)"
W !!,"4. Enter 'NONE' to answer all complications as 'NO'"
W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
Q
RANGE ; range of numbers
W !! K NOGO S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT!($D(NOGO)) D ONE
Q
ONE ; edit one item
I EMILY>1 D NOGO Q
K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",2)_"T",DIE=130 D ^DIE K DR I $D(Y) S SRSOUT=1
Q
RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q
NOGO ; no updates to complications
W @IOF,!,"You cannot update any fields within this option except 'Operative Death (Y/N)'.",!!,"The complication information must be entered using the options within the",!,"Complications Menu found on your main Surgery Risk Assessment menu."
W !!,"Press RETURN to continue " R X:DTIME
S NOGO=1
Q
SROACCR ;B'HAM ISC/MAM - CARDIAC COMPLICATON DATA ; 5 MAR 1992 10:00 am
+1 ;;3.0; Surgery ;;24 Jun 93
+2 IF '$DATA(SRTN)
WRITE !!,"A Surgery Risk Assessment must be selected prior to using this option.",!!,"Press <RET> to continue "
READ X:DTIME
GOTO END
+3 SET SRACLR=0
SET SRSOUT=0
SET DFN=$PIECE(^SRF(SRTN,0),"^")
DO DEM^VADPT
SET SRANAME=$PIECE(VADM(1),"^")_" ("_VA("PID")_")"
START IF SRACLR
DO RET
IF SRSOUT
GOTO END
SET SRACLR=0
KILL SRA,SRAO
DO ^SROACRC
ASK WRITE !!,"Select Complication Information to Edit: "
READ X:DTIME
IF '$TEST!("^"[X)
GOTO END
+1 IF X="a"
SET X="A"
IF '$DATA(SRAO(X))
IF (X'?.N1":".N)
IF (X'="A")
IF (X'="NONE")
DO HELP
IF SRSOUT
GOTO END
GOTO START
+2 IF X="NONE"
KILL DR
SET DIE=130
SET DA=SRTN
SET DR="[SRISK-CCOMP]"
DO ^DIE
KILL DR,DIE,DA
GOTO START
+3 IF X="A"
SET X=1
+4 IF X?.N1":".N
SET Y=$EXTRACT(X)
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>13)!(Y>Z)
DO HELP
IF SRSOUT
GOTO END
GOTO START
+5 WRITE @IOF,!,SRANAME,!
FOR MOE=1:1:80
WRITE "-"
+6 IF X?.N1":".N
DO RANGE
GOTO START
+7 IF $DATA(SRAO(X))
SET EMILY=X
WRITE !!
DO ONE
GOTO START
END WRITE @IOF
DO ^SRSKILL
+1 QUIT
HELP WRITE @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
+1 WRITE !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-14) to update the information in that field. (For",!," example, enter '7' to update Mediastinitis)"
+2 WRITE !!,"3. Enter a range of numbers (1-14) separated by a ':' to enter a range of",!," information. (For example, enter '3:5' to update Preoperative MI,",!," Endocarditis, and Renal Failure Requiring Dialysis)"
+3 WRITE !!,"4. Enter 'NONE' to answer all complications as 'NO'"
+4 WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
+5 QUIT
RANGE ; range of numbers
+1 WRITE !!
KILL NOGO
SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
IF SRSOUT!($DATA(NOGO))
QUIT
DO ONE
+2 QUIT
ONE ; edit one item
+1 IF EMILY>1
DO NOGO
QUIT
+2 KILL DR,DIE
SET DA=SRTN
SET DR=$PIECE(SRAO(EMILY),"^",2)_"T"
SET DIE=130
DO ^DIE
KILL DR
IF $DATA(Y)
SET SRSOUT=1
+3 QUIT
RET IF SRSOUT
QUIT
WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 QUIT
NOGO ; no updates to complications
+1 WRITE @IOF,!,"You cannot update any fields within this option except 'Operative Death (Y/N)'.",!!,"The complication information must be entered using the options within the",!,"Complications Menu found on your main Surgery Risk Assessment menu.
"
+2 WRITE !!,"Press RETURN to continue "
READ X:DTIME
+3 SET NOGO=1
+4 QUIT