SROUTC ;BIR/SJA - OUTCOMES DATA ;03/13/06
;;3.0; Surgery ;**125,135,153**;24 Jun 93;Build 11
D UPDT490,EN^SROCCAT
F I=205,206,208,209 S SRA(I)=$G(^SRF(SRTN,I))
S NYUK=$P(SRA(208),"^",2) D YN S SRAO(1)=SHEMP_"^385",NYUK=$P(SRA(208),"^",7) D YN S SRAO(8)=SHEMP_"^391"
S NYUK=$P(SRA(208),"^",3) D YN S SRAO(2)=SHEMP_"^386",NYUK=$P(SRA(206),"^",39) D YN S SRAO(9)=SHEMP_"^466"
S NYUK=$P(SRA(205),"^",17) D YN S SRAO(3)=SHEMP_"^254",NYUK=$P(SRA(209),"^",12) D YN S SRAO(10)=SHEMP_"^490"
S NYUK=$P(SRA(208),"^",5) D YN S SRAO(4)=SHEMP_"^388",NYUK=$P(SRA(205),"^",21) D YN S SRAO(11)=SHEMP_"^256"
S NYUK=$P(SRA(205),"^",26) D YN S SRAO(5)=SHEMP_"^411",NYUK=$P(SRA(205),"^",22) D YN S SRAO(12)=SHEMP_"^410"
S NYUK=$P(SRA(208),"^",6) D YN S SRAO(6)=SHEMP_"^389",NYUK=$P(SRA(206),"^",40) D YN S SRAO(13)=SHEMP_"^467"
S NYUK=$P(SRA(205),"^",13) D YN S SRAO(7)=SHEMP_"^285",NYUK=$P(SRA(208),"^") D YN S SRAO(0)=SHEMP_"^384"
;
DISP S SRPAGE="PAGE: 1",SRHDR(.5)="OUTCOMES INFORMATION" D HDR^SROAUTL
W !,"0. Operative Death: ",?35,$P(SRAO(0),"^")
W !!,"Perioperative (30 day) Occurrences:",!,"-----------------------------------"
W !,"1. Perioperative MI: ",?35,$P(SRAO(1),"^"),?40," 8. Repeat cardiac surg procedure: ",?76,$P(SRAO(8),"^")
W !,"2. Endocarditis: ",?35,$P(SRAO(2),"^"),?40," 9. Tracheostomy: ",?76,$P(SRAO(9),"^")
W !,"3. Renal failure require dialysis: ",$P(SRAO(3),"^"),?40,"10. Repeat ventilator w/in 30 days: ",?76,$P(SRAO(10),"^")
W !,"4. Mediastinitis: ",?35,$P(SRAO(4),"^"),?40,"11. Stroke: ",?76,$P(SRAO(11),"^")
W !,"5. Cardiac arrest requiring CPR: ",?35,$P(SRAO(5),"^"),?40,"12. Coma >= 24 hr: ",?76,$P(SRAO(12),"^")
W !,"6. Reoperation for bleeding: ",?35,$P(SRAO(6),"^"),?40,"13. New Mech Circ Support: ",?76,$P(SRAO(13),"^")
W !,"7. On ventilator >= 48 hr: ",?35,$P(SRAO(7),"^")
W !! F MOE=1:1:80 W "-"
Q
YN ; store answer
S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
Q
UPDT490 ; update field 490
N SRX S SRX=$P($G(^SRF(SRTN,209)),"^",12) S:SRX="" SRX="N"
K DA,DIE,DR S DIE=130,DA=SRTN,DR="490////"_SRX D ^DIE K DA,DIE,DR
Q
UPDATE N SRCMP,SROC,SRI,SRIF,SRQ,SRY D MAP
I EMILY=5!(EMILY=13) D IP Q
S X=$P(^SRO(136.5,SROC,0),"^"),DIC(0)="L",DLAYGO="130.22",DA(1)=SRTN,DIC="^SRF("_SRTN_",16," D FILE^DICN
S $P(^SRF(SRTN,16,+Y,0),"^",2)=SROC,SRY=+Y
EM8 I EMILY=8 K DIR S DIR(0)="130.22,8",DIR("A")="Cardiopulmonary Bypass Status" D ^DIR G:X="" EM8 D K DR,DA,DIE
.K DA,DR,DIE,DIR I X["^"!(X="@")!(Y=0) D DEL S DA=SRTN,DIE=130,DR="391////N" D ^DIE Q
.S DA=SRY,DR="8///"_Y,DA(1)=SRTN,DIE="^SRF(SRTN,16," D ^DIE
Q
IP K DIR S DIR("A")="Is this an Intraoperative occurrence? ",DIR("B")="YES",DIR(0)="YA" D ^DIR K DIR Q:$D(DTOUT)!$D(DUOUT)
S SRIF=Y
I SRIF=1 S X=$P(^SRO(136.5,SROC,0),"^"),DIC(0)="L",DLAYGO="130.14",DA(1)=SRTN,DIC="^SRF("_SRTN_",10," D FILE^DICN S $P(^SRF(SRTN,10,+Y,0),"^",2)=SROC Q
;
I SRIF=0 S X=$P(^SRO(136.5,SROC,0),"^"),DIC(0)="L",DLAYGO="130.22",DA(1)=SRTN,DIC="^SRF("_SRTN_",16," D FILE^DICN S $P(^SRF(SRTN,16,+Y,0),"^",2)=SROC
Q
DEL ; delete existing Post/Intraoperative occurrences.
N II,SRII,SROC D MAP
S II=0 F S II=$O(^SRF(SRTN,16,II)) Q:'II S SRII=$G(^(II,0)) I $P(SRII,"^",2)=SROC D Q
.S DA(1)=SRTN,DA=II,DIK="^SRF("_SRTN_",16," D ^DIK I '$O(^SRF(SRTN,16,0)) K ^SRF(SRTN,16,0)
;
S II=0 F S II=$O(^SRF(SRTN,10,II)) Q:'II S SRII=$G(^(II,0)) I $P(SRII,"^",2)=SROC D Q
.S DA(1)=SRTN,DA=II,DIK="^SRF("_SRTN_",10," D ^DIK I '$O(^SRF(SRTN,10,0)) K ^SRF(SRTN,10,0)
Q
MAP S SROC=$S(EMILY=1:17,EMILY=2:23,EMILY=3:9,EMILY=4:25,EMILY=5:16,EMILY=6:26,EMILY=7:6,EMILY=8:27,EMILY=9:33,EMILY=10:37,EMILY=11:12,EMILY=12:13,1:34)
Q
SROUTC ;BIR/SJA - OUTCOMES DATA ;03/13/06
+1 ;;3.0; Surgery ;**125,135,153**;24 Jun 93;Build 11
+2 DO UPDT490
DO EN^SROCCAT
+3 FOR I=205,206,208,209
SET SRA(I)=$GET(^SRF(SRTN,I))
+4 SET NYUK=$PIECE(SRA(208),"^",2)
DO YN
SET SRAO(1)=SHEMP_"^385"
SET NYUK=$PIECE(SRA(208),"^",7)
DO YN
SET SRAO(8)=SHEMP_"^391"
+5 SET NYUK=$PIECE(SRA(208),"^",3)
DO YN
SET SRAO(2)=SHEMP_"^386"
SET NYUK=$PIECE(SRA(206),"^",39)
DO YN
SET SRAO(9)=SHEMP_"^466"
+6 SET NYUK=$PIECE(SRA(205),"^",17)
DO YN
SET SRAO(3)=SHEMP_"^254"
SET NYUK=$PIECE(SRA(209),"^",12)
DO YN
SET SRAO(10)=SHEMP_"^490"
+7 SET NYUK=$PIECE(SRA(208),"^",5)
DO YN
SET SRAO(4)=SHEMP_"^388"
SET NYUK=$PIECE(SRA(205),"^",21)
DO YN
SET SRAO(11)=SHEMP_"^256"
+8 SET NYUK=$PIECE(SRA(205),"^",26)
DO YN
SET SRAO(5)=SHEMP_"^411"
SET NYUK=$PIECE(SRA(205),"^",22)
DO YN
SET SRAO(12)=SHEMP_"^410"
+9 SET NYUK=$PIECE(SRA(208),"^",6)
DO YN
SET SRAO(6)=SHEMP_"^389"
SET NYUK=$PIECE(SRA(206),"^",40)
DO YN
SET SRAO(13)=SHEMP_"^467"
+10 SET NYUK=$PIECE(SRA(205),"^",13)
DO YN
SET SRAO(7)=SHEMP_"^285"
SET NYUK=$PIECE(SRA(208),"^")
DO YN
SET SRAO(0)=SHEMP_"^384"
+11 ;
DISP SET SRPAGE="PAGE: 1"
SET SRHDR(.5)="OUTCOMES INFORMATION"
DO HDR^SROAUTL
+1 WRITE !,"0. Operative Death: ",?35,$PIECE(SRAO(0),"^")
+2 WRITE !!,"Perioperative (30 day) Occurrences:",!,"-----------------------------------"
+3 WRITE !,"1. Perioperative MI: ",?35,$PIECE(SRAO(1),"^"),?40," 8. Repeat cardiac surg procedure: ",?76,$PIECE(SRAO(8),"^")
+4 WRITE !,"2. Endocarditis: ",?35,$PIECE(SRAO(2),"^"),?40," 9. Tracheostomy: ",?76,$PIECE(SRAO(9),"^")
+5 WRITE !,"3. Renal failure require dialysis: ",$PIECE(SRAO(3),"^"),?40,"10. Repeat ventilator w/in 30 days: ",?76,$PIECE(SRAO(10),"^")
+6 WRITE !,"4. Mediastinitis: ",?35,$PIECE(SRAO(4),"^"),?40,"11. Stroke: ",?76,$PIECE(SRAO(11),"^")
+7 WRITE !,"5. Cardiac arrest requiring CPR: ",?35,$PIECE(SRAO(5),"^"),?40,"12. Coma >= 24 hr: ",?76,$PIECE(SRAO(12),"^")
+8 WRITE !,"6. Reoperation for bleeding: ",?35,$PIECE(SRAO(6),"^"),?40,"13. New Mech Circ Support: ",?76,$PIECE(SRAO(13),"^")
+9 WRITE !,"7. On ventilator >= 48 hr: ",?35,$PIECE(SRAO(7),"^")
+10 WRITE !!
FOR MOE=1:1:80
WRITE "-"
+11 QUIT
YN ; store answer
+1 SET SHEMP=$SELECT(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
+2 QUIT
UPDT490 ; update field 490
+1 NEW SRX
SET SRX=$PIECE($GET(^SRF(SRTN,209)),"^",12)
IF SRX=""
SET SRX="N"
+2 KILL DA,DIE,DR
SET DIE=130
SET DA=SRTN
SET DR="490////"_SRX
DO ^DIE
KILL DA,DIE,DR
+3 QUIT
UPDATE NEW SRCMP,SROC,SRI,SRIF,SRQ,SRY
DO MAP
+1 IF EMILY=5!(EMILY=13)
DO IP
QUIT
+2 SET X=$PIECE(^SRO(136.5,SROC,0),"^")
SET DIC(0)="L"
SET DLAYGO="130.22"
SET DA(1)=SRTN
SET DIC="^SRF("_SRTN_",16,"
DO FILE^DICN
+3 SET $PIECE(^SRF(SRTN,16,+Y,0),"^",2)=SROC
SET SRY=+Y
EM8 IF EMILY=8
KILL DIR
SET DIR(0)="130.22,8"
SET DIR("A")="Cardiopulmonary Bypass Status"
DO ^DIR
IF X=""
GOTO EM8
Begin DoDot:1
+1 KILL DA,DR,DIE,DIR
IF X["^"!(X="@")!(Y=0)
DO DEL
SET DA=SRTN
SET DIE=130
SET DR="391////N"
DO ^DIE
QUIT
+2 SET DA=SRY
SET DR="8///"_Y
SET DA(1)=SRTN
SET DIE="^SRF(SRTN,16,"
DO ^DIE
End DoDot:1
KILL DR,DA,DIE
+3 QUIT
IP KILL DIR
SET DIR("A")="Is this an Intraoperative occurrence? "
SET DIR("B")="YES"
SET DIR(0)="YA"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+1 SET SRIF=Y
+2 IF SRIF=1
SET X=$PIECE(^SRO(136.5,SROC,0),"^")
SET DIC(0)="L"
SET DLAYGO="130.14"
SET DA(1)=SRTN
SET DIC="^SRF("_SRTN_",10,"
DO FILE^DICN
SET $PIECE(^SRF(SRTN,10,+Y,0),"^",2)=SROC
QUIT
+3 ;
+4 IF SRIF=0
SET X=$PIECE(^SRO(136.5,SROC,0),"^")
SET DIC(0)="L"
SET DLAYGO="130.22"
SET DA(1)=SRTN
SET DIC="^SRF("_SRTN_",16,"
DO FILE^DICN
SET $PIECE(^SRF(SRTN,16,+Y,0),"^",2)=SROC
+5 QUIT
DEL ; delete existing Post/Intraoperative occurrences.
+1 NEW II,SRII,SROC
DO MAP
+2 SET II=0
FOR
SET II=$ORDER(^SRF(SRTN,16,II))
IF 'II
QUIT
SET SRII=$GET(^(II,0))
IF $PIECE(SRII,"^",2)=SROC
Begin DoDot:1
+3 SET DA(1)=SRTN
SET DA=II
SET DIK="^SRF("_SRTN_",16,"
DO ^DIK
IF '$ORDER(^SRF(SRTN,16,0))
KILL ^SRF(SRTN,16,0)
End DoDot:1
QUIT
+4 ;
+5 SET II=0
FOR
SET II=$ORDER(^SRF(SRTN,10,II))
IF 'II
QUIT
SET SRII=$GET(^(II,0))
IF $PIECE(SRII,"^",2)=SROC
Begin DoDot:1
+6 SET DA(1)=SRTN
SET DA=II
SET DIK="^SRF("_SRTN_",10,"
DO ^DIK
IF '$ORDER(^SRF(SRTN,10,0))
KILL ^SRF(SRTN,10,0)
End DoDot:1
QUIT
+7 QUIT
MAP SET SROC=$SELECT(EMILY=1:17,EMILY=2:23,EMILY=3:9,EMILY=4:25,EMILY=5:16,EMILY=6:26,EMILY=7:6,EMILY=8:27,EMILY=9:33,EMILY=10:37,EMILY=11:12,EMILY=12:13,1:34)
+1 QUIT