Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRS8DR

PRS8DR.m

Go to the documentation of this file.
  1. PRS8DR ;HISC/MRL,JAH/WCIOFO-DECOMPOSITION, DRIVER ;4/09/2007
  1. ;;4.0;PAID;**22,29,56,90,111,112,107**;Sep 21, 1995;Build 2
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ;This routine determines whether or not the parameters necessary
  1. ;to decompose time are in existence. The majority of variables
  1. ;involving processing an individual employee are defined in this
  1. ;routine.
  1. ;
  1. ;The following lines establish variables necessary to process a
  1. ;specific employees time for the specified pay period.
  1. ;
  1. ;Called by Routines: PRS8, PRS8DR (tag 1)
  1. ;
  1. N PRVAL,RESTORE
  1. ;
  1. D ONE^PRS8CV ;clean up variables
  1. S SAVE=+$G(SAVE),SEE=+$G(SEE)
  1. S TMTD=$G(^PRST(458,+PY,"E",DFN,0)),TMTD=$S($P(TMTD,"^",2)="X":1,1:0)
  1. K WK F I=1,2,3 S WK(I)="" ;weekly totals (wk3=misc data)
  1. D ^PRSAENT S VAL="" ;get entitlement (ENT)
  1. I PP="S" G END ;Manila citizen/don't decompose/no stub
  1. I $G(PB)["$" G STUB^PRS8CR ;don't decompose stipend/create stub
  1. ; Set NAWS to type of AWS
  1. N NAWS
  1. S NAWS=0
  1. I "KM"[$E(AC,1),$E(AC,2)=1,NH=72 S NAWS="36/40 AWS"
  1. I $E(AC,1)="M",$E(AC,2)=2,NH=80 S NAWS="9Mo AWS"
  1. ;
  1. I "^P^X^"[(U_$P($G(^PRST(458,+PY,"E",DFN,0)),"^",2)_U) S RESTORE=1
  1. D AUTOPINI^PRS8(+PY,+DFN,$G(RESTORE),.PRVAL) ; remove auto-posted data
  1. S DOUB=0 I $E(ENT,26),$E(ENT,29) S DOUB=1 ;count standby & oncall same
  1. S FLX="" S FLX=$P($G(^PRST(458,+PY,"E",DFN,0)),"^",6)
  1. I +NAWS=36 S FLX="C"
  1. S (SST,TAL)="",X=$P(C0,"^",8) I X'="" D ;T&L Unit
  1. .S X=$O(^PRST(455.5,"B",X,0)) ;get ien
  1. .S TAL=$G(^PRST(455.5,+X,0)),X=$P(TAL,"^",8) ;get sleep start time
  1. .I $L(X) S (NDAY,LAST,Y,Y1)=0 D 15^PRS8SU
  1. .S SST=$S(+X:X,1:93) K X,Y1,LAST,X ;sleep start time
  1. .K SL,SB,ST ;make sure standby variable don't exist
  1. S (CAMISC,CYA,CYA2806,WPCYA,LU)=0 ; << ADDED >> calendar year adjust./leave used in pp
  1. S (NH(1),NH(2))=0 ;normal hrs/pp total/week(1)/week(2)
  1. S (TH,TH(1),TH(2))=0 ;total hours
  1. N CT S (CT(1),CT(2))=0 ; counter for compensatory time
  1. K DWK S DWK=0 ;count of days worked - for intermittents
  1. S NH=NH/.25 ;turn Norm hrs into 15min increments
  1. K TOUR S (TOUR(1),TOUR(2))="" ;tour code for wg/week(1)/week(2)
  1. K TYP S TYP="" I $E(ENT)="D"!($E(ENT,1,2)="0D") S TYP=TYP_"D" ;daily pay basis
  1. I PP?1N.E!(PP="U") S TYP=TYP_"W" ;wagegrade
  1. I PP'="","KM"[PP S TYP=TYP_"N" ;nurse
  1. I +$E(AC,2)=1,NH=192 S TYP=TYP_"B" ;baylor plan
  1. I $G(PMP)'="","EF"[PMP S TYP=TYP_"H" ;Nurse Hybrid
  1. I $E($G(AC),2)=3 S TYP=TYP_"I" ;intermittent
  1. I NH>320 S TYP=TYP_"F" I NH'>448 S TYP=TYP_"f" ;firefighter
  1. ; Nurses on the 9month AWS will be treated as FT employees during the 9 months
  1. ; that they are working. Prevent a "P" from being added to TYP.
  1. I NH,NH'>319,$E(AC,2)'=1 S TYP=TYP_"P" ;part-time
  1. I PP="L",$E(AC,2)=2 S TYP=TYP_"d" ;doctor
  1. I PP="L",$E(AC,2)=1 S TYP=TYP_"dR" ;doctor/resident or intern
  1. I PP="Q",$E(AC,2)=2 S TYP=TYP_"d" ;doctor
  1. I PP="Q",$E(AC,2)=1 S TYP=TYP_"dR" ;doctor/resident or intern
  1. S (PTH,PTH(1),PTH(2))=0 ;part-time hours
  1. K WKL S (WKL(1),WKL(2))=0 ;count leave used in week during ND hours
  1. K MEAL S $P(MEAL,"1^",14)="",MEAL=MEAL_1 ;mealtime
  1. S (MILV,WCMP)=0 ;ML and PC indicators
  1. S (CBCK(1),CBCK(2))=0 ;call back hrs by week counter
  1. I TYP="" S TYP="*"
  1. K I,PB,PP,X,X1,X2
  1. D ^PRS8SU ;set up employee variables and commence decomposing
  1. D ^PRS8CR
  1. D:$D(PRVAL) AUTOPRES^PRS8(+PY,+DFN,.PRVAL) ; restore auto-posted data
  1. I SEE D ^PRS8VW
  1. ;
  1. END ; --- This is where we end this process
  1. G ONE^PRS8CV ;clean up
  1. Q
  1. ;
  1. 1 ; --- enter here to print single entry and close device
  1. D ^PRS8DR,^%ZISC Q