PRS8MT ;HISC/MRL-DECOMPOSITION, MEALTIME ;11/22/06 ;;4.0;PAID;**2,40,69,102,109**;Sep 21, 1995;Build 5 ;;Per VHA Directive 2004-038, this routine should not be modified. ; ;This routine is used to determine placement of mealtime where ;necessary. ; ;Called by Routines: PRS8ST ; MULT ; --- checking 1 node I $$HOLIDAY^PRS8UT(PY,DFN,MDY),$G(^PRST(458,PY,"E",DFN,"D",MDY,2))["MID^MID^ON" Q ;don't add meal if mid-mid on-call on a holiday, quit routine S TWO=DAY(MDY,"TWO") S S=1 D SET D:'Q I TWO S S=2 D SET D:'Q .S D1="",$P(D1,"0",193)="",V(1)=97,V(2)=0 .F I=1:3:28 S V=$P(N,"^",I,I+2) Q:$P(V,"^",1)="" D ..S X=$P(V,"^",3) I "^^6^7^3^8^"'[("^"_X_"^") Q ;quit if not NH ..F M=$P(V,"^"):1:$P(V,"^",2) D ; build up tour ...S D1=$E(D1,1,M-1)_$S(X=""!(X=3):1,X=6:2,1:3)_$E(D1,M+1,192) ...I V(1)>M S V(1)=M ...I V(2)