source: WorldVistAEHR/trunk/r/SURGERY-SR/SROUTC.m@ 1150

Last change on this file since 1150 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1SROUTC ;BIR/SJA - OUTCOMES DATA ;03/13/06
2 ;;3.0; Surgery ;**125,135,153**;24 Jun 93;Build 11
3 D UPDT490,EN^SROCCAT
4 F I=205,206,208,209 S SRA(I)=$G(^SRF(SRTN,I))
5 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"
6 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"
7 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"
8 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"
9 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"
10 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"
11 S NYUK=$P(SRA(205),"^",13) D YN S SRAO(7)=SHEMP_"^285",NYUK=$P(SRA(208),"^") D YN S SRAO(0)=SHEMP_"^384"
12 ;
13DISP S SRPAGE="PAGE: 1",SRHDR(.5)="OUTCOMES INFORMATION" D HDR^SROAUTL
14 W !,"0. Operative Death: ",?35,$P(SRAO(0),"^")
15 W !!,"Perioperative (30 day) Occurrences:",!,"-----------------------------------"
16 W !,"1. Perioperative MI: ",?35,$P(SRAO(1),"^"),?40," 8. Repeat cardiac surg procedure: ",?76,$P(SRAO(8),"^")
17 W !,"2. Endocarditis: ",?35,$P(SRAO(2),"^"),?40," 9. Tracheostomy: ",?76,$P(SRAO(9),"^")
18 W !,"3. Renal failure require dialysis: ",$P(SRAO(3),"^"),?40,"10. Repeat ventilator w/in 30 days: ",?76,$P(SRAO(10),"^")
19 W !,"4. Mediastinitis: ",?35,$P(SRAO(4),"^"),?40,"11. Stroke: ",?76,$P(SRAO(11),"^")
20 W !,"5. Cardiac arrest requiring CPR: ",?35,$P(SRAO(5),"^"),?40,"12. Coma >= 24 hr: ",?76,$P(SRAO(12),"^")
21 W !,"6. Reoperation for bleeding: ",?35,$P(SRAO(6),"^"),?40,"13. New Mech Circ Support: ",?76,$P(SRAO(13),"^")
22 W !,"7. On ventilator >= 48 hr: ",?35,$P(SRAO(7),"^")
23 W !! F MOE=1:1:80 W "-"
24 Q
25YN ; store answer
26 S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
27 Q
28UPDT490 ; update field 490
29 N SRX S SRX=$P($G(^SRF(SRTN,209)),"^",12) S:SRX="" SRX="N"
30 K DA,DIE,DR S DIE=130,DA=SRTN,DR="490////"_SRX D ^DIE K DA,DIE,DR
31 Q
32UPDATE N SRCMP,SROC,SRI,SRIF,SRQ,SRY D MAP
33 I EMILY=5!(EMILY=13) D IP Q
34 S X=$P(^SRO(136.5,SROC,0),"^"),DIC(0)="L",DLAYGO="130.22",DA(1)=SRTN,DIC="^SRF("_SRTN_",16," D FILE^DICN
35 S $P(^SRF(SRTN,16,+Y,0),"^",2)=SROC,SRY=+Y
36EM8 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
37 .K DA,DR,DIE,DIR I X["^"!(X="@")!(Y=0) D DEL S DA=SRTN,DIE=130,DR="391////N" D ^DIE Q
38 .S DA=SRY,DR="8///"_Y,DA(1)=SRTN,DIE="^SRF(SRTN,16," D ^DIE
39 Q
40IP 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)
41 S SRIF=Y
42 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
43 ;
44 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
45 Q
46DEL ; delete existing Post/Intraoperative occurrences.
47 N II,SRII,SROC D MAP
48 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
49 .S DA(1)=SRTN,DA=II,DIK="^SRF("_SRTN_",16," D ^DIK I '$O(^SRF(SRTN,16,0)) K ^SRF(SRTN,16,0)
50 ;
51 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
52 .S DA(1)=SRTN,DA=II,DIK="^SRF("_SRTN_",10," D ^DIK I '$O(^SRF(SRTN,10,0)) K ^SRF(SRTN,10,0)
53 Q
54MAP 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)
55 Q
Note: See TracBrowser for help on using the repository browser.