source: WorldVistAEHR/trunk/r/PAID-PRS/PRSALVE.m@ 767

Last change on this file since 767 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1PRSALVE ;HISC/REL-Edit Leave Request ;12-SEP-00
2 ;;4.0;PAID;**61,114**;Sep 21, 1995;Build 6
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 S DFN="",SSN=$P($G(^VA(200,DUZ,1)),"^",9) I SSN'="" S DFN=$O(^PRSPC("SSN",SSN,0))
5 I 'DFN W !!,*7,"Your SSN was not found in both the New Person & Employee File!" G EX
6 S TLE=$P($G(^PRSPC(DFN,0)),"^",8) S:TLE="" TLE=" " S TLI=+$O(^PRST(455.5,"B",TLE,0))
7 D ^PRSAENT S ZENT="",Z1="30 31 31 31 32 33 28 35 35 34 30",Z2="AL SL CB AD NL WP CU AA DL ML RL"
8 F K=1:1:11 I $E(ENT,$P(Z1," ",K)) S ZENT=ZENT_$P(Z2," ",K)_" "
9 I ZENT="" W !!?5,"You are not entitled to any type of Leave." G EX
10 W:$E(IOST,1,2)="C-" @IOF W !?26,"VA TIME & ATTENDANCE SYSTEM",!?30,"EDIT LEAVE REQUESTS"
11 S X=$G(^PRSPC(DFN,0)) W !!,$P(X,"^",1) S X=$P(X,"^",9) I X W ?67,"XXX-XX-",$E(X,6,9)
12 S X1=DT,X2=-5 D C^%DTC S EDT=9999999-X
13 W ! D DISP
14 G:'CNT EX
15X1 R !!,"Edit Which Request #? ",X:DTIME G:'$T!("^"[X) EX I X'?1N.N!(X<1)!(X>CNT) W *7," Enter # of Request to Edit" G X1
16 K DDS,DA,DR S X=+X,DA=R(X),ZOLD=$G(^PRST(458.1,DA,0)),Z1=$P(ZOLD,"^",3,6) D ED^PRSALVR G EX
17DISP ; Display Leave Requests
18 S LVT=";"_$P(^DD(458.1,6,0),"^",3),LVS=";"_$P(^DD(458.1,8,0),"^",3),CNT=0 K R
19 F DTI=0:0 S DTI=$O(^PRST(458.1,"AD",DFN,DTI)) Q:DTI=""!(DTI>EDT) F DA=0:0 S DA=$O(^PRST(458.1,"AD",DFN,DTI,DA)) Q:DA="" D LST
20 W:'CNT !,"No Requests to Edit." Q
21LST ; Display Request
22 S Z=$G(^PRST(458.1,DA,0)) Q:Z="" S SCOM=$P($G(^(1)),"^",1)
23 S Z1=$P(Z,"^",3)
24 S Y=$G(^PRST(458,"AD",Z1)),PPI=$P(Y,"^",1),DAY=$P(Y,"^",2)
25 I PPI,DAY,$D(^PRST(458,PPI,"E",DFN,"D",DAY,10)) Q
26 S CNT=CNT+1 W !,$J(CNT,2)," " S R(CNT)=DA
27 W $P(Z,"^",4)," " S X=$P(Z,"^",3) D DTP^PRSAPPU W Y," to ",$P(Z,"^",6)," "
28 S X=$P(Z,"^",5) D DTP^PRSAPPU W Y," "
29 S X=$P(Z,"^",15) I X W X," ",$S($P(Z,"^",16)="D":"days",1:"hrs")," "
30 S X=$P(Z,"^",7),%=$F(LVT,";"_X_":") I %>0 W $P($E(LVT,%,999),";",1)," "
31 S X=$P(Z,"^",9)
32 S %=$F(LVS,";"_X_":") I %>0 W $P($E(LVS,%,999),";",1)
33 S X=$P(Z,"^",8) W:X'="" !?5,X W:SCOM'="" !?5,"Supr: ",SCOM Q
34EX G KILL^XUSCLEAN
Note: See TracBrowser for help on using the repository browser.