PRSPEAE ;WOIFO/SAB - EDIT EXTENDED ABSENCE ;1/4/2005
;;4.0;PAID;**93**;Sep 21, 1995;Build 7
;;Per VHA Directive 2004-038, this routine should not be modified.
; Edit Existing Extended Absence
;
N DA,DDSFILE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT
N EAIEN,EALIST,PRSIEN,X,Y
;
; determine Employee IEN
S PRSIEN=$$PRSIEN^PRSPUT2(1)
I 'PRSIEN G EXIT
;
; verify that user has electronic signature code
I '$$ESIGC^PRSPUT2(1) G EXIT
;
SEL ; select extended absence
W @IOF W !?26,"VA TIME & ATTENDANCE SYSTEM"
W !?29,"EDIT EXTENDED ABSENCE",!
;
; build list in EALIST( array
D BLDLST^PRSPEAU(PRSIEN,DT,"^A^")
;
; display list (exit if ^ or time-out during list display)
G:$$DISLST^PRSPEAU() EXIT
;
I EALIST(0)=0 G EXIT ; nothing to select
;
; select item from list
W !
S DIR(0)="NO^1:"_EALIST(0)
S DIR("A")="Edit which extended absence #?"
D ^DIR K DIR G:Y'>0!$D(DIRUT) EXIT
S EAIEN=EALIST(+Y)
;
; lock record
L +^PRST(458.4,EAIEN):2
I '$T D G:$D(DIRUT) EXIT G AGAIN
. W $C(7),!,"Another user is editing this extended absence!"
. S DIR(0)="E" D ^DIR K DIR
;
; call form
S DDSFILE=458.4,DA=EAIEN,DR="[PRSP EXT ABSENCE]"
D ^DDS
;
; unlock record
L -^PRST(458.4,EAIEN)
;
; Repeat
AGAIN G SEL
;
EXIT ; exit point
Q
;
;PRSPEAE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSPEAE 1311 printed Nov 22, 2024@17:37:59 Page 2
PRSPEAE ;WOIFO/SAB - EDIT EXTENDED ABSENCE ;1/4/2005
+1 ;;4.0;PAID;**93**;Sep 21, 1995;Build 7
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ; Edit Existing Extended Absence
+4 ;
+5 NEW DA,DDSFILE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT
+6 NEW EAIEN,EALIST,PRSIEN,X,Y
+7 ;
+8 ; determine Employee IEN
+9 SET PRSIEN=$$PRSIEN^PRSPUT2(1)
+10 IF 'PRSIEN
GOTO EXIT
+11 ;
+12 ; verify that user has electronic signature code
+13 IF '$$ESIGC^PRSPUT2(1)
GOTO EXIT
+14 ;
SEL ; select extended absence
+1 WRITE @IOF
WRITE !?26,"VA TIME & ATTENDANCE SYSTEM"
+2 WRITE !?29,"EDIT EXTENDED ABSENCE",!
+3 ;
+4 ; build list in EALIST( array
+5 DO BLDLST^PRSPEAU(PRSIEN,DT,"^A^")
+6 ;
+7 ; display list (exit if ^ or time-out during list display)
+8 if $$DISLST^PRSPEAU()
GOTO EXIT
+9 ;
+10 ; nothing to select
IF EALIST(0)=0
GOTO EXIT
+11 ;
+12 ; select item from list
+13 WRITE !
+14 SET DIR(0)="NO^1:"_EALIST(0)
+15 SET DIR("A")="Edit which extended absence #?"
+16 DO ^DIR
KILL DIR
if Y'>0!$DATA(DIRUT)
GOTO EXIT
+17 SET EAIEN=EALIST(+Y)
+18 ;
+19 ; lock record
+20 LOCK +^PRST(458.4,EAIEN):2
+21 IF '$TEST
Begin DoDot:1
+22 WRITE $CHAR(7),!,"Another user is editing this extended absence!"
+23 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
if $DATA(DIRUT)
GOTO EXIT
GOTO AGAIN
+24 ;
+25 ; call form
+26 SET DDSFILE=458.4
SET DA=EAIEN
SET DR="[PRSP EXT ABSENCE]"
+27 DO ^DDS
+28 ;
+29 ; unlock record
+30 LOCK -^PRST(458.4,EAIEN)
+31 ;
+32 ; Repeat
AGAIN GOTO SEL
+1 ;
EXIT ; exit point
+1 QUIT
+2 ;
+3 ;PRSPEAE