MCAROC2 ; GENERATED FROM 'MCARCATH2' PRINT TEMPLATE (#973) ; 10/04/96 ; (FILE 691.1, MARGIN=80)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 F X=0:0 S X=$O(^DIPT(973,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
D T Q:'DN D N D N:$X>34 Q:'DN W ?34 X DXS(1,9) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PREMEDICATIONS:"
S I(1)=10,J(1)=691.2 F D1=0:0 Q:$O(^MCAR(691.1,D0,10,D1))'>0 X:$D(DSC(691.2)) DSC(691.2) S D1=$O(^(D1)) Q:D1'>0 D:$X>21 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^MCAR(691.1,D0,10,D1,0)) W ?21 S Y=$P(X,U,1) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
Q
A1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "VASCULAR ACCESS:"
S I(1)=11,J(1)=691.21 F D1=0:0 Q:$O(^MCAR(691.1,D0,11,D1))'>0 X:$D(DSC(691.21)) DSC(691.21) S D1=$O(^(D1)) Q:D1'>0 D:$X>22 T Q:'DN D B1
G B1R
B1 ;
S X=$G(^MCAR(691.1,D0,11,D1,0)) W ?22 S Y=$P(X,U,1) W:Y]"" $S($D(DXS(5,Y)):DXS(5,Y),1:Y)
Q
B1R ;
D N:$X>22 Q:'DN W ?22 X DXS(2,9) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "CATHETERS:"
D N:$X>29 Q:'DN W ?29 W "TYPE AND SIZE"
D N:$X>57 Q:'DN W ?57 W "ENGAGEMENT"
D N:$X>7 Q:'DN W ?7 W "RIGHT HEART"
S X=$G(^MCAR(691.1,D0,12)) D N:$X>27 Q:'DN W ?27 S Y=$P(X,U,3) W:Y]"" $S($D(DXS(6,Y)):DXS(6,Y),1:Y)
D N:$X>7 Q:'DN W ?7 W "LEFT HEART"
S I(1)=13,J(1)=691.22 F D1=0:0 Q:$O(^MCAR(691.1,D0,13,D1))'>0 X:$D(DSC(691.22)) DSC(691.22) S D1=$O(^(D1)) Q:D1'>0 D:$X>19 T Q:'DN D C1
G C1R
C1 ;
S X=$G(^MCAR(691.1,D0,13,D1,0)) D N:$X>27 Q:'DN W ?27 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.6,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D N:$X>58 Q:'DN W ?58 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(7,Y)):DXS(7,Y),1:Y)
Q
C1R ;
D N:$X>7 Q:'DN W ?7 W "RIGHT CORONARY"
S I(1)=14,J(1)=691.23 F D1=0:0 Q:$O(^MCAR(691.1,D0,14,D1))'>0 X:$D(DSC(691.23)) DSC(691.23) S D1=$O(^(D1)) Q:D1'>0 D:$X>23 T Q:'DN D D1
G D1R
D1 ;
S X=$G(^MCAR(691.1,D0,14,D1,0)) D N:$X>27 Q:'DN W ?27 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.6,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D N:$X>58 Q:'DN W ?58 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(8,Y)):DXS(8,Y),1:Y)
Q
D1R ;
D N:$X>7 Q:'DN W ?7 W "LEFT CORONARY"
S I(1)=15,J(1)=691.24 F D1=0:0 Q:$O(^MCAR(691.1,D0,15,D1))'>0 X:$D(DSC(691.24)) DSC(691.24) S D1=$O(^(D1)) Q:D1'>0 D:$X>22 T Q:'DN D E1
G E1R
E1 ;
S X=$G(^MCAR(691.1,D0,15,D1,0)) D N:$X>27 Q:'DN W ?27 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.6,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D N:$X>58 Q:'DN W ?58 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
Q
E1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "FLOURO TIME:"
S X=$G(^MCAR(691.1,D0,12)) W ?18 S Y=$P(X,U,1) W:Y]"" $J(Y,3,0)
W " MINUTES"
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "OTHER PROCEDURE AND COMMENT:"
S I(1)=17,J(1)=691.25 F D1=0:0 Q:$O(^MCAR(691.1,D0,17,D1))'>0 S D1=$O(^(D1)) D:$X>34 T Q:'DN D F1
G F1R
F1 ;
S X=$G(^MCAR(691.1,D0,17,D1,0)) S DIWL=27,DIWR=78 D ^DIWP
Q
F1R ;
D A^DIWW
D N:$X>6 Q:'DN W ?6 W "TECH COMMENTS:"
S I(1)=2,J(1)=691.12 F D1=0:0 Q:$O(^MCAR(691.1,D0,2,D1))'>0 S D1=$O(^(D1)) D:$X>22 T Q:'DN D G1
G G1R
G1 ;
S X=$G(^MCAR(691.1,D0,2,D1,0)) S DIWL=23,DIWR=77 D ^DIWP
Q
G1R ;
D A^DIWW
D T Q:'DN D N D N:$X>29 Q:'DN W ?29 X DXS(3,9) K DIP K:DN Y W X
S I(1)=19,J(1)=691.26 F D1=0:0 Q:$O(^MCAR(691.1,D0,19,D1))'>0 X:$D(DSC(691.26)) DSC(691.26) S D1=$O(^(D1)) Q:D1'>0 D:$X>29 T Q:'DN D H1
G H1R^MCAROC22
H1 ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INTERVENTION:"
S X=$G(^MCAR(691.1,D0,19,D1,0)) W ?19 S Y=$P(X,U,1) W:Y]"" $S($D(DXS(10,Y)):DXS(10,Y),1:Y)
D N:$X>6 Q:'DN W ?6 W "PRESSURES:"
D N:$X>7 Q:'DN W ?7 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="RA A: "_$P(DIP(1),U,2) K DIP K:DN Y W X
D N:$X>27 Q:'DN W ?27 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="PCW A: "_$P(DIP(1),U,13) K DIP K:DN Y W X
D N:$X>51 Q:'DN W ?51 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,1)):^(1),1:"") S X="AO S: "_$P(DIP(1),U,1) K DIP K:DN Y W X
D N:$X>10 Q:'DN W ?10 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="V: "_$P(DIP(1),U,3) K DIP K:DN Y W X
G ^MCAROC21
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCAROC2 4576 printed Oct 16, 2024@18:13:45 Page 2
MCAROC2 ; GENERATED FROM 'MCARCATH2' PRINT TEMPLATE (#973) ; 10/04/96 ; (FILE 691.1, MARGIN=80)
+1 GOTO BEGIN
N WRITE !
T if $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
if '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
if Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
if Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 if '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
FOR X=0:0
SET X=$ORDER(^DIPT(973,"DXS",X))
if 'X
QUIT
SET Y=$ORDER(^(X,""))
FOR X=X:0
if Y=""
QUIT
SET DXS(X,Y)=^(Y)
SET Y=$ORDER(^(Y))
+3 DO T
if 'DN
QUIT
DO N
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
XECUTE DXS(1,9)
KILL DIP
if DN
KILL Y
WRITE X
+4 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "PREMEDICATIONS:"
+5 SET I(1)=10
SET J(1)=691.2
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,10,D1))'>0
QUIT
if $DATA(DSC(691.2))
XECUTE DSC(691.2)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>21
DO T
if 'DN
QUIT
DO A1
+6 GOTO A1R
A1 ;
+1 SET X=$GET(^MCAR(691.1,D0,10,D1,0))
WRITE ?21
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+2 QUIT
A1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "VASCULAR ACCESS:"
+2 SET I(1)=11
SET J(1)=691.21
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,11,D1))'>0
QUIT
if $DATA(DSC(691.21))
XECUTE DSC(691.21)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>22
DO T
if 'DN
QUIT
DO B1
+3 GOTO B1R
B1 ;
+1 SET X=$GET(^MCAR(691.1,D0,11,D1,0))
WRITE ?22
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(5,Y)):DXS(5,Y),1:Y)
+2 QUIT
B1R ;
+1 if $X>22
DO N
if 'DN
QUIT
WRITE ?22
XECUTE DXS(2,9)
KILL DIP
if DN
KILL Y
WRITE X
+2 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "CATHETERS:"
+3 if $X>29
DO N
if 'DN
QUIT
WRITE ?29
WRITE "TYPE AND SIZE"
+4 if $X>57
DO N
if 'DN
QUIT
WRITE ?57
WRITE "ENGAGEMENT"
+5 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "RIGHT HEART"
+6 SET X=$GET(^MCAR(691.1,D0,12))
if $X>27
DO N
if 'DN
QUIT
WRITE ?27
SET Y=$PIECE(X,U,3)
if Y]""
WRITE $SELECT($DATA(DXS(6,Y)):DXS(6,Y),1:Y)
+7 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "LEFT HEART"
+8 SET I(1)=13
SET J(1)=691.22
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,13,D1))'>0
QUIT
if $DATA(DSC(691.22))
XECUTE DSC(691.22)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>19
DO T
if 'DN
QUIT
DO C1
+9 GOTO C1R
C1 ;
+1 SET X=$GET(^MCAR(691.1,D0,13,D1,0))
if $X>27
DO N
if 'DN
QUIT
WRITE ?27
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695.6,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 if $X>58
DO N
if 'DN
QUIT
WRITE ?58
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $SELECT($DATA(DXS(7,Y)):DXS(7,Y),1:Y)
+3 QUIT
C1R ;
+1 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "RIGHT CORONARY"
+2 SET I(1)=14
SET J(1)=691.23
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,14,D1))'>0
QUIT
if $DATA(DSC(691.23))
XECUTE DSC(691.23)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>23
DO T
if 'DN
QUIT
DO D1
+3 GOTO D1R
D1 ;
+1 SET X=$GET(^MCAR(691.1,D0,14,D1,0))
if $X>27
DO N
if 'DN
QUIT
WRITE ?27
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695.6,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 if $X>58
DO N
if 'DN
QUIT
WRITE ?58
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $SELECT($DATA(DXS(8,Y)):DXS(8,Y),1:Y)
+3 QUIT
D1R ;
+1 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "LEFT CORONARY"
+2 SET I(1)=15
SET J(1)=691.24
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,15,D1))'>0
QUIT
if $DATA(DSC(691.24))
XECUTE DSC(691.24)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>22
DO T
if 'DN
QUIT
DO E1
+3 GOTO E1R
E1 ;
+1 SET X=$GET(^MCAR(691.1,D0,15,D1,0))
if $X>27
DO N
if 'DN
QUIT
WRITE ?27
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695.6,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 if $X>58
DO N
if 'DN
QUIT
WRITE ?58
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+3 QUIT
E1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "FLOURO TIME:"
+2 SET X=$GET(^MCAR(691.1,D0,12))
WRITE ?18
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,3,0)
+3 WRITE " MINUTES"
+4 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "OTHER PROCEDURE AND COMMENT:"
+5 SET I(1)=17
SET J(1)=691.25
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,17,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>34
DO T
if 'DN
QUIT
DO F1
+6 GOTO F1R
F1 ;
+1 SET X=$GET(^MCAR(691.1,D0,17,D1,0))
SET DIWL=27
SET DIWR=78
DO ^DIWP
+2 QUIT
F1R ;
+1 DO A^DIWW
+2 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "TECH COMMENTS:"
+3 SET I(1)=2
SET J(1)=691.12
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,2,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>22
DO T
if 'DN
QUIT
DO G1
+4 GOTO G1R
G1 ;
+1 SET X=$GET(^MCAR(691.1,D0,2,D1,0))
SET DIWL=23
SET DIWR=77
DO ^DIWP
+2 QUIT
G1R ;
+1 DO A^DIWW
+2 DO T
if 'DN
QUIT
DO N
if $X>29
DO N
if 'DN
QUIT
WRITE ?29
XECUTE DXS(3,9)
KILL DIP
if DN
KILL Y
WRITE X
+3 SET I(1)=19
SET J(1)=691.26
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,19,D1))'>0
QUIT
if $DATA(DSC(691.26))
XECUTE DSC(691.26)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>29
DO T
if 'DN
QUIT
DO H1
+4 GOTO H1R^MCAROC22
H1 ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "INTERVENTION:"
+2 SET X=$GET(^MCAR(691.1,D0,19,D1,0))
WRITE ?19
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(10,Y)):DXS(10,Y),1:Y)
+3 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "PRESSURES:"
+4 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="RA A: "_$PIECE(DIP(1),U,2)
KILL DIP
if DN
KILL Y
WRITE X
+5 if $X>27
DO N
if 'DN
QUIT
WRITE ?27
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="PCW A: "_$PIECE(DIP(1),U,13)
KILL DIP
if DN
KILL Y
WRITE X
+6 if $X>51
DO N
if 'DN
QUIT
WRITE ?51
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,1)):^(1),1:"")
SET X="AO S: "_$PIECE(DIP(1),U,1)
KILL DIP
if DN
KILL Y
WRITE X
+7 if $X>10
DO N
if 'DN
QUIT
WRITE ?10
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="V: "_$PIECE(DIP(1),U,3)
KILL DIP
if DN
KILL Y
WRITE X
+8 GOTO ^MCAROC21