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

PRSPEAD.m

Go to the documentation of this file.
  1. PRSPEAD ;WOIFO/SAB - DISPLAY EXTENDED ABSENCE ;10/20/2004
  1. ;;4.0;PAID;**93**;Sep 21, 1995;Build 7
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ; Display List of Extended Absences
  1. ;
  1. N CNT,DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,EAIEN,OUT,PG,PRSIEN,TDT,X,Y
  1. ;
  1. ; determine Employee IEN
  1. S PRSIEN=$$PRSIEN^PRSPUT2(1)
  1. I 'PRSIEN G EXIT
  1. ;
  1. S (CNT,OUT,PG)=0
  1. D HD
  1. ;
  1. W !?24,"VA TIME & ATTENDANCE SYSTEM",!?26,"DISPLAY EXTENDED ABSENCE",!
  1. ;
  1. ; ask date
  1. S DIR(0)="D^::EX",DIR("A")="Begin with Date",DIR("B")="T"
  1. D ^DIR K DIR G:$D(DIRUT) EXIT
  1. ;
  1. ; loop thru employee extended absences by to date
  1. S TDT=Y-.01
  1. F S TDT=$O(^PRST(458.4,"AEE",PRSIEN,TDT)) Q:TDT="" D Q:OUT
  1. . S EAIEN=0
  1. . F S EAIEN=$O(^PRST(458.4,"AEE",PRSIEN,TDT,EAIEN)) Q:'EAIEN D Q:OUT
  1. . . I $Y+6>IOSL D HD Q:OUT
  1. . . D DISEA^PRSPEAU(EAIEN)
  1. . . S CNT=CNT+1
  1. ;
  1. I 'OUT,CNT=0 W !!,"No extended absence records on file."
  1. I 'OUT S DIR(0)="E" D ^DIR K DIR
  1. ;
  1. EXIT ; exit point
  1. Q
  1. ;
  1. HD ; header
  1. I $E(IOST,1,2)="C-",PG S DIR(0)="E" D ^DIR K DIR I 'Y S OUT=1 Q
  1. I $E(IOST,1,2)="C-"!PG W @IOF
  1. S PG=PG+1
  1. Q
  1. ;
  1. ;PRSPEAD