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

BSDLT1.m

Go to the documentation of this file.
  1. BSDLT1 ; IHS/ANMC/LJF - IHS CALLS FOR LETTERS ; [ 12/27/2004 3:22 PM ]
  1. ;;5.3;PIMS;**1001**;APR 26, 2002
  1. ;
  1. FUTURE(DFN,BSDCNT) ;EP
  1. ; called to print list of all future appts for patient
  1. ; BSDCNT is count of # of appts rescheduled; killed by calling rtn
  1. NEW BSDX,BSDN,SDX,SDLT,%DT,X,Y
  1. D PEND^BSDU2(DFN,0,"BSDX(") ;find pending appts
  1. I $G(BSDX(2))="" Q ;none found
  1. I $G(BSDX(3))="" Q ;only one appt;IHS/ITSC/LJF 10/25/2004 PATCH 1001
  1. I '$D(BSDX($G(BSDCNT)+2)) Q ;only rescheduled for future appts
  1. ;
  1. ; screen out future appointments to selected clinics
  1. S X=0 F S X=$O(^BSDX(X)) Q:'X D
  1. . S Y=$G(^BSDX(X,0)) I Y,$D(VAUTC(Y)) K BSDX(X)
  1. Q:'$D(BSDX) ;quit if all future were already printed
  1. ;
  1. W !!?5,"In summary, here is a list of all your upcoming appointments:",!
  1. S BSDN=1 F S BSDN=$O(BSDX(BSDN)) Q:'BSDN D
  1. . S %DT="T",X=$P(BSDX(BSDN),U) D ^%DT Q:Y=-1
  1. . S SDX=Y,SDCL=$P(BSDX(BSDN),U,2) D FORM^SDLT
  1. Q