SROACR1 ;BIR/MAM - OPERATIVE DATA, PAGE 1 ;06/28/06
;;3.0; Surgery ;**38,71,93,95,99,125,153**;24 Jun 93;Build 11
;
S SRA(206)=$G(^SRF(SRTN,206)),SRA(209)=$G(^SRF(SRTN,209))
S SRA(207)=$G(^SRF(SRTN,207)),SRA(207.1)=$G(^SRF(SRTN,207.1)) I $P(SRA(207),"^",27)="" K DA,DIE,DR S DA=SRTN,DIE=130,DR="469////5" D ^DIE K DA,DIE,DR S SRA(207)=$G(^SRF(SRTN,207))
S SRAO(1)=$P(SRA(207),"^")_"^365",SRAO(2)=$P(SRA(207),"^",2)_"^366",SRAO(3)=$P(SRA(207),"^",24)_"^464",SRAO(4)=$P(SRA(207),"^",25)_"^465",SRAO(5)=$P(SRA(207),"^",20)_"^416"
S NYUK=$P(SRA(207),"^",3) D YN S SRAO(6)=SHEMP_"^367",NYUK=$P(SRA(207),"^",4) D YN S SRAO(7)=SHEMP_"^368",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",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(SRA(207),"^",8) D YN S SRAO(20)=SHEMP_"^372"
S NYUK=$P(SRA(207.1),"^",2) D YN S SRAO(21)=SHEMP_"^505"
S SRAO(22)=$P($G(^SRF(SRTN,209)),"^",13)_"^502"
;
DISP S SRPAGE="PAGE: 1 OF 2" D HDR^SROAUTL
W "Cardiac surgical procedures with or without cardiopulmonary bypass "
;W ! F MOE=1:1:80 W "-"
W !,"CABG distal anastomoses:",?40,"11. Bridge to transplant/Device:",?75,$P(SRAO(11),"^")
W !," 1. Number with vein:",?34,$P(SRAO(1),"^"),?40,"12. TMR:",?75,$P(SRAO(12),"^")
W !," 2. Number with IMA:",?34,$P(SRAO(2),"^"),?40,"13. Maze procedure:",?61,$J($P(SRAO(13),"^"),17)
W !," 3. Number with Radial Artery:",?34,$P(SRAO(3),"^"),?40,"14. ASD repair:",?75,$P(SRAO(14),"^")
W !," 4. Number with Other Artery:",?34,$P(SRAO(4),"^"),?40,"15. VSD repair:",?75,$P(SRAO(15),"^")
W !," 5. Number with Other Conduit:",?34,$P(SRAO(5),"^"),?40,"16. Myectomy for IHSS:",?75,$P(SRAO(16),"^")
W !,?40,"17. Myxoma resection:",?75,$P(SRAO(17),"^")
W !," 6. Aortic Valve Replacement:",?34,$P(SRAO(6),"^"),?40,"18. Other tumor resection:",?75,$P(SRAO(18),"^")
W !," 7. Mitral Valve Replacement:",?34,$P(SRAO(7),"^"),?40,"19. Cardiac transplant:",?75,$P(SRAO(19),"^")
W !," 8. Tricuspid Valve Replacement:",?34,$P(SRAO(8),"^"),?40,"20. Great Vessel Repair:",?75,$P(SRAO(20),"^")
W !," 9. Valve Repair: ",$J($P(SRAO(9),"^"),18),?40,"21. Endovascular Repair:",?75,$P(SRAO(21),"^")
W !,"10. LV Aneurysmectomy:",?34,$P(SRAO(10),"^"),?40,"22. Other cardiac procedures:" S X=$P(SRAO(22),"^") W ?75,$S(X="N":"NO",X="Y":"YES",1:""),!
S X="IORVON;IORVOFF" D ENDR^%ZISS
S X=$P($G(^SRF(SRTN,209.1)),"^") I X'="",X'="NS" S SRQ=0 W !,IORVON_"* Other cardiac procedures (specify): " W:$L(X)<56 X,! I $L(X)>55 S Z=$L(X) D
.I X'[" " W ?27,X Q
.S I=0,LINE=1 F S SRL=$S(LINE=1:39,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 IORVOFF
W ! F MOE=1:1:80 W "-"
Q
CHCK ; compare ischemic time to CPB time
I '$D(IORVON) S X="IORVON;IORVOFF" D ENDR^%ZISS
N SRISCH,SRCPB S SRISCH=$P(SRA(206),"^",36),SRCPB=$P(SRA(206),"^",37)
I SRISCH,SRCPB,SRISCH>SRCPB W !,IORVON_"*** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***"_IORVOFF,!
F MOE=1:1:80 W "-"
Q
YN ; store answer
S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
Q
SURE W ! K DIR S DIR("A")=" Sure you want to delete all Misc. Cardiac Procedures information ? ",DIR("B")="NO",DIR(0)="YA" D ^DIR W ! K DIR S SRYN=Y I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
Q
SROACR1 ;BIR/MAM - OPERATIVE DATA, PAGE 1 ;06/28/06
+1 ;;3.0; Surgery ;**38,71,93,95,99,125,153**;24 Jun 93;Build 11
+2 ;
+3 SET SRA(206)=$GET(^SRF(SRTN,206))
SET SRA(209)=$GET(^SRF(SRTN,209))
+4 SET SRA(207)=$GET(^SRF(SRTN,207))
SET SRA(207.1)=$GET(^SRF(SRTN,207.1))
IF $PIECE(SRA(207),"^",27)=""
KILL DA,DIE,DR
SET DA=SRTN
SET DIE=130
SET DR="469////5"
DO ^DIE
KILL DA,DIE,DR
SET SRA(207)=$GET(^SRF(SRTN,207))
+5 SET SRAO(1)=$PIECE(SRA(207),"^")_"^365"
SET SRAO(2)=$PIECE(SRA(207),"^",2)_"^366"
SET SRAO(3)=$PIECE(SRA(207),"^",24)_"^464"
SET SRAO(4)=$PIECE(SRA(207),"^",25)_"^465"
SET SRAO(5)=$PIECE(SRA(207),"^",20)_"^416"
+6 SET NYUK=$PIECE(SRA(207),"^",3)
DO YN
SET SRAO(6)=SHEMP_"^367"
SET NYUK=$PIECE(SRA(207),"^",4)
DO YN
SET SRAO(7)=SHEMP_"^368"
SET NYUK=$PIECE(SRA(207),"^",5)
DO YN
SET SRAO(8)=SHEMP_"^369"
+7 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"
+8 SET NYUK=$PIECE(SRA(207),"^",7)
DO YN
SET SRAO(10)=SHEMP_"^371"
SET NYUK=$PIECE(SRA(209),"^",9)
DO YN
SET SRAO(11)=SHEMP_"^481"
+9 SET NYUK=$PIECE(SRA(209),"^",11)
DO YN
SET SRAO(12)=SHEMP_"^483"
+10 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"
+11 SET NYUK=$PIECE(SRA(207),"^",12)
DO YN
SET SRAO(14)=SHEMP_"^376"
+12 SET NYUK=$PIECE(SRA(207),"^",13)
DO YN
SET SRAO(15)=SHEMP_"^380"
+13 SET NYUK=$PIECE(SRA(207),"^",16)
DO YN
SET SRAO(16)=SHEMP_"^378"
+14 SET NYUK=$PIECE(SRA(207),"^",14)
DO YN
SET SRAO(17)=SHEMP_"^377"
+15 SET NYUK=$PIECE(SRA(207),"^",18)
DO YN
SET SRAO(18)=SHEMP_"^379"
+16 SET NYUK=$PIECE(SRA(207),"^",9)
DO YN
SET SRAO(19)=SHEMP_"^373"
+17 SET NYUK=$PIECE(SRA(207),"^",8)
DO YN
SET SRAO(20)=SHEMP_"^372"
+18 SET NYUK=$PIECE(SRA(207.1),"^",2)
DO YN
SET SRAO(21)=SHEMP_"^505"
+19 SET SRAO(22)=$PIECE($GET(^SRF(SRTN,209)),"^",13)_"^502"
+20 ;
DISP SET SRPAGE="PAGE: 1 OF 2"
DO HDR^SROAUTL
+1 WRITE "Cardiac surgical procedures with or without cardiopulmonary bypass "
+2 ;W ! F MOE=1:1:80 W "-"
+3 WRITE !,"CABG distal anastomoses:",?40,"11. Bridge to transplant/Device:",?75,$PIECE(SRAO(11),"^")
+4 WRITE !," 1. Number with vein:",?34,$PIECE(SRAO(1),"^"),?40,"12. TMR:",?75,$PIECE(SRAO(12),"^")
+5 WRITE !," 2. Number with IMA:",?34,$PIECE(SRAO(2),"^"),?40,"13. Maze procedure:",?61,$JUSTIFY($PIECE(SRAO(13),"^"),17)
+6 WRITE !," 3. Number with Radial Artery:",?34,$PIECE(SRAO(3),"^"),?40,"14. ASD repair:",?75,$PIECE(SRAO(14),"^")
+7 WRITE !," 4. Number with Other Artery:",?34,$PIECE(SRAO(4),"^"),?40,"15. VSD repair:",?75,$PIECE(SRAO(15),"^")
+8 WRITE !," 5. Number with Other Conduit:",?34,$PIECE(SRAO(5),"^"),?40,"16. Myectomy for IHSS:",?75,$PIECE(SRAO(16),"^")
+9 WRITE !,?40,"17. Myxoma resection:",?75,$PIECE(SRAO(17),"^")
+10 WRITE !," 6. Aortic Valve Replacement:",?34,$PIECE(SRAO(6),"^"),?40,"18. Other tumor resection:",?75,$PIECE(SRAO(18),"^")
+11 WRITE !," 7. Mitral Valve Replacement:",?34,$PIECE(SRAO(7),"^"),?40,"19. Cardiac transplant:",?75,$PIECE(SRAO(19),"^")
+12 WRITE !," 8. Tricuspid Valve Replacement:",?34,$PIECE(SRAO(8),"^"),?40,"20. Great Vessel Repair:",?75,$PIECE(SRAO(20),"^")
+13 WRITE !," 9. Valve Repair: ",$JUSTIFY($PIECE(SRAO(9),"^"),18),?40,"21. Endovascular Repair:",?75,$PIECE(SRAO(21),"^")
+14 WRITE !,"10. LV Aneurysmectomy:",?34,$PIECE(SRAO(10),"^"),?40,"22. Other cardiac procedures:"
SET X=$PIECE(SRAO(22),"^")
WRITE ?75,$SELECT(X="N":"NO",X="Y":"YES",1:""),!
+15 SET X="IORVON;IORVOFF"
DO ENDR^%ZISS
+16 SET X=$PIECE($GET(^SRF(SRTN,209.1)),"^")
IF X'=""
IF X'="NS"
SET SRQ=0
WRITE !,IORVON_"* Other cardiac procedures (specify): "
IF $LENGTH(X)<56
WRITE X,!
IF $LENGTH(X)>55
SET Z=$LENGTH(X)
Begin DoDot:1
+17 IF X'[" "
WRITE ?27,X
QUIT
+18 SET I=0
SET LINE=1
FOR
SET SRL=$SELECT(LINE=1:39,1:80)
Begin DoDot:2
+19 IF $EXTRACT(X,1,SRL)'[" "
WRITE X,!
SET SRQ=1
QUIT
+20 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
+21 WRITE IORVOFF
+22 WRITE !
FOR MOE=1:1:80
WRITE "-"
+23 QUIT
CHCK ; compare ischemic time to CPB time
+1 IF '$DATA(IORVON)
SET X="IORVON;IORVOFF"
DO ENDR^%ZISS
+2 NEW SRISCH,SRCPB
SET SRISCH=$PIECE(SRA(206),"^",36)
SET SRCPB=$PIECE(SRA(206),"^",37)
+3 IF SRISCH
IF SRCPB
IF SRISCH>SRCPB
WRITE !,IORVON_"*** NOTE: Ischemic Time is greater than CPB Time!! Please check. ***"_IORVOFF,!
+4 FOR MOE=1:1:80
WRITE "-"
+5 QUIT
YN ; store answer
+1 SET SHEMP=$SELECT(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
+2 QUIT
SURE WRITE !
KILL DIR
SET DIR("A")=" Sure you want to delete all Misc. Cardiac Procedures information ? "
SET DIR("B")="NO"
SET DIR(0)="YA"
DO ^DIR
WRITE !
KILL DIR
SET SRYN=Y
IF $DATA(DTOUT)!$DATA(DUOUT)
SET SRSOUT=1
+1 QUIT