SROAPCA2 ;BIR/MAM - PRINT OPERATIVE DATA ;06/28/06
;;3.0; Surgery ;**38,71,95,125,153**;24 Jun 93;Build 11
S SRA(206)=$G(^SRF(SRTN,206)),SRA(207)=$G(^SRF(SRTN,207)),SRA(209)=$G(^SRF(SRTN,209)),SRA(207.1)=$G(^SRF(SRTN,207.1))
S SRAO(1)=$P(SRA(207),"^")_"^365"
S SRAO(2)=$P(SRA(207),"^",2)_"^366"
S SRAO(3)=$P(SRA(207),"^",24)_"^464"
S SRAO(4)=$P(SRA(207),"^",25)_"^465"
S SRAO(5)=$P(SRA(207),"^",20)_"^416"
S NYUK=$P(SRA(207),"^",3) D YN S SRAO(6)=SHEMP_"^367"
S NYUK=$P(SRA(207),"^",4) D YN S SRAO(7)=SHEMP_"^368"
S NYUK=$P(SRA(207),"^",5) D YN S SRAO(8)=SHEMP_"^369"
S NYUK=$P(SRA(207),"^",6) S SRAO(9)=$S(NYUK="Y":"YES",NYUK="N":"NO",NYUK=1:"AORTIC",NYUK=2:"MITRAL",NYUK=3:"TRICUSPID",NYUK=4:"OTHER/COMBINATION",NYUK=5:"NONE",1:"")_"^370"
S NYUK=$P(SRA(207),"^",7) D YN S SRAO(10)=SHEMP_"^371"
S NYUK=$P(SRA(209),"^",9) D YN S SRAO(11)=SHEMP_"^481"
S NYUK=$P(SRA(209),"^",11) D YN S SRAO(12)=SHEMP_"^483"
S NYUK=$P(SRA(209),"^",14) S SHEMP=$S(NYUK="F":"FULL MAZE",NYUK="N":"NO MAZE PERFORMED",NYUK="M":"MINI MAZE",1:"") S SRAO(13)=SHEMP_"^512"
S NYUK=$P(SRA(207),"^",12) D YN S SRAO(14)=SHEMP_"^376"
S NYUK=$P(SRA(207),"^",13) D YN S SRAO(15)=SHEMP_"^380"
S NYUK=$P(SRA(207),"^",16) D YN S SRAO(16)=SHEMP_"^378"
S NYUK=$P(SRA(207),"^",14) D YN S SRAO(17)=SHEMP_"^377"
S NYUK=$P(SRA(207),"^",18) D YN S SRAO(18)=SHEMP_"^379"
S NYUK=$P(SRA(207),"^",9) D YN S SRAO(19)=SHEMP_"^373"
S NYUK=$P($G(^SRF(SRTN,209.1)),"^") S SRAO(20)=$S(NYUK="NS":"NS",1:NYUK)_"^484"
S NYUK=$P(SRA(207),"^",8) D YN S SRAO(21)=SHEMP_"^372"
S NYUK=$P(SRA(207.1),"^",2) D YN S SRAO("21H")=SHEMP_"^505"
S NYUK=$P(SRA(207),"^",15) D YN S SRAO(22)=SHEMP_"^381"
S NYUK=$P(SRA(207),"^",17) D YN S SRAO(23)=SHEMP_"^382"
S SRAO(24)=$P(SRA(206),"^",37)_"^451"
S SRAO(25)=$P(SRA(206),"^",36)_"^450"
S Y=$P(SRA(207),"^",26),C=$P(^DD(130,468,0),"^",2) D:Y'="" Y^DIQ S SRAO(26)=Y_"^468"
S Y=$P(SRA(207),"^",27),C=$P(^DD(130,469,0),"^",2) D:Y'="" Y^DIQ S SRAO(27)=Y_"^469"
S NYUK=$P(SRA(209),"^",13) D YN S SRAO(29)=SHEMP_"^502"
W !!,"VI. OPERATIVE DATA"
W !,"Cardiac surgical procedures with or without cardiopulmonary bypass",!,"CABG distal anastomoses:",?40,"Bridge to transplant/Device:",?75,$P(SRAO(11),"^")
W !,?2,"Number with Vein:",?33,$P(SRAO(1),"^"),?40,"TMR:",?75,$P(SRAO(12),"^")
W !,?2,"Number with IMA:",?33,$P(SRAO(2),"^"),?40,"Maze procedure:",?61,$J($P(SRAO(13),"^"),17)
W !,?2,"Number with Radial Artery:",?33,$P(SRAO(3),"^"),?40,"ASD repair:",?75,$P(SRAO(14),"^")
W !,?2,"Number with Other Artery:",?33,$P(SRAO(4),"^"),?40,"VSD repair:",?75,$P(SRAO(15),"^")
W !,?2,"Number with Other Conduit:",?33,$P(SRAO(5),"^"),?40,"Myectomy for IHSS:",?75,$P(SRAO(16),"^")
W !,"Aortic Valve Replacement:",?33,$P(SRAO(6),"^"),?40,"Myxoma resection:",?75,$P(SRAO(17),"^")
W !,"Mitral Valve Replacement:",?33,$P(SRAO(7),"^"),?40,"Other tumor resection:",?75,$P(SRAO(18),"^")
W !,"Tricuspid Valve Replacement:",?33,$P(SRAO(8),"^"),?40,"Cardiac transplant:",?75,$P(SRAO(19),"^")
W !,"Valve Repair:",?33,$P(SRAO(9),"^"),?40,"Great Vessel Repair:",?75,$P(SRAO(21),"^")
W !,"LV Aneurysmectomy:",?33,$P(SRAO(10),"^"),?40,"Endovascular Repair:",?75,$P(SRAO("21H"),"^")
W !,?40,"Other Cardiac procedure(s):",?75,$P(SRAO(29),"^")
W !,"* Other Cardiac procedures (Specify): " I $P(SRAO(20),"^")'="" S SRQ=0 S X=$P(SRAO(20),"^") W:$L(X)<49 X,! I $L(X)>48 S Z=$L(X) D
.I X'[" " W ?29,X Q
.S I=0,LINE=1 F S SRL=$S(LINE=1:48,1:80) D Q:SRQ
..I $E(X,1,SRL)'[" " W X,! S SRQ=1 Q
..S J=SRL-I,Y=$E(X,J),I=I+1 I Y=" " W $E(X,1,J-1),! S X=$E(X,J+1,Z),Z=$L(X),I=0,LINE=LINE+1 I Z<SRL W X S SRQ=1 Q
W !!,"Indicate other cardiac procedures only if done with cardiopulmonary bypass"
W !,"Foreign body removal:",?33,$P(SRAO(22),"^")
W !,"Pericardiectomy:",?33,$P(SRAO(23),"^")
W !!,"Other Operative Data details"
W !,"Total CPB Time: ",?20,$P(SRAO(24),"^")_" min",?42,"Total Ischemic Time: ",$P(SRAO(25),"^")_" min"
W !,"Incision Type: ",?25,$P(SRAO(26),"^")
W !,"Conversion Off Pump to CPB: ",$P(SRAO(27),"^")
I $Y+6>IOSL D PAGE^SROAPCA I SRSOUT Q
K SRA,SRAO D ^SROAPCA3
Q
YN ; store answer
S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
Q
SROAPCA2 ;BIR/MAM - PRINT OPERATIVE DATA ;06/28/06
+1 ;;3.0; Surgery ;**38,71,95,125,153**;24 Jun 93;Build 11
+2 SET SRA(206)=$GET(^SRF(SRTN,206))
SET SRA(207)=$GET(^SRF(SRTN,207))
SET SRA(209)=$GET(^SRF(SRTN,209))
SET SRA(207.1)=$GET(^SRF(SRTN,207.1))
+3 SET SRAO(1)=$PIECE(SRA(207),"^")_"^365"
+4 SET SRAO(2)=$PIECE(SRA(207),"^",2)_"^366"
+5 SET SRAO(3)=$PIECE(SRA(207),"^",24)_"^464"
+6 SET SRAO(4)=$PIECE(SRA(207),"^",25)_"^465"
+7 SET SRAO(5)=$PIECE(SRA(207),"^",20)_"^416"
+8 SET NYUK=$PIECE(SRA(207),"^",3)
DO YN
SET SRAO(6)=SHEMP_"^367"
+9 SET NYUK=$PIECE(SRA(207),"^",4)
DO YN
SET SRAO(7)=SHEMP_"^368"
+10 SET NYUK=$PIECE(SRA(207),"^",5)
DO YN
SET SRAO(8)=SHEMP_"^369"
+11 SET NYUK=$PIECE(SRA(207),"^",6)
SET SRAO(9)=$SELECT(NYUK="Y":"YES",NYUK="N":"NO",NYUK=1:"AORTIC",NYUK=2:"MITRAL",NYUK=3:"TRICUSPID",NYUK=4:"OTHER/COMBINATION",NYUK=5:"NONE",1:"")_"^370"
+12 SET NYUK=$PIECE(SRA(207),"^",7)
DO YN
SET SRAO(10)=SHEMP_"^371"
+13 SET NYUK=$PIECE(SRA(209),"^",9)
DO YN
SET SRAO(11)=SHEMP_"^481"
+14 SET NYUK=$PIECE(SRA(209),"^",11)
DO YN
SET SRAO(12)=SHEMP_"^483"
+15 SET NYUK=$PIECE(SRA(209),"^",14)
SET SHEMP=$SELECT(NYUK="F":"FULL MAZE",NYUK="N":"NO MAZE PERFORMED",NYUK="M":"MINI MAZE",1:"")
SET SRAO(13)=SHEMP_"^512"
+16 SET NYUK=$PIECE(SRA(207),"^",12)
DO YN
SET SRAO(14)=SHEMP_"^376"
+17 SET NYUK=$PIECE(SRA(207),"^",13)
DO YN
SET SRAO(15)=SHEMP_"^380"
+18 SET NYUK=$PIECE(SRA(207),"^",16)
DO YN
SET SRAO(16)=SHEMP_"^378"
+19 SET NYUK=$PIECE(SRA(207),"^",14)
DO YN
SET SRAO(17)=SHEMP_"^377"
+20 SET NYUK=$PIECE(SRA(207),"^",18)
DO YN
SET SRAO(18)=SHEMP_"^379"
+21 SET NYUK=$PIECE(SRA(207),"^",9)
DO YN
SET SRAO(19)=SHEMP_"^373"
+22 SET NYUK=$PIECE($GET(^SRF(SRTN,209.1)),"^")
SET SRAO(20)=$SELECT(NYUK="NS":"NS",1:NYUK)_"^484"
+23 SET NYUK=$PIECE(SRA(207),"^",8)
DO YN
SET SRAO(21)=SHEMP_"^372"
+24 SET NYUK=$PIECE(SRA(207.1),"^",2)
DO YN
SET SRAO("21H")=SHEMP_"^505"
+25 SET NYUK=$PIECE(SRA(207),"^",15)
DO YN
SET SRAO(22)=SHEMP_"^381"
+26 SET NYUK=$PIECE(SRA(207),"^",17)
DO YN
SET SRAO(23)=SHEMP_"^382"
+27 SET SRAO(24)=$PIECE(SRA(206),"^",37)_"^451"
+28 SET SRAO(25)=$PIECE(SRA(206),"^",36)_"^450"
+29 SET Y=$PIECE(SRA(207),"^",26)
SET C=$PIECE(^DD(130,468,0),"^",2)
IF Y'=""
DO Y^DIQ
SET SRAO(26)=Y_"^468"
+30 SET Y=$PIECE(SRA(207),"^",27)
SET C=$PIECE(^DD(130,469,0),"^",2)
IF Y'=""
DO Y^DIQ
SET SRAO(27)=Y_"^469"
+31 SET NYUK=$PIECE(SRA(209),"^",13)
DO YN
SET SRAO(29)=SHEMP_"^502"
+32 WRITE !!,"VI. OPERATIVE DATA"
+33 WRITE !,"Cardiac surgical procedures with or without cardiopulmonary bypass",!,"CABG distal anastomoses:",?40,"Bridge to transplant/Device:",?75,$PIECE(SRAO(11),"^")
+34 WRITE !,?2,"Number with Vein:",?33,$PIECE(SRAO(1),"^"),?40,"TMR:",?75,$PIECE(SRAO(12),"^")
+35 WRITE !,?2,"Number with IMA:",?33,$PIECE(SRAO(2),"^"),?40,"Maze procedure:",?61,$JUSTIFY($PIECE(SRAO(13),"^"),17)
+36 WRITE !,?2,"Number with Radial Artery:",?33,$PIECE(SRAO(3),"^"),?40,"ASD repair:",?75,$PIECE(SRAO(14),"^")
+37 WRITE !,?2,"Number with Other Artery:",?33,$PIECE(SRAO(4),"^"),?40,"VSD repair:",?75,$PIECE(SRAO(15),"^")
+38 WRITE !,?2,"Number with Other Conduit:",?33,$PIECE(SRAO(5),"^"),?40,"Myectomy for IHSS:",?75,$PIECE(SRAO(16),"^")
+39 WRITE !,"Aortic Valve Replacement:",?33,$PIECE(SRAO(6),"^"),?40,"Myxoma resection:",?75,$PIECE(SRAO(17),"^")
+40 WRITE !,"Mitral Valve Replacement:",?33,$PIECE(SRAO(7),"^"),?40,"Other tumor resection:",?75,$PIECE(SRAO(18),"^")
+41 WRITE !,"Tricuspid Valve Replacement:",?33,$PIECE(SRAO(8),"^"),?40,"Cardiac transplant:",?75,$PIECE(SRAO(19),"^")
+42 WRITE !,"Valve Repair:",?33,$PIECE(SRAO(9),"^"),?40,"Great Vessel Repair:",?75,$PIECE(SRAO(21),"^")
+43 WRITE !,"LV Aneurysmectomy:",?33,$PIECE(SRAO(10),"^"),?40,"Endovascular Repair:",?75,$PIECE(SRAO("21H"),"^")
+44 WRITE !,?40,"Other Cardiac procedure(s):",?75,$PIECE(SRAO(29),"^")
+45 WRITE !,"* Other Cardiac procedures (Specify): "
IF $PIECE(SRAO(20),"^")'=""
SET SRQ=0
SET X=$PIECE(SRAO(20),"^")
IF $LENGTH(X)<49
WRITE X,!
IF $LENGTH(X)>48
SET Z=$LENGTH(X)
Begin DoDot:1
+46 IF X'[" "
WRITE ?29,X
QUIT
+47 SET I=0
SET LINE=1
FOR
SET SRL=$SELECT(LINE=1:48,1:80)
Begin DoDot:2
+48 IF $EXTRACT(X,1,SRL)'[" "
WRITE X,!
SET SRQ=1
QUIT
+49 SET J=SRL-I
SET Y=$EXTRACT(X,J)
SET I=I+1
IF Y=" "
WRITE $EXTRACT(X,1,J-1),!
SET X=$EXTRACT(X,J+1,Z)
SET Z=$LENGTH(X)
SET I=0
SET LINE=LINE+1
IF Z<SRL
WRITE X
SET SRQ=1
QUIT
End DoDot:2
IF SRQ
QUIT
End DoDot:1
+50 WRITE !!,"Indicate other cardiac procedures only if done with cardiopulmonary bypass"
+51 WRITE !,"Foreign body removal:",?33,$PIECE(SRAO(22),"^")
+52 WRITE !,"Pericardiectomy:",?33,$PIECE(SRAO(23),"^")
+53 WRITE !!,"Other Operative Data details"
+54 WRITE !,"Total CPB Time: ",?20,$PIECE(SRAO(24),"^")_" min",?42,"Total Ischemic Time: ",$PIECE(SRAO(25),"^")_" min"
+55 WRITE !,"Incision Type: ",?25,$PIECE(SRAO(26),"^")
+56 WRITE !,"Conversion Off Pump to CPB: ",$PIECE(SRAO(27),"^")
+57 IF $Y+6>IOSL
DO PAGE^SROAPCA
IF SRSOUT
QUIT
+58 KILL SRA,SRAO
DO ^SROAPCA3
+59 QUIT
YN ; store answer
+1 SET SHEMP=$SELECT(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
+2 QUIT