SROACR2 ;BIR/SJA - OPERATIVE DATA, PAGE 2 ;12/03/07
;;3.0;Surgery;**125,153,160,166,182,184**;24 Jun 93;Build 35
;
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 SRSOUT=0 D ^SROAUTL
START G:SRSOUT END
;
EDIT S SRR=0 S SRPAGE="PAGE: 1" D HDR^SROAUTL
;
K DR S SRQ=0,(DR,SRDR)="481;451;450;468;469"
K DA,DIC,DIQ,SRY S DIC="^SRF(",DA=SRTN,DIQ="SRY",DIQ(0)="IE",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
K SRX S SRX=0 F M=1:1 S I=$P(SRDR,";",M) Q:'I D
.K SREXT D TR,GET
.S SRX=SRX+1,Y=$P(X,";;",2),SRFLD=$P(Y,"^"),(Z,SRX(SRX))=$P(Y,"^",2)_"^"_SRFLD,SREXT=SRY(130,SRTN,SRFLD,"E")
.I SRFLD=481 W !!,"Operative Data details:",!,"-----------------------"
.W !,$J(SRX,2)_". "_$P(Z,"^")_":" D EXT
.W:SRFLD=382 !
D CHCK W ! F K=1:1:80 W "-"
D SEL G:SRR=1 EDIT
S SRSOUT=1 G END
Q
SEL S SRSOUT=0 W !!,"Select Cardiac Procedures Operative Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q:X="" S:X="a" X="A" I '$D(SRFLG),'$D(SRX(X)),(X'?1.2N1":"1.2N),X'="A" D HELP S SRR=1 Q
I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRX)!(Y>Z) D HELP S SRR=1 Q
I X="A" S X="1:"_SRX
I X?1.2N1":"1.2N D RANGE S SRR=1 K SREXT Q
I $D(SRX(X)),+X=X S EMILY=X D S SRR=1
.I $$LOCK^SROUTL(SRTN) W ! D ONE,UNLOCK^SROUTL(SRTN)
Q
EXT W ?30,SREXT
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-5) to update the information in that field. (For",!," example, enter '4' to update Incision Type.)"
W !!,"3. Enter a range of numbers (1-5) separated by a ':' to enter a range of",!," information. (For example, enter '2:4' to enter Total CPB time,",!," Total Ischemic time, and Incision Type.)"
D RET
Q
CHCK ; compare ischemic time to CPB time
I '$D(IORVON) S X="IORVON;IORVOFF" D ENDR^%ZISS
N SRISCH,SRCPB S SRISCH=SRY(130,SRTN,450,"E"),SRCPB=SRY(130,SRTN,451,"E")
I SRISCH,SRCPB,SRISCH>SRCPB W !,IORVON_"*** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***"_IORVOFF
Q
RET Q:SRSOUT W ! K DIR S DIR(0)="E" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) 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
K DR,DA,DIE S DR=$P(SRX(EMILY),"^",2)_"T",DA=SRTN,DIE=130,SRDT=$P(SRX(EMILY),"^",3) S:SRDT DR=DR_";"_SRDT_"T" D ^DIE K DR,DA I $D(Y) S SRSOUT=1
I EMILY=3,$P($G(^SRF(SRTN,206)),"^",37)>0,($P($G(^SRF(SRTN,207)),"^",27)=1) S $P(^SRF(SRTN,207),"^",27)=5
Q
TR S J=I,J=$TR(J,"1234567890.","ABCDEFGHIJP")
Q
GET S X=$T(@J)
Q
END W @IOF D ^SRSKILL
Q
DHA ;;481^Bridge to Transplant
DEA ;;451^Total CPB Time
DEJ ;;450^Total Ischemic Time
DFH ;;468^Incision Type
DFI ;;469^Convert Off Pump to CPB
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROACR2 2963 printed Oct 16, 2024@18:40:59 Page 2
SROACR2 ;BIR/SJA - OPERATIVE DATA, PAGE 2 ;12/03/07
+1 ;;3.0;Surgery;**125,153,160,166,182,184**;24 Jun 93;Build 35
+2 ;
+3 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
+4 SET SRSOUT=0
DO ^SROAUTL
START if SRSOUT
GOTO END
+1 ;
EDIT SET SRR=0
SET SRPAGE="PAGE: 1"
DO HDR^SROAUTL
+1 ;
+2 KILL DR
SET SRQ=0
SET (DR,SRDR)="481;451;450;468;469"
+3 KILL DA,DIC,DIQ,SRY
SET DIC="^SRF("
SET DA=SRTN
SET DIQ="SRY"
SET DIQ(0)="IE"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+4 KILL SRX
SET SRX=0
FOR M=1:1
SET I=$PIECE(SRDR,";",M)
if 'I
QUIT
Begin DoDot:1
+5 KILL SREXT
DO TR
DO GET
+6 SET SRX=SRX+1
SET Y=$PIECE(X,";;",2)
SET SRFLD=$PIECE(Y,"^")
SET (Z,SRX(SRX))=$PIECE(Y,"^",2)_"^"_SRFLD
SET SREXT=SRY(130,SRTN,SRFLD,"E")
+7 IF SRFLD=481
WRITE !!,"Operative Data details:",!,"-----------------------"
+8 WRITE !,$JUSTIFY(SRX,2)_". "_$PIECE(Z,"^")_":"
DO EXT
+9 if SRFLD=382
WRITE !
End DoDot:1
+10 DO CHCK
WRITE !
FOR K=1:1:80
WRITE "-"
+11 DO SEL
if SRR=1
GOTO EDIT
+12 SET SRSOUT=1
GOTO END
+13 QUIT
SEL SET SRSOUT=0
WRITE !!,"Select Cardiac Procedures Operative Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 if X=""
QUIT
if X="a"
SET X="A"
IF '$DATA(SRFLG)
IF '$DATA(SRX(X))
IF (X'?1.2N1":"1.2N)
IF X'="A"
DO HELP
SET SRR=1
QUIT
+2 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRX)!(Y>Z)
DO HELP
SET SRR=1
QUIT
+3 IF X="A"
SET X="1:"_SRX
+4 IF X?1.2N1":"1.2N
DO RANGE
SET SRR=1
KILL SREXT
QUIT
+5 IF $DATA(SRX(X))
IF +X=X
SET EMILY=X
Begin DoDot:1
+6 IF $$LOCK^SROUTL(SRTN)
WRITE !
DO ONE
DO UNLOCK^SROUTL(SRTN)
End DoDot:1
SET SRR=1
+7 QUIT
EXT WRITE ?30,SREXT
+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-5) to update the information in that field. (For",!," example, enter '4' to update Incision Type.)"
+2 WRITE !!,"3. Enter a range of numbers (1-5) separated by a ':' to enter a range of",!," information. (For example, enter '2:4' to enter Total CPB time,",!," Total Ischemic time, and Incision Type.)"
+3 DO RET
+4 QUIT
CHCK ; compare ischemic time to CPB time
+1 IF '$DATA(IORVON)
SET X="IORVON;IORVOFF"
DO ENDR^%ZISS
+2 NEW SRISCH,SRCPB
SET SRISCH=SRY(130,SRTN,450,"E")
SET SRCPB=SRY(130,SRTN,451,"E")
+3 IF SRISCH
IF SRCPB
IF SRISCH>SRCPB
WRITE !,IORVON_"*** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***"_IORVOFF
+4 QUIT
RET if SRSOUT
QUIT
WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 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 KILL DR,DA,DIE
SET DR=$PIECE(SRX(EMILY),"^",2)_"T"
SET DA=SRTN
SET DIE=130
SET SRDT=$PIECE(SRX(EMILY),"^",3)
if SRDT
SET DR=DR_";"_SRDT_"T"
DO ^DIE
KILL DR,DA
IF $DATA(Y)
SET SRSOUT=1
+2 IF EMILY=3
IF $PIECE($GET(^SRF(SRTN,206)),"^",37)>0
IF ($PIECE($GET(^SRF(SRTN,207)),"^",27)=1)
SET $PIECE(^SRF(SRTN,207),"^",27)=5
+3 QUIT
TR SET J=I
SET J=$TRANSLATE(J,"1234567890.","ABCDEFGHIJP")
+1 QUIT
GET SET X=$TEXT(@J)
+1 QUIT
END WRITE @IOF
DO ^SRSKILL
+1 QUIT
DHA ;;481^Bridge to Transplant
DEA ;;451^Total CPB Time
DEJ ;;450^Total Ischemic Time
DFH ;;468^Incision Type
DFI ;;469^Convert Off Pump to CPB