source: FOIAVistA/tag/r/SURGERY-SR/SROAPCA3.m@ 1093

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

WorldVistAEHR overlayed on FOIAVistA

File size: 4.1 KB
Line 
1SROAPCA3 ;B'HAM ISC/MAM - CARDIAC OCCURRENCE DATA ;08/23/07
2 ;;3.0; Surgery ;**38,71,95,101,125,160,164**;24 Jun 93;Build 2
3 D EN^SROCCAT K SRA S SRA(205)=$G(^SRF(SRTN,205)),SRA(208)=$G(^SRF(SRTN,208)),SRA(206)=$G(^SRF(SRTN,206)),SRA(209)=$G(^SRF(SRTN,209))
4 S NYUK=$P(SRA(208),"^") D YN S SRAO(1)=SHEMP_"^384"
5 S Y=$P($G(^DPT(DFN,.35)),"^") D DT^SROAPCA1 S SRAO(2)=X
6 S NYUK=$P(SRA(208),"^",2) D YN S SRAO(3)=SHEMP_"^385",NYUK=$P(SRA(208),"^",3) D YN S SRAO(4)=SHEMP_"^386",NYUK=$P(SRA(205),"^",17) D YN S SRAO(5)=SHEMP_"^254",NYUK=$P(SRA(209),"^",12) D YN S SRAO(6)=SHEMP_"^490"
7 S NYUK=$P(SRA(208),"^",5) D YN S SRAO(7)=SHEMP_"^388",NYUK=$P(SRA(208),"^",6) D YN S SRAO(8)=SHEMP_"^389",NYUK=$P(SRA(205),"^",13) D YN S SRAO(9)=SHEMP_"^285"
8 S NYUK=$P(SRA(208),"^",7) D YN S SRAO(10)=SHEMP_"^391",NYUK=$P(SRA(205),"^",22) D YN S SRAO(11)=SHEMP_"^410"
9 S NYUK=$P(SRA(205),"^",21) D YN S SRAO(12)=SHEMP_"^256",NYUK=$P(SRA(205),"^",26) D YN S SRAO(13)=SHEMP_"^411"
10 S NYUK=$P(SRA(206),"^",39) D YN S SRAO(14)=SHEMP_"^466"
11 S NYUK=$P(SRA(206),"^",40) D YN S SRAO(15)=SHEMP_"^467"
12 I $Y+5>IOSL D PAGE^SROAPCA I SRSOUT Q
13 W !!,"VII. OUTCOMES"
14 W !,"Operative Death:",?18,$P(SRAO(1),"^"),?43,"Date of Death:",?58,$P(SRAO(2),"^")
15 ;I $Y+10>IOSL D PAGE^SROAPCA I SRSOUT Q
16 W !!,"Perioperative (30 day) Occurrences:"
17 W !,?2,"Perioperative MI:",?36,$P(SRAO(3),"^"),?42,"Repeat cardiac Surg procedure:",?74,$P(SRAO(10),"^")
18 W !,?2,"Endocarditis:",?36,$P(SRAO(4),"^"),?42,"Tracheostomy:",?74,$P(SRAO(14),"^")
19 W !,?2,"Renal Failure Requiring Dialysis:",?36,$P(SRAO(5),"^"),?42,"Ventilator supp within 30 days:",?74,$P(SRAO(6),"^")
20 W !,?2,"Mediastinitis:",?36,$P(SRAO(7),"^"),?42,"Stroke/CVA:",?74,$P(SRAO(12),"^")
21 W !,?2,"Cardiac Arrest Requiring CPR:",?36,$P(SRAO(13),"^"),?42,"Coma > or = 24 Hours:",?74,$P(SRAO(11),"^")
22 W !,?2,"Reoperation for Bleeding:",?36,$P(SRAO(8),"^"),?42,"New Mech Circulatory Support:",?74,$P(SRAO(15),"^")
23 W !,?2,"On ventilator > or = 48 hr:",?36,$P(SRAO(9),"^")
24 D RES
25 Q
26YN ; store answer
27 S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
28 Q
29 ;
30RES I $Y+12>IOSL D PAGE^SROAPCA I SRSOUT Q
31 S SRA(208)=$G(^SRF(SRTN,208))
32 S SRA(.2)=$G(^SRF(SRTN,.2))
33 W !!,"VIII. RESOURCE DATA"
34 S Y=$P($G(^SRF(SRTN,208)),"^",14) D DT^SROAPCA1 W !,"Hospital Admission Date:",?47,X
35 S Y=$P($G(^SRF(SRTN,208)),"^",15) D DT^SROAPCA1 W !,"Hospital Discharge Date:",?47,X
36 S Y=$P(SRA(.2),"^",10) D DT^SROAPCA1 W !,"Time Patient In OR: ",?47,X
37 S Y=$P(SRA(.2),"^",12) D DT^SROAPCA1 W !,"Time Patient Out OR: ",?47,X
38 S Y=$P($G(^SRF(SRTN,208)),"^",22) I Y>1 D DT^SROAPCA1 S Y=X
39 S Y=$S(Y="NS":"Unable to determine",Y="RI":"Remains intubated at 30 days",1:Y) W !,"Date and Time Patient Extubated: ",?47,Y
40 S Y=$P($G(^SRF(SRTN,208)),"^",23) I Y>1 D DT^SROAPCA1 S Y=X
41 S Y=$S(Y="NS":"Unable to determine",Y="RI":"Remains in ICU at 30 days",1:Y) W !,"Date and Time Patient Discharged from ICU: ",?47,Y
42 S Y=$P(SRA(209),"^") W !,"Patient is Homeless: ",?47,$S(Y="Y":"YES",Y="N":"NO",Y="NS":"NS",1:"")
43 S Y=$P(SRA(206),"^",41) W !,"Cardiac Surg Performed at Non-VA Facility: ",?47,$S(Y="Y":"YES",Y="N":"NO",Y="NS":"UNKNOWN",1:"")
44 S Y=$P(SRA(209),"^",15) D DT^SROAPCA1 W !,"CT Surgery Consult Date: ",?47,$P(X," ")
45 W !,"Resource Data Comments: "
46 I $G(^SRF(SRTN,206.2))'="" S SRQ=0 S X=$G(^SRF(SRTN,206.2)) W:$L(X)<49 X,! I $L(X)>48 S Z=$L(X) D
47 .I X'[" " W ?25,X Q
48 .S I=0,LINE=1 F S SRL=$S(LINE=1:48,1:80) D Q:SRQ
49 ..I $E(X,1,SRL)'[" " W X,! S SRQ=1 Q
50 ..S J=SRL-I,Y=$E(X,J),I=I+1 I Y=" " W $E(X,1,J-1),!,?5 S X=$E(X,J+1,Z),Z=$L(X),I=0,LINE=LINE+1 I Z<SRL W X S SRQ=1 Q
51 I $Y+7>IOSL D PAGE^SROAPCA I SRSOUT Q
52 W ! F MOE=1:1:80 W "="
53 W !,"IX. SOCIOECONOMIC, ETHNICITY, AND RACE"
54 N SREMP S SREMP=$P(SRA(208),"^",18) S SREMP=$S(SREMP=1:"EMPLOYED FULL TIME",SREMP=2:"EMPLOYED PART TIME",SREMP=3:"NOT EMPLOYED",SREMP=4:"SELF EMPLOYED",SREMP=5:"RETIRED",SREMP=6:"ACTIVE MILITARY DUTY",SREMP=9:"UNKNOWN",1:" ")
55 W !,?1,"Employment Status Preoperatively: ",?40,SREMP
56 K SRA,SRAO
57 ; Race/Ethnic
58 D ENTH^SRORACE
59 I $Y+7>IOSL D PAGE^SROAPCA I SRSOUT Q
60 D ^SROAPCA4
61 W !!," *** End of report for "_SRANM_" assessment #"_SRTN_" ***"
62 I $E(IOST)'="P" W ! K DIR S DIR(0)="E" D ^DIR K DIR
63 Q
Note: See TracBrowser for help on using the repository browser.