source: FOIAVistA/tag/r/DIETETICS-FH/FHORD92.m@ 1716

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1FHORD92 ; HISC/NCA - Diet Census Percentage ;6/8/93 08:54
2 ;;5.5;DIETETICS;;Jan 28, 2005
3 ;
4 ;RVD 4/7/04 - add outpatient meals data.
5 ;
6 D DIV^FHOMUTL G:'$D(FHSITE) KIL
7R0 R !!,"Do you want DIET CENSUS PERCENTAGE for MEAL? (Y/N): ",FHAN:DTIME G:'$T!("^"[FHAN) KIL S X=FHAN D TR^FH S FHAN=X I $P("YES",FHAN,1)'="",$P("NO",FHAN,1)'="" W *7," Enter YES or NO" G R0
8 S FHAN=$E(FHAN,1)
9 S FHP=$O(^FH(119.71,0)) I FHP'<1,$O(^FH(119.71,FHP))<1 G F1
10F0 R !!,"Select PRODUCTION FACILITY: ",X:DTIME G:'$T!("^"[X) KIL
11 K DIC S DIC="^FH(119.71,",DIC(0)="EMQ" D ^DIC G:Y<1 F0 S FHP=+Y
12F1 S %DT("A")="Select Date: ",%DT="AEX" W ! D ^%DT G KIL:"^"[X!$D(DTOUT),F1:Y<1 S (X1,D1)=+Y
13 I FHAN'="Y" S (MEAL,FHCY,FHDA,FHP1)="" G L0
14 D E1^FHPRC1 I FHCY<1 W *7,!!,"No MENU CYCLE Defined for that Date!" G F1
15 I '$D(^FH(116,FHCY,"DA",FHDA,0)) W *7,!!,"MENU CYCLE DAY Not Defined for that Date!" G F1
16R1 R !!,"Select MEAL (B,N,E or ALL): ",MEAL:DTIME G:'$T!("^"[MEAL) KIL S X=MEAL D TR^FH S MEAL=X S:$P("ALL",MEAL,1)="" MEAL="A"
17 I "BNEA"'[MEAL!(MEAL'?1U) W *7,!,"Select B for Breakfast, N for Noon, or E for Evening or ALL for all meals" G R1
18 S FHDA=^FH(116,FHCY,"DA",FHDA,0)
19 I $D(^FH(116.3,D1,0)) S X=^(0) F LL=2:1:4 I $P(X,"^",LL) S $P(FHDA,"^",LL)=$P(X,"^",LL)
20 I MEAL'="A" S FHX1=$P(FHDA,"^",$F("BNE",MEAL)) I 'FHX1 W *7,!!,"*** NO MENU DEFINED FOR THIS MEAL ***" G KIL
21R2 R !!,"Use CENSUS or FORECAST? (C OR F): ",FHP1:DTIME G:'$T!("^"[FHP1) KIL S X=FHP1 D TR^FH S FHP1=X I $P("CENSUS",FHP1,1)'="",$P("FORECAST",FHP1,1)'="" W *7," Enter C or F" G R2
22 K M2 S FHP1=$E(FHP1,1),FHX1=$S(FHP1="C":"Census",1:"Forecast") G:FHX1["C" L0
23 W !!,"Forecasting ..." D Q2^FHPRF1
24 F P0=0:0 S P0=$O(^TMP($J,P0)) Q:P0<1 D C0 G:X="^" KIL
25L0 W ! K IOP,%ZIS S %ZIS("A")="Select LIST Printer: ",%ZIS="MQ" D ^%ZIS K %ZIS,IOP G:POP KIL
26 I $D(IO("Q")) S FHPGM="Q1^FHORD93",FHLST="D1^MEAL^FHAN^FHDA^FHP^FHP1^M2(^FHSITE^FHSITENM" D EN2^FH G KIL
27 U IO D Q1^FHORD93 D ^%ZISC K %ZIS,IOP G KIL
28C0 S S1=^TMP($J,P0)
29 W !!?5,"Service Point: ",$P(^FH(119.72,P0,0),"^",1)
30C1 W !?5,"Forecast Census: ",S1," // " R X:DTIME I '$T!(X["^") S X="^" Q
31 S:X="" X=S1 I X'?1N.N!(X>9999) W *7," Must be a number less than 9999" G C1
32 S M2(P0)=X Q
33KIL K %,%H,%I,%T,%DT,%ZIS,A1,ADM,C2,C3,D,D1,D2,CHK,CT,FHDFN,DFN,DIC,DOW,DTP,FHAN,FHCY,FHDA,FHLD,FHOR,FHORD,FHP,FHP1,FHPAR,FHX1,K,K1,K3,KK,L1,L2,LL,LN,LP,MEAL,M2,N,N1,N2,N3
34 K NOW,NXW,P,P0,P1,PG,POP,S,S0,S1,S2,S3,S4,SP,T,T0,TF,TIM,TP,TOT,TYP,W1,WRD,WRDN,X,X0,X1,X2,Y,Y0,Z K ^TMP($J) Q
Note: See TracBrowser for help on using the repository browser.