SROAOUT ;BIR/SJA - OUTCOMES DATA ;09/30/2011
;;3.0;Surgery;**125,135,142,160,174,175,176,182**;24 Jun 93;Build 49
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="1:16"
I X?.N1":".N S Y=$E(X),Z=$P(X,":",2) I Y<1!(Z>16)!(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 (1-16) 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)_$S(EMILY=1:"Myocardial Infarction (Y/N)",1:"T"),DIE=130 D ^DIE K DA,DIE,DR I $D(Y)!$D(DTOUT) S SRSOUT=1
Q:'EMILY
I EMILY=13,'SRSOUT,SRBEF="N",X'="N" D UPDATE^SROUTC Q
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="Y",EMILY=11 D K DA,DR,DIE Q
.N SROCC,SRDUR S SROCC=0 F S SROCC=$O(^SRF(SRTN,16,SROCC)) Q:'SROCC I $P(^SRF(SRTN,16,SROCC,0),"^",2)=12 S SRDUR=$P(^SRF(SRTN,16,SROCC,0),"^",8) Q
.K DIR S DIR(0)="130.22,9",DIR("A")="Stroke/CVA Duration",DA(1)=SRTN,DA=SROCC D ^DIR K DA,DR,DIE,DIR
.I ($G(SRDUR)=""&((X="")!(X="@")!(X["^")))!(Y=1)!(Y="") D DEL^SROUTC S DA=SRTN,DIE=130,DR="256////N" D ^DIE Q
.I $G(SRDUR)'="",X["^" Q
.I $G(SRDUR)'=Y,Y'="" S DA=SROCC,DA(1)=SRTN,DIE="^SRF(SRTN,16,",DR="9////"_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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROAOUT 3258 printed Dec 13, 2024@02:41:25 Page 2
SROAOUT ;BIR/SJA - OUTCOMES DATA ;09/30/2011
+1 ;;3.0;Surgery;**125,135,142,160,174,175,176,182**;24 Jun 93;Build 49
+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="1:16"
+3 IF X?.N1":".N
SET Y=$EXTRACT(X)
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>16)!(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 (1-16) 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)_$SELECT(EMILY=1:"Myocardial Infarction (Y/N)",1:"T")
SET DIE=130
DO ^DIE
KILL DA,DIE,DR
IF $DATA(Y)!$DATA(DTOUT)
SET SRSOUT=1
+4 if 'EMILY
QUIT
+5 IF EMILY=13
IF 'SRSOUT
IF SRBEF="N"
IF X'="N"
DO UPDATE^SROUTC
QUIT
+6 IF 'SRSOUT
IF SRBEF'="Y"
IF X="Y"
DO UPDATE^SROUTC
QUIT
+7 IF 'SRSOUT
IF SRBEF="Y"
IF X="Y"
IF EMILY=8
Begin DoDot:1
+8 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
+9 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
+10 IF ($GET(SRSTAT)=""&((X="")!(X="@")!(X["^")))!(Y=0)
DO DEL^SROUTC
SET DA=SRTN
SET DIE=130
SET DR="391////N"
DO ^DIE
QUIT
+11 IF $GET(SRSTAT)'=""
IF X["^"
QUIT
+12 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
+13 IF 'SRSOUT
IF SRBEF="Y"
IF X="Y"
IF EMILY=11
Begin DoDot:1
+14 NEW SROCC,SRDUR
SET SROCC=0
FOR
SET SROCC=$ORDER(^SRF(SRTN,16,SROCC))
if 'SROCC
QUIT
IF $PIECE(^SRF(SRTN,16,SROCC,0),"^",2)=12
SET SRDUR=$PIECE(^SRF(SRTN,16,SROCC,0),"^",8)
QUIT
+15 KILL DIR
SET DIR(0)="130.22,9"
SET DIR("A")="Stroke/CVA Duration"
SET DA(1)=SRTN
SET DA=SROCC
DO ^DIR
KILL DA,DR,DIE,DIR
+16 IF ($GET(SRDUR)=""&((X="")!(X="@")!(X["^")))!(Y=1)!(Y="")
DO DEL^SROUTC
SET DA=SRTN
SET DIE=130
SET DR="256////N"
DO ^DIE
QUIT
+17 IF $GET(SRDUR)'=""
IF X["^"
QUIT
+18 IF $GET(SRDUR)'=Y
IF Y'=""
SET DA=SROCC
SET DA(1)=SRTN
SET DIE="^SRF(SRTN,16,"
SET DR="9////"_Y
DO ^DIE
QUIT
End DoDot:1
KILL DA,DR,DIE
QUIT
+19 IF 'SRSOUT
IF SRBEF="Y"
IF (X=""!(X="N"))
DO DEL^SROUTC
+20 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