source: WorldVistAEHR/trunk/r/PAID-PRS/PRSACED5.m@ 1003

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

revised back to 6/30/08 version

File size: 2.2 KB
Line 
1PRSACED5 ; HISC/REL/FPT-T&A Cross-Edits ;02/07/06 12:53
2 ;;4.0;PAID;**102**;Sep 21, 1995
3 G D1:DUT=1,D2:DUT=2,D3:DUT=3 Q
4D1 G:+NOR N1
5 I "045"'[LVG S ERR=151 D ERR^PRSACED
6 I "LJXWPQY"'[PAY S ERR=152 D ERR^PRSACED
7 Q:"45"'[LVG
8 S E(1)=0 F K=13:1:18 S X=$P(C0,"^",K),E(1)=E(1)+$E(X,1,2)+($E(X,3)*.25)
9 S E(2)=0 F K=48:1:53 S X=$P(C0,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
10 I E(1)>7!(E(2)>7) S ERR=159 D ERR^PRSACED
11 I LVG=5 I E(1)+E(2)+$P(C1,"^",30)>14 S ERR=160 D ERR^PRSACED
12 Q
13N1 I '(NOR=48&("KM"[PAY)),NOR<80 S ERR=153 D ERR^PRSACED
14 I '(PAY="W"&(LVG=0)),"123"'[LVG S ERR=154 D ERR^PRSACED
15 S E(1)=0 F K=13:1:18,20,43 S X=$P(C0,"^",K),E(1)=E(1)+$E(X,1,2)+($E(X,3)*.25)
16 S E(2)=0 F K=48:1:53 S X=$P(C0,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
17 F K=2,25 S X=$P(C1,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
18 G:NOR=80 N2
19 I $P(C0,"^",42)+$P(C1,"^",24)=0 S MX=NOR/2 I E(1)>MX!(E(2)>MX) S ERR=161 D ERR^PRSACED
20 S X=$P(C0,"^",42) I X S X=$E(X,1,2)+($E(X,3)*.25) I E(1)>X S ERR=163 D ERR^PRSACED
21 S X=$P(C1,"^",24) I X S X=$E(X,1,2)+($E(X,3)*.25) I E(2)>X S ERR=163 D ERR^PRSACED
22 Q
23N2 I CWK'="C",E(1)>45!(E(2)>45) S ERR=165 D ERR^PRSACED
24 I CWK="C",E(1)+E(2)>80 S ERR=166 D ERR^PRSACED
25 Q
26D2 I NOR<1!(NOR>79) S ERR=155 D ERR^PRSACED
27 I "0123"'[LVG S ERR=156 D ERR^PRSACED
28 I "ABCGLMNRU0123456789PQT"'[PAY S ERR=157 D ERR^PRSACED
29 Q:"123"'[LVG
30 S E(1)=0 F K=13:1:18,20,43 S X=$P(C0,"^",K),E(1)=E(1)+$E(X,1,2)+($E(X,3)*.25)
31 S E(2)=0 F K=48:1:53 S X=$P(C0,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
32 F K=2,25 S X=$P(C1,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
33 S X=$P(C0,"^",42),X=$E(X,1,2)+($E(X,3)*.25) I E(1)>X S ERR=164 D ERR^PRSACED
34 S X=$P(C1,"^",24),X=$E(X,1,2)+($E(X,3)*.25) I E(2)>X S ERR=164 D ERR^PRSACED
35 Q:CWK'="C"
36 S E(1)=0 F K=29,30,31 S X=$P(C0,"^",K),E(1)=E(1)+$E(X,1,2)+($E(X,3)*.25)
37 F K=11,12,13 S X=$P(C1,"^",K),E(1)=E(1)+$E(X,1,2)+($E(X,3)*.25)
38 S E(2)=0 F K=21,42 S X=$P(C0,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
39 F K=16,51 S X=$P(C0,"^",K),E(2)=E(2)-$E(X,1,2)-($E(X,3)*.25)
40 F K=3,24 S X=$P(C1,"^",K),E(2)=E(2)+$E(X,1,2)+($E(X,3)*.25)
41 ; The following line was commented out for DFAS Release #1 per Angela Curtiss instructions.
42 ; I E(1),E(2)<80 S ERR=170 D ERR^PRSACED -
43 Q
44D3 I +NOR!LVG S ERR=158 D ERR^PRSACED
45 Q
Note: See TracBrowser for help on using the repository browser.