FHINI0KS ; ; 11-OCT-1995
;;5.0;Dietetics;;Oct 11, 1995
Q:'DIFQ(115) 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
;;^DD(115.07,18,21,2,0)
;;=feeding.
;;^DD(115.07,19,0)
;;=2PM #1 QTY^NJ2,0^^0;14^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,19,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,19,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,19,21,1,0)
;;=This is the ordered quantity of the first 2pm feeding.
;;^DD(115.07,20,0)
;;=2PM FEEDING #2^*P118'^FH(118,^0;15^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,20,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,20,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,20,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,20,21,1,0)
;;=This is the second supplemental feeding ordered for the 2pm
;;^DD(115.07,20,21,2,0)
;;=feeding.
;;^DD(115.07,21,0)
;;=2PM #2 QTY^NJ2,0^^0;16^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,21,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,21,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,21,21,1,0)
;;=This is the ordered quantity of the second 2pm feeding.
;;^DD(115.07,22,0)
;;=2PM FEEDING #3^*P118'^FH(118,^0;17^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,22,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,22,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,22,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,22,21,1,0)
;;=This is the third supplemental feeding ordered for the 2pm
;;^DD(115.07,22,21,2,0)
;;=feeding.
;;^DD(115.07,23,0)
;;=2PM #3 QTY^NJ2,0^^0;18^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,23,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,23,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,23,21,1,0)
;;=This is the ordered quantity of the third 2pm feeding.
;;^DD(115.07,24,0)
;;=2PM FEEDING #4^*P118'^FH(118,^0;19^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,24,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,24,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,24,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,24,21,1,0)
;;=This is the fourth supplemental feeding ordered for the 2pm
;;^DD(115.07,24,21,2,0)
;;=feeding.
;;^DD(115.07,25,0)
;;=2PM #4 QTY^NJ2,0^^0;20^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,25,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,25,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,25,21,1,0)
;;=This is the ordered quantity of the fourth 2pm feeding.
;;^DD(115.07,26,0)
;;=8PM FEEDING #1^*P118'^FH(118,^0;21^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,26,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,26,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,26,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,26,21,1,0)
;;=This is the first supplemental feeding ordered for the 8pm
;;^DD(115.07,26,21,2,0)
;;=feeding.
;;^DD(115.07,27,0)
;;=8PM #1 QTY^NJ2,0^^0;22^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,27,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,27,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,27,21,1,0)
;;=This is the ordered quantity of the first 8pm feeding.
;;^DD(115.07,28,0)
;;=8PM FEEDING #2^*P118'^FH(118,^0;23^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,28,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,28,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,28,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,28,21,1,0)
;;=This is the second supplemental feeding ordered for the 8pm
;;^DD(115.07,28,21,2,0)
;;=feeding.
;;^DD(115.07,29,0)
;;=8PM #2 QTY^NJ2,0^^0;24^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,29,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,29,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,29,21,1,0)
;;=This is the ordered quantity of the second 8pm feeding.
;;^DD(115.07,30,0)
;;=8PM FEEDING #3^*P118'^FH(118,^0;25^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(115.07,30,12)
;;=Cannot select bulk nourishments
;;^DD(115.07,30,12.1)
;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
;;^DD(115.07,30,21,0)
;;=^^2^2^2880710^
;;^DD(115.07,30,21,1,0)
;;=This is the third supplemental feeding ordered for the 8pm
;;^DD(115.07,30,21,2,0)
;;=feeding.
;;^DD(115.07,31,0)
;;=8PM #3 QTY^NJ2,0^^0;26^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
;;^DD(115.07,31,3)
;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
;;^DD(115.07,31,21,0)
;;=^^1^1^2880710^
;;^DD(115.07,31,21,1,0)
;;=This is the ordered quantity of the third 8pm feeding.
;;^DD(115.07,32,0)
;;=8PM FEEDING #4^*P118'^FH(118,^0;27^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
FHINI0KS ; ; 11-OCT-1995
+1 ;;5.0;Dietetics;;Oct 11, 1995
+2 IF 'DIFQ(115)
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 ;;^DD(115.07,18,21,2,0)
+2 ;;=feeding.
+3 ;;^DD(115.07,19,0)
+4 ;;=2PM #1 QTY^NJ2,0^^0;14^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+5 ;;^DD(115.07,19,3)
+6 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+7 ;;^DD(115.07,19,21,0)
+8 ;;=^^1^1^2880710^
+9 ;;^DD(115.07,19,21,1,0)
+10 ;;=This is the ordered quantity of the first 2pm feeding.
+11 ;;^DD(115.07,20,0)
+12 ;;=2PM FEEDING #2^*P118'^FH(118,^0;15^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+13 ;;^DD(115.07,20,12)
+14 ;;=Cannot select bulk nourishments
+15 ;;^DD(115.07,20,12.1)
+16 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+17 ;;^DD(115.07,20,21,0)
+18 ;;=^^2^2^2880710^
+19 ;;^DD(115.07,20,21,1,0)
+20 ;;=This is the second supplemental feeding ordered for the 2pm
+21 ;;^DD(115.07,20,21,2,0)
+22 ;;=feeding.
+23 ;;^DD(115.07,21,0)
+24 ;;=2PM #2 QTY^NJ2,0^^0;16^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+25 ;;^DD(115.07,21,3)
+26 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+27 ;;^DD(115.07,21,21,0)
+28 ;;=^^1^1^2880710^
+29 ;;^DD(115.07,21,21,1,0)
+30 ;;=This is the ordered quantity of the second 2pm feeding.
+31 ;;^DD(115.07,22,0)
+32 ;;=2PM FEEDING #3^*P118'^FH(118,^0;17^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+33 ;;^DD(115.07,22,12)
+34 ;;=Cannot select bulk nourishments
+35 ;;^DD(115.07,22,12.1)
+36 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+37 ;;^DD(115.07,22,21,0)
+38 ;;=^^2^2^2880710^
+39 ;;^DD(115.07,22,21,1,0)
+40 ;;=This is the third supplemental feeding ordered for the 2pm
+41 ;;^DD(115.07,22,21,2,0)
+42 ;;=feeding.
+43 ;;^DD(115.07,23,0)
+44 ;;=2PM #3 QTY^NJ2,0^^0;18^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+45 ;;^DD(115.07,23,3)
+46 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+47 ;;^DD(115.07,23,21,0)
+48 ;;=^^1^1^2880710^
+49 ;;^DD(115.07,23,21,1,0)
+50 ;;=This is the ordered quantity of the third 2pm feeding.
+51 ;;^DD(115.07,24,0)
+52 ;;=2PM FEEDING #4^*P118'^FH(118,^0;19^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+53 ;;^DD(115.07,24,12)
+54 ;;=Cannot select bulk nourishments
+55 ;;^DD(115.07,24,12.1)
+56 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+57 ;;^DD(115.07,24,21,0)
+58 ;;=^^2^2^2880710^
+59 ;;^DD(115.07,24,21,1,0)
+60 ;;=This is the fourth supplemental feeding ordered for the 2pm
+61 ;;^DD(115.07,24,21,2,0)
+62 ;;=feeding.
+63 ;;^DD(115.07,25,0)
+64 ;;=2PM #4 QTY^NJ2,0^^0;20^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+65 ;;^DD(115.07,25,3)
+66 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+67 ;;^DD(115.07,25,21,0)
+68 ;;=^^1^1^2880710^
+69 ;;^DD(115.07,25,21,1,0)
+70 ;;=This is the ordered quantity of the fourth 2pm feeding.
+71 ;;^DD(115.07,26,0)
+72 ;;=8PM FEEDING #1^*P118'^FH(118,^0;21^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+73 ;;^DD(115.07,26,12)
+74 ;;=Cannot select bulk nourishments
+75 ;;^DD(115.07,26,12.1)
+76 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+77 ;;^DD(115.07,26,21,0)
+78 ;;=^^2^2^2880710^
+79 ;;^DD(115.07,26,21,1,0)
+80 ;;=This is the first supplemental feeding ordered for the 8pm
+81 ;;^DD(115.07,26,21,2,0)
+82 ;;=feeding.
+83 ;;^DD(115.07,27,0)
+84 ;;=8PM #1 QTY^NJ2,0^^0;22^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+85 ;;^DD(115.07,27,3)
+86 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+87 ;;^DD(115.07,27,21,0)
+88 ;;=^^1^1^2880710^
+89 ;;^DD(115.07,27,21,1,0)
+90 ;;=This is the ordered quantity of the first 8pm feeding.
+91 ;;^DD(115.07,28,0)
+92 ;;=8PM FEEDING #2^*P118'^FH(118,^0;23^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+93 ;;^DD(115.07,28,12)
+94 ;;=Cannot select bulk nourishments
+95 ;;^DD(115.07,28,12.1)
+96 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+97 ;;^DD(115.07,28,21,0)
+98 ;;=^^2^2^2880710^
+99 ;;^DD(115.07,28,21,1,0)
+100 ;;=This is the second supplemental feeding ordered for the 8pm
+101 ;;^DD(115.07,28,21,2,0)
+102 ;;=feeding.
+103 ;;^DD(115.07,29,0)
+104 ;;=8PM #2 QTY^NJ2,0^^0;24^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+105 ;;^DD(115.07,29,3)
+106 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+107 ;;^DD(115.07,29,21,0)
+108 ;;=^^1^1^2880710^
+109 ;;^DD(115.07,29,21,1,0)
+110 ;;=This is the ordered quantity of the second 8pm feeding.
+111 ;;^DD(115.07,30,0)
+112 ;;=8PM FEEDING #3^*P118'^FH(118,^0;25^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+113 ;;^DD(115.07,30,12)
+114 ;;=Cannot select bulk nourishments
+115 ;;^DD(115.07,30,12.1)
+116 ;;=S DIC("S")="I $P(^(0),U,3)'=""Y"""
+117 ;;^DD(115.07,30,21,0)
+118 ;;=^^2^2^2880710^
+119 ;;^DD(115.07,30,21,1,0)
+120 ;;=This is the third supplemental feeding ordered for the 8pm
+121 ;;^DD(115.07,30,21,2,0)
+122 ;;=feeding.
+123 ;;^DD(115.07,31,0)
+124 ;;=8PM #3 QTY^NJ2,0^^0;26^K:+X'=X!(X>20)!(X<1)!(X?.E1"."1N.N) X
+125 ;;^DD(115.07,31,3)
+126 ;;=TYPE A WHOLE NUMBER BETWEEN 1 AND 20
+127 ;;^DD(115.07,31,21,0)
+128 ;;=^^1^1^2880710^
+129 ;;^DD(115.07,31,21,1,0)
+130 ;;=This is the ordered quantity of the third 8pm feeding.
+131 ;;^DD(115.07,32,0)
+132 ;;=8PM FEEDING #4^*P118'^FH(118,^0;27^S DIC("S")="I $P(^(0),U,3)'=""Y""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X