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

PRSPEAE.m

Go to the documentation of this file.
  1. PRSPEAE ;WOIFO/SAB - EDIT EXTENDED ABSENCE ;1/4/2005
  1. ;;4.0;PAID;**93**;Sep 21, 1995;Build 7
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ; Edit Existing Extended Absence
  1. ;
  1. N DA,DDSFILE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT
  1. N EAIEN,EALIST,PRSIEN,X,Y
  1. ;
  1. ; determine Employee IEN
  1. S PRSIEN=$$PRSIEN^PRSPUT2(1)
  1. I 'PRSIEN G EXIT
  1. ;
  1. ; verify that user has electronic signature code
  1. I '$$ESIGC^PRSPUT2(1) G EXIT
  1. ;
  1. SEL ; select extended absence
  1. W @IOF W !?26,"VA TIME & ATTENDANCE SYSTEM"
  1. W !?29,"EDIT EXTENDED ABSENCE",!
  1. ;
  1. ; build list in EALIST( array
  1. D BLDLST^PRSPEAU(PRSIEN,DT,"^A^")
  1. ;
  1. ; display list (exit if ^ or time-out during list display)
  1. G:$$DISLST^PRSPEAU() EXIT
  1. ;
  1. I EALIST(0)=0 G EXIT ; nothing to select
  1. ;
  1. ; select item from list
  1. W !
  1. S DIR(0)="NO^1:"_EALIST(0)
  1. S DIR("A")="Edit which extended absence #?"
  1. D ^DIR K DIR G:Y'>0!$D(DIRUT) EXIT
  1. S EAIEN=EALIST(+Y)
  1. ;
  1. ; lock record
  1. L +^PRST(458.4,EAIEN):2
  1. I '$T D G:$D(DIRUT) EXIT G AGAIN
  1. . W $C(7),!,"Another user is editing this extended absence!"
  1. . S DIR(0)="E" D ^DIR K DIR
  1. ;
  1. ; call form
  1. S DDSFILE=458.4,DA=EAIEN,DR="[PRSP EXT ABSENCE]"
  1. D ^DDS
  1. ;
  1. ; unlock record
  1. L -^PRST(458.4,EAIEN)
  1. ;
  1. ; Repeat
  1. AGAIN G SEL
  1. ;
  1. EXIT ; exit point
  1. Q
  1. ;
  1. ;PRSPEAE