source: WorldVistAEHR/trunk/r/PAID-PRS/PRSACED1.m@ 1306

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1PRSACED1 ;HISC/REL/FPT,WCIOFO/JAH-T&A Edits (cont) ;02/16/02
2 ;;4.0;PAID;**6,24,45,75**;Sep 21, 1995
3 D STUB^PRSACED6
4TK ; entry point for time keepers
5 S FLSA=$P(^PRSPC(DFN,0),U,12),PB=$P(^PRSPC(DFN,0),U,20)
6 S PMP=$G(^PRSPC(DFN,"PREMIUM")),PMP=$P(PMP,U,6)
7 S CNT=0
8 I $E(NOR,1)'?1N S NOR=$F("+ABCDEF",$E(NOR,1))+8_$E(NOR,2)
9 S CWK=$P($G(^PRST(458,PPI,"E",DFN,0)),"^",6)
10 S HMX=$S(CWK'="C":720,1:800)
11 ;
12 ; initialize time storage array
13 ;
14 S (E(1),E(2),E(14),E(15),E(16),E(17))=0
15 F K=13:1:23,26:1:28,48:1:60 S X=$P(C0,"^",K) I X'="" S LAB=$P(T0," ",K-12) D @LAB
16 F K=1:1:5,8:1:10 S X=$P(C1,"^",K) I X'="" S LAB=$P(T1," ",K) D @LAB
17 I E(1)>60!(E(2)>60) S ERR=34 D ERR^PRSACED
18 G ^PRSACED2
19RT ;
20RL ;
21AN ;
22AL I X>HMX S ERR=1 D ERR^PRSACED
23 I LVG=0 S ERR=10 D ERR^PRSACED
24 Q
25FA ;
26FB ;
27FC ;
28FD ;
29SK ;
30SL I X>HMX S ERR=2 D ERR^PRSACED
31 I LVG=0 S ERR=11 D ERR^PRSACED
32 Q
33NO ;
34NP ;
35WD ;
36WP I X>HMX S ERR=3 D ERR^PRSACED
37 I "45"[LVG,$E(X,3) S ERR=12 D ERR^PRSACED
38 I DUT=3 S ERR=13 D ERR^PRSACED
39 ;
40 ;Store NO, NP, WD and WP in E(14), E(15), E(16), and E(17)
41 S X1=$S(LAB="NO":14,LAB="NP":15,LAB="WD":16,1:17)
42 S E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
43 Q
44AD ;
45AF ;
46AU ;
47AB I X>HMX S ERR=4 D ERR^PRSACED
48 Q
49CE ;
50CT ;
51CU ;
52CO I X>HMX S ERR=5 D ERR^PRSACED
53 Q:CWK="F"
54 I "ABCKMNU0123456789"'[PAY S ERR=14 D ERR^PRSACED
55 Q
56FE I X<1!(X>999999) S ERR=172 D ERR^PRSACED
57 I PAY'="F" S ERR=172 D ERR^PRSACED
58 Q
59UN ;
60US I X>$S(PAY="L"&(DUT=3):500,1:400) S ERR=15 D ERR^PRSACED
61 I DUT=2,$P(C1,"^",31)'="" S ERR=16 D ERR^PRSACED
62 I DUT=3,$P(C1,"^",31)="" S ERR=17 D ERR^PRSACED
63 I PAY="T",DUT=3,NOR="00",X>70!($P(C1,"^",31)>14) S ERR=19 D ERR^PRSACED
64 I DUT=1,"ABCGKMNRUY0123456789"'[PAY!($P(C1,"^",31))!(X>200) S ERR=20 D ERR^PRSACED
65 Q
66NA ;
67NR Q:"ABCGKMNU0123456789"[PAY S ERR=21 D ERR^PRSACED Q
68NB ;
69NS Q:"0123456789AGKMU"[PAY S ERR=22 D ERR^PRSACED Q
70SA ;
71SE S MX=$S("ABCKMN"[PAY:400,1:320) I X>MX S ERR=25 D ERR^PRSACED
72 I "ABCGKMNU0123456789"'[PAY S ERR=26 D ERR^PRSACED
73 S X1=$S("AM"[PAY:"123",1:1) I X1'[DUT S ERR=27 D ERR^PRSACED
74 S X1=LAB="SE"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
75 Q
76SB ;
77SF I X>240 S ERR=28 D ERR^PRSACED
78 I "BGU0123456789"'[PAY S ERR=29 D ERR^PRSACED
79 I DUT'=1 S ERR=30 D ERR^PRSACED
80 S X1=LAB="SF"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
81 Q
82SC ;
83SG I "0123456789GU"'[PAY S ERR=32 D ERR^PRSACED
84 I DUT'=1 S ERR=33 D ERR^PRSACED
85 I X>240 S ERR=31 D ERR^PRSACED
86 S X1=LAB="SG"+1,E(X1)=E(X1)+$E(X,1,2)+($E(X,3)*.25)
87 Q
Note: See TracBrowser for help on using the repository browser.