source: FOIAVistA/trunk/r/DIETETICS-FH/FHOMELT.m@ 1310

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1FHOMELT ;Hines OIFO/RTK OUTPATIENT MEALS LIST EARLY/LATE TRAYS ;5/10/04 12:35
2 ;;5.5;DIETETICS;**5**;Jan 28, 2005;Build 53
3 ;patch #5 - added outpt room-bed.
4 ;
5 ; FHP=PTR to COMM OFFICE, DTE=DATE in FILEMAN FORMAT, MEAL=B,N,E or A
6 ;K ^TMP($J)
7 S X1=DTE,X2=-1 D C^%DTC S FHRMDTE=X,X1=DTE,X2=1 D C^%DTC S FHDTQ=X
8 F FHOMDT=FHRMDTE:0 S FHOMDT=$O(^FHPT("RM",FHOMDT)) Q:FHOMDT=""!(FHOMDT'<FHDTQ) D
9 .F FHDFN=0:0 S FHDFN=$O(^FHPT("RM",FHOMDT,FHDFN)) Q:FHDFN="" D
10 ..F FHRNUM=0:0 S FHRNUM=$O(^FHPT("RM",FHOMDT,FHDFN,FHRNUM)) Q:FHRNUM="" D
11 ...I '$D(^FHPT(FHDFN,"OP",FHRNUM,2)) Q
12 ...S FHELN0=$G(^FHPT(FHDFN,"OP",FHRNUM,0))
13 ...S FHELN2=$G(^FHPT(FHDFN,"OP",FHRNUM,2))
14 ...I $P(FHELN0,U,15)="C" Q
15 ...I $P(FHELN2,U,6)="C" Q
16 ...S FHLOC=$P(FHELN0,U,3) I FHLOC="" Q
17 ...S FHCOMM=$P($G(^FH(119.6,FHLOC,0)),U,8) I FHCOMM="" Q
18 ...S FHMEAL=$P(FHELN0,U,4) I MEAL'="A",MEAL'=FHMEAL Q
19 ...I FHP>0,FHP'=FHCOMM Q
20 ...S RM=$P(FHELN0,U,18)
21 ...I $G(RM),$D(^DG(405.4,RM,0)) S RM=$P(^DG(405.4,RM,0),U,1)
22 ...S FHMLTM=$P(FHELN2,U,1),FHBAG=$P(FHELN2,U,2)
23 ...I $P($G(^FH(119.6,FHLOC,1)),U,4)="Y" D DIETPAT^FHOMRR1 S FHDIET=FHDIETP
24 ...I $P($G(^FH(119.6,FHLOC,1)),U,4)'="Y" S FHDIET=$P(FHELN0,U,2) I FHDIET'="" S FHDIET=$P($G(^FH(111,FHDIET,0)),U,1)
25 ...D PATNAME^FHOMUTL
26 ...S ^TMP($J,FHMEAL,FHMLTM_"~"_FHPTNM)=FHLOC_"^"_FHDFN_"^"_FHBAG_"^"_FHDIET_"^"_$E(RM,1,10)
27 ...Q
Note: See TracBrowser for help on using the repository browser.