FHINI008 ; ; 11-OCT-1995
;;5.0;Dietetics;;Oct 11, 1995
Q:'DIFQ(112) F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) X NO E S @X=Y
Q Q
;;^DIC(112,0,"GL")
;;=^FHNU(
;;^DIC("B","FOOD NUTRIENTS",112)
;;=
;;^DIC(112,"%D",0)
;;=^^3^3^2871124^
;;^DIC(112,"%D",1,0)
;;=This file contains both standard USDA nutrient data based upon
;;^DIC(112,"%D",2,0)
;;=Handbook 456 and Revised Handbook 8 as well as user entered data.
;;^DIC(112,"%D",3,0)
;;=The standard data includes 32 common nutrients.
;;^DD(112,0)
;;=FIELD^^99^75
;;^DD(112,0,"DT")
;;=2930520
;;^DD(112,0,"IX","AC",112,4)
;;=
;;^DD(112,0,"IX","AD",112,4.2)
;;=
;;^DD(112,0,"IX","AE",112,4.4)
;;=
;;^DD(112,0,"IX","AQ",112,.01)
;;=
;;^DD(112,0,"IX","B",112,.01)
;;=
;;^DD(112,0,"IX","B",112,4.2)
;;=
;;^DD(112,0,"IX","C",112,1)
;;=
;;^DD(112,0,"NM","FOOD NUTRIENTS")
;;=
;;^DD(112,0,"PT",112.63,.01)
;;=
;;^DD(112,0,"PT",113,27)
;;=
;;^DD(112,0,"PT",114,102)
;;=
;;^DD(112,0,"PT",114.01,2)
;;=
;;^DD(112,.01,0)
;;=NAME^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>60!($L(X)<3)!'(X'?1P.E)!(X'?.ANP) X
;;^DD(112,.01,1,0)
;;=^.1
;;^DD(112,.01,1,1,0)
;;=112^B
;;^DD(112,.01,1,1,1)
;;=S ^FHNU("B",$E(X,1,30),DA)=""
;;^DD(112,.01,1,1,2)
;;=K ^FHNU("B",$E(X,1,30),DA)
;;^DD(112,.01,1,1,"%D",0)
;;=^^1^1^2911118^
;;^DD(112,.01,1,1,"%D",1,0)
;;=This is the normal B cross-reference of the NAME field.
;;^DD(112,.01,1,2,0)
;;=112^AQ^MUMPS
;;^DD(112,.01,1,2,1)
;;=I $D(^FHNU(DA,.6)),$P(^(.6),"^",1)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
;;^DD(112,.01,1,2,2)
;;=K ^FHNU("AQ",$E(X,1,30),DA)
;;^DD(112,.01,1,2,"%D",0)
;;=^^2^2^2940824^
;;^DD(112,.01,1,2,"%D",1,0)
;;=If Field 4 is Yes, then the name is set under an "AQ" quick-list for
;;^DD(112,.01,1,2,"%D",2,0)
;;=rapid selection.
;;^DD(112,.01,3)
;;=ANSWER MUST BE 3-60 CHARACTERS IN LENGTH
;;^DD(112,.01,21,0)
;;=^^1^1^2880717^
;;^DD(112,.01,21,1,0)
;;=This field contains the name of the food nutrient item.
;;^DD(112,.01,"DEL",1,0)
;;=I DUZ(0)'["@",'$D(^XUSEC("FHMGR",DUZ))
;;^DD(112,.01,"DT")
;;=2850406
;;^DD(112,1,0)
;;=CODE^F^^0;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>6!($L(X)<1) X
;;^DD(112,1,1,0)
;;=^.1
;;^DD(112,1,1,1,0)
;;=112^C
;;^DD(112,1,1,1,1)
;;=S ^FHNU("C",$E(X,1,30),DA)=""
;;^DD(112,1,1,1,2)
;;=K ^FHNU("C",$E(X,1,30),DA)
;;^DD(112,1,3)
;;=ANSWER MUST BE 1-6 CHARACTERS IN LENGTH
;;^DD(112,1,21,0)
;;=^^3^3^2880717^
;;^DD(112,1,21,1,0)
;;=This field, if present, contains the USDA code of the food
;;^DD(112,1,21,2,0)
;;=nutrient item. It may be either a Revised Handbook 8 number
;;^DD(112,1,21,3,0)
;;=or a Handbook 456 number.
;;^DD(112,2,0)
;;=COMMON UNITS^F^^0;3^K:$L(X)>10!($L(X)<1) X
;;^DD(112,2,3)
;;=ANSWER MUST BE 1-10 CHARACTERS IN LENGTH
;;^DD(112,2,21,0)
;;=^^3^3^2880717^
;;^DD(112,2,21,1,0)
;;=This field represents the type of common units used (e.g., oz.,
;;^DD(112,2,21,2,0)
;;=serving, each) when quantities are to be represented in common
;;^DD(112,2,21,3,0)
;;=units.
;;^DD(112,3,0)
;;=GRAMS/COMMON UNIT^NJ8,3^^0;4^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."4N.N) X
;;^DD(112,3,3)
;;=TYPE A NUMBER BETWEEN 0 AND 9999
;;^DD(112,3,21,0)
;;=^^2^2^2930510^^
;;^DD(112,3,21,1,0)
;;=This field contains the number of grams in the common unit
;;^DD(112,3,21,2,0)
;;=specified for this nutrient.
;;^DD(112,4,0)
;;=ORIGINAL NAME ON QUICK LIST?^S^Y:YES;N:NO;^.6;1^Q
;;^DD(112,4,1,0)
;;=^.1
;;^DD(112,4,1,1,0)
;;=112^AC^MUMPS
;;^DD(112,4,1,1,1)
;;=I X="Y" S X1=$P(^FHNU(DA,0),U,1) S:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)=""
;;^DD(112,4,1,1,2)
;;=S X1=$P(^FHNU(DA,0),U,1) K:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)
;;^DD(112,4,1,1,"%D",0)
;;=^^2^2^2940824^
;;^DD(112,4,1,1,"%D",1,0)
;;=If Field is Yes, then Name (.01 Field) is set under "AQ" Quick List
;;^DD(112,4,1,1,"%D",2,0)
;;=for rapid selection.
;;^DD(112,4,21,0)
;;=^^3^3^2880717^
;;^DD(112,4,21,1,0)
;;=This field, when answered YES, means that the main name
;;^DD(112,4,21,2,0)
;;=of this nutrient will be on a Quick List for rapid look-up.
;;^DD(112,4,21,3,0)
;;=In short, this is a commonly used item.
;;^DD(112,4,"DT")
;;=2850615
;;^DD(112,4.2,0)
;;=ALTERNATE NAME^F^^.6;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>40!($L(X)<3) X
;;^DD(112,4.2,1,0)
;;=^.1
;;^DD(112,4.2,1,1,0)
;;=112^B^MNEMONIC
;;^DD(112,4.2,1,1,1)
;;=S:'$D(^FHNU("B",$E(X,1,30),DA)) ^(DA)=1
;;^DD(112,4.2,1,1,2)
;;=I $D(^FHNU("B",$E(X,1,30),DA)),^(DA) K ^(DA)
;;^DD(112,4.2,1,1,"%D",0)
;;=^^1^1^2911118^
;;^DD(112,4.2,1,1,"%D",1,0)
;;=This is the normal B cross-reference of the ALTERNATE NAME field.
;;^DD(112,4.2,1,2,0)
;;=112^AD^MUMPS
;;^DD(112,4.2,1,2,1)
;;=I $D(^FHNU(DA,.6)),$P(^(.6),U,3)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
;;^DD(112,4.2,1,2,2)
;;=K ^FHNU("AQ",$E(X,1,30),DA)
FHINI008 ; ; 11-OCT-1995
+1 ;;5.0;Dietetics;;Oct 11, 1995
+2 IF 'DIFQ(112)
QUIT
FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
XECUTE NO
IF '$TEST
SET @X=Y
Q QUIT
+1 ;;^DIC(112,0,"GL")
+2 ;;=^FHNU(
+3 ;;^DIC("B","FOOD NUTRIENTS",112)
+4 ;;=
+5 ;;^DIC(112,"%D",0)
+6 ;;=^^3^3^2871124^
+7 ;;^DIC(112,"%D",1,0)
+8 ;;=This file contains both standard USDA nutrient data based upon
+9 ;;^DIC(112,"%D",2,0)
+10 ;;=Handbook 456 and Revised Handbook 8 as well as user entered data.
+11 ;;^DIC(112,"%D",3,0)
+12 ;;=The standard data includes 32 common nutrients.
+13 ;;^DD(112,0)
+14 ;;=FIELD^^99^75
+15 ;;^DD(112,0,"DT")
+16 ;;=2930520
+17 ;;^DD(112,0,"IX","AC",112,4)
+18 ;;=
+19 ;;^DD(112,0,"IX","AD",112,4.2)
+20 ;;=
+21 ;;^DD(112,0,"IX","AE",112,4.4)
+22 ;;=
+23 ;;^DD(112,0,"IX","AQ",112,.01)
+24 ;;=
+25 ;;^DD(112,0,"IX","B",112,.01)
+26 ;;=
+27 ;;^DD(112,0,"IX","B",112,4.2)
+28 ;;=
+29 ;;^DD(112,0,"IX","C",112,1)
+30 ;;=
+31 ;;^DD(112,0,"NM","FOOD NUTRIENTS")
+32 ;;=
+33 ;;^DD(112,0,"PT",112.63,.01)
+34 ;;=
+35 ;;^DD(112,0,"PT",113,27)
+36 ;;=
+37 ;;^DD(112,0,"PT",114,102)
+38 ;;=
+39 ;;^DD(112,0,"PT",114.01,2)
+40 ;;=
+41 ;;^DD(112,.01,0)
+42 ;;=NAME^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>60!($L(X)<3)!'(X'?1P.E)!(X'?.ANP) X
+43 ;;^DD(112,.01,1,0)
+44 ;;=^.1
+45 ;;^DD(112,.01,1,1,0)
+46 ;;=112^B
+47 ;;^DD(112,.01,1,1,1)
+48 ;;=S ^FHNU("B",$E(X,1,30),DA)=""
+49 ;;^DD(112,.01,1,1,2)
+50 ;;=K ^FHNU("B",$E(X,1,30),DA)
+51 ;;^DD(112,.01,1,1,"%D",0)
+52 ;;=^^1^1^2911118^
+53 ;;^DD(112,.01,1,1,"%D",1,0)
+54 ;;=This is the normal B cross-reference of the NAME field.
+55 ;;^DD(112,.01,1,2,0)
+56 ;;=112^AQ^MUMPS
+57 ;;^DD(112,.01,1,2,1)
+58 ;;=I $D(^FHNU(DA,.6)),$P(^(.6),"^",1)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
+59 ;;^DD(112,.01,1,2,2)
+60 ;;=K ^FHNU("AQ",$E(X,1,30),DA)
+61 ;;^DD(112,.01,1,2,"%D",0)
+62 ;;=^^2^2^2940824^
+63 ;;^DD(112,.01,1,2,"%D",1,0)
+64 ;;=If Field 4 is Yes, then the name is set under an "AQ" quick-list for
+65 ;;^DD(112,.01,1,2,"%D",2,0)
+66 ;;=rapid selection.
+67 ;;^DD(112,.01,3)
+68 ;;=ANSWER MUST BE 3-60 CHARACTERS IN LENGTH
+69 ;;^DD(112,.01,21,0)
+70 ;;=^^1^1^2880717^
+71 ;;^DD(112,.01,21,1,0)
+72 ;;=This field contains the name of the food nutrient item.
+73 ;;^DD(112,.01,"DEL",1,0)
+74 ;;=I DUZ(0)'["@",'$D(^XUSEC("FHMGR",DUZ))
+75 ;;^DD(112,.01,"DT")
+76 ;;=2850406
+77 ;;^DD(112,1,0)
+78 ;;=CODE^F^^0;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>6!($L(X)<1) X
+79 ;;^DD(112,1,1,0)
+80 ;;=^.1
+81 ;;^DD(112,1,1,1,0)
+82 ;;=112^C
+83 ;;^DD(112,1,1,1,1)
+84 ;;=S ^FHNU("C",$E(X,1,30),DA)=""
+85 ;;^DD(112,1,1,1,2)
+86 ;;=K ^FHNU("C",$E(X,1,30),DA)
+87 ;;^DD(112,1,3)
+88 ;;=ANSWER MUST BE 1-6 CHARACTERS IN LENGTH
+89 ;;^DD(112,1,21,0)
+90 ;;=^^3^3^2880717^
+91 ;;^DD(112,1,21,1,0)
+92 ;;=This field, if present, contains the USDA code of the food
+93 ;;^DD(112,1,21,2,0)
+94 ;;=nutrient item. It may be either a Revised Handbook 8 number
+95 ;;^DD(112,1,21,3,0)
+96 ;;=or a Handbook 456 number.
+97 ;;^DD(112,2,0)
+98 ;;=COMMON UNITS^F^^0;3^K:$L(X)>10!($L(X)<1) X
+99 ;;^DD(112,2,3)
+100 ;;=ANSWER MUST BE 1-10 CHARACTERS IN LENGTH
+101 ;;^DD(112,2,21,0)
+102 ;;=^^3^3^2880717^
+103 ;;^DD(112,2,21,1,0)
+104 ;;=This field represents the type of common units used (e.g., oz.,
+105 ;;^DD(112,2,21,2,0)
+106 ;;=serving, each) when quantities are to be represented in common
+107 ;;^DD(112,2,21,3,0)
+108 ;;=units.
+109 ;;^DD(112,3,0)
+110 ;;=GRAMS/COMMON UNIT^NJ8,3^^0;4^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."4N.N) X
+111 ;;^DD(112,3,3)
+112 ;;=TYPE A NUMBER BETWEEN 0 AND 9999
+113 ;;^DD(112,3,21,0)
+114 ;;=^^2^2^2930510^^
+115 ;;^DD(112,3,21,1,0)
+116 ;;=This field contains the number of grams in the common unit
+117 ;;^DD(112,3,21,2,0)
+118 ;;=specified for this nutrient.
+119 ;;^DD(112,4,0)
+120 ;;=ORIGINAL NAME ON QUICK LIST?^S^Y:YES;N:NO;^.6;1^Q
+121 ;;^DD(112,4,1,0)
+122 ;;=^.1
+123 ;;^DD(112,4,1,1,0)
+124 ;;=112^AC^MUMPS
+125 ;;^DD(112,4,1,1,1)
+126 ;;=I X="Y" S X1=$P(^FHNU(DA,0),U,1) S:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)=""
+127 ;;^DD(112,4,1,1,2)
+128 ;;=S X1=$P(^FHNU(DA,0),U,1) K:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)
+129 ;;^DD(112,4,1,1,"%D",0)
+130 ;;=^^2^2^2940824^
+131 ;;^DD(112,4,1,1,"%D",1,0)
+132 ;;=If Field is Yes, then Name (.01 Field) is set under "AQ" Quick List
+133 ;;^DD(112,4,1,1,"%D",2,0)
+134 ;;=for rapid selection.
+135 ;;^DD(112,4,21,0)
+136 ;;=^^3^3^2880717^
+137 ;;^DD(112,4,21,1,0)
+138 ;;=This field, when answered YES, means that the main name
+139 ;;^DD(112,4,21,2,0)
+140 ;;=of this nutrient will be on a Quick List for rapid look-up.
+141 ;;^DD(112,4,21,3,0)
+142 ;;=In short, this is a commonly used item.
+143 ;;^DD(112,4,"DT")
+144 ;;=2850615
+145 ;;^DD(112,4.2,0)
+146 ;;=ALTERNATE NAME^F^^.6;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>40!($L(X)<3) X
+147 ;;^DD(112,4.2,1,0)
+148 ;;=^.1
+149 ;;^DD(112,4.2,1,1,0)
+150 ;;=112^B^MNEMONIC
+151 ;;^DD(112,4.2,1,1,1)
+152 ;;=S:'$D(^FHNU("B",$E(X,1,30),DA)) ^(DA)=1
+153 ;;^DD(112,4.2,1,1,2)
+154 ;;=I $D(^FHNU("B",$E(X,1,30),DA)),^(DA) K ^(DA)
+155 ;;^DD(112,4.2,1,1,"%D",0)
+156 ;;=^^1^1^2911118^
+157 ;;^DD(112,4.2,1,1,"%D",1,0)
+158 ;;=This is the normal B cross-reference of the ALTERNATE NAME field.
+159 ;;^DD(112,4.2,1,2,0)
+160 ;;=112^AD^MUMPS
+161 ;;^DD(112,4.2,1,2,1)
+162 ;;=I $D(^FHNU(DA,.6)),$P(^(.6),U,3)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
+163 ;;^DD(112,4.2,1,2,2)
+164 ;;=K ^FHNU("AQ",$E(X,1,30),DA)