MCOBC1 ; GENERATED FROM 'MCARCATHBRPR' PRINT TEMPLATE (#1019) ; 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(1019,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
W ?0 W "DATE/TIME: "
S X=$G(^MCAR(691.1,D0,0)) S Y=$P(X,U,1) D DT
D N:$X>34 Q:'DN W ?34 W "MEDICAL PATIENT: "
S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(690,Y,0))#2:$P(^(0),U,1),1:Y) S Y=$S(Y="":Y,$D(^DPT(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURES: "
S I(1)=3,J(1)=691.13 F D1=0:0 Q:$O(^MCAR(691.1,D0,3,D1))'>0 X:$D(DSC(691.13)) DSC(691.13) S D1=$O(^(D1)) Q:D1'>0 D:$X>18 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^MCAR(691.1,D0,3,D1,0)) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.3,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
Q
A1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INDICATIONS: "
S I(1)=8,J(1)=691.18 F D1=0:0 Q:$O(^MCAR(691.1,D0,8,D1))'>0 X:$D(DSC(691.18)) DSC(691.18) S D1=$O(^(D1)) Q:D1'>0 D:$X>19 T Q:'DN D B1
G B1R
B1 ;
S X=$G(^MCAR(691.1,D0,8,D1,0)) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(697.5,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,50)
Q
B1R ;
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>71 T Q:'DN D C1
G C1R
C1 ;
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)) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,1) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
D T Q:'DN D N D N:$X>9 Q:'DN W ?9 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="RA MEAN PRESSURE: "_$P(DIP(1),U,4) K DIP K:DN Y W X
D N:$X>39 Q:'DN W ?39 W "PA SYSTOLIC/DIASTOLIC: "
W ?64 X DXS(1,9.2) S DIP(5)=X S X=$P(DIP(1),U,9)_"/"_$P(DIP(1),U,10),X=$S(DIP(3):DIP(4),DIP(5):X) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="PCW MEAN: "_$P(DIP(1),U,15) K DIP K:DN Y W X
D N:$X>39 Q:'DN W ?39 S DIP(1)=$S($D(^MCAR(691.1,D0,19,D1,0)):^(0),1:"") S X="LV END DIASTOLIC (Z): "_$P(DIP(1),U,21) K DIP K:DN Y W X
Q
C1R ;
D T Q:'DN D N W ?0 W " "
S I(1)=21,J(1)=691.27 F D1=0:0 Q:$O(^MCAR(691.1,D0,21,D1))'>0 X:$D(DSC(691.27)) DSC(691.27) S D1=$O(^(D1)) Q:D1'>0 D:$X>3 T Q:'DN D D1
G D1R
D1 ;
S X=$G(^MCAR(691.1,D0,21,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>39 Q:'DN W ?39 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>39 Q:'DN W ?39 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
Q
D1R ;
S I(1)=25,J(1)=691.29 F D1=0:0 Q:$O(^MCAR(691.1,D0,25,D1))'>0 X:$D(DSC(691.29)) DSC(691.29) S D1=$O(^(D1)) Q:D1'>0 D:$X>48 T Q:'DN D E1
G E1R
E1 ;
D N:$X>9 Q:'DN W ?9 W "LEFT MAIN CA NARROWING"
S X=$G(^MCAR(691.1,D0,25,D1,0)) D N:$X>39 Q:'DN W ?39 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
Q
E1R ;
S I(1)=25.5,J(1)=691.47 F D1=0:0 Q:$O(^MCAR(691.1,D0,25.5,D1))'>0 X:$D(DSC(691.47)) DSC(691.47) S D1=$O(^(D1)) Q:D1'>0 D:$X>58 T Q:'DN D F1
G F1R
F1 ;
D N:$X>9 Q:'DN W ?9 W "LEFT MAIN CA NARROWING NUMBER"
S X=$G(^MCAR(691.1,D0,25.5,D1,0)) D N:$X>39 Q:'DN W ?39 S Y=$P(X,U,1) W:Y]"" $J(Y,6,2)
Q
F1R ;
S I(1)=27,J(1)=691.3 F D1=0:0 Q:$O(^MCAR(691.1,D0,27,D1))'>0 X:$D(DSC(691.3)) DSC(691.3) S D1=$O(^(D1)) Q:D1'>0 D:$X>47 T Q:'DN D G1
G G1R
G1 ;
S X=$G(^MCAR(691.1,D0,27,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>39 Q:'DN W ?39 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>39 Q:'DN W ?39 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
Q
G1R ;
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>48 T Q:'DN D H1
G H1R^MCOBC11
H1 ;
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>39 Q:'DN W ?39 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)
G ^MCOBC11
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCOBC1 4646 printed Dec 13, 2024@02:15:20 Page 2
MCOBC1 ; GENERATED FROM 'MCARCATHBRPR' PRINT TEMPLATE (#1019) ; 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(1019,"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 WRITE ?0
WRITE "DATE/TIME: "
+4 SET X=$GET(^MCAR(691.1,D0,0))
SET Y=$PIECE(X,U,1)
DO DT
+5 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
WRITE "MEDICAL PATIENT: "
+6 SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(690,Y,0))#2:$PIECE(^(0),U,1),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^DPT(Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+7 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "PROCEDURES: "
+8 SET I(1)=3
SET J(1)=691.13
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,3,D1))'>0
QUIT
if $DATA(DSC(691.13))
XECUTE DSC(691.13)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>18
DO T
if 'DN
QUIT
DO A1
+9 GOTO A1R
A1 ;
+1 SET X=$GET(^MCAR(691.1,D0,3,D1,0))
if $X>19
DO N
if 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695.3,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 QUIT
A1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "INDICATIONS: "
+2 SET I(1)=8
SET J(1)=691.18
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,8,D1))'>0
QUIT
if $DATA(DSC(691.18))
XECUTE DSC(691.18)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>19
DO T
if 'DN
QUIT
DO B1
+3 GOTO B1R
B1 ;
+1 SET X=$GET(^MCAR(691.1,D0,8,D1,0))
if $X>19
DO N
if 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(697.5,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,50)
+2 QUIT
B1R ;
+1 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>71
DO T
if 'DN
QUIT
DO C1
+2 GOTO C1R
C1 ;
+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))
if $X>19
DO N
if 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+3 DO T
if 'DN
QUIT
DO N
if $X>9
DO N
if 'DN
QUIT
WRITE ?9
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="RA MEAN PRESSURE: "_$PIECE(DIP(1),U,4)
KILL DIP
if DN
KILL Y
WRITE X
+4 if $X>39
DO N
if 'DN
QUIT
WRITE ?39
WRITE "PA SYSTOLIC/DIASTOLIC: "
+5 WRITE ?64
XECUTE DXS(1,9.2)
SET DIP(5)=X
SET X=$PIECE(DIP(1),U,9)_"/"_$PIECE(DIP(1),U,10)
SET X=$SELECT(DIP(3):DIP(4),DIP(5):X)
KILL DIP
if DN
KILL Y
WRITE X
+6 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="PCW MEAN: "_$PIECE(DIP(1),U,15)
KILL DIP
if DN
KILL Y
WRITE X
+7 if $X>39
DO N
if 'DN
QUIT
WRITE ?39
SET DIP(1)=$SELECT($DATA(^MCAR(691.1,D0,19,D1,0)):^(0),1:"")
SET X="LV END DIASTOLIC (Z): "_$PIECE(DIP(1),U,21)
KILL DIP
if DN
KILL Y
WRITE X
+8 QUIT
C1R ;
+1 DO T
if 'DN
QUIT
DO N
WRITE ?0
WRITE " "
+2 SET I(1)=21
SET J(1)=691.27
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,21,D1))'>0
QUIT
if $DATA(DSC(691.27))
XECUTE DSC(691.27)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>3
DO T
if 'DN
QUIT
DO D1
+3 GOTO D1R
D1 ;
+1 SET X=$GET(^MCAR(691.1,D0,21,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>39
DO N
if 'DN
QUIT
WRITE ?39
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>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+4 QUIT
D1R ;
+1 SET I(1)=25
SET J(1)=691.29
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,25,D1))'>0
QUIT
if $DATA(DSC(691.29))
XECUTE DSC(691.29)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>48
DO T
if 'DN
QUIT
DO E1
+2 GOTO E1R
E1 ;
+1 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
WRITE "LEFT MAIN CA NARROWING"
+2 SET X=$GET(^MCAR(691.1,D0,25,D1,0))
if $X>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.1,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,17)
+3 QUIT
E1R ;
+1 SET I(1)=25.5
SET J(1)=691.47
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,25.5,D1))'>0
QUIT
if $DATA(DSC(691.47))
XECUTE DSC(691.47)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>58
DO T
if 'DN
QUIT
DO F1
+2 GOTO F1R
F1 ;
+1 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
WRITE "LEFT MAIN CA NARROWING NUMBER"
+2 SET X=$GET(^MCAR(691.1,D0,25.5,D1,0))
if $X>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,6,2)
+3 QUIT
F1R ;
+1 SET I(1)=27
SET J(1)=691.3
FOR D1=0:0
if $ORDER(^MCAR(691.1,D0,27,D1))'>0
QUIT
if $DATA(DSC(691.3))
XECUTE DSC(691.3)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>47
DO T
if 'DN
QUIT
DO G1
+2 GOTO G1R
G1 ;
+1 SET X=$GET(^MCAR(691.1,D0,27,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>39
DO N
if 'DN
QUIT
WRITE ?39
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>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,7,2)
+4 QUIT
G1R ;
+1 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>48
DO T
if 'DN
QUIT
DO H1
+2 GOTO H1R^MCOBC11
H1 ;
+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>39
DO N
if 'DN
QUIT
WRITE ?39
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 GOTO ^MCOBC11