1 | FHNU6 ; HISC/REL/NCA - Abbreviated Analysis Output ;8/2/94 16:09
|
---|
2 | ;;5.5;DIETETICS;;Jan 28, 2005
|
---|
3 | K A,B,C F K=1:1:3 S C(K)=0 F K=1:1:66 S A(K)=0,B(K)=0
|
---|
4 | S NX=0
|
---|
5 | D1 S NX=$O(FHM(NX)) I NX="" G D2
|
---|
6 | S AMT=+FHM(NX) I TYP="C" S WT=$P(FHM(NX),",",3),AMT=AMT*WT
|
---|
7 | S AMT=AMT/100,Y=$G(^FHNU(NX,1)) F K=1:1:20 S Z1=$P(Y,"^",K) I Z1'="" S A(K)=Z1*AMT+A(K),B(K)=B(K)+1
|
---|
8 | S Y=$G(^FHNU(NX,2)) F K=21:1:38 S Z1=$P(Y,"^",K-20) I Z1'="" S A(K)=Z1*AMT+A(K),B(K)=B(K)+1
|
---|
9 | S Y=$G(^FHNU(NX,3)) F K=39:1:56 S Z1=$P(Y,"^",K-38) I Z1'="" S A(K)=Z1*AMT+A(K),B(K)=B(K)+1
|
---|
10 | S Y=$G(^FHNU(NX,4)) F K=57:1:66 S Z1=$P(Y,"^",K-56) I Z1'="" S A(K)=Z1*AMT+A(K),B(K)=B(K)+1
|
---|
11 | G D1
|
---|
12 | D2 S ZR=$S(RDA:^FH(112.2,RDA,1),1:""),ANS=""
|
---|
13 | S Z1=4*A(1)+(9*A(2))+(4*A(3)) S:'Z1 Z1=1 F KK=1,3,2 S C(KK)=$J(A(KK)*$S(KK=2:900,1:400)/Z1,4,0)
|
---|
14 | W:$E(IOST,1,2)="C-" @IOF W !?28,"--- Analysis of Menu ---",!!?(80-$L(TIT)\2),TIT,!!?34,"%",?39,"%",?76,"%",!
|
---|
15 | W ?33,"DRI",?37,"Kcal",?75,"DRI",!
|
---|
16 | F K=1:1:34 S Y=$T(COM+K),Z1=$P(Y,";",3) D LST
|
---|
17 | D PSE I ANS="^" K A,B,C,KK,T1,Z1,Z2,ZR Q
|
---|
18 | F K=35:1:70 S Y=$T(COM+K),Z1=$P(Y,";",3) D LST
|
---|
19 | D PSE W ! K A,B,C,KK,T1,Z1,Z2,ZR Q
|
---|
20 | LST W:K#2 ! Q:'Z1 S T1=$S(K#2:0,1:42)
|
---|
21 | W ?T1,$P(Y,";",4)," (",B(Z1),")" I B(Z1) W ?(T1+21),$J(A(Z1),7,$P(Y,";",6))," ",$P(Y,";",5)
|
---|
22 | S Z2=$P(Y,";",7) I Z2,ZR'="" S Z2=A(Z1)/$P(ZR,U,Z2) W ?(T1+33),$J(Z2*100,3,0)
|
---|
23 | I $D(C(Z1)) W ?(T1+37),C(Z1)
|
---|
24 | Q
|
---|
25 | PSE I IOST?1"C-".E R !!,"Press RETURN to Continue ",X:DTIME W ! S:'$T!(X["^") ANS="^" Q:ANS="^" I "^"'[X W !,"Enter a RETURN to Continue." G PSE
|
---|
26 | Q
|
---|
27 | COM ;;
|
---|
28 | ;;4;Calories;K;0;0
|
---|
29 | ;;33;Vitamin A;RE;0;2
|
---|
30 | ;;1;Protein;Gms;1;1
|
---|
31 | ;;19;Ascorbic Acid;Mg;1;4
|
---|
32 | ;;3;Carbohydrate;Gms;1;0
|
---|
33 | ;;17;Vitamin E;Mg;1;3
|
---|
34 | ;;2;Fat;Gms;1;0
|
---|
35 | ;;21;Riboflavin;Mg;1;6
|
---|
36 | ;;13;Sodium;Mg;1;19
|
---|
37 | ;;20;Thiamin;Mg;1;5
|
---|
38 | ;;12;Potassium;Mg;1;20
|
---|
39 | ;;22;Niacin;Mg;1;7
|
---|
40 | ;;8;Calcium;Mg;1;11
|
---|
41 | ;;24;Vitamin B6;Mg;1;8
|
---|
42 | ;;11;Phosphorus;Mg;1;12
|
---|
43 | ;;26;Vitamin B12;Mcg;1;10
|
---|
44 | ;;9;Iron;Mg;1;14
|
---|
45 | ;;65;Vitamin K;Mcg;1;26
|
---|
46 | ;;14;Zinc;Mg;1;15
|
---|
47 | ;;25;Folate;Mcg;1;9
|
---|
48 | ;;10;Magnesium;Mg;1;13
|
---|
49 | ;;23;Pantothenic Ac;Mg;1;16
|
---|
50 | ;;16;Manganese;Mg;1;18
|
---|
51 | ;;29;Cholesterol;Mg;1;0
|
---|
52 | ;;15;Copper;Mg;1;17
|
---|
53 | ;;27;Linoleic Acid;Gms;1;0
|
---|
54 | ;;66;Selenium;Mcg;1;22
|
---|
55 | ;;28;Linolenic Acid;Gms;1;0
|
---|
56 | ;;0;Crude Fiber;Gms;1;0
|
---|
57 | ;;31;Monounsat. Fat;Gms;1;0
|
---|
58 | ;;0;Dietary Fiber;Gms;1;0
|
---|
59 | ;;32;Polyunsat. Fat;Gms;1;0
|
---|
60 | ;;5;Water;Ml;1;0
|
---|
61 | ;;30;Saturated Fat;Gms;1;0
|
---|
62 | ;;34;Ash;Gms;1;0
|
---|
63 | ;;39;Tryptophan;Gms;2;0
|
---|
64 | ;;35;Alcohol;Gms;1;0
|
---|
65 | ;;40;Threonine;Gms;2;0
|
---|
66 | ;;36;Caffeine;Mg;1;0
|
---|
67 | ;;41;Isoleucine;Gms;2;0
|
---|
68 | ;;37;Total Diet Fiber;Gms;1;0
|
---|
69 | ;;42;Leucine;Gms;2;0
|
---|
70 | ;;38;Total Tocopherol;Mg;1;0
|
---|
71 | ;;43;Lysine;Gms;2;0
|
---|
72 | ;;57;Capric Acid;Gms;2;0
|
---|
73 | ;;44;Methionine;Gms;2;0
|
---|
74 | ;;58;Lauric Acid;Gms;2;0
|
---|
75 | ;;45;Cystine;Gms;2;0
|
---|
76 | ;;59;Myristic Acid;Gms;2;0
|
---|
77 | ;;46;Phenylalanine;Gms;2;0
|
---|
78 | ;;60;Palmitic Acid;Gms;2;0
|
---|
79 | ;;47;Tyrosine;Gms;2;0
|
---|
80 | ;;61;Palmitoleic Acid;Gms;2;0
|
---|
81 | ;;48;Valine;Gms;2;0
|
---|
82 | ;;62;Stearic Acid;Gms;2;0
|
---|
83 | ;;49;Arginine;Gms;2;0
|
---|
84 | ;;63;Oleic Acid;Gms;2;0
|
---|
85 | ;;50;Histidine;Gms;2;0
|
---|
86 | ;;64;Arachidonic Acid;Gms;2;0
|
---|
87 | ;;51;Alanine;Gms;2;0
|
---|
88 | ;;0
|
---|
89 | ;;52;Aspartic Acid;Gms;2;0
|
---|
90 | ;;0
|
---|
91 | ;;53;Glutamic Acid;Gms;2;0
|
---|
92 | ;;0
|
---|
93 | ;;54;Glycine;Gms;2;0
|
---|
94 | ;;0
|
---|
95 | ;;55;Proline;Gms;2;0
|
---|
96 | ;;0
|
---|
97 | ;;56;Serine;Gms;2;0
|
---|