FHINI0H3 ; ; 11-OCT-1995
;;5.0;Dietetics;;Oct 11, 1995
Q:'DIFQ(112.6) 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.6,0,"GL")
;;=^FHUM(
;;^DIC("B","USER MENU",112.6)
;;=
;;^DIC(112.6,"%D",0)
;;=^^2^2^2871124^
;;^DIC(112.6,"%D",1,0)
;;=This file contains menus of food items, classified by day and meal,
;;^DIC(112.6,"%D",2,0)
;;=which are saved for nutrient analysis.
;;^DD(112.6,0)
;;=FIELD^^2^6
;;^DD(112.6,0,"DT")
;;=2931124
;;^DD(112.6,0,"ID",.7)
;;=W:$D(^("0")) " ",$E($P(^("0"),U,3),4,5)_"-"_$E($P(^("0"),U,3),6,7)_"-"_$E($P(^("0"),U,3),2,3)
;;^DD(112.6,0,"IX","B",112.6,.01)
;;=
;;^DD(112.6,0,"NM","USER MENU")
;;=
;;^DD(112.6,.01,0)
;;=NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E)!(X'?.ANP) X
;;^DD(112.6,.01,1,0)
;;=^.1
;;^DD(112.6,.01,1,1,0)
;;=112.6^B
;;^DD(112.6,.01,1,1,1)
;;=S ^FHUM("B",$E(X,1,30),DA)=""
;;^DD(112.6,.01,1,1,2)
;;=K ^FHUM("B",$E(X,1,30),DA)
;;^DD(112.6,.01,1,1,"%D",0)
;;=^^1^1^2911118^
;;^DD(112.6,.01,1,1,"%D",1,0)
;;=This is the normal B cross-reference of the NAME field.
;;^DD(112.6,.01,3)
;;=NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION
;;^DD(112.6,.01,21,0)
;;=^^3^3^2880717^
;;^DD(112.6,.01,21,1,0)
;;=This field contains the name of a user menu. This is a list of
;;^DD(112.6,.01,21,2,0)
;;=food items, and amounts, that a user wishes to have analyzed
;;^DD(112.6,.01,21,3,0)
;;=for nutrient content.
;;^DD(112.6,.01,"DT")
;;=2850517
;;^DD(112.6,.6,0)
;;=UNITS^RS^C:COMMON;G:GRAMS;^0;2^Q
;;^DD(112.6,.6,21,0)
;;=^^2^2^2940616^^
;;^DD(112.6,.6,21,1,0)
;;=This field indicates whether common units are used in specifying
;;^DD(112.6,.6,21,2,0)
;;=quantities or whether grams are used throughout.
;;^DD(112.6,.6,"DT")
;;=2841102
;;^DD(112.6,.7,0)
;;=DATE ENTERED^D^^0;3^S %DT="EX" D ^%DT S X=Y K:Y<1 X
;;^DD(112.6,.7,21,0)
;;=^^2^2^2880717^
;;^DD(112.6,.7,21,1,0)
;;=This field indicates the date on which this user menu was first
;;^DD(112.6,.7,21,2,0)
;;=created.
;;^DD(112.6,.7,"DT")
;;=2841102
;;^DD(112.6,.8,0)
;;=USER^P200'^VA(200,^0;4^Q
;;^DD(112.6,.8,21,0)
;;=^^1^1^2880717^
;;^DD(112.6,.8,21,1,0)
;;=This field indicates the person who first created the user menu.
;;^DD(112.6,.8,"DT")
;;=2841102
;;^DD(112.6,1,0)
;;=DAY NUMBER^112.61^^1;0
;;^DD(112.6,1,21,0)
;;=^^3^3^2931116^^^^
;;^DD(112.6,1,21,1,0)
;;=This field contains the sequence number, or day number, of the
;;^DD(112.6,1,21,2,0)
;;=days represented by this menu. It is normally 1 to the maximum
;;^DD(112.6,1,21,3,0)
;;=number of used entered.
;;^DD(112.6,2,0)
;;=RECIPE MENU?^S^1:YES;0:NO;^0;5^Q
;;^DD(112.6,2,21,0)
;;=^^2^2^2950221^^^^
;;^DD(112.6,2,21,1,0)
;;=This field, if answered yes, means this user menu is a recipe
;;^DD(112.6,2,21,2,0)
;;=menu else, if answered no, means it is not.
;;^DD(112.6,2,"DT")
;;=2931116
;;^DD(112.61,0)
;;=DAY NUMBER SUB-FIELD^NL^1^2
;;^DD(112.61,0,"DT")
;;=2931124
;;^DD(112.61,0,"NM","DAY NUMBER")
;;=
;;^DD(112.61,0,"UP")
;;=112.6
;;^DD(112.61,.01,0)
;;=DAY NUMBER^MRNJ2,0X^^0;1^K:+X'=X!(X>7)!(X<1)!(X?.E1"."1N.N) X I $D(X) S DINUM=X
;;^DD(112.61,.01,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 7
;;^DD(112.61,.01,21,0)
;;=^^1^1^2931117^^
;;^DD(112.61,.01,21,1,0)
;;=This is the day number for which meals will be entered.
;;^DD(112.61,.01,"DT")
;;=2931117
;;^DD(112.61,1,0)
;;=MEAL NUMBER^112.62^^1;0
;;^DD(112.61,1,21,0)
;;=^^4^4^2931117^^
;;^DD(112.61,1,21,1,0)
;;=This is the meal number for which food items will be entered.
;;^DD(112.61,1,21,2,0)
;;=It is merely a sequence number and individual meals, such as
;;^DD(112.61,1,21,3,0)
;;=breakfast, noon, and evening are not referenced as such since
;;^DD(112.61,1,21,4,0)
;;=meals may be snack times, or other eating times.
;;^DD(112.62,0)
;;=MEAL NUMBER SUB-FIELD^NL^4^5
;;^DD(112.62,0,"DT")
;;=2931124
;;^DD(112.62,0,"NM","MEAL NUMBER")
;;=
;;^DD(112.62,0,"UP")
;;=112.61
;;^DD(112.62,.01,0)
;;=MEAL NUMBER^MRNJ1,0X^^0;1^K:+X'=X!(X>6)!(X<1)!(X?.E1"."1N.N) X I $D(X) S DINUM=X
;;^DD(112.62,.01,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 6
;;^DD(112.62,.01,21,0)
;;=^^1^1^2931116^^
;;^DD(112.62,.01,21,1,0)
;;=This is the meal number for which food items will be entered.
;;^DD(112.62,.01,"DT")
;;=2931116
;;^DD(112.62,1,0)
;;=FOOD ITEM^112.63P^^1;0
;;^DD(112.62,1,21,0)
;;=^^2^2^2931117^^^
;;^DD(112.62,1,21,1,0)
;;=This multiple represents the food items, selected from the
;;^DD(112.62,1,21,2,0)
;;=Food Nutrient file, which are represented in the meal.
;;^DD(112.62,2,0)
;;=MEAL^P116.1'^FH(116.1,^0;2^Q
;;^DD(112.62,2,21,0)
;;=^^1^1^2931220^^^^
;;^DD(112.62,2,21,1,0)
;;=This field represents the meal file.
FHINI0H3 ; ; 11-OCT-1995
+1 ;;5.0;Dietetics;;Oct 11, 1995
+2 IF 'DIFQ(112.6)
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.6,0,"GL")
+2 ;;=^FHUM(
+3 ;;^DIC("B","USER MENU",112.6)
+4 ;;=
+5 ;;^DIC(112.6,"%D",0)
+6 ;;=^^2^2^2871124^
+7 ;;^DIC(112.6,"%D",1,0)
+8 ;;=This file contains menus of food items, classified by day and meal,
+9 ;;^DIC(112.6,"%D",2,0)
+10 ;;=which are saved for nutrient analysis.
+11 ;;^DD(112.6,0)
+12 ;;=FIELD^^2^6
+13 ;;^DD(112.6,0,"DT")
+14 ;;=2931124
+15 ;;^DD(112.6,0,"ID",.7)
+16 ;;=W:$D(^("0")) " ",$E($P(^("0"),U,3),4,5)_"-"_$E($P(^("0"),U,3),6,7)_"-"_$E($P(^("0"),U,3),2,3)
+17 ;;^DD(112.6,0,"IX","B",112.6,.01)
+18 ;;=
+19 ;;^DD(112.6,0,"NM","USER MENU")
+20 ;;=
+21 ;;^DD(112.6,.01,0)
+22 ;;=NAME^RF^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E)!(X'?.ANP) X
+23 ;;^DD(112.6,.01,1,0)
+24 ;;=^.1
+25 ;;^DD(112.6,.01,1,1,0)
+26 ;;=112.6^B
+27 ;;^DD(112.6,.01,1,1,1)
+28 ;;=S ^FHUM("B",$E(X,1,30),DA)=""
+29 ;;^DD(112.6,.01,1,1,2)
+30 ;;=K ^FHUM("B",$E(X,1,30),DA)
+31 ;;^DD(112.6,.01,1,1,"%D",0)
+32 ;;=^^1^1^2911118^
+33 ;;^DD(112.6,.01,1,1,"%D",1,0)
+34 ;;=This is the normal B cross-reference of the NAME field.
+35 ;;^DD(112.6,.01,3)
+36 ;;=NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION
+37 ;;^DD(112.6,.01,21,0)
+38 ;;=^^3^3^2880717^
+39 ;;^DD(112.6,.01,21,1,0)
+40 ;;=This field contains the name of a user menu. This is a list of
+41 ;;^DD(112.6,.01,21,2,0)
+42 ;;=food items, and amounts, that a user wishes to have analyzed
+43 ;;^DD(112.6,.01,21,3,0)
+44 ;;=for nutrient content.
+45 ;;^DD(112.6,.01,"DT")
+46 ;;=2850517
+47 ;;^DD(112.6,.6,0)
+48 ;;=UNITS^RS^C:COMMON;G:GRAMS;^0;2^Q
+49 ;;^DD(112.6,.6,21,0)
+50 ;;=^^2^2^2940616^^
+51 ;;^DD(112.6,.6,21,1,0)
+52 ;;=This field indicates whether common units are used in specifying
+53 ;;^DD(112.6,.6,21,2,0)
+54 ;;=quantities or whether grams are used throughout.
+55 ;;^DD(112.6,.6,"DT")
+56 ;;=2841102
+57 ;;^DD(112.6,.7,0)
+58 ;;=DATE ENTERED^D^^0;3^S %DT="EX" D ^%DT S X=Y K:Y<1 X
+59 ;;^DD(112.6,.7,21,0)
+60 ;;=^^2^2^2880717^
+61 ;;^DD(112.6,.7,21,1,0)
+62 ;;=This field indicates the date on which this user menu was first
+63 ;;^DD(112.6,.7,21,2,0)
+64 ;;=created.
+65 ;;^DD(112.6,.7,"DT")
+66 ;;=2841102
+67 ;;^DD(112.6,.8,0)
+68 ;;=USER^P200'^VA(200,^0;4^Q
+69 ;;^DD(112.6,.8,21,0)
+70 ;;=^^1^1^2880717^
+71 ;;^DD(112.6,.8,21,1,0)
+72 ;;=This field indicates the person who first created the user menu.
+73 ;;^DD(112.6,.8,"DT")
+74 ;;=2841102
+75 ;;^DD(112.6,1,0)
+76 ;;=DAY NUMBER^112.61^^1;0
+77 ;;^DD(112.6,1,21,0)
+78 ;;=^^3^3^2931116^^^^
+79 ;;^DD(112.6,1,21,1,0)
+80 ;;=This field contains the sequence number, or day number, of the
+81 ;;^DD(112.6,1,21,2,0)
+82 ;;=days represented by this menu. It is normally 1 to the maximum
+83 ;;^DD(112.6,1,21,3,0)
+84 ;;=number of used entered.
+85 ;;^DD(112.6,2,0)
+86 ;;=RECIPE MENU?^S^1:YES;0:NO;^0;5^Q
+87 ;;^DD(112.6,2,21,0)
+88 ;;=^^2^2^2950221^^^^
+89 ;;^DD(112.6,2,21,1,0)
+90 ;;=This field, if answered yes, means this user menu is a recipe
+91 ;;^DD(112.6,2,21,2,0)
+92 ;;=menu else, if answered no, means it is not.
+93 ;;^DD(112.6,2,"DT")
+94 ;;=2931116
+95 ;;^DD(112.61,0)
+96 ;;=DAY NUMBER SUB-FIELD^NL^1^2
+97 ;;^DD(112.61,0,"DT")
+98 ;;=2931124
+99 ;;^DD(112.61,0,"NM","DAY NUMBER")
+100 ;;=
+101 ;;^DD(112.61,0,"UP")
+102 ;;=112.6
+103 ;;^DD(112.61,.01,0)
+104 ;;=DAY NUMBER^MRNJ2,0X^^0;1^K:+X'=X!(X>7)!(X<1)!(X?.E1"."1N.N) X I $D(X) S DINUM=X
+105 ;;^DD(112.61,.01,3)
+106 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 7
+107 ;;^DD(112.61,.01,21,0)
+108 ;;=^^1^1^2931117^^
+109 ;;^DD(112.61,.01,21,1,0)
+110 ;;=This is the day number for which meals will be entered.
+111 ;;^DD(112.61,.01,"DT")
+112 ;;=2931117
+113 ;;^DD(112.61,1,0)
+114 ;;=MEAL NUMBER^112.62^^1;0
+115 ;;^DD(112.61,1,21,0)
+116 ;;=^^4^4^2931117^^
+117 ;;^DD(112.61,1,21,1,0)
+118 ;;=This is the meal number for which food items will be entered.
+119 ;;^DD(112.61,1,21,2,0)
+120 ;;=It is merely a sequence number and individual meals, such as
+121 ;;^DD(112.61,1,21,3,0)
+122 ;;=breakfast, noon, and evening are not referenced as such since
+123 ;;^DD(112.61,1,21,4,0)
+124 ;;=meals may be snack times, or other eating times.
+125 ;;^DD(112.62,0)
+126 ;;=MEAL NUMBER SUB-FIELD^NL^4^5
+127 ;;^DD(112.62,0,"DT")
+128 ;;=2931124
+129 ;;^DD(112.62,0,"NM","MEAL NUMBER")
+130 ;;=
+131 ;;^DD(112.62,0,"UP")
+132 ;;=112.61
+133 ;;^DD(112.62,.01,0)
+134 ;;=MEAL NUMBER^MRNJ1,0X^^0;1^K:+X'=X!(X>6)!(X<1)!(X?.E1"."1N.N) X I $D(X) S DINUM=X
+135 ;;^DD(112.62,.01,3)
+136 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 6
+137 ;;^DD(112.62,.01,21,0)
+138 ;;=^^1^1^2931116^^
+139 ;;^DD(112.62,.01,21,1,0)
+140 ;;=This is the meal number for which food items will be entered.
+141 ;;^DD(112.62,.01,"DT")
+142 ;;=2931116
+143 ;;^DD(112.62,1,0)
+144 ;;=FOOD ITEM^112.63P^^1;0
+145 ;;^DD(112.62,1,21,0)
+146 ;;=^^2^2^2931117^^^
+147 ;;^DD(112.62,1,21,1,0)
+148 ;;=This multiple represents the food items, selected from the
+149 ;;^DD(112.62,1,21,2,0)
+150 ;;=Food Nutrient file, which are represented in the meal.
+151 ;;^DD(112.62,2,0)
+152 ;;=MEAL^P116.1'^FH(116.1,^0;2^Q
+153 ;;^DD(112.62,2,21,0)
+154 ;;=^^1^1^2931220^^^^
+155 ;;^DD(112.62,2,21,1,0)
+156 ;;=This field represents the meal file.