Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FHDCR1C

FHDCR1C.m

Go to the documentation of this file.
  1. FHDCR1C ; HISC/NCA/RVD - Print Diet Cards (cont.) ;5/10/95 13:02
  1. ;;5.5;DIETETICS;;Jan 28, 2005
  1. PRT ; Print 2 person page
  1. N NBR
  1. S TL=0 D CHKH
  1. W !! S TL=TL+2 F N1=1:1:2 I $D(^TMP($J,0,N1)) W ?$S(N1=1:2,1:65),MEALDT
  1. W ! S TL=TL+1 F N1=1:1 Q:'$D(PP(N1)) W ! S TL=TL+1 F NBR=1:1:2 I $D(PP(N1,NBR)) W ?$S(NBR=1:2,1:65),PP(N1,NBR)
  1. W ! S TL=TL+1
  1. F N1=1:1 Q:'$D(^TMP($J,"MP",N1)) D:(TL+2)'<($S(FHBOT="Y":LN-5,1:LN-3)) NXT W !! S TL=TL+2 F NBR=1:1:2 D
  1. .S S1=$S(NBR=1:2,1:65)
  1. .I $D(^TMP($J,"MP",N1,NBR)) W ?S1,^TMP($J,"MP",N1,NBR)
  1. .Q
  1. I TL<LN F L1=TL:1:$S(FHBOT="Y":LN-2,1:LN) W !
  1. I FHBOT="Y" D HEAD W @IOF Q
  1. E D FOOT
  1. W @IOF Q
  1. NXT ; Print Next Page
  1. W !! S TL=TL+2 F NM=1:1:2 I $D(^TMP($J,0,NM)) W ?$S(NM=1:20,1:80),"(More Items Next Pg)"
  1. I TL<LN F L1=TL:1:$S(FHBOT="Y":LN-2,1:LN) W !
  1. I FHBOT="Y" D HEAD G N1
  1. E D FOOT
  1. N1 W @IOF S TL=0 D CHKH
  1. W !! S TL=TL+2 F XX=1:1:2 I $D(^TMP($J,0,XX)) W ?$S(XX=1:2,1:65),MEALDT," (Cont.)"
  1. W ! S TL=TL+1
  1. Q
  1. CHKH ; Check whether name header should be on bottom
  1. I FHBOT="Y" W ! S TL=TL+1 D FOOT W ! S TL=TL+1 Q
  1. E D HEAD
  1. Q
  1. .S S1=$S(NBR=1:2,1:65) I NM=1 W ?S1,X Q
  1. .W ?(S1+56-$L(X)),X Q
  1. Q
  1. Q