MCAROE1 ; GENERATED FROM 'MCARECHO1' PRINT TEMPLATE (#992) ; 02/21/97 ; (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 F X=0:0 S X=$O(^DIPT(992,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
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),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 !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCAROE1 4380 printed Dec 13, 2024@02:13:14 Page 2
MCAROE1 ; GENERATED FROM 'MCARECHO1' PRINT TEMPLATE (#992) ; 02/21/97 ; (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
FOR X=0:0
SET X=$ORDER(^DIPT(992,"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 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
WRITE "WARD/CLINIC: "
+4 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),1:Y)
WRITE $EXTRACT(Y,1,30)
+5 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "AGE: "
+6 XECUTE DXS(1,9)
KILL DIP
if DN
KILL Y
WRITE X
+7 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
WRITE "SEX: "
+8 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
+9 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "HT IN: "
+10 SET X=$GET(^MCAR(691,D0,13))
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $JUSTIFY(Y,3,0)
+11 if $X>27
DO N
if 'DN
QUIT
WRITE ?27
WRITE "WT LBS: "
+12 SET Y=$PIECE(X,U,1)
if Y]""
WRITE $JUSTIFY(Y,4,0)
+13 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
+14 SET X=$GET(^MCAR(691,D0,13))
SET Y=$PIECE(X,U,3)
if Y]""
WRITE $JUSTIFY(Y,6,2)
+15 DO T
if 'DN
QUIT
DO N
if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "TEST RESULTS:"
+16 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
XECUTE DXS(4,9)
KILL DIP
if DN
KILL Y
WRITE X
+17 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
XECUTE DXS(5,9)
KILL DIP
if DN
KILL Y
WRITE X
+18 if $X>24
DO N
if 'DN
QUIT
WRITE ?24
XECUTE DXS(6,9)
KILL DIP
if DN
KILL Y
WRITE X
+19 if $X>30
DO N
if 'DN
QUIT
WRITE ?30
XECUTE DXS(7,9)
KILL DIP
if DN
KILL Y
WRITE X
+20 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
XECUTE DXS(8,9)
KILL DIP
if DN
KILL Y
WRITE X
+21 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
XECUTE DXS(9,9)
KILL DIP
if DN
KILL Y
WRITE X
+22 if $X>66
DO N
if 'DN
QUIT
WRITE ?66
XECUTE DXS(10,9)
KILL DIP
if DN
KILL Y
WRITE X
+23 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
XECUTE DXS(11,9)
KILL DIP
if DN
KILL Y
WRITE X
+24 if $X>24
DO N
if 'DN
QUIT
WRITE ?24
XECUTE DXS(12,9)
KILL DIP
if DN
KILL Y
WRITE X
+25 if $X>30
DO N
if 'DN
QUIT
WRITE ?30
XECUTE DXS(13,9)
KILL DIP
if DN
KILL Y
WRITE X
+26 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
XECUTE DXS(14,9)
KILL DIP
if DN
KILL Y
WRITE X
+27 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
XECUTE DXS(15,9)
KILL DIP
if DN
KILL Y
WRITE X
+28 if $X>65
DO N
if 'DN
QUIT
WRITE ?65
XECUTE DXS(16,9)
KILL DIP
if DN
KILL Y
WRITE X
+29 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
+30 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
+31 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
+32 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
XECUTE DXS(20,9)
KILL DIP
if DN
KILL Y
WRITE X
+33 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
XECUTE DXS(21,9)
KILL DIP
if DN
KILL Y
WRITE X
+34 if $X>65
DO N
if 'DN
QUIT
WRITE ?65
XECUTE DXS(22,9)
KILL DIP
if DN
KILL Y
WRITE X
+35 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
XECUTE DXS(23,9)
KILL DIP
if DN
KILL Y
WRITE X
+36 if $X>24
DO N
if 'DN
QUIT
WRITE ?24
XECUTE DXS(24,9)
KILL DIP
if DN
KILL Y
WRITE X
+37 if $X>31
DO N
if 'DN
QUIT
WRITE ?31
XECUTE DXS(25,9)
KILL DIP
if DN
KILL Y
WRITE X
+38 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
XECUTE DXS(26,9)
KILL DIP
if DN
KILL Y
WRITE X
+39 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
XECUTE DXS(27,9)
KILL DIP
if DN
KILL Y
WRITE X
+40 if $X>65
DO N
if 'DN
QUIT
WRITE ?65
XECUTE DXS(28,9)
KILL DIP
if DN
KILL Y
WRITE X
+41 if $X>9
DO N
if 'DN
QUIT
WRITE ?9
XECUTE DXS(29,9)
KILL DIP
if DN
KILL Y
WRITE X
+42 if $X>24
DO N
if 'DN
QUIT
WRITE ?24
XECUTE DXS(30,9)
KILL DIP
if DN
KILL Y
WRITE X
+43 if $X>31
DO N
if 'DN
QUIT
WRITE ?31
XECUTE DXS(31,9)
KILL DIP
if DN
KILL Y
WRITE X
+44 if $X>44
DO N
if 'DN
QUIT
WRITE ?44
XECUTE DXS(32,9)
KILL DIP
if DN
KILL Y
WRITE X
+45 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
XECUTE DXS(33,9)
KILL DIP
if DN
KILL Y
WRITE X
+46 if $X>67
DO N
if 'DN
QUIT
WRITE ?67
XECUTE DXS(34,9)
KILL DIP
if DN
KILL Y
WRITE X
+47 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
+48 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
+49 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
+50 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
+51 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
+52 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
+53 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
+54 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
+55 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
+56 KILL Y
+57 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!