MCAROE1 ; GENERATED FROM 'MCARECHO1' PRINT TEMPLATE (#3716) ; 11/29/04 ; (FILE 691, 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(3716,"DXS")
S I(0)="^MCAR(691,",J(0)=691
D N:$X>49 Q:'DN W ?49 W "WARD/CLINIC: "
S X=$G(^MCAR(691,D0,11)) S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^SC(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "AGE: "
X DXS(1,9) K DIP K:DN Y W X
D N:$X>49 Q:'DN W ?49 W "SEX: "
X DXS(2,9.3) S DIP(201)=$S($D(^DPT(D0,0)):^(0),1:"") 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>4 Q:'DN W ?4 W "HT IN: "
S X=$G(^MCAR(691,D0,13)) S Y=$P(X,U,2) W:Y]"" $J(Y,3,0)
D N:$X>27 Q:'DN W ?27 W "WT LBS: "
S Y=$P(X,U,1) W:Y]"" $J(Y,4,0)
D N:$X>49 Q:'DN W ?49 X DXS(3,9.2) S X=$S(DIP(2):DIP(3),DIP(4):DIP(5),DIP(6):X) K DIP K:DN Y W X
S X=$G(^MCAR(691,D0,13)) S Y=$P(X,U,3) W:Y]"" $J(Y,6,2)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "TEST RESULTS:"
D N:$X>6 Q:'DN W ?6 X DXS(4,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(5,9) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(6,9) K DIP K:DN Y W X
D N:$X>30 Q:'DN W ?30 X DXS(7,9) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 X DXS(8,9) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 X DXS(9,9) K DIP K:DN Y W X
D N:$X>66 Q:'DN W ?66 X DXS(10,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(11,9) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(12,9) K DIP K:DN Y W X
D N:$X>30 Q:'DN W ?30 X DXS(13,9) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 X DXS(14,9) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 X DXS(15,9) K DIP K:DN Y W X
D N:$X>65 Q:'DN W ?65 X DXS(16,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(17,9.2) S X="% FRACT SHORT: ",X=$S(DIP(3):DIP(4),DIP(5):X) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(18,9.2) S X=X&Y,DIP(3)=X S X="",DIP(4)=X S X=1,DIP(5)=X S X=DIP(6),X=$S(DIP(3):DIP(4),DIP(5):X) K DIP K:DN Y W X
D N:$X>32 Q:'DN W ?32 X DXS(19,9.2) S X=$S(DIP(3):DIP(4),DIP(5):X) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 X DXS(20,9) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 X DXS(21,9) K DIP K:DN Y W X
D N:$X>65 Q:'DN W ?65 X DXS(22,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(23,9) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(24,9) K DIP K:DN Y W X
D N:$X>31 Q:'DN W ?31 X DXS(25,9) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 X DXS(26,9) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 X DXS(27,9) K DIP K:DN Y W X
D N:$X>65 Q:'DN W ?65 X DXS(28,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(29,9) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(30,9) K DIP K:DN Y W X
D N:$X>31 Q:'DN W ?31 X DXS(31,9) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 X DXS(32,9) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 X DXS(33,9) K DIP K:DN Y W X
D N:$X>67 Q:'DN W ?67 X DXS(34,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X $P(^DD(691,32.8,0),U,5,99) S DIP(1)=X S X='DIP(1),DIP(2)=X S X="",DIP(3)=X S X=1,DIP(4)=X S X="LV MASS: ",X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>24 Q:'DN W ?24 X DXS(35,9.2) S X=$J(DIP(6),DIP(7),X),X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 X DXS(36,9) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(37,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>33 Q:'DN W ?33 X DXS(38,9.2) S DIP(4)=X S X="",DIP(5)=X S X=1,DIP(6)=X S X="EF: "_DIP(7)_"%",X=$S(DIP(2):DIP(3),DIP(4):DIP(5),DIP(6):X) K DIP K:DN Y W X
D N:$X>48 Q:'DN W ?48 X DXS(39,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 X DXS(40,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>35 Q:'DN W ?35 X DXS(41,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
D N:$X>9 Q:'DN W ?9 X DXS(42,9.3) S X=$S(DIP(3):DIP(4),DIP(5):X) K DIP K:DN Y W X
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
MCAROE1 ; GENERATED FROM 'MCARECHO1' PRINT TEMPLATE (#3716) ; 11/29/04 ; (FILE 691, 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(3716,"DXS")
+3 SET I(0)="^MCAR(691,"
SET J(0)=691
+4 IF $X>49
DO N
IF 'DN
QUIT
WRITE ?49
WRITE "WARD/CLINIC: "
+5 SET X=$GET(^MCAR(691,D0,11))
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^SC(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+6 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "AGE: "
+7 XECUTE DXS(1,9)
KILL DIP
IF DN
KILL Y
WRITE X
+8 IF $X>49
DO N
IF 'DN
QUIT
WRITE ?49
WRITE "SEX: "
+9 XECUTE DXS(2,9.3)
SET DIP(201)=$SELECT($DATA(^DPT(D0,0)):^(0),1:"")
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
+10 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "HT IN: "
+11 SET X=$GET(^MCAR(691,D0,13))
SET Y=$PIECE(X,U,2)
IF Y]""
WRITE $JUSTIFY(Y,3,0)
+12 IF $X>27
DO N
IF 'DN
QUIT
WRITE ?27
WRITE "WT LBS: "
+13 SET Y=$PIECE(X,U,1)
IF Y]""
WRITE $JUSTIFY(Y,4,0)
+14 IF $X>49
DO N
IF 'DN
QUIT
WRITE ?49
XECUTE DXS(3,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):DIP(5),DIP(6):X)
KILL DIP
IF DN
KILL Y
WRITE X
+15 SET X=$GET(^MCAR(691,D0,13))
SET Y=$PIECE(X,U,3)
IF Y]""
WRITE $JUSTIFY(Y,6,2)
+16 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "TEST RESULTS:"
+17 IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
XECUTE DXS(4,9)
KILL DIP
IF DN
KILL Y
WRITE X
+18 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(5,9)
KILL DIP
IF DN
KILL Y
WRITE X
+19 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(6,9)
KILL DIP
IF DN
KILL Y
WRITE X
+20 IF $X>30
DO N
IF 'DN
QUIT
WRITE ?30
XECUTE DXS(7,9)
KILL DIP
IF DN
KILL Y
WRITE X
+21 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
XECUTE DXS(8,9)
KILL DIP
IF DN
KILL Y
WRITE X
+22 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
XECUTE DXS(9,9)
KILL DIP
IF DN
KILL Y
WRITE X
+23 IF $X>66
DO N
IF 'DN
QUIT
WRITE ?66
XECUTE DXS(10,9)
KILL DIP
IF DN
KILL Y
WRITE X
+24 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(11,9)
KILL DIP
IF DN
KILL Y
WRITE X
+25 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(12,9)
KILL DIP
IF DN
KILL Y
WRITE X
+26 IF $X>30
DO N
IF 'DN
QUIT
WRITE ?30
XECUTE DXS(13,9)
KILL DIP
IF DN
KILL Y
WRITE X
+27 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
XECUTE DXS(14,9)
KILL DIP
IF DN
KILL Y
WRITE X
+28 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
XECUTE DXS(15,9)
KILL DIP
IF DN
KILL Y
WRITE X
+29 IF $X>65
DO N
IF 'DN
QUIT
WRITE ?65
XECUTE DXS(16,9)
KILL DIP
IF DN
KILL Y
WRITE X
+30 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(17,9.2)
SET X="% FRACT SHORT: "
SET X=$SELECT(DIP(3):DIP(4),DIP(5):X)
KILL DIP
IF DN
KILL Y
WRITE X
+31 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(18,9.2)
SET X=X&Y
SET DIP(3)=X
SET X=""
SET DIP(4)=X
SET X=1
SET DIP(5)=X
SET X=DIP(6)
SET X=$SELECT(DIP(3):DIP(4),DIP(5):X)
KILL DIP
IF DN
KILL Y
WRITE X
+32 IF $X>32
DO N
IF 'DN
QUIT
WRITE ?32
XECUTE DXS(19,9.2)
SET X=$SELECT(DIP(3):DIP(4),DIP(5):X)
KILL DIP
IF DN
KILL Y
WRITE X
+33 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
XECUTE DXS(20,9)
KILL DIP
IF DN
KILL Y
WRITE X
+34 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
XECUTE DXS(21,9)
KILL DIP
IF DN
KILL Y
WRITE X
+35 IF $X>65
DO N
IF 'DN
QUIT
WRITE ?65
XECUTE DXS(22,9)
KILL DIP
IF DN
KILL Y
WRITE X
+36 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(23,9)
KILL DIP
IF DN
KILL Y
WRITE X
+37 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(24,9)
KILL DIP
IF DN
KILL Y
WRITE X
+38 IF $X>31
DO N
IF 'DN
QUIT
WRITE ?31
XECUTE DXS(25,9)
KILL DIP
IF DN
KILL Y
WRITE X
+39 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
XECUTE DXS(26,9)
KILL DIP
IF DN
KILL Y
WRITE X
+40 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
XECUTE DXS(27,9)
KILL DIP
IF DN
KILL Y
WRITE X
+41 IF $X>65
DO N
IF 'DN
QUIT
WRITE ?65
XECUTE DXS(28,9)
KILL DIP
IF DN
KILL Y
WRITE X
+42 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(29,9)
KILL DIP
IF DN
KILL Y
WRITE X
+43 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(30,9)
KILL DIP
IF DN
KILL Y
WRITE X
+44 IF $X>31
DO N
IF 'DN
QUIT
WRITE ?31
XECUTE DXS(31,9)
KILL DIP
IF DN
KILL Y
WRITE X
+45 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
XECUTE DXS(32,9)
KILL DIP
IF DN
KILL Y
WRITE X
+46 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
XECUTE DXS(33,9)
KILL DIP
IF DN
KILL Y
WRITE X
+47 IF $X>67
DO N
IF 'DN
QUIT
WRITE ?67
XECUTE DXS(34,9)
KILL DIP
IF DN
KILL Y
WRITE X
+48 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE $PIECE(^DD(691,32.8,0),U,5,99)
SET DIP(1)=X
SET X='DIP(1)
SET DIP(2)=X
SET X=""
SET DIP(3)=X
SET X=1
SET DIP(4)=X
SET X="LV MASS: "
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+49 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
XECUTE DXS(35,9.2)
SET X=$JUSTIFY(DIP(6),DIP(7),X)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+50 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
XECUTE DXS(36,9)
KILL DIP
IF DN
KILL Y
WRITE X
+51 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(37,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+52 IF $X>33
DO N
IF 'DN
QUIT
WRITE ?33
XECUTE DXS(38,9.2)
SET DIP(4)=X
SET X=""
SET DIP(5)=X
SET X=1
SET DIP(6)=X
SET X="EF: "_DIP(7)_"%"
SET X=$SELECT(DIP(2):DIP(3),DIP(4):DIP(5),DIP(6):X)
KILL DIP
IF DN
KILL Y
WRITE X
+53 IF $X>48
DO N
IF 'DN
QUIT
WRITE ?48
XECUTE DXS(39,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+54 IF $X>63
DO N
IF 'DN
QUIT
WRITE ?63
XECUTE DXS(40,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+55 IF $X>35
DO N
IF 'DN
QUIT
WRITE ?35
XECUTE DXS(41,9.2)
SET X=$SELECT(DIP(2):DIP(3),DIP(4):X)
KILL DIP
IF DN
KILL Y
WRITE X
+56 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
XECUTE DXS(42,9.3)
SET X=$SELECT(DIP(3):DIP(4),DIP(5):X)
KILL DIP
IF DN
KILL Y
WRITE X
+57 KILL Y
+58 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!