source: FOIAVistA/trunk/r/PAID-PRS/PRSACED2.m@ 1163

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1PRSACED2 ; HISC/FPT-T&A Edits ;11/24/1999
2 ;;4.0;PAID;**45,54,112**;Sep 21, 1995;Build 54
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; initialize array that stores 8b values. This array is used
6 ; for edit checks that involve more than one type of time.
7 ; nodes 14-17 were initialized and set in PRSACED1.
8 F Z=1:1:13 S E(Z)=0
9 ;
10 F K=29:1:32,34:1:42,46,47 S X=$P(C0,"^",K) I X'="" S LAB=$P(T0," ",K-12) D @LAB
11 F K=11:1:14,16:1:24,28,29,58,59 S X=$P(C1,"^",K) I X'="" S LAB=$P(T1," ",K) D @LAB
12 I E(1)+E(2)=0 G E1
13 I "0123456789GHU"[PAY,E(1)>60!(E(2)>60) S ERR=41 D ERR^PRSACED
14E1 I "^R^C^"'[(U_PMP_U),E(3)>20!(E(4)>20) S ERR=55 D ERR^PRSACED
15 I E(5)>24!(E(6)>24) S ERR=61 D ERR^PRSACED
16 I NOR>80,(E(5)+E(6)) S ERR=168 D ERR^PRSACED
17 ; RA or RE hours may not exceed PT or PH hours minus 53.
18 ; RA is stored in E(3), RE in E(4), PT in E(10) and PH in E(11).
19 ; only check firefighters with premium pay indicator R or C (patch *54)
20 I "^R^C^"[(U_PMP_U) D
21 . I E(3),(E(3)>(E(10)-53)) S ERR=175 D ERR^PRSACED
22 . I E(4),(E(4)>(E(11)-53)) S ERR=176 D ERR^PRSACED
23 ;
24 ; NT, NH, NO, NP, WD, WP in E(12), E(13), E(14), E(15), E(16), E(17)
25 ; NT hrs can't exceed WD + NO. NH hrs can't exceed WP + NP.
26 ;
27 I E(12)>(E(14)+E(16)) S ERR=178 D ERR^PRSACED
28 I E(13)>(E(15)+E(17)) S ERR=179 D ERR^PRSACED
29 ;
30 I E(7)+E(8)=0 G E2
31 I DUT=1,CWK'="C" S MX=NOR/2 I E(7)>MX!(E(8)>MX) S ERR=80 D ERR^PRSACED
32 G:DUT=1 E2 S X1=$P(C0,"^",42)+$P(C0,"^",21),X1=X1\10+(X1#10*.25)
33 I E(7)>X1 S ERR=81 D ERR^PRSACED
34 S X1=$P(C1,"^",24)+$P(C1,"^",3),X1=X1\10+(X1#10*.25)
35 I E(8)>X1 S ERR=81 D ERR^PRSACED
36E2 I NOR=112,DUT=1,'$P(C0,"^",42)!('$P(C1,"^",24)) S ERR=67 D ERR^PRSACED
37 I E(9),'$P(C1,"^",46),E(9)'=+NOR S ERR=65 D ERR^PRSACED
38 ;exclude 9/3 month employee
39 I DUT=2,'(NOR="01"&("LMN"[PAY)),'(NOR="80"&(PAY="M")),$P(C0,"^",42)=""!($P(C1,"^",24)="") S ERR=66 D ERR^PRSACED
40 G ^PRSACED3
41OA ;
42OE I "ABCKMN"[PAY,X>600 S ERR=35 D ERR^PRSACED
43 I "ABCGKMNU0123456789"'[PAY S ERR=36 D ERR^PRSACED
44 S X1=LAB="OE"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
45 Q
46OB ;
47OF I "ABCGU0123456789"'[PAY S ERR=37 D ERR^PRSACED
48 I "ABC"[PAY,X>60 S ERR=38 D ERR^PRSACED
49 S X1=LAB="OF"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
50 Q
51OC ;
52OG I "0123456789GU"'[PAY S ERR=39 D ERR^PRSACED
53 S X1=LAB="OG"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
54 Q
55OK ;
56OS I "ABCKM"'[PAY S ERR=44 D ERR^PRSACED
57 I "ABC"[PAY,PMP="" S ERR=45 D ERR^PRSACED
58 I FLSA'="E" S ERR=46 D ERR^PRSACED
59 Q
60OM I X>560 S ERR=48 D ERR^PRSACED
61 I ($P(C0,"^",44)'>0),NOR'>80 S ERR=50 D ERR^PRSACED
62 I X>$P(C0,"^",44) S ERR=62 D ERR^PRSACED
63 Q
64OU I X>560 S ERR=49 D ERR^PRSACED
65 I ($P(C1,"^",26)'>0),NOR'>80 S ERR=51 D ERR^PRSACED
66 I X>$P(C1,"^",26) S ERR=63 D ERR^PRSACED
67 Q
68RA ;RA is stored in E(3), RE in E(4)
69RE I "ABCGKMNU0123456789"'[PAY S ERR=52 D ERR^PRSACED
70 S X1=LAB="RE"+3,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
71 Q
72RB ;
73RF I "BGU0123456789"'[PAY S ERR=53 D ERR^PRSACED
74 S X1=LAB="RF"+3,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
75 Q
76RC ;
77RG I "0123456789AGKMNU"'[PAY S ERR=54 D ERR^PRSACED
78 I PAY="A",X>200 S ERR=56 D ERR^PRSACED
79 S X1=LAB="RG"+3,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
80 Q
81HA ;
82HL I "ABCGKMNU0123456789"'[PAY S ERR=57 D ERR^PRSACED
83 S X1=LAB="HL"+5,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
84 Q
85HB ;
86HM I "BGU0123456789"'[PAY S ERR=58 D ERR^PRSACED
87 S X1=LAB="HM"+5,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
88 Q
89HC ;
90HN I "0123456789GKMU"'[PAY S ERR=59 D ERR^PRSACED
91 S X1=LAB="HN"+5,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
92 Q
93HD ;
94HO I X>240 S ERR=60 D ERR^PRSACED
95 I PAY'="U" S ERR=76 D ERR^PRSACED
96 I PB'="P" S ERR=76 D ERR^PRSACED
97 Q
98PT ;
99PH I 'X,'LVG,'(DUT=2&("BLM"[PAY)) S ERR=64 D ERR^PRSACED
100 I DUT=1,NOR'>80 S ERR=67 D ERR^PRSACED
101 I DUT=3 S ERR=68 D ERR^PRSACED
102 ; total part time hours stored in E(9)
103 S E(9)=E(9)+$E(X,1,2)+($E(X,3)*.25)
104 ; Save PT in E(10) and PH in E(11)
105 S X1=LAB="PH"+10,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
106 Q
107EA S E(7)=E(7)+$E(X,3,4)+($E(X,5)*.25)
108EB I LAB="EB" S E(7)=E(7)+$E(X,3,4)+($E(X,5)*.25)
109EC I LAB="EC" S E(8)=E(8)+$E(X,3,4)+($E(X,5)*.25)
110ED I LAB="ED" S E(8)=E(8)+$E(X,3,4)+($E(X,5)*.25)
111 I "GU1234567"'[PAY S ERR=78 D ERR^PRSACED
112 I $E(X,1,2)>50 S ERR=79 D ERR^PRSACED
113 Q
114NT ; Special firefighter codes
115NH ; NT is stored in E(12), NH in E(13)
116 I NOR'>80 S ERR=177 D ERR^PRSACED
117 S X1=LAB="NH"+12,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
118 Q
Note: See TracBrowser for help on using the repository browser.