MCAROT ; GENERATED FROM 'MCARETT1' PRINT TEMPLATE (#975) ; 03/26/01 ; (FILE 691.7, 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 M DXS=^DIPT(975,"DXS")
S I(0)="^MCAR(691.7,",J(0)=691.7
D N:$X>44 Q:'DN W ?44 W "TIME TEST:"
W ?56 X DXS(1,9.2) S X=$E($P(X,".",2)_"0000",1,4),%=X>1159 S:X>1259 X=X-1200 S X=X\100_":"_$E(X#100+100,2,3)_" "_$E("AP",%+1)_"M" K DIP K:DN Y W X
D N:$X>4 Q:'DN W ?4 W "AGE: "
W $$RPTAGE^MCARUTL4(691.7,D0) K DIP K:DN Y
D N:$X>44 Q:'DN W ?44 W "WT LBS:"
S X=$G(^MCAR(691.7,D0,10)) W ?53 S Y=$P(X,U,1) W:Y]"" $J(Y,4,0)
D N:$X>4 Q:'DN W ?4 W "SEX:"
W ?10 X DXS(2,9.3) S X=$P($P(DIP(202),$C(59)_$P(DIP(201),U,2)_":",2),$C(59),1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 W "WARD/CLINIC: "
S X=$G(^MCAR(691.7,D0,10)) S Y=$P(X,U,5) S Y=$S(Y="":Y,$D(^SC(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,20)
D N:$X>4 Q:'DN W ?4 W "REF PHYS: "
S X=$G(^MCAR(691.7,D0,3)) W ?16,$E($P(X,U,1),1,20)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "ETT PROTOCOL:"
W ?19 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(7,Y)):DXS(7,Y),1:Y)
D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.7,D0,3)):^(3),1:"") S X="HYPERVENTILATION: "_$P(DIP(1),U,3) K DIP K:DN Y W X
D N:$X>4 Q:'DN W ?4 X "N I,Y "_$P(^DD(691.7,46,0),U,5,99) S DIP(1)=X S X="TARGET HR: "_DIP(1) K DIP K:DN Y W X
D N:$X>4 Q:'DN W ?4 W "RESTING EKG:"
S I(1)=2,J(1)=691.72 F D1=0:0 Q:$O(^MCAR(691.7,D0,2,D1))'>0 S D1=$O(^(D1)) D:$X>18 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^MCAR(691.7,D0,2,D1,0)) S DIWL=19,DIWR=78 D ^DIWP
Q
A1R ;
D A^DIWW
D N:$X>4 Q:'DN W ?4 W "----------------------------------------------------------------------"
D N:$X>18 Q:'DN W ?18 W "SUPINE"
D N:$X>33 Q:'DN W ?33 W "UPRIGHT"
D N:$X>48 Q:'DN W ?48 W "ONSET CP"
D N:$X>63 Q:'DN W ?63 W "PEAK EX"
D N:$X>18 Q:'DN W ?18 W "------"
D N:$X>33 Q:'DN W ?33 W "-------"
D N:$X>48 Q:'DN W ?48 W "--------"
D N:$X>63 Q:'DN W ?63 W "-------"
D N:$X>6 Q:'DN W ?6 W "HR"
S X=$G(^MCAR(691.7,D0,3)) D N:$X>18 Q:'DN W ?18 S Y=$P(X,U,4) W:Y]"" $J(Y,4,0)
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,7) W:Y]"" $J(Y,4,0)
D N:$X>48 Q:'DN W ?48 S Y=$P(X,U,15) W:Y]"" $J(Y,4,0)
S X=$G(^MCAR(691.7,D0,4)) D N:$X>63 Q:'DN W ?63 S Y=$P(X,U,1) W:Y]"" $J(Y,4,0)
D N:$X>6 Q:'DN W ?6 W "SBP/DBP"
D N:$X>18 Q:'DN W ?18 S DIP(1)=$S($D(^MCAR(691.7,D0,3)):^(3),1:"") S X=$P(DIP(1),U,5)_"/"_$P(DIP(1),U,6) K DIP K:DN Y W X
D N:$X>33 Q:'DN W ?33 S DIP(1)=$S($D(^MCAR(691.7,D0,3)):^(3),1:"") S X=$P(DIP(1),U,8)_"/"_$P(DIP(1),U,9) K DIP K:DN Y W X
D N:$X>48 Q:'DN W ?48 X DXS(3,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>63 Q:'DN W ?63 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=$P(DIP(1),U,2)_"/"_$P(DIP(1),U,3) K DIP K:DN Y W X
D N:$X>6 Q:'DN W ?6 W "ST/SLP"
D N:$X>18 Q:'DN W ?18 S DIP(1)=$S($D(^MCAR(691.7,D0,3)):^(3),1:"") S X=$P(DIP(1),U,10)_"/"_$P(DIP(1),U,11) K DIP K:DN Y W X
D N:$X>33 Q:'DN W ?33 S DIP(2)=$S($D(^MCAR(691.7,D0,3)):^(3),1:""),DIP(1)=$S($D(^(7)):^(7),1:"") S X=$P(DIP(1),U,3)_"/"_$P(DIP(2),U,12) K DIP K:DN Y W X
D N:$X>48 Q:'DN W ?48 X DXS(4,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>63 Q:'DN W ?63 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=$P(DIP(1),U,7)_"/"_$P(DIP(1),U,8) K DIP K:DN Y W X
D N:$X>6 Q:'DN W ?6 W "RPP/1000"
D N:$X>18 Q:'DN W ?18 X "N I,Y "_$P(^DD(691.7,12,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
D N:$X>33 Q:'DN W ?33 X "N I,Y "_$P(^DD(691.7,16,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
D N:$X>48 Q:'DN W ?48 X "N I,Y "_$P(^DD(691.7,28,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
D N:$X>63 Q:'DN W ?63 X "N I,Y "_$P(^DD(691.7,42,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
D N:$X>6 Q:'DN W ?6 W "MIN:SEC"
D N:$X>49 Q:'DN W ?49 X DXS(5,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>64 Q:'DN W ?64 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=$P(DIP(1),U,9)_":"_$P(DIP(1),U,10) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "----------------------------------------------------------------------"
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X="PEAK MPH: "_$P(DIP(1),U,4) K DIP K:DN Y W X
W ?15 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=" % GRADE: "_$P(DIP(1),U,5) K DIP K:DN Y W X
W ?26 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=" METS: "_$P(DIP(1),U,6) K DIP K:DN Y W X
W ?37 X "N I,Y "_$P(^DD(691.7,48,0),U,5,99) S DIP(1)=X S X=" % TARGET HR: "_DIP(1) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 X DXS(6,9) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.7,D0,5)):^(5),1:"") S X="TIME ST SEGMENT RETURN TO BASELINE: "_$P(DIP(1),U,7) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SIGNIFICANT ARRHYTHMIAS:"
S X=$G(^MCAR(691.7,D0,5)) W ?30 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(8,Y)):DXS(8,Y),1:Y)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "BLOOD PRESSURE CHANGES:"
S X=$G(^MCAR(691.7,D0,7)) W ?29 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "OTHER EKG CHANGES:"
S I(1)=9,J(1)=691.75 F D1=0:0 Q:$O(^MCAR(691.7,D0,9,D1))'>0 S D1=$O(^(D1)) D:$X>24 T Q:'DN D B1
G B1R
B1 ;
S X=$G(^MCAR(691.7,D0,9,D1,0)) S DIWL=25,DIWR=78 D ^DIWP
Q
B1R ;
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INTERPRETATION:"
S X=$G(^MCAR(691.7,D0,5)) W ?21 S Y=$P(X,U,8) W:Y]"" $S($D(DXS(10,Y)):DXS(10,Y),1:Y)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMMENTS:"
S I(1)=6,J(1)=691.73 F D1=0:0 Q:$O(^MCAR(691.7,D0,6,D1))'>0 S D1=$O(^(D1)) D:$X>15 T Q:'DN D C1
G C1R
C1 ;
S X=$G(^MCAR(691.7,D0,6,D1,0)) S DIWL=1,DIWR=75 D ^DIWP
Q
C1R ;
D A^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "HEART MEDS:"
S I(1)=1,J(1)=691.71 F D1=0:0 Q:$O(^MCAR(691.7,D0,1,D1))'>0 X:$D(DSC(691.71)) DSC(691.71) S D1=$O(^(D1)) Q:D1'>0 D:$X>17 T Q:'DN D D1
G D1R
D1 ;
S X=$G(^MCAR(691.7,D0,1,D1,0)) W ?17 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695,Y,0))#2:$P(^(0),U,1),1:Y) S Y=$S(Y="":Y,$D(^PSDRUG(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
W " "
W ?0,$E($P(X,U,2),1,10)
W " "
W ?0,$E($P(X,U,3),1,10)
Q
D1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMPLICATIONS:"
S I(1)=11,J(1)=691.703 F D1=0:0 Q:$O(^MCAR(691.7,D0,11,D1))'>0 X:$D(DSC(691.703)) DSC(691.703) S D1=$O(^(D1)) Q:D1'>0 D:$X>20 T Q:'DN D E1
G E1R
E1 ;
S X=$G(^MCAR(691.7,D0,11,D1,0)) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696.9,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,40)
Q
E1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "EKG TECH:"
S X=$G(^MCAR(691.7,D0,7)) W ?15 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,35)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "ATTN PHYS:"
G ^MCAROT1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCAROT 7433 printed Dec 13, 2024@02:14:12 Page 2
MCAROT ; GENERATED FROM 'MCARETT1' PRINT TEMPLATE (#975) ; 03/26/01 ; (FILE 691.7, 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
MERGE DXS=^DIPT(975,"DXS")
+3 SET I(0)="^MCAR(691.7,"
SET J(0)=691.7
+4 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
WRITE "TIME TEST:"
+5 WRITE ?56
XECUTE DXS(1,9.2)
SET X=$EXTRACT($PIECE(X,".",2)_"0000",1,4)
SET %=X>1159
if X>1259
SET X=X-1200
SET X=X\100_":"_$EXTRACT(X#100+100,2,3)_" "_$EXTRACT("AP",%+1)_"M"
KILL DIP
if DN
KILL Y
WRITE X
+6 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "AGE: "
+7 WRITE $$RPTAGE^MCARUTL4(691.7,D0)
KILL DIP
if DN
KILL Y
+8 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
WRITE "WT LBS:"
+9 SET X=$GET(^MCAR(691.7,D0,10))
WRITE ?53
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+10 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "SEX:"
+11 WRITE ?10
XECUTE DXS(2,9.3)
SET X=$PIECE($PIECE(DIP(202),$CHAR(59)_$PIECE(DIP(201),U,2)_":",2),$CHAR(59),1)
SET D0=I(0,0)
KILL DIP
if DN
KILL Y
WRITE X
+12 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
WRITE "WARD/CLINIC: "
+13 SET X=$GET(^MCAR(691.7,D0,10))
SET Y=$PIECE(X,U,5)
SET Y=$SELECT(Y="":Y,$DATA(^SC(Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,20)
+14 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "REF PHYS: "
+15 SET X=$GET(^MCAR(691.7,D0,3))
WRITE ?16,$EXTRACT($PIECE(X,U,1),1,20)
+16 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "ETT PROTOCOL:"
+17 WRITE ?19
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $SELECT($DATA(DXS(7,Y)):DXS(7,Y),1:Y)
+18 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,3)):^(3),1:"")
SET X="HYPERVENTILATION: "_$PIECE(DIP(1),U,3)
KILL DIP
if DN
KILL Y
WRITE X
+19 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
XECUTE "N I,Y "_$PIECE(^DD(691.7,46,0),U,5,99)
SET DIP(1)=X
SET X="TARGET HR: "_DIP(1)
KILL DIP
if DN
KILL Y
WRITE X
+20 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "RESTING EKG:"
+21 SET I(1)=2
SET J(1)=691.72
FOR D1=0:0
if $ORDER(^MCAR(691.7,D0,2,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>18
DO T
if 'DN
QUIT
DO A1
+22 GOTO A1R
A1 ;
+1 SET X=$GET(^MCAR(691.7,D0,2,D1,0))
SET DIWL=19
SET DIWR=78
DO ^DIWP
+2 QUIT
A1R ;
+1 DO A^DIWW
+2 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "----------------------------------------------------------------------"
+3 if $X>18
DO N
if 'DN
QUIT
WRITE ?18
WRITE "SUPINE"
+4 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
WRITE "UPRIGHT"
+5 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
WRITE "ONSET CP"
+6 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
WRITE "PEAK EX"
+7 if $X>18
DO N
if 'DN
QUIT
WRITE ?18
WRITE "------"
+8 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
WRITE "-------"
+9 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
WRITE "--------"
+10 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
WRITE "-------"
+11 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "HR"
+12 SET X=$GET(^MCAR(691.7,D0,3))
if $X>18
DO N
if 'DN
QUIT
WRITE ?18
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+13 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,7)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+14 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
SET Y=$PIECE(X,U,15)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+15 SET X=$GET(^MCAR(691.7,D0,4))
if $X>63
DO N
if 'DN
QUIT
WRITE ?63
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+16 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "SBP/DBP"
+17 if $X>18
DO N
if 'DN
QUIT
WRITE ?18
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,3)):^(3),1:"")
SET X=$PIECE(DIP(1),U,5)_"/"_$PIECE(DIP(1),U,6)
KILL DIP
if DN
KILL Y
WRITE X
+18 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,3)):^(3),1:"")
SET X=$PIECE(DIP(1),U,8)_"/"_$PIECE(DIP(1),U,9)
KILL DIP
if DN
KILL Y
WRITE X
+19 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
XECUTE DXS(3,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
if DN
KILL Y
WRITE X
+20 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X=$PIECE(DIP(1),U,2)_"/"_$PIECE(DIP(1),U,3)
KILL DIP
if DN
KILL Y
WRITE X
+21 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "ST/SLP"
+22 if $X>18
DO N
if 'DN
QUIT
WRITE ?18
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,3)):^(3),1:"")
SET X=$PIECE(DIP(1),U,10)_"/"_$PIECE(DIP(1),U,11)
KILL DIP
if DN
KILL Y
WRITE X
+23 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET DIP(2)=$SELECT($DATA(^MCAR(691.7,D0,3)):^(3),1:"")
SET DIP(1)=$SELECT($DATA(^(7)):^(7),1:"")
SET X=$PIECE(DIP(1),U,3)_"/"_$PIECE(DIP(2),U,12)
KILL DIP
if DN
KILL Y
WRITE X
+24 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
XECUTE DXS(4,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
if DN
KILL Y
WRITE X
+25 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X=$PIECE(DIP(1),U,7)_"/"_$PIECE(DIP(1),U,8)
KILL DIP
if DN
KILL Y
WRITE X
+26 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "RPP/1000"
+27 if $X>18
DO N
if 'DN
QUIT
WRITE ?18
XECUTE "N I,Y "_$PIECE(^DD(691.7,12,0),U,5,99)
SET DIP(1)=X
SET X=DIP(1)
SET DIP(2)=X
SET X=6
SET DIP(3)=X
SET X=2
SET X=$JUSTIFY(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+28 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
XECUTE "N I,Y "_$PIECE(^DD(691.7,16,0),U,5,99)
SET DIP(1)=X
SET X=DIP(1)
SET DIP(2)=X
SET X=6
SET DIP(3)=X
SET X=2
SET X=$JUSTIFY(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+29 if $X>48
DO N
if 'DN
QUIT
WRITE ?48
XECUTE "N I,Y "_$PIECE(^DD(691.7,28,0),U,5,99)
SET DIP(1)=X
SET X=DIP(1)
SET DIP(2)=X
SET X=6
SET DIP(3)=X
SET X=2
SET X=$JUSTIFY(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+30 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
XECUTE "N I,Y "_$PIECE(^DD(691.7,42,0),U,5,99)
SET DIP(1)=X
SET X=DIP(1)
SET DIP(2)=X
SET X=6
SET DIP(3)=X
SET X=2
SET X=$JUSTIFY(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+31 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "MIN:SEC"
+32 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
XECUTE DXS(5,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
if DN
KILL Y
WRITE X
+33 if $X>64
DO N
if 'DN
QUIT
WRITE ?64
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X=$PIECE(DIP(1),U,9)_":"_$PIECE(DIP(1),U,10)
KILL DIP
if DN
KILL Y
WRITE X
+34 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "----------------------------------------------------------------------"
+35 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X="PEAK MPH: "_$PIECE(DIP(1),U,4)
KILL DIP
if DN
KILL Y
WRITE X
+36 WRITE ?15
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X=" % GRADE: "_$PIECE(DIP(1),U,5)
KILL DIP
if DN
KILL Y
WRITE X
+37 WRITE ?26
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,4)):^(4),1:"")
SET X=" METS: "_$PIECE(DIP(1),U,6)
KILL DIP
if DN
KILL Y
WRITE X
+38 WRITE ?37
XECUTE "N I,Y "_$PIECE(^DD(691.7,48,0),U,5,99)
SET DIP(1)=X
SET X=" % TARGET HR: "_DIP(1)
KILL DIP
if DN
KILL Y
WRITE X
+39 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
XECUTE DXS(6,9)
KILL DIP
if DN
KILL Y
WRITE X
+40 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
SET DIP(1)=$SELECT($DATA(^MCAR(691.7,D0,5)):^(5),1:"")
SET X="TIME ST SEGMENT RETURN TO BASELINE: "_$PIECE(DIP(1),U,7)
KILL DIP
if DN
KILL Y
WRITE X
+41 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "SIGNIFICANT ARRHYTHMIAS:"
+42 SET X=$GET(^MCAR(691.7,D0,5))
WRITE ?30
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $SELECT($DATA(DXS(8,Y)):DXS(8,Y),1:Y)
+43 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "BLOOD PRESSURE CHANGES:"
+44 SET X=$GET(^MCAR(691.7,D0,7))
WRITE ?29
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+45 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "OTHER EKG CHANGES:"
+46 SET I(1)=9
SET J(1)=691.75
FOR D1=0:0
if $ORDER(^MCAR(691.7,D0,9,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>24
DO T
if 'DN
QUIT
DO B1
+47 GOTO B1R
B1 ;
+1 SET X=$GET(^MCAR(691.7,D0,9,D1,0))
SET DIWL=25
SET DIWR=78
DO ^DIWP
+2 QUIT
B1R ;
+1 DO A^DIWW
+2 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "INTERPRETATION:"
+3 SET X=$GET(^MCAR(691.7,D0,5))
WRITE ?21
SET Y=$PIECE(X,U,8)
if Y]""
WRITE $SELECT($DATA(DXS(10,Y)):DXS(10,Y),1:Y)
+4 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "COMMENTS:"
+5 SET I(1)=6
SET J(1)=691.73
FOR D1=0:0
if $ORDER(^MCAR(691.7,D0,6,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>15
DO T
if 'DN
QUIT
DO C1
+6 GOTO C1R
C1 ;
+1 SET X=$GET(^MCAR(691.7,D0,6,D1,0))
SET DIWL=1
SET DIWR=75
DO ^DIWP
+2 QUIT
C1R ;
+1 DO A^DIWW
+2 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "HEART MEDS:"
+3 SET I(1)=1
SET J(1)=691.71
FOR D1=0:0
if $ORDER(^MCAR(691.7,D0,1,D1))'>0
QUIT
if $DATA(DSC(691.71))
XECUTE DSC(691.71)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>17
DO T
if 'DN
QUIT
DO D1
+4 GOTO D1R
D1 ;
+1 SET X=$GET(^MCAR(691.7,D0,1,D1,0))
WRITE ?17
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695,Y,0))#2:$PIECE(^(0),U,1),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^PSDRUG(Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 WRITE " "
+3 WRITE ?0,$EXTRACT($PIECE(X,U,2),1,10)
+4 WRITE " "
+5 WRITE ?0,$EXTRACT($PIECE(X,U,3),1,10)
+6 QUIT
D1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "COMPLICATIONS:"
+2 SET I(1)=11
SET J(1)=691.703
FOR D1=0:0
if $ORDER(^MCAR(691.7,D0,11,D1))'>0
QUIT
if $DATA(DSC(691.703))
XECUTE DSC(691.703)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>20
DO T
if 'DN
QUIT
DO E1
+3 GOTO E1R
E1 ;
+1 SET X=$GET(^MCAR(691.7,D0,11,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(696.9,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,40)
+2 QUIT
E1R ;
+1 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "EKG TECH:"
+2 SET X=$GET(^MCAR(691.7,D0,7))
WRITE ?15
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,35)
+3 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "ATTN PHYS:"
+4 GOTO ^MCAROT1