Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FHINI008

FHINI008.m

Go to the documentation of this file.
  1. FHINI008 ; ; 11-OCT-1995
  1. ;;5.0;Dietetics;;Oct 11, 1995
  1. 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
  1. Q Q
  1. ;;^DIC(112,0,"GL")
  1. ;;=^FHNU(
  1. ;;^DIC("B","FOOD NUTRIENTS",112)
  1. ;;=
  1. ;;^DIC(112,"%D",0)
  1. ;;=^^3^3^2871124^
  1. ;;^DIC(112,"%D",1,0)
  1. ;;=This file contains both standard USDA nutrient data based upon
  1. ;;^DIC(112,"%D",2,0)
  1. ;;=Handbook 456 and Revised Handbook 8 as well as user entered data.
  1. ;;^DIC(112,"%D",3,0)
  1. ;;=The standard data includes 32 common nutrients.
  1. ;;^DD(112,0)
  1. ;;=FIELD^^99^75
  1. ;;^DD(112,0,"DT")
  1. ;;=2930520
  1. ;;^DD(112,0,"IX","AC",112,4)
  1. ;;=
  1. ;;^DD(112,0,"IX","AD",112,4.2)
  1. ;;=
  1. ;;^DD(112,0,"IX","AE",112,4.4)
  1. ;;=
  1. ;;^DD(112,0,"IX","AQ",112,.01)
  1. ;;=
  1. ;;^DD(112,0,"IX","B",112,.01)
  1. ;;=
  1. ;;^DD(112,0,"IX","B",112,4.2)
  1. ;;=
  1. ;;^DD(112,0,"IX","C",112,1)
  1. ;;=
  1. ;;^DD(112,0,"NM","FOOD NUTRIENTS")
  1. ;;=
  1. ;;^DD(112,0,"PT",112.63,.01)
  1. ;;=
  1. ;;^DD(112,0,"PT",113,27)
  1. ;;=
  1. ;;^DD(112,0,"PT",114,102)
  1. ;;=
  1. ;;^DD(112,0,"PT",114.01,2)
  1. ;;=
  1. ;;^DD(112,.01,0)
  1. ;;=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
  1. ;;^DD(112,.01,1,0)
  1. ;;=^.1
  1. ;;^DD(112,.01,1,1,0)
  1. ;;=112^B
  1. ;;^DD(112,.01,1,1,1)
  1. ;;=S ^FHNU("B",$E(X,1,30),DA)=""
  1. ;;^DD(112,.01,1,1,2)
  1. ;;=K ^FHNU("B",$E(X,1,30),DA)
  1. ;;^DD(112,.01,1,1,"%D",0)
  1. ;;=^^1^1^2911118^
  1. ;;^DD(112,.01,1,1,"%D",1,0)
  1. ;;=This is the normal B cross-reference of the NAME field.
  1. ;;^DD(112,.01,1,2,0)
  1. ;;=112^AQ^MUMPS
  1. ;;^DD(112,.01,1,2,1)
  1. ;;=I $D(^FHNU(DA,.6)),$P(^(.6),"^",1)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
  1. ;;^DD(112,.01,1,2,2)
  1. ;;=K ^FHNU("AQ",$E(X,1,30),DA)
  1. ;;^DD(112,.01,1,2,"%D",0)
  1. ;;=^^2^2^2940824^
  1. ;;^DD(112,.01,1,2,"%D",1,0)
  1. ;;=If Field 4 is Yes, then the name is set under an "AQ" quick-list for
  1. ;;^DD(112,.01,1,2,"%D",2,0)
  1. ;;=rapid selection.
  1. ;;^DD(112,.01,3)
  1. ;;=ANSWER MUST BE 3-60 CHARACTERS IN LENGTH
  1. ;;^DD(112,.01,21,0)
  1. ;;=^^1^1^2880717^
  1. ;;^DD(112,.01,21,1,0)
  1. ;;=This field contains the name of the food nutrient item.
  1. ;;^DD(112,.01,"DEL",1,0)
  1. ;;=I DUZ(0)'["@",'$D(^XUSEC("FHMGR",DUZ))
  1. ;;^DD(112,.01,"DT")
  1. ;;=2850406
  1. ;;^DD(112,1,0)
  1. ;;=CODE^F^^0;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>6!($L(X)<1) X
  1. ;;^DD(112,1,1,0)
  1. ;;=^.1
  1. ;;^DD(112,1,1,1,0)
  1. ;;=112^C
  1. ;;^DD(112,1,1,1,1)
  1. ;;=S ^FHNU("C",$E(X,1,30),DA)=""
  1. ;;^DD(112,1,1,1,2)
  1. ;;=K ^FHNU("C",$E(X,1,30),DA)
  1. ;;^DD(112,1,3)
  1. ;;=ANSWER MUST BE 1-6 CHARACTERS IN LENGTH
  1. ;;^DD(112,1,21,0)
  1. ;;=^^3^3^2880717^
  1. ;;^DD(112,1,21,1,0)
  1. ;;=This field, if present, contains the USDA code of the food
  1. ;;^DD(112,1,21,2,0)
  1. ;;=nutrient item. It may be either a Revised Handbook 8 number
  1. ;;^DD(112,1,21,3,0)
  1. ;;=or a Handbook 456 number.
  1. ;;^DD(112,2,0)
  1. ;;=COMMON UNITS^F^^0;3^K:$L(X)>10!($L(X)<1) X
  1. ;;^DD(112,2,3)
  1. ;;=ANSWER MUST BE 1-10 CHARACTERS IN LENGTH
  1. ;;^DD(112,2,21,0)
  1. ;;=^^3^3^2880717^
  1. ;;^DD(112,2,21,1,0)
  1. ;;=This field represents the type of common units used (e.g., oz.,
  1. ;;^DD(112,2,21,2,0)
  1. ;;=serving, each) when quantities are to be represented in common
  1. ;;^DD(112,2,21,3,0)
  1. ;;=units.
  1. ;;^DD(112,3,0)
  1. ;;=GRAMS/COMMON UNIT^NJ8,3^^0;4^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."4N.N) X
  1. ;;^DD(112,3,3)
  1. ;;=TYPE A NUMBER BETWEEN 0 AND 9999
  1. ;;^DD(112,3,21,0)
  1. ;;=^^2^2^2930510^^
  1. ;;^DD(112,3,21,1,0)
  1. ;;=This field contains the number of grams in the common unit
  1. ;;^DD(112,3,21,2,0)
  1. ;;=specified for this nutrient.
  1. ;;^DD(112,4,0)
  1. ;;=ORIGINAL NAME ON QUICK LIST?^S^Y:YES;N:NO;^.6;1^Q
  1. ;;^DD(112,4,1,0)
  1. ;;=^.1
  1. ;;^DD(112,4,1,1,0)
  1. ;;=112^AC^MUMPS
  1. ;;^DD(112,4,1,1,1)
  1. ;;=I X="Y" S X1=$P(^FHNU(DA,0),U,1) S:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)=""
  1. ;;^DD(112,4,1,1,2)
  1. ;;=S X1=$P(^FHNU(DA,0),U,1) K:X1'="" ^FHNU("AQ",$E(X1,1,30),DA)
  1. ;;^DD(112,4,1,1,"%D",0)
  1. ;;=^^2^2^2940824^
  1. ;;^DD(112,4,1,1,"%D",1,0)
  1. ;;=If Field is Yes, then Name (.01 Field) is set under "AQ" Quick List
  1. ;;^DD(112,4,1,1,"%D",2,0)
  1. ;;=for rapid selection.
  1. ;;^DD(112,4,21,0)
  1. ;;=^^3^3^2880717^
  1. ;;^DD(112,4,21,1,0)
  1. ;;=This field, when answered YES, means that the main name
  1. ;;^DD(112,4,21,2,0)
  1. ;;=of this nutrient will be on a Quick List for rapid look-up.
  1. ;;^DD(112,4,21,3,0)
  1. ;;=In short, this is a commonly used item.
  1. ;;^DD(112,4,"DT")
  1. ;;=2850615
  1. ;;^DD(112,4.2,0)
  1. ;;=ALTERNATE NAME^F^^.6;2^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>40!($L(X)<3) X
  1. ;;^DD(112,4.2,1,0)
  1. ;;=^.1
  1. ;;^DD(112,4.2,1,1,0)
  1. ;;=112^B^MNEMONIC
  1. ;;^DD(112,4.2,1,1,1)
  1. ;;=S:'$D(^FHNU("B",$E(X,1,30),DA)) ^(DA)=1
  1. ;;^DD(112,4.2,1,1,2)
  1. ;;=I $D(^FHNU("B",$E(X,1,30),DA)),^(DA) K ^(DA)
  1. ;;^DD(112,4.2,1,1,"%D",0)
  1. ;;=^^1^1^2911118^
  1. ;;^DD(112,4.2,1,1,"%D",1,0)
  1. ;;=This is the normal B cross-reference of the ALTERNATE NAME field.
  1. ;;^DD(112,4.2,1,2,0)
  1. ;;=112^AD^MUMPS
  1. ;;^DD(112,4.2,1,2,1)
  1. ;;=I $D(^FHNU(DA,.6)),$P(^(.6),U,3)="Y" S ^FHNU("AQ",$E(X,1,30),DA)=""
  1. ;;^DD(112,4.2,1,2,2)
  1. ;;=K ^FHNU("AQ",$E(X,1,30),DA)