source: FOIAVistA/trunk/r/DIETETICS-FH/FHOMRO3.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 1005 bytes
Line 
1FHOMRO3 ;Hines OIFO/RTK OUTPATIENT ORDER MULTIPLE DIETS ;9/28/04 10:05
2 ;;5.5;DIETETICS;;Jan 28, 2005
3 ;
4 ;Code reused from FHORD1
5 K FHDI,PREC S N1=0
6F1 ;
7 W ! K DIC S DIC="^FH(111,",DIC(0)="AEQMZ"
8 S DIC("S")="I '$D(^(""I""))&(Y>0)" D ^DIC
9 K DIC G AB:X[U!$D(DTOUT),F5:X="",F1:Y<1
10 S PREC=$P(Y(0),U,4) I PREC,$D(FHDI(PREC)) W *7,!!,"This conflicts with ",$P(FHDI(PREC),"^",2),! G F1
11 S N1=N1+1,FHDI(PREC)=+Y_"^"_Y(0) G F5:+Y=1,F1:N1<5 W *7,!!,"You have now selected the maximum of 5 Diet Modifications!"
12F5 ;
13 G:'N1 AB W !!,"You have selected the following Diet:",!
14 S (FHD3,FHD4)=0 F FHD0=0:0 S FHD0=$O(FHDI(FHD0)) Q:FHD0="" W !?5,$P(FHDI(FHD0),U,2) S:$P(FHDI(FHD0),U,4)="Y" FHD3=1 S:$P(FHDI(FHD0),U,7)="Y" FHD4=1
15F9 ;
16 R !!,"Is this Correct? Y// ",Y:DTIME G:'$T!(Y="^") AB S:Y="" Y="Y" S X=Y D TR^FH S Y=X
17 I $P("YES",Y,1)'="",$P("NO",Y,1)'="" W *7,!," Answer YES to accept diet list; NO to select diets again" G F9
18 I Y'?1"Y".E K FHDI S N1=0 W !!,"Select new diets ..." G F1
19 Q
20AB K FHDI S N1=0 Q
Note: See TracBrowser for help on using the repository browser.