SROAOUT ;BIR/SJA - OUTCOMES DATA ;04/03/07
;;3.0; Surgery ;**125,135,142,160**;24 Jun 93;Build 7
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
D SRA^SROES S SRACLR=0,SRSOUT=0,SRSUPCPT=1 D ^SROAUTL
START D:SRACLR RET G:SRSOUT END S SRACLR=0 K SRA,SRAO D ^SROUTC
ASK W !!,"Select Outcomes 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") D HELP G:SRSOUT END G START
I X="A" S X="0:13"
I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<0!(Z>13)!(Y>Z) D HELP G:SRSOUT END G START
D HDR^SROAUTL
I X?.N1":".N D RANGE G START
I $D(SRAO(X)) S EMILY=X D G START
.I $$LOCK^SROUTL(SRTN) W !! D ONE,UNLOCK^SROUTL(SRTN)
END D:$D(SRTN) EXIT^SROES 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 (0-13) to update the information in that field. (For",!," example, enter '4' to update Mediastinitis)"
W !!,"3. Enter a range of numbers separated by a ':' to enter a range of",!," information. (For example, enter '11:13' to enter Stroke,",!," Coma >= 24 hr, and New Mech Circ Support)"
W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
Q
RANGE ; range of numbers
I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
.W !! S SHEMP=$P(X,":"),CURLEY=$P(X,":",2) F EMILY=SHEMP:1:CURLEY Q:SRSOUT D ONE
Q
ONE ; edit one item
N SRBEF
S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="I",DR=$P(SRAO(EMILY),"^",2) D EN^DIQ1 K DA,DIC,DIQ,DR S SRBEF=SRY(130,SRTN,$P(SRAO(EMILY),"^",2),"I")
K DR,DIE S DA=SRTN,DR=$P(SRAO(EMILY),"^",2)_"T",DIE=130 D ^DIE K DA,DIE,DR I $D(Y)!$D(DTOUT) S SRSOUT=1
Q:'EMILY
I 'SRSOUT,SRBEF'="Y",X="Y" D UPDATE^SROUTC Q
I 'SRSOUT,SRBEF="Y",X="Y",EMILY=8 D K DA,DR,DIE Q
.N SROCC,SRSTAT S SROCC=0 F S SROCC=$O(^SRF(SRTN,16,SROCC)) Q:'SROCC I $P(^SRF(SRTN,16,SROCC,0),"^",2)=27 S SRSTAT=$P(^SRF(SRTN,16,SROCC,0),"^",5) Q
.K DIR S DIR(0)="130.22,8",DIR("A")="Cardiopulmonary Bypass Status",DA(1)=SRTN,DA=SROCC D ^DIR K DA,DR,DIE,DIR
.I ($G(SRSTAT)=""&((X="")!(X="@")!(X["^")))!(Y=0) D DEL^SROUTC S DA=SRTN,DIE=130,DR="391////N" D ^DIE Q
.I $G(SRSTAT)'="",X["^" Q
.I $G(SRSTAT)'=Y,Y'="" S DA=SROCC,DA(1)=SRTN,DIE="^SRF(SRTN,16,",DR="8////"_Y D ^DIE Q
I 'SRSOUT,SRBEF="Y",(X=""!(X="N")) D DEL^SROUTC
Q
RET Q:SRSOUT W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q
SROAOUT ;BIR/SJA - OUTCOMES DATA ;04/03/07
+1 ;;3.0; Surgery ;**125,135,142,160**;24 Jun 93;Build 7
+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 DO SRA^SROES
SET SRACLR=0
SET SRSOUT=0
SET SRSUPCPT=1
DO ^SROAUTL
START IF SRACLR
DO RET
IF SRSOUT
GOTO END
SET SRACLR=0
KILL SRA,SRAO
DO ^SROUTC
ASK WRITE !!,"Select Outcomes 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")
DO HELP
IF SRSOUT
GOTO END
GOTO START
+2 IF X="A"
SET X="0:13"
+3 IF X?.N1":".N
SET Y=$EXTRACT(X)
SET Z=$PIECE(X,":",2)
IF Y<0!(Z>13)!(Y>Z)
DO HELP
IF SRSOUT
GOTO END
GOTO START
+4 DO HDR^SROAUTL
+5 IF X?.N1":".N
DO RANGE
GOTO START
+6 IF $DATA(SRAO(X))
SET EMILY=X
Begin DoDot:1
+7 IF $$LOCK^SROUTL(SRTN)
WRITE !!
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot:1
GOTO START
END IF $DATA(SRTN)
DO EXIT^SROES
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 (0-13) to update the information in that field. (For",!," example, enter '4' to update Mediastinitis)"
+2 WRITE !!,"3. Enter a range of numbers separated by a ':' to enter a range of",!," information. (For example, enter '11:13' to enter Stroke,",!," Coma >= 24 hr, and New Mech Circ Support)"
+3 WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
+4 QUIT
RANGE ; range of numbers
+1 IF $$LOCK^SROUTL(SRTN)
Begin DoDot:1
+2 WRITE !!
SET SHEMP=$PIECE(X,":")
SET CURLEY=$PIECE(X,":",2)
FOR EMILY=SHEMP:1:CURLEY
IF SRSOUT
QUIT
DO ONE
End DoDot:1
DO UNLOCK^SROUTL(SRTN)
+3 QUIT
ONE ; edit one item
+1 NEW SRBEF
+2 SET DIC="^SRF("
SET DA=SRTN
SET DIQ="SRY"
SET DIQ(0)="I"
SET DR=$PIECE(SRAO(EMILY),"^",2)
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
SET SRBEF=SRY(130,SRTN,$PIECE(SRAO(EMILY),"^",2),"I")
+3 KILL DR,DIE
SET DA=SRTN
SET DR=$PIECE(SRAO(EMILY),"^",2)_"T"
SET DIE=130
DO ^DIE
KILL DA,DIE,DR
IF $DATA(Y)!$DATA(DTOUT)
SET SRSOUT=1
+4 IF 'EMILY
QUIT
+5 IF 'SRSOUT
IF SRBEF'="Y"
IF X="Y"
DO UPDATE^SROUTC
QUIT
+6 IF 'SRSOUT
IF SRBEF="Y"
IF X="Y"
IF EMILY=8
Begin DoDot:1
+7 NEW SROCC,SRSTAT
SET SROCC=0
FOR
SET SROCC=$ORDER(^SRF(SRTN,16,SROCC))
IF 'SROCC
QUIT
IF $PIECE(^SRF(SRTN,16,SROCC,0),"^",2)=27
SET SRSTAT=$PIECE(^SRF(SRTN,16,SROCC,0),"^",5)
QUIT
+8 KILL DIR
SET DIR(0)="130.22,8"
SET DIR("A")="Cardiopulmonary Bypass Status"
SET DA(1)=SRTN
SET DA=SROCC
DO ^DIR
KILL DA,DR,DIE,DIR
+9 IF ($GET(SRSTAT)=""&((X="")!(X="@")!(X["^")))!(Y=0)
DO DEL^SROUTC
SET DA=SRTN
SET DIE=130
SET DR="391////N"
DO ^DIE
QUIT
+10 IF $GET(SRSTAT)'=""
IF X["^"
QUIT
+11 IF $GET(SRSTAT)'=Y
IF Y'=""
SET DA=SROCC
SET DA(1)=SRTN
SET DIE="^SRF(SRTN,16,"
SET DR="8////"_Y
DO ^DIE
QUIT
End DoDot:1
KILL DA,DR,DIE
QUIT
+12 IF 'SRSOUT
IF SRBEF="Y"
IF (X=""!(X="N"))
DO DEL^SROUTC
+13 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