MCOBC11 ; GENERATED FROM 'MCARCATHBRPR' PRINT TEMPLATE (#1019) ; 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>39 Q:'DN W ?39 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
Q
H1R ;
S I(1)=37,J(1)=691.36 F D1=0:0 Q:$O(^MCAR(691.1,D0,37,D1))'>0 X:$D(DSC(691.36)) DSC(691.36) S D1=$O(^(D1)) Q:D1'>0 D:$X>48 T Q:'DN D I1
G I1R
I1 ;
D T Q:'DN D N D N:$X>23 Q:'DN W ?23 W "STARTING"
D N:$X>38 Q:'DN W ?38 W "RESULTING"
D N:$X>21 Q:'DN W ?21 W "% OBSTRUCTION"
D N:$X>36 Q:'DN W ?36 W "% OBSTRUCTION"
S X=$G(^MCAR(691.1,D0,37,D1,0)) D N:$X>7 Q:'DN W ?7 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>23 Q:'DN W ?23 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)
S X=$G(^MCAR(691.1,D0,37,D1,3)) D N:$X>23 Q:'DN W ?23 S Y=$P(X,U,1) W:Y]"" $J(Y,7,2)
S X=$G(^MCAR(691.1,D0,37,D1,0)) D N:$X>40 Q:'DN W ?40 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
S X=$G(^MCAR(691.1,D0,37,D1,3)) D N:$X>40 Q:'DN W ?40 S Y=$P(X,U,2) W:Y]"" $J(Y,7,2)
Q
I1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.1,D0,40)):^(40),1:"") S X="EJECTION FRACTION: "_$P(DIP(1),U,3) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMPLICATIONS: "
S DICMX="D L^DIWP" D N:$X>20 Q:'DN S DIWL=21,DIWR=78 X DXS(2,9) K DIP K:DN Y
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "CONCLUSION: "
S I(1)=43,J(1)=691.41 F D1=0:0 Q:$O(^MCAR(691.1,D0,43,D1))'>0 S D1=$O(^(D1)) D:$X>18 T Q:'DN D J1
G J1R
J1 ;
S X=$G(^MCAR(691.1,D0,43,D1,0)) S DIWL=18,DIWR=77 D ^DIWP
Q
J1R ;
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PLAN: "
S I(1)=44,J(1)=691.42 F D1=0:0 Q:$O(^MCAR(691.1,D0,44,D1))'>0 S D1=$O(^(D1)) D:$X>12 T Q:'DN D K1
G K1R
K1 ;
S X=$G(^MCAR(691.1,D0,44,D1,0)) S DIWL=13,DIWR=77 D ^DIWP
Q
K1R ;
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SUMMARY: "
S X=$G(^MCAR(691.1,D0,.2)) S Y=$P(X,U,1) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURE SUMMARY: "
D N:$X>17 Q:'DN S DIWL=18,DIWR=77 S Y=$P(X,U,2) S X=Y D ^DIWP
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "CARDIOLOGY STAFF: "
S X=$G(^MCAR(691.1,D0,45)) S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,35)
W ?24 S MCFILE=691.1 D DISP^MCMAG K DIP K:DN Y
W ?35 K MCFILE K DIP K:DN Y
K Y K DIWF
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCOBC11 3001 printed Dec 13, 2024@02:15:21 Page 2
MCOBC11 ; GENERATED FROM 'MCARCATHBRPR' PRINT TEMPLATE (#1019) ; 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>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+3 QUIT
H1R ;
+1 SET I(1)=37
SET J(1)=691.36
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,37,D1))'>0
QUIT
if $DATA(DSC(691.36))
XECUTE DSC(691.36)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>48
DO T
if 'DN
QUIT
DO I1
+2 GOTO I1R
I1 ;
+1 DO T
if 'DN
QUIT
DO N
if $X>23
DO N
if 'DN
QUIT
WRITE ?23
WRITE "STARTING"
+2 if $X>38
DO N
if 'DN
QUIT
WRITE ?38
WRITE "RESULTING"
+3 if $X>21
DO N
if 'DN
QUIT
WRITE ?21
WRITE "% OBSTRUCTION"
+4 if $X>36
DO N
if 'DN
QUIT
WRITE ?36
WRITE "% OBSTRUCTION"
+5 SET X=$GET(^MCAR(691.1,D0,37,D1,0))
if $X>7
DO N
if 'DN
QUIT
WRITE ?7
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)
+6 if $X>23
DO N
if 'DN
QUIT
WRITE ?23
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)
+7 SET X=$GET(^MCAR(691.1,D0,37,D1,3))
if $X>23
DO N
if 'DN
QUIT
WRITE ?23
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+8 SET X=$GET(^MCAR(691.1,D0,37,D1,0))
if $X>40
DO N
if 'DN
QUIT
WRITE ?40
SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.1,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,17)
+9 SET X=$GET(^MCAR(691.1,D0,37,D1,3))
if $X>40
DO N
if 'DN
QUIT
WRITE ?40
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+10 QUIT
I1R ;
+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,40)):^(40),1:"")
SET X="EJECTION FRACTION: "_$PIECE(DIP(1),U,3)
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 "COMPLICATIONS: "
+3 SET DICMX="D L^DIWP"
if $X>20
DO N
if 'DN
QUIT
SET DIWL=21
SET DIWR=78
XECUTE DXS(2,9)
KILL DIP
if DN
KILL Y
+4 DO A^DIWW
+5 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "CONCLUSION: "
+6 SET I(1)=43
SET J(1)=691.41
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,43,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>18
DO T
if 'DN
QUIT
DO J1
+7 GOTO J1R
J1 ;
+1 SET X=$GET(^MCAR(691.1,D0,43,D1,0))
SET DIWL=18
SET DIWR=77
DO ^DIWP
+2 QUIT
J1R ;
+1 DO A^DIWW
+2 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "PLAN: "
+3 SET I(1)=44
SET J(1)=691.42
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,44,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>12
DO T
if 'DN
QUIT
DO K1
+4 GOTO K1R
K1 ;
+1 SET X=$GET(^MCAR(691.1,D0,44,D1,0))
SET DIWL=13
SET DIWR=77
DO ^DIWP
+2 QUIT
K1R ;
+1 DO A^DIWW
+2 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "SUMMARY: "
+3 SET X=$GET(^MCAR(691.1,D0,.2))
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+4 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "PROCEDURE SUMMARY: "
+5 if $X>17
DO N
if 'DN
QUIT
SET DIWL=18
SET DIWR=77
SET Y=$PIECE(X,U,2)
SET X=Y
DO ^DIWP
+6 DO A^DIWW
+7 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "CARDIOLOGY STAFF: "
+8 SET X=$GET(^MCAR(691.1,D0,45))
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,35)
+9 WRITE ?24
SET MCFILE=691.1
DO DISP^MCMAG
KILL DIP
if DN
KILL Y
+10 WRITE ?35
KILL MCFILE
KILL DIP
if DN
KILL Y
+11 KILL Y
KILL DIWF
+12 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!