source: WorldVistAEHR/trunk/r/PAID-PRS/PRS8DR.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: 3.0 KB
RevLine 
[623]1PRS8DR ;HISC/MRL,JAH/WCIOFO-DECOMPOSITION, DRIVER ;1/25/2007
2 ;;4.0;PAID;**22,29,56,90,111**;Sep 21, 1995;Build 2
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ;This routine determines whether or not the parameters necessary
6 ;to decompose time are in existance. The majority of variables
7 ;involving processing an individual employee are defined in this
8 ;routine.
9 ;
10 ;The following lines establish variables necessary to process a
11 ;specific employees time for the specified pay period.
12 ;
13 ;Called by Routines: PRS8, PRS8DR (tag 1)
14 ;
15 N PRVAL,RESTORE
16 ;
17 D ONE^PRS8CV ;clean up variables
18 S SAVE=+$G(SAVE),SEE=+$G(SEE)
19 S TMTD=$G(^PRST(458,+PY,"E",DFN,0)),TMTD=$S($P(TMTD,"^",2)="X":1,1:0)
20 K WK F I=1,2,3 S WK(I)="" ;weekly totals (wk3=misc data)
21 D ^PRSAENT S VAL="" ;get entitlement (ENT)
22 I PP="S" G END ;manilla citizen/don't decompose/no stub
23 I $G(PB)["$" G STUB^PRS8CR ;don't decompose stipend/create stub
24 I "^P^X^"[(U_$P($G(^PRST(458,+PY,"E",DFN,0)),"^",2)_U) S RESTORE=1
25 D AUTOPINI^PRS8(+PY,+DFN,$G(RESTORE),.PRVAL) ; remove auto-posted data
26 S DOUB=0 I $E(ENT,26),$E(ENT,29) S DOUB=1 ;count standby & oncall same
27 S FLX="" S FLX=$P($G(^PRST(458,+PY,"E",DFN,0)),"^",6)
28 S (SST,TAL)="",X=$P(C0,"^",8) I X'="" D ;T&L Unit
29 .S X=$O(^PRST(455.5,"B",X,0)) ;get ien
30 .S TAL=$G(^PRST(455.5,+X,0)),X=$P(TAL,"^",8) ;get sleep start time
31 .I $L(X) S (NDAY,LAST,Y,Y1)=0 D 15^PRS8SU
32 .S SST=$S(+X:X,1:93) K X,Y1,LAST,X ;sleep start time
33 .K SL,SB,ST ;make sure standby variable don't exist
34 S (CAMISC,CYA,CYA2806,WPCYA,LU)=0 ; << ADDED >> calendar year adjust./leave used in pp
35 S (NH(1),NH(2))=0 ;normal hrs/pp total/week(1)/week(2)
36 S (TH,TH(1),TH(2))=0 ;total hours
37 N CT S (CT(1),CT(2))=0 ; counter for compensatory time
38 K DWK S DWK=0 ;count of days worked - for intermittents
39 S NH=NH/.25 ;turn Norm hrs into 15min increments
40 K TOUR S (TOUR(1),TOUR(2))="" ;tour code for wg/week(1)/week(2)
41 K TYP S TYP="" I $E(ENT)="D"!($E(ENT,1,2)="0D") S TYP=TYP_"D" ;daily pay basis
42 I PP?1N.E!(PP="U") S TYP=TYP_"W" ;wagegrade
43 I PP'="","KM"[PP S TYP=TYP_"N" ;nurse
44 I +$E(AC,2)=1,NH=192 S TYP=TYP_"B" ;baylor plan
45 I $G(PMP)'="","EF"[PMP S TYP=TYP_"H" ;Nurse Hybrid
46 I $E($G(AC),2)=3 S TYP=TYP_"I" ;intermittent
47 I NH>320 S TYP=TYP_"F" I NH'>448 S TYP=TYP_"f" ;firefighter
48 I NH,NH'>319 S TYP=TYP_"P" ;part-time
49 I PP="L",$E(AC,2)=2 S TYP=TYP_"d" ;doctor
50 I PP="L",$E(AC,2)=1 S TYP=TYP_"dR" ;doctor/resident or intern
51 S (PTH,PTH(1),PTH(2))=0 ;part-time hours
52 K WKL S (WKL(1),WKL(2))=0 ;count leave used in week during ND hours
53 K MEAL S $P(MEAL,"1^",14)="",MEAL=MEAL_1 ;mealtime
54 S (MILV,WCMP)=0 ;ML and PC indicators
55 S (CBCK(1),CBCK(2))=0 ;call back hrs by week counter
56 I TYP="" S TYP="*"
57 K I,PB,PP,X,X1,X2
58 D ^PRS8SU ;set up employee variables and commence decomposing
59 D ^PRS8CR
60 D:$D(PRVAL) AUTOPRES^PRS8(+PY,+DFN,.PRVAL) ; restore auto-posted data
61 I SEE D ^PRS8VW
62 ;
63END ; --- This is where we end this process
64 G ONE^PRS8CV ;clean up
65 Q
66 ;
671 ; --- enter here to print single entry and close device
68 D ^PRS8DR,^%ZISC Q
Note: See TracBrowser for help on using the repository browser.