source: FOIAVistA/trunk/r/DIETETICS-FH/FHORE1A.m@ 674

Last change on this file since 674 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 832 bytes
Line 
1FHORE1A ; HISC/REL - File Early/Late Order ;6/21/96 10:14
2 ;;5.5;DIETETICS;;Jan 28, 2005
3PROC ; File complete order
4 S FHDAY=0,DTE=SDT I SDT=EDT D FIL G F13
5F11 G:DTE<NOW F12
6 S X=DTE\1 D DOW^%DTC G:WKD'[$E("XMTWRFS",Y+1) F12
7 F K=X:0 S K=$O(^FHPT(FHDFN,"A",ADM,"EL",K)) Q:K<1!(K\1'=X) I $P(^(K,0),"^",2)=MEAL W:FHWF'=2 *7,!,"Early/Late Meal Already Ordered for ",$E(X,4,5),"/",$E(X,6,7),"/",$E(X,2,3),! G F12
8 D FIL W:FHWF'=2 "."
9F12 S X1=DTE\1,X2=1 D C^%DTC G:X>EDT F13
10 S X=X_"@"_TIM,%DT="XT" D ^%DT S DTE=Y G F11
11F13 W:FHWF'=2 "... done" Q
12FIL ; File daily order
13 I '$D(^FHPT(FHDFN,"A",ADM,"EL",0)) S ^(0)="^115.05D^^"
14 S %=$P(^FHPT(FHDFN,"A",ADM,"EL",0),"^",4)+1,$P(^(0),"^",3,4)=DTE_"^"_%
15 S ^FHPT(FHDFN,"A",ADM,"EL",DTE,0)=DTE_"^"_MEAL_"^"_TIM_"^"_BAG_"^"_DUZ_"^"_NOW_"^"_+FHORN,FHDAY=1
16 S ^FHPT("ADLT",DTE,FHDFN,ADM)="" Q
Note: See TracBrowser for help on using the repository browser.