MCAROC31 ; GENERATED FROM 'MCARCATH3' PRINT TEMPLATE (#972) ; 10/04/96 ; (continued)
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)
D N:$X>44 Q:'DN W ?44 S DIP(1)=$S($D(^MCAR(691.1,D0,29,D1,0)):^(0),1:"") S X="TO: "_$S('$D(^MCAR(696,+$P(DIP(1),U,2),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
Q
F1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.1,D0,30)):^(30),1:"") S X="CIRCUMFLEX: "_$S('$D(^MCAR(695.9,+$P(DIP(1),U,1),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
S I(1)=31,J(1)=691.32 F D1=0:0 Q:$O(^MCAR(691.1,D0,31,D1))'>0 X:$D(DSC(691.32)) DSC(691.32) S D1=$O(^(D1)) Q:D1'>0 D:$X>15 T Q:'DN D G1
G G1R
G1 ;
S X=$G(^MCAR(691.1,D0,31,D1,0)) D N:$X>9 Q:'DN W ?9 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
W ?42 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^MCAR(696.2,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
Q
G1R ;
D N:$X>7 Q:'DN W ?7 X DXS(7,9.2) S DIP(3)=X S X=1,DIP(4)=X S X="",X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>7 Q:'DN W ?7 X DXS(8,9.3) S DIP(5)=X S X=1,DIP(6)=X S X="",X=$S(DIP(3):DIP(5),DIP(6):X) K DIP K:DN Y W X
S I(1)=33,J(1)=691.33 F D1=0:0 Q:$O(^MCAR(691.1,D0,33,D1))'>0 X:$D(DSC(691.33)) DSC(691.33) S D1=$O(^(D1)) Q:D1'>0 D:$X>18 T Q:'DN D H1
G H1R
H1 ;
D N:$X>8 Q:'DN W ?8 S DIP(1)=$S($D(^MCAR(691.1,D0,33,D1,0)):^(0),1:"") S X="FROM: "_$S('$D(^MCAR(696,+$P(DIP(1),U,1),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 S DIP(1)=$S($D(^MCAR(691.1,D0,33,D1,0)):^(0),1:"") S X="TO: "_$S('$D(^MCAR(696,+$P(DIP(1),U,2),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
Q
H1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "BYPASS GRAFTS ?:"
S X=$G(^MCAR(691.1,D0,35)) W ?22 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
S I(1)=36,J(1)=691.35 F D1=0:0 Q:$O(^MCAR(691.1,D0,36,D1))'>0 X:$D(DSC(691.35)) DSC(691.35) S D1=$O(^(D1)) Q:D1'>0 D:$X>35 T Q:'DN D I1
G I1R
I1 ;
D N:$X>7 Q:'DN W ?7 W "DISTAL ANASTOMOSIS:"
S X=$G(^MCAR(691.1,D0,36,D1,0)) D N:$X>9 Q:'DN W ?9 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
W ?42 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^MCAR(696.4,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
Q
I1R ;
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCAROC31 3080 printed Dec 13, 2024@02:13:11 Page 2
MCAROC31 ; GENERATED FROM 'MCARCATH3' PRINT TEMPLATE (#972) ; 10/04/96 ; (continued)
+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 $X>44
DO N
if 'DN
QUIT
WRITE ?44
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,29,D1,0)):^(0),1:"")
SET X="TO: "_$SELECT('$DATA(^MCAR(696,+$PIECE(DIP(1),U,2),0)):"",1:$PIECE(^(0),U,1))
KILL DIP
if DN
KILL Y
WRITE X
+3 QUIT
F1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,30)):^(30),1:"")
SET X="CIRCUMFLEX: "_$SELECT('$DATA(^MCAR(695.9,+$PIECE(DIP(1),U,1),0)):"",1:$PIECE(^(0),U,1))
KILL DIP
if DN
KILL Y
WRITE X
+2 SET I(1)=31
SET J(1)=691.32
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,31,D1))'>0
QUIT
if $DATA(DSC(691.32))
XECUTE DSC(691.32)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>15
DO T
if 'DN
QUIT
DO G1
+3 GOTO G1R
G1 ;
+1 SET X=$GET(^MCAR(691.1,D0,31,D1,0))
if $X>9
DO N
if 'DN
QUIT
WRITE ?9
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.1,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,17)
+3 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+4 WRITE ?42
SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.2,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,25)
+5 QUIT
G1R ;
+1 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
XECUTE DXS(7,9.2)
SET DIP(3)=X
SET X=1
SET DIP(4)=X
SET X=""
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
if DN
KILL Y
WRITE X
+2 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
XECUTE DXS(8,9.3)
SET DIP(5)=X
SET X=1
SET DIP(6)=X
SET X=""
SET X=$SELECT(DIP(3):DIP(5),DIP(6):X)
KILL DIP
if DN
KILL Y
WRITE X
+3 SET I(1)=33
SET J(1)=691.33
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,33,D1))'>0
QUIT
if $DATA(DSC(691.33))
XECUTE DSC(691.33)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>18
DO T
if 'DN
QUIT
DO H1
+4 GOTO H1R
H1 ;
+1 if $X>8
DO N
if 'DN
QUIT
WRITE ?8
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,33,D1,0)):^(0),1:"")
SET X="FROM: "_$SELECT('$DATA(^MCAR(696,+$PIECE(DIP(1),U,1),0)):"",1:$PIECE(^(0),U,1))
KILL DIP
if DN
KILL Y
WRITE X
+2 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,33,D1,0)):^(0),1:"")
SET X="TO: "_$SELECT('$DATA(^MCAR(696,+$PIECE(DIP(1),U,2),0)):"",1:$PIECE(^(0),U,1))
KILL DIP
if DN
KILL Y
WRITE X
+3 QUIT
H1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "BYPASS GRAFTS ?:"
+2 SET X=$GET(^MCAR(691.1,D0,35))
WRITE ?22
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+3 SET I(1)=36
SET J(1)=691.35
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,36,D1))'>0
QUIT
if $DATA(DSC(691.35))
XECUTE DSC(691.35)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>35
DO T
if 'DN
QUIT
DO I1
+4 GOTO I1R
I1 ;
+1 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "DISTAL ANASTOMOSIS:"
+2 SET X=$GET(^MCAR(691.1,D0,36,D1,0))
if $X>9
DO N
if 'DN
QUIT
WRITE ?9
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+3 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.1,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,17)
+4 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+5 WRITE ?42
SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.4,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,25)
+6 QUIT
I1R ;
+1 KILL Y
+2 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!