SROAPCA ;BIR/MAM - PRINT CLINICAL DATA ;07/19/2011
;;3.0;Surgery;**38,47,71,95,125,134,153,160,174,175,176,182,184**;24 Jun 93;Build 35
F I=0,200,206,207,208,209,200.1,210 S SRA(I)=$G(^SRF(SRTN,I)),$P(LN,"-",79)=""
S X=$P(SRA(0),"^",9),SRADATE=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
W:$Y @IOF W !,?7,"VA SURGICAL QUALITY IMPROVEMENT PROGRAM - CARDIAC SPECIALTY",!
W ! F MOE=1:1:80 W "="
W !,"I. IDENTIFYING DATA",?60,"Case #: "_SRTN
N SRSPH1,SRZIP S (SRSPH1,SRZIP)=""
S STATNUM=+$P($$SITE^SROVAR,"^",3) D ADD^VADPT
W !,"Patient: "_SRANM,?60,"Fac./Div. #: "_STATNUM
W !,"Surgery Date: "_SRADATE,?25,"Address: "_VAPA(1)
S SRSPH1=VAPA(8) S:SRSPH1="" SRSPH1="NS/Unknown" S SRZIP=$S(VAPA(11)'="":$P(VAPA(11),"^",2),1:VAPA(6)) S:SRZIP="" SRZIP="NS/Unknown"
W !,"Phone: "_SRSPH1,?25,"Zip Code: "_SRZIP
S X=VADM(3) W ?53,"Date of Birth: ",$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
S SRAO(1)=SRADATE,NYUK=$P(SRA(0),"^",4),SRAO(2)=$P(VADM(5),"^",2)
S SRAO(3)=AGE,NYUK=$P(SRA(206),"^") S:NYUK'="" NYUK=$S(NYUK["C"!(NYUK["c"):+NYUK_" cm",1:+NYUK_" in") S SRAO(4)=NYUK_"^236"
S NYUK=$P(SRA(206),"^",2) S:NYUK'="" NYUK=$S(NYUK["K"!(NYUK["k"):+NYUK_" kg",1:+NYUK_" lb") S SRAO(5)=NYUK_"^237"
S Y=$P(SRA(200.1),"^",11),C=$P(^DD(130,519,0),"^",2) D:Y'="" Y^DIQ S SRAO(6)=Y_"^519"
S Y=$P(SRA(200.1),"^",12),C=$P(^DD(130,520,0),"^",2) D:Y'="" Y^DIQ S SRAO(31)=Y_"^520"
S NYUK=$P(SRA(200),"^",11) D YN S SRAO(7)=SHEMP_"^203"
S SRAO(8)=$P(SRA(206),"^",5)_"^347",NYUK=$P(SRA(206),"^",6) D YN S SRAO(9)=SHEMP_"^209",NYUK=$P(SRA(206),"^",7) D YN S SRAO(10)=SHEMP_"^348"
S Y=$P(SRA(200.1),"^",9),C=$P(^DD(130,517,0),"^",2) D:Y'="" Y^DIQ S SRAO(11)=Y_"^517"
S Y=$P(SRA(200.1),"^",10),C=$P(^DD(130,518,0),"^",2) D:Y'="" Y^DIQ S SRAO(12)=Y_"^518"
S NYUK=$P(SRA(206),"^",11) D YN S SRAO(14)=SHEMP_"^350"
S NYUK=$P(SRA(200.1),"^",2),SRAO(15)=$S(NYUK=1:"INDEPENDENT",NYUK=2:"PARTIAL DEPENDENT",NYUK=3:"TOTALLY DEPENDENT",NYUK="NS":"NS",1:"")_"^492"
S NYUK=$P(SRA(200),"^",56),SRAO(16)=$S(NYUK=1:"NONE",NYUK=2:"<12 HRS OF SURG",NYUK=3:">12 HRS - 7 DAYS",NYUK=4:">7 DAYS",NYUK=5:"UNKNOWN",1:"")_"^640"
S NYUK=$P(SRA(206),"^",14),SRAO(17)=$S(NYUK=0:"NO",NYUK=1:"< OR = 7 DAYS OF SURG",NYUK=2:"BETWEEN 7 DAYS AND 6 MONTHS OF SURG",NYUK=3:"UNKNOWN",NYUK=4:"> 6 MONTHS",NYUK=5:"UNKNOWN",NYUK="NS":"NS",1:"")_"^205"
S NYUK=$P(SRA(206),"^",15) S SHEMP=$S(NYUK=0:"NONE",NYUK=">":">3",NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:NYUK) S SRAO(18)=SHEMP_"^352"
S NYUK=$P(SRA(200.1),"^",13),SRAO(20)=$S(NYUK=0:"NO CVD",NYUK=1:"YES/NO SURG",NYUK=2:"YES/PRIOR SURG",1:"")_"^521"
S NYUK=$P(SRA(200.1),"^",14),SRAO(21)=$S(NYUK=0:"NO CVD",NYUK=1:"HIST OF TIA'S",NYUK=2:"CVA W/O NEURO DEF",NYUK=3:"CVA W/ NEURO DEF",1:"")_"^522"
S NYUK=$P(SRA(206),"^",16) S SRAO(19)=$$OUT^SROACL1(265,NYUK)_"^265"
S SRAO(22)=$$OUT^SROAPRT1(267,$P(SRA(206),"^",18))_"^267"
S Y=$P(SRA(200),"^",59),SRAO("22A")=$S(Y=1:"NO ANGINA",Y=2:"W/N 14 DAY OF SURG",Y=3:"W/N 15-30 DAYS OF SURG",Y=4:"UNKNOWN",1:"")_"^643"
S Y=$P(SRA(207),"^",29),SRAO(23)=Y_"-"_$S(Y=0:"N CARD DX",Y=1:"Y CARD DX",Y=2:"Y CARD DX",Y=3:"Y CARD DX",Y=4:"Y CARD DX",Y=5:"N CARD DX",Y=6:"Y CARD DX",1:"")_"^423"
S NYUK=$P(SRA(206),"^",20) D YN S SRAO(24)=SHEMP_"^353",NYUK=$P(SRA(206),"^",21) D YN S SRAO(25)=SHEMP_"^354"
S NYUK=$P(SRA(206),"^",22) D YN S SRAO(26)=SHEMP_"^355"
S NYUK=$P(SRA(209),"^",2),SRAO(27)=$S(NYUK="N":"NONE",NYUK="I":"IABP",NYUK="V":"VAD",NYUK="A":"ARTI",NYUK="O":"OTHER",1:NYUK)_"^474"
S NYUK=$P(SRA(200),"^",57) D H641^SROACL1 S SRAO(28)=SHEMP_"^641"
S NYUK=$P(SRA(206),"^",10) D YN S SRAO(29)=SHEMP_"^349"
S NYUK=$P(SRA(208),"^",19) D YN S SRAO(30)=SHEMP_"^509"
S NYUK=$P(SRA(200),"^",55) S SRAO(13)=$$H618^SROACL1(NYUK)_"^618"
S NYUK=$P(SRA(200.1),"^",8),SRAO(32)=$$OUT^SROACL1(237.1,NYUK)_"^237.1"
S NYUK=$P(SRA(210),"^"),SRAO("32A")=$$OUT^SROACL1(662,NYUK)_"^662"
S NYUK=$P(SRA(200.1),"^",15),SRAO("32B")=$$OUT^SROACL1(667,NYUK)_"^667"
DISP ; display fields
W ! F MOE=1:1:80 W "="
W !,"II. CLINICAL DATA"
W !,"Gender:",?26,$P(SRAO(2),"^"),?40,"Age:",?(79-$L(SRAO(3))),SRAO(3)
W !,"Height:",?26,$P(SRAO(4),"^"),?40,"Prior MI: " I $L($P(SRAO(17),"^"))>24 W ?54,$E($P(SRAO(17),"^"),1,25)
I $L($P(SRAO(17),"^"))<25 W ?(79-$L($P(SRAO(17),"^"))),$P(SRAO(17),"^")
W !,"Weight:",?26,$P(SRAO(5),"^"),?40,"Number of prior heart surgeries:",?(79-$L($P(SRAO(18),"^"))),$P(SRAO(18),"^")
W !,"Diabetes - Long Term:",?26,$E($P(SRAO(6),"^"),1,12),?40,"Prior heart surgery: " D H485
W !,"Diabetes - 2 Wks Preop:",?26,$E($P(SRAO(31),"^"),1,12),?40,"PAD:",?(79-$L($P(SRAO(19),"^"))),$P(SRAO(19),"^")
W !,"COPD:",?26,$P(SRAO(7),"^"),?40,"CVD Repair/Obstruct:",?(79-$L($P(SRAO(20),"^"))),$P(SRAO(20),"^")
W !,"FEV1:",?26,$P(SRAO(8),"^")_$S($P(SRAO(8),"^")="":"",$P(SRAO(8),"^")="NS":"",1:" liters"),?40,"History of CVD:",?(79-$L($P(SRAO(21),"^"))),$P(SRAO(21),"^")
W !,"Cardiomegaly (X-ray): ",?26,$P(SRAO(9),"^"),?40,"Angina Severity: ",?(79-$L($P(SRAO(22),"^"))),$P(SRAO(22),"^")
W !,"Tobacco Use: ",$J($P(SRAO(11),"^"),24),?40,"Angina Timeframe: ",?(79-$L($P(SRAO("22A"),"^"))),$P(SRAO("22A"),"^")
W !,"Tobacco Use Timeframe: ",$J($P(SRAO(12),"^"),14),?40,"Congestive Heart Failure:",?(79-$L($P(SRAO(23),"^"))),$P(SRAO(23),"^")
W !,"Positive Drug Screening: ",?26,$P(SRAO(13),"^"),?40,"Current Diuretic Use:",?(79-$L($P(SRAO(24),"^"))),$P(SRAO(24),"^")
W !,"Active Endocarditis:",?26,$P(SRAO(29),"^"),?40,"IV NTG 48 Hours Preceding Surgery:",?(79-$L($P(SRAO(26),"^"))),$P(SRAO(26),"^")
W !,"Functional Status: ",$J($P(SRAO(15),"^"),18),?40,"Preop Circulatory Device:",?(79-$L($P(SRAO(27),"^"))),$P(SRAO(27),"^")
W !,"PCI:",?((18-$L($P(SRAO(16),"^"))\2)+19),$P(SRAO(16),"^"),?40,"Hypertension: ",?(79-$L($P(SRAO(28),"^"))),$P(SRAO(28),"^")
W !,"Preop Sleep Apnea:",?26,$P(SRAO(32),"^"),?40,"Preoperative Atrial Fibrillation:",?(79-$L($P(SRAO(30),"^"))),$P(SRAO(30),"^")
W !,"Sleep Apnea-Compliance:",$E($P(SRAO("32B"),"^"),1,16),?40,"Impaired Cognitive Function: ",$E($P(SRAO("32A"),"^"),1,11)
K SRA,SRAO D ^SROAPCA1
Q
YN ; store answer
S SHEMP=$S(NYUK="NS":"NS",NYUK="NA":"N/A",NYUK="N":"NO",NYUK="Y":"YES",1:"")
Q
PAGE I $E(IOST)'="P" W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
W @IOF,!,SRANM,! F MOE=1:1:80 W "="
Q
H485 S SHEMP="",X=$P(SRA(206),"^",42) F I=1:1:$L(X,",") D
.S C=$P(X,",",I) S:I>1 SHEMP=SHEMP_", " S SHEMP=SHEMP_$S(C=0:"NONE",C=1:"CABG-ONLY",C=2:"VALVE-ONLY",C=3:"CABG/VALVE",C=4:"OTHER",C=5:"CABG/OTHER",C=6:"UNKNOWN",1:"")
S X=SHEMP I $L(X)<17 W $J(X,18) Q
W $J($P(X,",")_",",16) I $L($P(X,", ",2,9))<40 W !,?41,$P(X,", ",2,9) Q
W !,?41,$P(X,", ",2,4)_",",!,?41,$P(X,", ",5,9)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROAPCA 6748 printed Nov 22, 2024@17:51:26 Page 2
SROAPCA ;BIR/MAM - PRINT CLINICAL DATA ;07/19/2011
+1 ;;3.0;Surgery;**38,47,71,95,125,134,153,160,174,175,176,182,184**;24 Jun 93;Build 35
+2 FOR I=0,200,206,207,208,209,200.1,210
SET SRA(I)=$GET(^SRF(SRTN,I))
SET $PIECE(LN,"-",79)=""
+3 SET X=$PIECE(SRA(0),"^",9)
SET SRADATE=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
+4 if $Y
WRITE @IOF
WRITE !,?7,"VA SURGICAL QUALITY IMPROVEMENT PROGRAM - CARDIAC SPECIALTY",!
+5 WRITE !
FOR MOE=1:1:80
WRITE "="
+6 WRITE !,"I. IDENTIFYING DATA",?60,"Case #: "_SRTN
+7 NEW SRSPH1,SRZIP
SET (SRSPH1,SRZIP)=""
+8 SET STATNUM=+$PIECE($$SITE^SROVAR,"^",3)
DO ADD^VADPT
+9 WRITE !,"Patient: "_SRANM,?60,"Fac./Div. #: "_STATNUM
+10 WRITE !,"Surgery Date: "_SRADATE,?25,"Address: "_VAPA(1)
+11 SET SRSPH1=VAPA(8)
if SRSPH1=""
SET SRSPH1="NS/Unknown"
SET SRZIP=$SELECT(VAPA(11)'="":$PIECE(VAPA(11),"^",2),1:VAPA(6))
if SRZIP=""
SET SRZIP="NS/Unknown"
+12 WRITE !,"Phone: "_SRSPH1,?25,"Zip Code: "_SRZIP
+13 SET X=VADM(3)
WRITE ?53,"Date of Birth: ",$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
+14 SET SRAO(1)=SRADATE
SET NYUK=$PIECE(SRA(0),"^",4)
SET SRAO(2)=$PIECE(VADM(5),"^",2)
+15 SET SRAO(3)=AGE
SET NYUK=$PIECE(SRA(206),"^")
if NYUK'=""
SET NYUK=$SELECT(NYUK["C"!(NYUK["c"):+NYUK_" cm",1:+NYUK_" in")
SET SRAO(4)=NYUK_"^236"
+16 SET NYUK=$PIECE(SRA(206),"^",2)
if NYUK'=""
SET NYUK=$SELECT(NYUK["K"!(NYUK["k"):+NYUK_" kg",1:+NYUK_" lb")
SET SRAO(5)=NYUK_"^237"
+17 SET Y=$PIECE(SRA(200.1),"^",11)
SET C=$PIECE(^DD(130,519,0),"^",2)
if Y'=""
DO Y^DIQ
SET SRAO(6)=Y_"^519"
+18 SET Y=$PIECE(SRA(200.1),"^",12)
SET C=$PIECE(^DD(130,520,0),"^",2)
if Y'=""
DO Y^DIQ
SET SRAO(31)=Y_"^520"
+19 SET NYUK=$PIECE(SRA(200),"^",11)
DO YN
SET SRAO(7)=SHEMP_"^203"
+20 SET SRAO(8)=$PIECE(SRA(206),"^",5)_"^347"
SET NYUK=$PIECE(SRA(206),"^",6)
DO YN
SET SRAO(9)=SHEMP_"^209"
SET NYUK=$PIECE(SRA(206),"^",7)
DO YN
SET SRAO(10)=SHEMP_"^348"
+21 SET Y=$PIECE(SRA(200.1),"^",9)
SET C=$PIECE(^DD(130,517,0),"^",2)
if Y'=""
DO Y^DIQ
SET SRAO(11)=Y_"^517"
+22 SET Y=$PIECE(SRA(200.1),"^",10)
SET C=$PIECE(^DD(130,518,0),"^",2)
if Y'=""
DO Y^DIQ
SET SRAO(12)=Y_"^518"
+23 SET NYUK=$PIECE(SRA(206),"^",11)
DO YN
SET SRAO(14)=SHEMP_"^350"
+24 SET NYUK=$PIECE(SRA(200.1),"^",2)
SET SRAO(15)=$SELECT(NYUK=1:"INDEPENDENT",NYUK=2:"PARTIAL DEPENDENT",NYUK=3:"TOTALLY DEPENDENT",NYUK="NS":"NS",1:"")_"^492"
+25 SET NYUK=$PIECE(SRA(200),"^",56)
SET SRAO(16)=$SELECT(NYUK=1:"NONE",NYUK=2:"<12 HRS OF SURG",NYUK=3:">12 HRS - 7 DAYS",NYUK=4:">7 DAYS",NYUK=5:"UNKNOWN",1:"")_"^640"
+26 SET NYUK=$PIECE(SRA(206),"^",14)
SET SRAO(17)=$SELECT(NYUK=0:"NO",NYUK=1:"< OR = 7 DAYS OF SURG",NYUK=2:"BETWEEN 7 DAYS AND 6 MONTHS OF SURG",NYUK=3:"UNKNOWN",NYUK=4:"> 6 MONTHS",NYUK=5:"UNKNOWN",NYUK="NS":"NS",1:"")_"^205"
+27 SET NYUK=$PIECE(SRA(206),"^",15)
SET SHEMP=$SELECT(NYUK=0:"NONE",NYUK=">":">3",NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:NYUK)
SET SRAO(18)=SHEMP_"^352"
+28 SET NYUK=$PIECE(SRA(200.1),"^",13)
SET SRAO(20)=$SELECT(NYUK=0:"NO CVD",NYUK=1:"YES/NO SURG",NYUK=2:"YES/PRIOR SURG",1:"")_"^521"
+29 SET NYUK=$PIECE(SRA(200.1),"^",14)
SET SRAO(21)=$SELECT(NYUK=0:"NO CVD",NYUK=1:"HIST OF TIA'S",NYUK=2:"CVA W/O NEURO DEF",NYUK=3:"CVA W/ NEURO DEF",1:"")_"^522"
+30 SET NYUK=$PIECE(SRA(206),"^",16)
SET SRAO(19)=$$OUT^SROACL1(265,NYUK)_"^265"
+31 SET SRAO(22)=$$OUT^SROAPRT1(267,$PIECE(SRA(206),"^",18))_"^267"
+32 SET Y=$PIECE(SRA(200),"^",59)
SET SRAO("22A")=$SELECT(Y=1:"NO ANGINA",Y=2:"W/N 14 DAY OF SURG",Y=3:"W/N 15-30 DAYS OF SURG",Y=4:"UNKNOWN",1:"")_"^643"
+33 SET Y=$PIECE(SRA(207),"^",29)
SET SRAO(23)=Y_"-"_$SELECT(Y=0:"N CARD DX",Y=1:"Y CARD DX",Y=2:"Y CARD DX",Y=3:"Y CARD DX",Y=4:"Y CARD DX",Y=5:"N CARD DX",Y=6:"Y CARD DX",1:"")_"^423"
+34 SET NYUK=$PIECE(SRA(206),"^",20)
DO YN
SET SRAO(24)=SHEMP_"^353"
SET NYUK=$PIECE(SRA(206),"^",21)
DO YN
SET SRAO(25)=SHEMP_"^354"
+35 SET NYUK=$PIECE(SRA(206),"^",22)
DO YN
SET SRAO(26)=SHEMP_"^355"
+36 SET NYUK=$PIECE(SRA(209),"^",2)
SET SRAO(27)=$SELECT(NYUK="N":"NONE",NYUK="I":"IABP",NYUK="V":"VAD",NYUK="A":"ARTI",NYUK="O":"OTHER",1:NYUK)_"^474"
+37 SET NYUK=$PIECE(SRA(200),"^",57)
DO H641^SROACL1
SET SRAO(28)=SHEMP_"^641"
+38 SET NYUK=$PIECE(SRA(206),"^",10)
DO YN
SET SRAO(29)=SHEMP_"^349"
+39 SET NYUK=$PIECE(SRA(208),"^",19)
DO YN
SET SRAO(30)=SHEMP_"^509"
+40 SET NYUK=$PIECE(SRA(200),"^",55)
SET SRAO(13)=$$H618^SROACL1(NYUK)_"^618"
+41 SET NYUK=$PIECE(SRA(200.1),"^",8)
SET SRAO(32)=$$OUT^SROACL1(237.1,NYUK)_"^237.1"
+42 SET NYUK=$PIECE(SRA(210),"^")
SET SRAO("32A")=$$OUT^SROACL1(662,NYUK)_"^662"
+43 SET NYUK=$PIECE(SRA(200.1),"^",15)
SET SRAO("32B")=$$OUT^SROACL1(667,NYUK)_"^667"
DISP ; display fields
+1 WRITE !
FOR MOE=1:1:80
WRITE "="
+2 WRITE !,"II. CLINICAL DATA"
+3 WRITE !,"Gender:",?26,$PIECE(SRAO(2),"^"),?40,"Age:",?(79-$LENGTH(SRAO(3))),SRAO(3)
+4 WRITE !,"Height:",?26,$PIECE(SRAO(4),"^"),?40,"Prior MI: "
IF $LENGTH($PIECE(SRAO(17),"^"))>24
WRITE ?54,$EXTRACT($PIECE(SRAO(17),"^"),1,25)
+5 IF $LENGTH($PIECE(SRAO(17),"^"))<25
WRITE ?(79-$LENGTH($PIECE(SRAO(17),"^"))),$PIECE(SRAO(17),"^")
+6 WRITE !,"Weight:",?26,$PIECE(SRAO(5),"^"),?40,"Number of prior heart surgeries:",?(79-$LENGTH($PIECE(SRAO(18),"^"))),$PIECE(SRAO(18),"^")
+7 WRITE !,"Diabetes - Long Term:",?26,$EXTRACT($PIECE(SRAO(6),"^"),1,12),?40,"Prior heart surgery: "
DO H485
+8 WRITE !,"Diabetes - 2 Wks Preop:",?26,$EXTRACT($PIECE(SRAO(31),"^"),1,12),?40,"PAD:",?(79-$LENGTH($PIECE(SRAO(19),"^"))),$PIECE(SRAO(19),"^")
+9 WRITE !,"COPD:",?26,$PIECE(SRAO(7),"^"),?40,"CVD Repair/Obstruct:",?(79-$LENGTH($PIECE(SRAO(20),"^"))),$PIECE(SRAO(20),"^")
+10 WRITE !,"FEV1:",?26,$PIECE(SRAO(8),"^")_$SELECT($PIECE(SRAO(8),"^")="":"",$PIECE(SRAO(8),"^")="NS":"",1:" liters"),?40,"History of CVD:",?(79-$LENGTH($PIECE(SRAO(21),"^"))),$PIECE(SRAO(21),"^")
+11 WRITE !,"Cardiomegaly (X-ray): ",?26,$PIECE(SRAO(9),"^"),?40,"Angina Severity: ",?(79-$LENGTH($PIECE(SRAO(22),"^"))),$PIECE(SRAO(22),"^")
+12 WRITE !,"Tobacco Use: ",$JUSTIFY($PIECE(SRAO(11),"^"),24),?40,"Angina Timeframe: ",?(79-$LENGTH($PIECE(SRAO("22A"),"^"))),$PIECE(SRAO("22A"),"^")
+13 WRITE !,"Tobacco Use Timeframe: ",$JUSTIFY($PIECE(SRAO(12),"^"),14),?40,"Congestive Heart Failure:",?(79-$LENGTH($PIECE(SRAO(23),"^"))),$PIECE(SRAO(23),"^")
+14 WRITE !,"Positive Drug Screening: ",?26,$PIECE(SRAO(13),"^"),?40,"Current Diuretic Use:",?(79-$LENGTH($PIECE(SRAO(24),"^"))),$PIECE(SRAO(24),"^")
+15 WRITE !,"Active Endocarditis:",?26,$PIECE(SRAO(29),"^"),?40,"IV NTG 48 Hours Preceding Surgery:",?(79-$LENGTH($PIECE(SRAO(26),"^"))),$PIECE(SRAO(26),"^")
+16 WRITE !,"Functional Status: ",$JUSTIFY($PIECE(SRAO(15),"^"),18),?40,"Preop Circulatory Device:",?(79-$LENGTH($PIECE(SRAO(27),"^"))),$PIECE(SRAO(27),"^")
+17 WRITE !,"PCI:",?((18-$LENGTH($PIECE(SRAO(16),"^"))\2)+19),$PIECE(SRAO(16),"^"),?40,"Hypertension: ",?(79-$LENGTH($PIECE(SRAO(28),"^"))),$PIECE(SRAO(28),"^")
+18 WRITE !,"Preop Sleep Apnea:",?26,$PIECE(SRAO(32),"^"),?40,"Preoperative Atrial Fibrillation:",?(79-$LENGTH($PIECE(SRAO(30),"^"))),$PIECE(SRAO(30),"^")
+19 WRITE !,"Sleep Apnea-Compliance:",$EXTRACT($PIECE(SRAO("32B"),"^"),1,16),?40,"Impaired Cognitive Function: ",$EXTRACT($PIECE(SRAO("32A"),"^"),1,11)
+20 KILL SRA,SRAO
DO ^SROAPCA1
+21 QUIT
YN ; store answer
+1 SET SHEMP=$SELECT(NYUK="NS":"NS",NYUK="NA":"N/A",NYUK="N":"NO",NYUK="Y":"YES",1:"")
+2 QUIT
PAGE IF $EXTRACT(IOST)'="P"
WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
QUIT
+1 IF $DATA(ZTQUEUED)
DO ^SROSTOP
IF SRHALT
SET SRSOUT=1
QUIT
+2 WRITE @IOF,!,SRANM,!
FOR MOE=1:1:80
WRITE "="
+3 QUIT
H485 SET SHEMP=""
SET X=$PIECE(SRA(206),"^",42)
FOR I=1:1:$LENGTH(X,",")
Begin DoDot:1
+1 SET C=$PIECE(X,",",I)
if I>1
SET SHEMP=SHEMP_", "
SET SHEMP=SHEMP_$SELECT(C=0:"NONE",C=1:"CABG-ONLY",C=2:"VALVE-ONLY",C=3:"CABG/VALVE",C=4:"OTHER",C=5:"CABG/OTHER",C=6:"UNKNOWN",1:"")
End DoDot:1
+2 SET X=SHEMP
IF $LENGTH(X)<17
WRITE $JUSTIFY(X,18)
QUIT
+3 WRITE $JUSTIFY($PIECE(X,",")_",",16)
IF $LENGTH($PIECE(X,", ",2,9))<40
WRITE !,?41,$PIECE(X,", ",2,9)
QUIT
+4 WRITE !,?41,$PIECE(X,", ",2,4)_",",!,?41,$PIECE(X,", ",5,9)
+5 QUIT