SRTPLIV6 ;BIR/SJA - LIVER-OUTCOME INFORMATION ;10/04/2011
;;3.0;Surgery;**167,176**;24 Jun 93;Build 8
I '$D(SRTPP) W !!,"A Transplant Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END
N SRX,SRY,SRZ
START Q:SRSOUT D DISP
W !!,"Select Transplant Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 G END
I X="" D:(SRNOVA&($P(SR("RA"),"^",2)="LI")) ^SRTPLIV7 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?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRX)!(Y>Z) D HELP G:SRSOUT END G START
I X="A" S X="1:"_SRX
D HDR^SRTPUTL
I X?1.2N1":"1.2N D RANGE G START
I $D(SRAO(X)),+X=X S SREMIL=X D ONE G START
END W @IOF
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 items.",!!,"2. Enter a number (1-"_SRX_") to update the information in that field. (For example,",!," enter '1' to update Bleeding/Transfusions)"
W !!,"3. Enter a range of numbers (1-"_SRX_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
PRESS W ! K DIR S DIR("A")="Press the return key to continue or '^' to exit: ",DIR(0)="FOA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
RANGE ; range of numbers
S SRNOMORE=0,SRSHEMP=$P(X,":"),SRCURL=$P(X,":",2) F SREMIL=SRSHEMP:1:SRCURL Q:SRNOMORE D ONE
Q
ONE ; edit one item
K DR,DIE S DA=SRTPP,DR=$P(SRAO(SREMIL),"^",2)_"T",DIE=139.5 D ^DIE K DR I $D(Y) S SRNOMORE=1
Q
DISP ; display fields
S SRHPG="OUTCOME INFORMATION",SRPAGE="PAGE: "_$S(SRNOVA:"6",1:"")_" OF "_$S(SRNOVA:7,1:"")
I $P(SR("RA"),"^",2)="LU" S SRPAGE="PAGE: "_$S(SRNOVA:"4",1:"")_" OF "_$S(SRNOVA:5,1:"")
D HDR^SRTPUTL
K DR,SRAO S (DR,SRDR)="116;117;118;119;192;121;122;123;124;125;126;193"
K DA,DIC,DIQ,SRX,SRY,SRZ S DIC="^SRT(",DA=SRTPP,DIQ="SRY",DIQ(0)="E",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
S (SRX,SRZ)=0 F I=1:1 S SRZ=$P(SRDR,";",I) Q:'SRZ S SRX=I,SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
D OUTNO
W !,"1. Bleeding/Transfusions:",?33,$P(SRAO(1),"^")
W !,"2. Pneumonia:",?33,$P(SRAO(2),"^")
W !,"3. On Ventilator >48 hours:",?33,$P(SRAO(3),"^")
W !,"4. Cardiac Arrest Req. CPR:",?33,$P(SRAO(4),"^")
W !,"5. Myocardial Infarction:",?33,$P(SRAO(5),"^")
W !,"6. Stroke/CVA:",?33,$P(SRAO(6),"^")
W !,"7. Coma >= 24 hr:",?33,$P(SRAO(7),"^")
W !,"8. Superficial Incisional SSI:",?33,$P(SRAO(8),"^")
W !,"9. Deep Incisional SSI:",?33,$P(SRAO(9),"^")
W !,"10. Systemic Sepsis:",?33,$P(SRAO(10),"^")
W !,"11. Return to Surgery < 30 Days:",?33,$P(SRAO(11),"^")
W !,"12. Death within 30 Days:",?33,$P(SRAO(12),"^")
W !!,SRLINE
Q
OUTNO ; default empty outcome fields to "NO"
K DA,DIE,DR S DR=""
S II=0 F S II=$O(SRAO(II)) Q:'II S:$P(SRAO(II),"^")="" DR=$S(DR]"":(DR_";"_$P(SRDR,";",II)),1:$P(SRDR,";",II))_"////"_$S($P(SRDR,";",II)=121:"1",1:"N")
S DIE=139.5,DA=SRTPP D ^DIE K DA,DIE,DR
K DA,DIC,DIQ,SRX,SRY,SRZ S DIC="^SRT(",DA=SRTPP,DIQ="SRY",DIQ(0)="E",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
S (SRX,SRZ)=0 F I=1:1 S SRZ=$P(SRDR,";",I) Q:'SRZ S SRX=I,SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSRTPLIV6 3258 printed Nov 22, 2024@17:58:28 Page 2
SRTPLIV6 ;BIR/SJA - LIVER-OUTCOME INFORMATION ;10/04/2011
+1 ;;3.0;Surgery;**167,176**;24 Jun 93;Build 8
+2 IF '$DATA(SRTPP)
WRITE !!,"A Transplant Assessment must be selected prior to using this option.",!!,"Press <RET> to continue "
READ X:DTIME
GOTO END
+3 NEW SRX,SRY,SRZ
START if SRSOUT
QUIT
DO DISP
+1 WRITE !!,"Select Transplant Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
GOTO END
+2 IF X=""
if (SRNOVA&($PIECE(SR("RA"),"^",2)="LI"))
DO ^SRTPLIV7
GOTO END
+3 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
+4 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRX)!(Y>Z)
DO HELP
if SRSOUT
GOTO END
GOTO START
+5 IF X="A"
SET X="1:"_SRX
+6 DO HDR^SRTPUTL
+7 IF X?1.2N1":"1.2N
DO RANGE
GOTO START
+8 IF $DATA(SRAO(X))
IF +X=X
SET SREMIL=X
DO ONE
GOTO START
END WRITE @IOF
+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 items.",!!,"2. Enter a number (1-"_SRX_") to update the information in that field. (For example,",!," enter '1' to update Bleeding/Transfusions)"
+2 WRITE !!,"3. Enter a range of numbers (1-"_SRX_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
PRESS WRITE !
KILL DIR
SET DIR("A")="Press the return key to continue or '^' to exit: "
SET DIR(0)="FOA"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT
RANGE ; range of numbers
+1 SET SRNOMORE=0
SET SRSHEMP=$PIECE(X,":")
SET SRCURL=$PIECE(X,":",2)
FOR SREMIL=SRSHEMP:1:SRCURL
if SRNOMORE
QUIT
DO ONE
+2 QUIT
ONE ; edit one item
+1 KILL DR,DIE
SET DA=SRTPP
SET DR=$PIECE(SRAO(SREMIL),"^",2)_"T"
SET DIE=139.5
DO ^DIE
KILL DR
IF $DATA(Y)
SET SRNOMORE=1
+2 QUIT
DISP ; display fields
+1 SET SRHPG="OUTCOME INFORMATION"
SET SRPAGE="PAGE: "_$SELECT(SRNOVA:"6",1:"")_" OF "_$SELECT(SRNOVA:7,1:"")
+2 IF $PIECE(SR("RA"),"^",2)="LU"
SET SRPAGE="PAGE: "_$SELECT(SRNOVA:"4",1:"")_" OF "_$SELECT(SRNOVA:5,1:"")
+3 DO HDR^SRTPUTL
+4 KILL DR,SRAO
SET (DR,SRDR)="116;117;118;119;192;121;122;123;124;125;126;193"
+5 KILL DA,DIC,DIQ,SRX,SRY,SRZ
SET DIC="^SRT("
SET DA=SRTPP
SET DIQ="SRY"
SET DIQ(0)="E"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+6 SET (SRX,SRZ)=0
FOR I=1:1
SET SRZ=$PIECE(SRDR,";",I)
if 'SRZ
QUIT
SET SRX=I
SET SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
+7 DO OUTNO
+8 WRITE !,"1. Bleeding/Transfusions:",?33,$PIECE(SRAO(1),"^")
+9 WRITE !,"2. Pneumonia:",?33,$PIECE(SRAO(2),"^")
+10 WRITE !,"3. On Ventilator >48 hours:",?33,$PIECE(SRAO(3),"^")
+11 WRITE !,"4. Cardiac Arrest Req. CPR:",?33,$PIECE(SRAO(4),"^")
+12 WRITE !,"5. Myocardial Infarction:",?33,$PIECE(SRAO(5),"^")
+13 WRITE !,"6. Stroke/CVA:",?33,$PIECE(SRAO(6),"^")
+14 WRITE !,"7. Coma >= 24 hr:",?33,$PIECE(SRAO(7),"^")
+15 WRITE !,"8. Superficial Incisional SSI:",?33,$PIECE(SRAO(8),"^")
+16 WRITE !,"9. Deep Incisional SSI:",?33,$PIECE(SRAO(9),"^")
+17 WRITE !,"10. Systemic Sepsis:",?33,$PIECE(SRAO(10),"^")
+18 WRITE !,"11. Return to Surgery < 30 Days:",?33,$PIECE(SRAO(11),"^")
+19 WRITE !,"12. Death within 30 Days:",?33,$PIECE(SRAO(12),"^")
+20 WRITE !!,SRLINE
+21 QUIT
OUTNO ; default empty outcome fields to "NO"
+1 KILL DA,DIE,DR
SET DR=""
+2 SET II=0
FOR
SET II=$ORDER(SRAO(II))
if 'II
QUIT
if $PIECE(SRAO(II),"^")=""
SET DR=$SELECT(DR]"":(DR_";"_$PIECE(SRDR,";",II)),1:$PIECE(SRDR,";",II))_"////"_$SELECT($PIECE(SRDR,";",II)=121:"1",1:"N")
+3 SET DIE=139.5
SET DA=SRTPP
DO ^DIE
KILL DA,DIE,DR
+4 KILL DA,DIC,DIQ,SRX,SRY,SRZ
SET DIC="^SRT("
SET DA=SRTPP
SET DIQ="SRY"
SET DIQ(0)="E"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+5 SET (SRX,SRZ)=0
FOR I=1:1
SET SRZ=$PIECE(SRDR,";",I)
if 'SRZ
QUIT
SET SRX=I
SET SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
+6 QUIT