Index: FOIAVistA/tag/r/PAID-PRS/PRS8AC.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8AC.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8AC.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8AC ;HISC/MRL-DECOMPOSITION, ACTIVITY STRING ;05/18/07
- ;;4.0;PAID;**40,45,54,52,69,75,90,96,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8AC ;HISC/MRL-DECOMPOSITION, ACTIVITY STRING ;01/22/04
+ ;;4.0;PAID;**40,45,54,52,69,75,90,96**;Sep 21, 1995
  ;
  ;The primary purpose of this routine is to create the activity
@@ -16,11 +15,9 @@
  S Q=0
  I DY>0,DY<15 D  G END:Q
- .I DAY(DY,"OFF"),"LSWARUHFGDr"[VAR S Q=1 ;exc invalid day off VAR
+ .I DAY(DY,"OFF"),"LSWARUHFGD"[VAR S Q=1 ;exc invalid day off VAR
  K OC,FLAG
  ;
  S DAYZ=DAY(DY,"W")_$G(DAY(DY,"N")),MTM=0
  S DAYH=$G(DAY(DY,"HOL"))_$G(DAY(DY+1,"HOL")) ;holiday node
- N DAYR
- S DAYR=DAY(DY,"r")_$G(DAY(DY,"rN")) ; Recess
  ;
  ;P 45 FIREFIGHTERS F NODE TO TRACK ADDITIONAL FF HRS
@@ -29,6 +26,4 @@
  F T=+V:1:+$P(V,"^",2) D
  .I +VAR,$E(DAYH,T),$E(DAYZ,T)?1A Q  ;no override holiday
- .; Don't override Recess but allow Unscheduled Regular (VAR=4)
- .I +VAR,VAR'=4,$E(DAYR,T)="r" Q  ; don't override Recess
  .I VAR="A"&(JURY=1) S VAR="J"
  .S VAR1=VAR Q:VAR1=""  S DAYZ(1)=$E(DAYZ,T)
@@ -37,10 +32,5 @@
  .I T=+V,"Vh"[VAR1,TYP["I" S DAY(DY,"DWK")=1 ;count days worked for cop
  .I "JLSWNnARUXYFGD"[VAR1,T'>96,'$E(DAYZ,T) Q  ;invalid outside tour
- .; Regular employees can't earn ct/use ot during work
- .I +NAWS'=9,"EOPQT4"[VAR1,T'>96,$E(DAYZ,T) Q
- .; 9mo AWS checks
- .I +NAWS=9,"PQT"[VAR1,T'>96,$E(DAYZ,T) Q  ;can't earn ct/use ot during work
- .; Allow CT/OT/UN/ON if posted over Recess otherwise don't allow
- .I +NAWS=9,"4OEC"[VAR1,T'>96,$E(DAYZ,T),$E(DAYR,T)'="r" S $E(DAYR,T)=VAR1 Q
+ .I "EOPQT4"[VAR1,T'>96,$E(DAYZ,T) Q  ;can't earn ct/use ot during work
  .I "OE"[VAR1,"BC"[DAYZ(1),$L(DAYZ(1)) D  ; Change OT or CT to CB/SB OT
  ..S VAR1=$C($A($E(DAYZ,T))+32)
@@ -54,30 +44,9 @@
  .I $E(DAYZ,T)=5,"ALSRUFGD"[VAR1 S VAR1=$E(DAYZ,T)
  .I $E(DAYZ,T)="-","BbCctes"[VAR1 Q  ;unavail for oc/sb or sch ot/ct
- .;
- .I VAR'="r" D
- ..S DAYZ=$E(DAYZ,0,T-1)_VAR1_$E(DAYZ,T+1,999)
- ..I $E($G(DAY(DY-1,"N")),T)'="",VAR1'=$E($G(DAY(DY-1,"N")),T) D
- ...S DAY(DY-1,"N")=$E(DAY(DY-1,"N"),0,T-1)_VAR1_$E(DAY(DY-1,"N"),T+1,999) ;save VAR
- ..; When processing tour time also copy tour into DAYR
- ..I "1235"[VAR1 D
- ...S DAYR=$E(DAYZ,0,T-1)_VAR1_$E(DAYZ,T+1,999)
- ...I $E($G(DAY(DY-1,"N")),T)'="",VAR1'=$E($G(DAY(DY-1,"N")),T) D
- ....S DAY(DY-1,"rN")=$E(DAY(DY-1,"rN"),0,T-1)_VAR1_$E(DAY(DY-1,"rN"),T+1,999)
- .;
- .; The following check will record Recess and will then update VAR1 to 0 which
- .; will result in the normally scheduled tour being marked as being no tour.
- .; This will allow Unscheduled Regular, OT and CT to be posted over the tour.
- .I VAR="r" D
- ..S DAYR=$E(DAYR,0,T-1)_VAR1_$E(DAYR,T+1,999)
- ..S DAYZ=$E(DAYZ,0,T-1)_0_$E(DAYZ,T+1,999) ; Overwrite tour
- ..I $E($G(DAY(DY-1,"rN")),T)'="",VAR1'=$E($G(DAY(DY-1,"rN")),T) D
- ...S DAY(DY-1,"rN")=$E(DAY(DY-1,"rN"),0,T-1)_VAR1_$E(DAY(DY-1,"rN"),T+1,999)
- ...S DAY(DY-1,"N")=$E(DAY(DY-1,"N"),0,T-1)_0_$E(DAY(DY-1,"N"),T+1,999)
- ..S Y=48 D SET ; Count Recess
- .;
+ .S DAYZ=$E(DAYZ,0,T-1)_VAR1_$E(DAYZ,T+1,999) I $E($G(DAY(DY-1,"N")),T)'="",VAR1'=$E($G(DAY(DY-1,"N")),T) S DAY(DY-1,"N")=$E(DAY(DY-1,"N"),0,T-1)_VAR1_$E(DAY(DY-1,"N"),T+1,999) ;save VAR
  .I VAR1="J" S Y=5 D SET ;set authorized absence for jury duty
  .I VAR1="M" S Y=5 D SET ; authorized absence for ML
  .;ot on non-premium T&L
- .I ("Eocb"[VAR1!(VAR1="O"&'$E(DAYH,T)))&("^^10^11^12^13^15^16^17^"[("^"_$P(V,"^",4)_"^"))!(VAR1=5&("ALSRUFGD"[VAR))!(VAR1=4&(TYP["P"!(TYP["I"&(TYP["N"!(TYP["H"!($$HYBRID^PRSAENT1($G(DFN)))))))&("^7^9^11^12^14^17^"[("^"_$P(V,"^",4)_"^"))) D
+ .I ("Eocb"[VAR1!(VAR1="O"&'$E(DAYH,T)))&("^^10^11^12^13^15^16^"[("^"_$P(V,"^",4)_"^"))!(VAR1=5&("ALSRUFGD"[VAR))!(VAR1=4&(TYP["P"!(TYP["I"&(TYP["N"!(TYP["H"!($$HYBRID^PRSAENT1($G(DFN)))))))&("^7^9^11^12^14^"[("^"_$P(V,"^",4)_"^"))) D
  ..Q:$E(DAY(DY,"P"),T)=5&("ALSRUFGD"'[VAR)
  ..I $D(FLAG) S FLAG=VAR1,VAR1=5
@@ -89,5 +58,4 @@
  ...I "^7^8^9^11^"[("^"_$P(V,"^",4)_"^")&(TYP'["N")&(TYP'["H")&('$$HYBRID^PRSAENT1($G(DFN))) S CODE="n" Q
  ...I "^7^8^9^11^"[("^"_$P(V,"^",4)_"^")&("^S^T^U^V^"'[(U_PMP_U)) S CODE="n" Q
- ...I $P(V,"^",4)=17 S CODE="N" Q  ; Code 17 - OT/CT with premiums 
  ...I VAR1=5 S CODE=VAR Q
  ...S CODE=1
@@ -125,11 +93,10 @@
  ..K S,VAR1
  ;
+ ;
  S DAY(DY,"W")=$E(DAYZ,1,96) ;todays activity
  S DAY(DY,"N")=$E(DAYZ,97,999) ;tomorrows activity from today/if any
- S DAY(DY,"r")=$E(DAYR,1,96) ; Today's Recess
- S DAY(DY,"rN")=$E(DAYR,97,999) ; Tomorrow's Recess/if any
  S:$E(DAY(DY,"P"),97,999)'="" DAY(DY,"P1")=$E(DAY(DY,"P"),97,999) ;non-prem ot for next day
  S DAY(DY,"P")=$E(DAY(DY,"P"),1,96) ;non-prem ot for today
- I DAY(DY,"N")?1"0"."0",DAY(DY,"rN")'["r" S DAY(DY,"N")=""
+ I DAY(DY,"N")?1"0"."0" S DAY(DY,"N")=""
  S DAY(DY,"HOL")=$E(DAYH,1,96)
  ;
@@ -167,7 +134,4 @@
  .S X=DAY(DY-1,"P1")_$E(DAY(DY,"P"),$L(DAY(DY-1,"P1"))+1,96)
  .S DAY(DY,"P")=X
- I $D(DAY(DY-1,"rN")),$L(DAY(DY-1,"rN")) D
- .S X=DAY(DY-1,"rN")_$E(DAY(DY,"r"),$L(DAY(DY-1,"rN"))+1,96)
- .S DAY(DY,"r")=X
  ;
 END ; --- all done here
Index: FOIAVistA/tag/r/PAID-PRS/PRS8CR.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8CR.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8CR.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8CR ;HISC/MRL-DECOMPOSITION, CREATE STRING ;01/17/07
- ;;4.0;PAID;**2,6,45,69,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8CR ;HISC/MRL-DECOMPOSITION, CREATE STRING ;8/23/01
+ ;;4.0;PAID;**2,6,45,69**;Sep 21, 1995
  ;
  ;This routine take the information contained in the WK array
@@ -17,16 +16,12 @@
  N MLINHRS
  S MLINHRS=$$MLINHRS^PRSAENT(DFN)
- S S="333333333333333333333333333333333443623233333333333"
- S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEA  EB  TATCFAFCADNTRSSRSDND"
- S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSEC  ED  TBTDFBFDAFNHRNSSSHNU"
+ S S="33333333333333333333333333333333344362323333333"
+ S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEA  EB  TATCFAFCADNT"
+ S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSEC  ED  TBTDFBFDAFNH"
  S E(3)="NLDWINTLLULNLDDTTOLAMLCAPCCYRRFFFECD"
  K V S V="" F I=1,2,3 S V(I)=""
  ;
  ;Next section gets Week 1 and Week 2 data and stores in V(WK)
- F J=1,2 F I=1:1:38,40,42:1:51 S X=+$P(WK(J),"^",I) I X]"" D
- .; Don't report PT/PT for nurses on AWS schedules
- .Q:$E(AC,2)=1&($P(C0,U,16)=72)&(I=32)  ; 36/40 AWS
- .Q:$E(AC,2)=2&($P(C0,U,16)=80)&(I=32)  ; 9month AWS
- .;
+ F J=1,2 F I=1:1:38,40,42,43,44,45,46,47 S X=+$P(WK(J),"^",I) I X]"" D
  .I TYP'["D",I'=38,I'=40 D QH
  .I TYP["D" S X=+X_"0"
Index: FOIAVistA/tag/r/PAID-PRS/PRS8DR.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8DR.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8DR.m	(revision 636)
@@ -1,8 +1,8 @@
-PRS8DR ;HISC/MRL,JAH/WCIOFO-DECOMPOSITION, DRIVER ;4/09/2007
- ;;4.0;PAID;**22,29,56,90,111,112**;Sep 21, 1995;Build 54
+PRS8DR ;HISC/MRL,JAH/WCIOFO-DECOMPOSITION, DRIVER ;1/25/2007
+ ;;4.0;PAID;**22,29,56,90,111**;Sep 21, 1995;Build 2
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
  ;This routine determines whether or not the parameters necessary
- ;to decompose time are in existence.  The majority of variables
+ ;to decompose time are in existance.  The majority of variables
  ;involving processing an individual employee are defined in this
  ;routine.
@@ -20,17 +20,10 @@
  K WK F I=1,2,3 S WK(I)="" ;weekly totals (wk3=misc data)
  D ^PRSAENT S VAL="" ;get entitlement (ENT)
- I PP="S" G END ;Manila citizen/don't decompose/no stub
+ I PP="S" G END ;manilla citizen/don't decompose/no stub
  I $G(PB)["$" G STUB^PRS8CR ;don't decompose stipend/create stub
- ; Set NAWS to type of AWS
- N NAWS
- S NAWS=0
- I "KM"[$E(AC,1),$E(AC,2)=1,NH=72 S NAWS="36/40 AWS"
- I $E(AC,1)="M",$E(AC,2)=2,NH=80 S NAWS="9Mo AWS"
- ;
  I "^P^X^"[(U_$P($G(^PRST(458,+PY,"E",DFN,0)),"^",2)_U) S RESTORE=1
  D AUTOPINI^PRS8(+PY,+DFN,$G(RESTORE),.PRVAL) ; remove auto-posted data
  S DOUB=0 I $E(ENT,26),$E(ENT,29) S DOUB=1 ;count standby & oncall same
  S FLX="" S FLX=$P($G(^PRST(458,+PY,"E",DFN,0)),"^",6)
- I +NAWS=36 S FLX="C"
  S (SST,TAL)="",X=$P(C0,"^",8) I X'="" D  ;T&L Unit
  .S X=$O(^PRST(455.5,"B",X,0)) ;get ien
@@ -53,7 +46,5 @@
  I $E($G(AC),2)=3 S TYP=TYP_"I" ;intermittent
  I NH>320 S TYP=TYP_"F" I NH'>448 S TYP=TYP_"f" ;firefighter
- ; Nurses on the 9month AWS will be treated as FT employees during the 9 months
- ; that they are working.  Prevent a "P" from being added to TYP.
- I NH,NH'>319,$E(AC,2)'=1 S TYP=TYP_"P" ;part-time
+ I NH,NH'>319 S TYP=TYP_"P" ;part-time
  I PP="L",$E(AC,2)=2 S TYP=TYP_"d" ;doctor
  I PP="L",$E(AC,2)=1 S TYP=TYP_"dR" ;doctor/resident or intern
Index: FOIAVistA/tag/r/PAID-PRS/PRS8EX.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8EX.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8EX.m	(revision 636)
@@ -1,4 +1,4 @@
-PRS8EX ;HISC/MRL,WCIOFO/SAB-DECOMPOSITION, EXCEPTIONS ;1/31/2007
- ;;4.0;PAID;**2,40,56,69,111,112**;Sep 21, 1995;Build 54
+PRS8EX ;HISC/MRL,WCIOFO/SAB-DECOMPOSITION, EXCEPTIONS ;1/25/2007
+ ;;4.0;PAID;**2,40,56,69,111**;Sep 21, 1995;Build 2
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -27,5 +27,5 @@
  ..Q
  .Q
- S X="^AL^SL^WP^NP^AA^RL^CU^CT^CP^HX^ML^TR^TV^OT^RG^TT^SB^ON^NL^HW^CB^AD^DL^RS" ;code
+ S X="^AL^SL^WP^NP^AA^RL^CU^CT^CP^HX^ML^TR^TV^OT^RG^TT^SB^ON^NL^HW^CB^AD^DL" ;code
  S X=($F(X,"^"_TT)\3)+4,(X,TT(1))=$P($T(ACT+X),";;",2) ;parameters
  S GO=0 I '+X!($E(ENT,+X)) S GO=1 ;entitlement exists-continue
@@ -76,5 +76,5 @@
  I TT'="UN" S VAR=$P(X,"^",3) ;increment time code
  I '$S(VAR'="W":1,'CYA:1,DY<CYA:1,1:0) D
- .S WPCY=1 ;flag to save WOP in hours from 1/1 for calendar year adjustment
+ .S WPCY=1 ;flag to save WOP in hours from 1/1 for calander year adjustment
  I TYP'["D" D  G END ;process hourly people and quit
  .; The following 2 lines commented out because for Employees that are
@@ -144,3 +144,2 @@
  ;;31^Adoption^G^45
  ;;35^Donor Leave^D^46
- ;;5^Recess^r^48
Index: FOIAVistA/tag/r/PAID-PRS/PRS8HD.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8HD.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8HD.m	(revision 636)
@@ -1,4 +1,4 @@
-PRS8HD ;HISC/MGD-DECOMPOSITION, DETERMINE HOLIDAYS ;12/07/2007
- ;;4.0;PAID;**4,33,72,88,94,98,113,118**;Sep 21, 1995;Build 1
+PRS8HD ;HISC/MGD-DECOMPOSITION, DETERMINE HOLIDAYS ;01/3/2007
+ ;;4.0;PAID;**4,33,72,88,94,98,113**;Sep 21, 1995;Build 3
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -160,5 +160,4 @@
  ;;3040611^President Reagan Funeral^FRIDAY^PRS*4*94
  ;;3070102^President Ford Funeral^TUESDAY^PRS*4*113
- ;;3071224^Extra Christmas Day^MONDAY^PRS*4*118
  ;
  ;---------------------------------------------------------------------
Index: FOIAVistA/tag/r/PAID-PRS/PRS8HR.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8HR.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8HR.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8HR ;HISC/MRL,WCIOFO/JAH-DECOMPOSITION, HOURS ;06/25/07
- ;;4.0;PAID;**2,22,29,42,52,102,108,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8HR ;HISC/MRL,WCIOFO/JAH-DECOMPOSITION, HOURS ;05/05/06
+ ;;4.0;PAID;**2,22,29,42,52,102,108**;Sep 21, 1995
  ;
  ;This routine is called by ^PRS8PP (premium pay calculator)
@@ -68,9 +67,11 @@
  I TYP["I",$E(AC,1)="L",TH=320,"4OosEe"[VAL Q
  ;
- ;     IF type of time is anything but Leave Without Pay "W" or Non-Pay "n"
- ;     THEN increment total hrs HT & increment HTP.  Also update
- ;     ^TMP global for reference during the processing of On-Call (PRS8OC).
- ;
- I "Wn"'[VAL S HT=HT+1,HTP=HTP+1,^TMP($J,"PRS8",DAY,"HT")=HT
+ ;     IF type of time is anything but (leave w/out pay, comp time) 
+ ;     THEN increment total hrs(HT) & increment HTP if type of 
+ ;     time not non pay or leave w/out pay.
+ ;
+ ; Update daily counter - *102 added non-pay back into daily count
+ ;
+ S HT=HT+1,HTP=HTP+1
  ;
  ;---------------------------------------------------------
@@ -93,5 +94,5 @@
  ;
  ; Check for FT Compressed
- I $E(AC,2)=1,NH>319,FLX="C",("OoseE4"[VAL) S GO=1
+ I NH>319,FLX="C",("OoseE4"[VAL) S GO=1
  ;
  ; Check for week
@@ -137,5 +138,5 @@
  ;   Check employees with Normal hours less than 80. (Baylor NH=320)
  ;
- I NH'>319!(($E(AC,2)=2)&(NH=320)) D TH^PRS8HRSV D  Q
+ I NH'>319 D TH^PRS8HRSV D  Q
  .I FLX="C" D  Q:X
  ..;
@@ -186,5 +187,24 @@
  .S X=$S("Ee"'[VAL:TOUR+19,(TH(W)'>160)&(HT'>32):9,1:7)
  .I TYP["P",VAL[4,TH(W)'>160,HT'>32 S X=9
- .I TYP["P",VAL="O",TH(W)'>160,HT'>32 S X=9
  .D CHK^PRS8HRSV
  Q
+ ;
+ ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ ; ### DELETE UNLESS EARLIER CHECK WAS RESTORED
+CT2DAY() ;Determine if comptime eligible including 2 day tour.
+ ;
+ N TOUREC,TWODAY
+ S (RTN,TWODAY)=0
+ ;
+ ;      IF time segment contains Scheduled or unscheduled comptime 
+ ;      or overtime and there is some time in tour hours worked THEN
+ ;      check if it's a 2 day tour. For 2 day tours some of time worked
+ ;      won't be in HT variable since it occured on other day of two
+ ;      day tour, it's not valid to simply check the HT variable for
+ ;      8 hours of work. (patch PRS*4*22)
+ ;
+ I "OosEe4"[VAL,(HT>0),(NH>319) D
+ .S TOUREC=$P($G(DAY(DAY,0)),"^",2)
+ .I TOUREC>0 S TWODAY=$P($G(^PRST(457.1,TOUREC,0)),"^",5)
+ .I TWODAY="Y" S RTN=1
+ Q RTN
Index: FOIAVistA/tag/r/PAID-PRS/PRS8HRSV.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8HRSV.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8HRSV.m	(revision 636)
@@ -1,8 +1,7 @@
-PRS8HRSV ;WCIOFO/JAH-HOLIDAY FLAG, TIME CHECKER, WK() SET; 04/05/07
- ;;4.0;PAID;**29,52,102,108,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;  Set up variable for holiday worked or holiday excused
+PRS8HRSV ;WCIOFO/JAH-HOLIDAY FLAG, TIME CHECKER, WK() SET; 05/02/06
+ ;;4.0;PAID;**29,52,102,108**;Sep 21, 1995
+ ;  Set up variable for holiday worked or holiday exused
  ;  Holiday worked coded 2 in DAY array
- ;  Holiday excused coded 1 in DAY array
+ ;  Holiday exused coded 1 in DAY array
  ;  A NON holiday is coded as all zero's in day array.
  ;
@@ -61,12 +60,4 @@
  I X,Y=2,$E(ENT,+Y)'="H" S X=$S(TYP'["B":0,1:9)
  ;
- ;   IF 36/40 AWS with WP determine eligibility for OT/CT
- ;   Skip this check if time is HW (X=29) or OT on Hol (X=24)
- ;   
- I "KM"[$E(AC,1),$E(AC,2)=1,$P(C0,U,16)=72,X'=32,X'=29,X'=24 D
- . I HT>32 S X=$S(VAL="O":TOUR+15,VAL="e":7,1:X)  Q
- . I TH(W)>160 S X=$S(VAL="O":TOUR+19,VAL="e":7,1:X)  Q
- . I HT'>32,TH(W)'>160 S X=9
- ;
  ;   If X is hours in excess of 8/day & > 40/week & type of time
  ;   is compensatory time X = 0
@@ -112,8 +103,4 @@
  ..I X'=32,$E(ENT,25),'HOLWKD D
  ...S ZZ=X
- ...; for 36/40 AWS w/ WP or NP report OT on Holiday as (OK/OS)
- ...; For 9mo AWS w/ Recess report OT on Holiday as (OK/OS)
- ...I +NAWS,VAL["O",$E(DAY(DAY,"HOL"),M)=0 S X=24 D SET S X=0 Q
- ...;
  ...S X=$S(TYP["P"!(TYP["I"):TOUR+28,1:24) D SET
  ...I TYP["P"!(TYP["I") S X=9 D SET
@@ -167,11 +154,4 @@
 SET ; --- Set value into WK array
  ;
- ; Nurses on the 36/40 AWS are FT with Normal Hours of 72.  Nurses on the 9 month
- ; AWS are PT with Normal Hours of 80.  Neither will not have Part Time Hours
- ; counted in their 8B string.
- ;
- Q:$E(AC,2)=1&($P(C0,U,16)=72)&(X=32)  ; 36/40 AWS
- Q:$E(AC,2)=2&(NH=320)&(X=32)  ; 9month AWS before any Recess processed
- ;
  ;     Full time employee & part time hours & normal hours WK1 + WK2
  ;     = biweekly normal hours.
@@ -198,5 +178,4 @@
  I $S(VAL=4:1,"osEe"[VAL!(VAL="O"&('HOLWKD)):1,1:0) D
  . Q:(HT>32)&(TH(W)<160)&(NH<320)&($E(ENT,19)=1)
- . Q:(HT>32)&(TH(W)<160)&(NH=320)&($E(ENT,19)=1)&($E(AC,2)=2)  ; 9month AWS
  . S TH=TH+1,TH(W)=TH(W)+1
  Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8MSC0.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8MSC0.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8MSC0.m	(revision 636)
@@ -1,4 +1,4 @@
-PRS8MSC0 ;HISC/DAD,WCIOFO/JAH,SAB - MISC TIME CARD ADJUST(contd) ;4/04/2007
- ;;4.0;PAID;**22,35,40,56,111,112**;Sep 21, 1995;Build 54
+PRS8MSC0 ;HISC/DAD,WCIOFO/JAH,SAB - MISC TIME CARD ADJUST(contd) ;1/25/2007
+ ;;4.0;PAID;**22,35,40,56,111**;Sep 21, 1995;Build 2
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -80,18 +80,9 @@
  ...I TYP["W",$E($P(PEROT(H),"^",3))'="E"&($G(^TMP($J,"PRS8",$P(PEROT(H),"^",1),"OFF"))=0) S TOUR=$G(^TMP($J,"PRS8",$P(PEROT(H),"^",1),"TOUR"))
  ...S D=+OT,P=$S($E($P(PEROT(H),"^",3))'="E":TOUR+19,1:7),Y=8-(STOP-START+1+Z)
- ...;
- ...I TYP["P",TYP'["B",P'=7,'+NAWS D
+ ...I TYP["P",TYP'["B",P'=7 D
  ....I $P($G(^TMP($J,"PRS8",$P(PEROT(H),"^",1),"OFF")),"^",1)=1&(TH(WEEK)'>160) S Y=0 Q
  ....I $P(C0,"^",12)="E" S P=$S($L($TR(W,"0O"))>31&(TH(WEEK)'>160):TOUR+25,1:P) D:Y SET S Y=$S(TH(WEEK)'>160:Y,1:0) S P=9 D:Y SET S Y=0
  ...I $P(C0,"^",12)="N",P'=7 S P=$S($L($TR(W,"0O"))>31:TOUR+15,1:P) D:Y SET S Y=0
- ...D:Y&('+NAWS) SET
- ...;
- ...I +NAWS D  Q  ; Checks for just the AWS nurses
- ....N CNT,HT,I
- ....S CNT=Y,Y=1,HT=$G(^TMP($J,"PRS8",D,"HT"))
- ....F I=1:1:CNT D
- .....I HT'<32 S P=$S(P'=7:TOUR+15,1:P) D SET1 Q  ; DA/DE or CE/CT
- .....I TH($S(+OT>7:2,1:1))'<160 S P=$S(P'=7:TOUR+19,1:P) D SET1 Q  ; OA/OE or CE/CT
- .....I HT<32,TH($S(+OT>7:2,1:1))<160 S P=9 D SET1 Q  ; UN/US
+ ...D:Y SET
  ..Q
  .Q
@@ -109,15 +100,4 @@
  S $P(WK(WEEK),"^",P)=$P(WK(WEEK),"^",P)+Y
  Q
- ;
-SET1     ; Set sleep time into WK array
- Q:D<1!(D>14)
- S WEEK=$S(D>7:2,1:1)
- S $P(WK(WEEK),"^",P)=$P(WK(WEEK),"^",P)+Y
- Q:(HT>32)&(TH(WEEK)<160)&(NH<320)&($E(ENT,19)=1)
- Q:(HT>32)&(TH(WEEK)<160)&(NH=320)&($E(ENT,19)=1)&($E(AC,2)=2)  ; 9month AWS
- S HT=HT+1,TH(WEEK)=TH(WEEK)+1
- S ^TMP($J,"PRS8",D,"HT")=^TMP($J,"PRS8",D,"HT")+1
- Q
- ;
 OTNXTPP(DAY,CALLBK,EMPNM,PPIEN,TLU) ;
  ;OT or CT connects to a tour of duty in the next pay period.
@@ -176,7 +156,5 @@
  F W=1,2 D  ;              For each week subtract leave ND from total ND
  . Q:'WKL(W)  ;                                 No leave ND to subtract
- . I +NAWS'=36 S $P(WK(W),"^",10)=$P(WK(W),"^",10)-WKL(W) ; Subtract
- . ; For 36/40 AWS subtract time from Night Differential-AWS (piece 51)
- . I +NAWS=36 S $P(WK(W),"^",51)=$P(WK(W),"^",51)-WKL(W)
+ . S $P(WK(W),"^",10)=$P(WK(W),"^",10)-WKL(W) ; Subtract
  . S WKL(W)=0 ;                                 Reset leave ND amount
  Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8MT.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8MT.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8MT.m	(revision 636)
@@ -1,4 +1,4 @@
-PRS8MT ;HISC/MRL-DECOMPOSITION, MEALTIME ;02/21/08
- ;;4.0;PAID;**2,40,69,102,109,112,116**;Sep 21, 1995;Build 23
+PRS8MT ;HISC/MRL-DECOMPOSITION, MEALTIME ;11/22/06
+ ;;4.0;PAID;**2,40,69,102,109**;Sep 21, 1995;Build 5
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -32,8 +32,4 @@
 GETY ; --- this is where Y (placement of mealtime) is defined
  S X=$E(D,V(1),V(2)),D1=$E(D1,V(1),V(2))
- N ORIGX,RECESS
- S ORIGX=X ; Original copy of codes in X and
- S RECESS=DAY(MDY,"r")_$G(DAY(MDY,"rN"))
- S RECESS=$E(RECESS,V(1),V(2)) ; load any Recess
  I X["5" D
  . N DAYP
@@ -48,17 +44,13 @@
  .S Y=$E(X,M)
  .I "1235C"[Y,"1235C"[X1 Q  ; scheduled work time
- .I "4OC"[Y,$E(RECESS,M)="r" S Q=0 Q  ; Work performed while on Recess (9mo AWS)
  .I Y'="O",Y'=X1 S Q=0 Q  ; not same type of time, and non-OT
- .I Y="O",($E(DAY($S(V(1)+M-1<97:MDY,1:MDY+1),"HOL"),$S(V(1)+M-1<97:V(1)+M-1,1:V(1)+M-1-96))'=2) S Q=0 Q  ; OT indicating non-holiday worked gets no meal
- .I Y="O",($E(DAY($S(V(1)+M-1<97:MDY,1:MDY+1),"HOL"),$S(V(1)+M-1<97:V(1)+M-1,1:V(1)+M-1-96))=2),"123C"[X1 S Q=0 Q  ; OT indicating holiday worked and Excused.
+ .I Y="O",($E(DAY($S(V(1)+M-1<97:MDY,1:MDY+1),"HOL"),$S(V(1)+M-1<97:V(1)+M-1,1:V(1)+M-1-96))'=2) S Q=0 Q  ; OT indicatin' non-holiday worked gets no meal
+ .I Y="O",($E(DAY($S(V(1)+M-1<97:MDY,1:MDY+1),"HOL"),$S(V(1)+M-1<97:V(1)+M-1,1:V(1)+M-1-96))=2),"123C"[X1 S Q=0 Q  ; OT indicatin holiday worked and Excused.
  .Q
  I X["0" D
- .I RECESS'["r" S SPL=$TR(X,"1235"),SPLX=$TR(X,SPL,$TR($J("",$L(SPL))," "))
- .I RECESS["r" S SPL=$TR(X,"01235"),SPLX=$TR(X,SPL,$TR($J("",$L(SPL))," "))
+ .S SPL=$TR(X,"1235"),SPLX=$TR(X,SPL,$TR($J("",$L(SPL))," "))
  .I SPLX="" S Q=1
- ;
- K M
- ;--- one activity for entire tour
- I Q S Q=0 D  F M=1:1:MT S M(M)=Y+M-1
+ ; --- one activity for entire tour
+ K M I Q S Q=0 D  F M=1:1:MT S M(M)=Y+M-1
  .I V(1)>24,V(2)<73 S Y=MID Q  ;no premium time involved/ meal in middle
  .S Q=0 D  ;check for all premium
@@ -78,65 +70,34 @@
  ; --- multiple activities per tour
  E  D
- .S Z=$TR(X,"1235"),X=$TR(X,Z,$TR($J("",$L(Z))," ","0"))
- .;
- .; if leave posted > or = to tour length + mt (ie didn't post around 
- .; lunch) it was resulting in OT (ZRIK strips HOL, OC, & no tour time)
- .;
- .S ZRIK=$TR(Z,"HC0")
- .I MT>0,$L(ZRIK)'<(($P(DAY(DAY,0),"^",8)*4)+MT) S X="",$P(X,"1",$L(ZRIK)+1)=""
- .Q:X?1"0"."0"&(RECESS'["r")
- .S M=0 F A=1,2 Q:M=MT  F B=MID,MID+1,MID-1:-1:V(1),MID+2:1:V(2) D  Q:M=MT
- ..Q:'$E(X,B-V(1)+1)
- ..I A=1,PM,B<25!(B>72&(B<121)) S M=M+1,M(M)=B
- ..I A=1,'PM,B>24&(B<73)!(B>120) S M=M+1,M(M)=B
- ..I A=2 S M=M+1,M(M)=B
- ..Q
- .Q
+ .  S Z=$TR(X,"1235"),X=$TR(X,Z,$TR($J("",$L(Z))," ","0"))
+ .  S ZRIK=$TR(Z,"HC") I MT>0,$L(ZRIK)'<(($P(DAY(DAY,0),"^",8)*4)+MT) S X="",$P(X,"1",$L(ZRIK)+1)="" ;if leave posted > or = to tour length + mt (ie didn't post around lunch) it was resulting in OT (ZRIK strips HOL & OC)
+ .  Q:X?1"0"."0"
+ .  S M=0 F A=1,2 Q:M=MT  F B=MID,MID+1,MID-1:-1:V(1),MID+2:1:V(2) D  Q:M=MT
+ .  .  Q:'$E(X,B-V(1)+1)
+ .  .  I A=1,PM,B<25!(B>72&(B<121)) S M=M+1,M(M)=B
+ .  .  I A=1,'PM,B>24&(B<73)!(B>120) S M=M+1,M(M)=B
+ .  .  I A=2 S M=M+1,M(M)=B
+ .  .  Q
+ .  Q
  Q:'$O(M(0))
 Y ; --- this is where meals get placed in string
  F Y=0:0 S Y=$O(M(Y)) Q:Y'>0  D
  . N ORIGAC ; original activity code
- . S M=M(Y),(X,ORIGAC)=$E(D,M),X=$S(X="J":"A",X=5:$E(DAY(MDY,"P"),M),1:X)
- . ; If a 9mo AWS works during Recess don't place meal over that type of time
- . I +NAWS=9 D  ; 9mo AWS nurses
- . . ; If extra work (UN,OT,CT) was posted over the entire tour including the meal time
- . . ; don't include meal time in the W node or you will reduce the extra work count.
- . . ; Set X=0 to reduce the Recess count below.
- . . I "4OEC"[ORIGAC&($L(ORIGX)=$L($TR(ORIGX,"1235"))) S X=0 Q
- . . ;
- . . ; If extra work posted over tour time that wasn't covered by Recess it will
- . . ; be stored in the r node.  If this time exists, add that time back into the 
- . . ; W node instead of the meal time.
- . . I "1235"[ORIGAC,"4OEC"[$E(RECESS,M-V(1)+1) D  Q
- . . . S D=$E(D,0,M-1)_$E(RECESS,M-V(1)+1)_$E(D,M+1,999)
- . . . S ORIGX=$E(ORIGX,1,M-V(1)-1)_$E(RECESS,M-V(1)+1)_$E(ORIGX,M-V(1)+2,999)
- . . ;
- . . ; For everything else, update D and ORIGX
- . . S D=$E(D,0,M-1)_"m"_$E(D,M+1,999)
- . . S ORIGX=$E(ORIGX,M-V(1)-1)_"m"_$E(ORIGX,M-V(1)+2,999)
- . ;
- . ; All employees other than 9mo AWS
- . I +NAWS'=9 S D=$E(D,0,M-1)_"m"_$E(D,M+1,999)
- . ;
- . ; The following line has been updated to include a check for Recess as the 48th piece.
- . ; Recess will be designated as a zero (0). 
- . S X=$S(X'="M":$F("LSWnAR*U************************V********YXFGD*0",X)-1,1:5)
- . ;
- . ; Firefighter checks
- . I "Ff"[TYP,NH'=480!(NH(1)'=NH(2)) S X=32
- . ;I X'=4,CYA2806>0 S CYA2806=CYA2806-1 ; << ADDED-> DROP LUNCH FROM CY ALSO>>
- . Q:X'>0
- . Q:MDY=0&(M(Y)<96)!(MDY=14&(M(Y)>97))
- . S W=$S(MDY<8:1,1:2) I MDY=7&(M(Y)>96) S W=2
- . I $P(WK(W),"^",+X)>0 S $P(WK(W),"^",+X)=$P(WK(W),"^",+X)-1 ;subtract
- . ;
- . ; If Military Leave subtract the mealtime out of the WK(3) array.
- . I ORIGAC="M",$P(WK(3),U,11)>0 S $P(WK(3),U,11)=$P(WK(3),U,11)-1
- . ;I WPCYA>0 S WPCYA=WPCYA-1 ;lunch from total << AND FROM CA TOTAL >>
+ .  S M=M(Y),(X,ORIGAC)=$E(D,M),X=$S(X="J":"A",X=5:$E(DAY(MDY,"P"),M),1:X),D=$E(D,0,M-1)_"m"_$E(D,M+1,999)
+ .  S X=$S(X'="M":$F("LSWnAR*U************************V********YXFGD",X)-1,1:5)
+ .  I "Ff"[TYP,NH'=480!(NH(1)'=NH(2)) S X=32
+ .  ;I X'=4,CYA2806>0 S CYA2806=CYA2806-1 ; << ADDED-> DROP LUNCH FROM CY ALSO>>
+ .  Q:X'>0
+ .  Q:MDY=0&(M(Y)<96)!(MDY=14&(M(Y)>97))
+ .  S W=$S(MDY<8:1,1:2) I MDY=7&(M(Y)>96) S W=2
+ .  I $P(WK(W),"^",+X)>0 S $P(WK(W),"^",+X)=$P(WK(W),"^",+X)-1 ;subtract
+ .  ; If Military Leave subtract the mealtime out of the WK(3) array.
+ .  I ORIGAC="M",$P(WK(3),U,11)>0 S $P(WK(3),U,11)=$P(WK(3),U,11)-1
+ .  ;I WPCYA>0 S WPCYA=WPCYA-1 ;lunch from total << AND FROM CA TOTAL >>
  . ; PRS*4*40 added 8 (U), 44 (F), 45 (G), 46 (D) to following line
  . ; because PRS8AC also increments LU for those types of time
- . I +X,"^1^2^6^8^44^45^46^"[("^"_+X_"^") S LU=LU-1 ;reduce leave used
- . I +X,"^3^"[("^"_+X_"^"),"P"[TYP S TH=TH+1,TH(W)=TH(W)+1
- . Q
+ .  I +X,"^1^2^6^8^44^45^46^"[("^"_+X_"^") S LU=LU-1 ;reduce leave used
+ .  I +X,"^3^"[("^"_+X_"^"),"P"[TYP S TH=TH+1,TH(W)=TH(W)+1
+ .   Q
  S DAY(MDY,"W")=$E(D,1,96)
  S X=$E(D,97,999) I $L(X) D
Index: FOIAVistA/tag/r/PAID-PRS/PRS8OC.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8OC.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8OC.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8OC ;HISC/MGD-DECOMPOSITION, ON-CALL ;02/27/07
- ;;4.0;PAID;**63,92,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8OC ;HISC/MGD-DECOMPOSITION, ON-CALL ;02/17/04
+ ;;4.0;PAID;**63,92**;Sep 21, 1995         
  ;
  ;The following MUMPS code is used to credit the appropriate
@@ -34,7 +33,5 @@
 OCS ; --- set On-Call minimum hours
  ;set YA/YE for PPI="W" or "V" else set OT
- I +NAWS=0 S Y=$S(CC:7,'DOUB:TOUR+19,1:23)
- I +NAWS S Y=$S(CC:7,1:TOUR+19)
- ;
+ S Y=$S(CC:7,'DOUB:TOUR+19,1:23)
  N X,Z,DD,TT,CCCNT,NEXTT,OCCNT,TIMECNT
  S TT=$S(T>96:T-96,1:T),TIMECNT=0
@@ -83,6 +80,5 @@
  ..I OC+CNTR'>8 D
  ...S Y(1)=$S(X=1:OC,1:8-CNTR)
- ...I +NAWS=0 D CHOL ; Process everyone but AWS nurses
- ...I +NAWS D CHOL1 ; Process AWS nurses
+ ...D CHOL
  ...S (OC,OC(D),CC,CC(D))=0,FG=1
  ..Q
@@ -98,6 +94,5 @@
  ..I OC+CNTR'>8 D
  ...S Y(1)=$S(X=1:OC,1:8-CNTR)
- ...I +NAWS=0 D CHOL ; Process everyone but AWS nurses
- ...I +NAWS D CHOL1 ; Process AWS nurses
+ ...D CHOL
  ...S (OC,OC(D),CC,CC(D))=0,FG=1
  ..Q
@@ -118,10 +113,8 @@
  ...;
  ..S Y(1)=$S(X=2:CC(I)+CCCNT,X:CC(I),OC(I)>7:CC(I),1:4),Y=7
- ..I +NAWS=0 D CHOL ; Process everyone but AWS nurses
- ..I +NAWS D CHOL1 ; Process AWS nurses
+ ..D CHOL
  ..S Y(1)=$S(X=2:OC(I)-CC(I)+OCCNT,X:OC(I)-CC(I),OC(I)>7:OC(I)-CC(I),1:4)
  ..S Y=$S('DOUB:TOUR+19,1:23)
- ..I +NAWS=0 D CHOL ; Process everyone but AWS nurses
- ..I +NAWS D CHOL1 ; Process AWS nurses
+ ..D CHOL
  ..Q
  .Q
@@ -132,6 +125,5 @@
  ...I T=96,"ct"'[$E(DAY(DAY+1,"W"),1) S OC(I)=8-TIMECNT
  ..S Y(1)=$S(X:OC(I),OC(I)>7:OC(I),1:8)
- ..I +NAWS=0 D CHOL ; Process everyone but AWS nurses
- ..I +NAWS D CHOL1 ; Process AWS nurses
+ ..D CHOL
  ..Q
  .Q
@@ -155,31 +147,2 @@
  E  S $P(WK(W),"^",Y)=$P(WK(W),"^",Y)+Y(1)
  Q
- ;
-CHOL1 ; Checks for AWS nurses
- N HT,J,K,T2ADD
- S K=0,TMP=Y,Y=0
- S T2ADD=$S(CC:Y(1)-CC,1:Y(1)-OC-CC)
- ; Apply normal checks for OT on Hol and Hol Callback
- I TMP'=7,$E(ENT,25),$$HOLIDAY^PRS8UT(PY,DFN,+D) S Y=24 ;ot on actual hol
- I 'Y,$E($G(DAY(I,"HOL")),$S(T>96:(T-96),1:T)) S Y=TOUR+28 ;holiday callback
- I 'Y S Y=TMP
- I Y=24!(Y=(TOUR+28)) D SET Q
- ; If not OT on Hol or Hol Callback Determine if we are setting OT or CT
- S K=$S(Y=7:CC,1:OC)
- F J=1:1:K D AWSWK ; Update actual time worked
- F J=1:1:T2ADD D AWSWK ; Update time added to reach 2 hour min
- Q
- ;
-AWSWK ; Determine what type of time to add based on 8/day and 40/wk
- S HT=+$G(^TMP($J,"PRS8",D,"HT"))
- I HT'<32 S Y=$S(Y'=7:TOUR+15,1:Y) D SET1 Q
- I TH(W)'<160 S Y=$S(Y'=7:TOUR+19,1:Y) D SET1 Q
- I HT<32,TH(W)<160 S Y=9 D SET1
- Q
- ;
-SET1 ; Set WK array for AWS nurses
- S $P(WK(W),"^",Y)=$P(WK(W),"^",Y)+1
- Q:HT'<32
- S TH=TH+1,TH(WK)=TH(WK)+1
- S ^TMP($J,"PRS8",DAY,"HT")=HT+1
- Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8PP.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8PP.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8PP.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8PP ;HISC/MRL,WIRMFO/MGD-DECOMP, PREMIUM PAYS ;05/10/07
- ;;4.0;PAID;**22,40,75,92,96,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8PP ;HISC/MRL,WIRMFO/MGD-DECOMP, PREMIUM PAYS ;02/27/04
+ ;;4.0;PAID;**22,40,75,92,96**;Sep 21, 1995
  ;
  ;This routine is the entry point for determining certain premium
@@ -98,25 +97,12 @@
  . . S DAT=$G(^TMP($J,"PRS8",DAYN,2)) D  Q:FND
  . . . ; loop thru tour segments in exceptions
- . . . F TS=1:1:7 Q:$P(DAT,U,(TS-1)*4+1)=""  D  Q:FND
+ . . . F TS=1:1:7 Q:$P(DAT,U,(TS-1)*3+1)=""  D  Q:FND
  . . . . ; check if time contained in exception segment
- . . . . I M1'<$P(DAT,U,(TS-1)*4+1),M1'>$P(DAT,U,(TS-1)*4+2) D
- . . . . . S TOT=$P(DAT,U,(TS-1)*4+3)
- . . . . . ; On-Call and Recess are the only types of exceptions
- . . . . . ; where OT, CT and RG can be posted for the same 15 minute
- . . . . . ; segment of time, so don't stop searching if you find these.
- . . . . . I TOT="ON"!(TOT="RS") S TOT="" Q
- . . . . . S FND=1,SC=$P(DAT,U,(TS-1)*4+4)
- . . . . . Q
- . Q:TOT="OT"&("^11^12^17^"'[(U_SC_U))  ; Pre-Scheduled & Tour Coverage & OT/CT With Premiums
- . Q:TOT="CT"&("^12^17^"'[(U_SC_U))     ; Tour Coverage & OT/CT With Premiums
- . ; Code 17 - OT/CT with premiums only get ND for 6p-6a
- . Q:TOT="OT"!(TOT="CT")!(TOT="RG")&(SC=17)&((M'<25)&(M'>72))
- . Q:TOT="RG"&(SC'=7)&(SC'=17)          ; Shift Coverage & OT/CT With Premiums
- . S X=10
- . ; for 36/40 AWS, premium time resulting from their tour 
- . ; will be mapped to Night Differential-AWS (ND/NU) and
- . ; Paid at the AAC with the 1872 divisor for the hourly rate (36*52)
- . I +NAWS=36,("OEc"'[VAL!(TOT="HW")) S X=51
- . D SET
+ . . . . I M1'<$P(DAT,U,(TS-1)*3+1),M1'>$P(DAT,U,(TS-1)*3+2) D
+ . . . . . S FND=1,TOT=$P(DAT,U,(TS-1)*3+3),SC=$P(DAT,U,(TS-1)*3+4)
+ . Q:TOT="OT"&("^11^12^"'[(U_SC_U))  ; Pre-Scheduled & Tour Coverage
+ . Q:TOT="CT"&(SC'=12)               ; Tour Coverage
+ . Q:TOT="RG"&(SC'=7)                ; Shift Coverage
+ . S X=10 D SET
  . ; keep leave count since it may need to be backed out by PRS8MSC0
  . I "LSRUFGD"[VAL S WKL(WK)=WKL(WK)+1
@@ -157,13 +143,5 @@
  . . ; grant ND (unless meal-time, etc.), keep count of leave since it
  . . ;   may need to be backed out by PRS8MSC0
- . . I AV[$E(D,J) D
- . . . S X=10
- . . . ; For 36/46 AWS nurses ND for Holiday Worked (HA/HL) and normal
- . . . ; tour time will be reported as Night Differential-AWS (ND/NU)
- . . . I +NAWS=36 D
- . . . . I $E(DAY(DAY,"HOL"),J)=2 S X=51 Q  ; Holiday Worked
- . . . . I "OEc"'[VAL S X=51 ; Tour time
- . . . D SET
- . . . S:"LSRUFGD"[$E(D,J) WKL(WK)=WKL(WK)+1
+ . . I AV[$E(D,J) S X=10 D SET S:"LSRUFGD"[$E(D,J) WKL(WK)=WKL(WK)+1
  ;
  Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8ST.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8ST.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8ST.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8ST ;HISC/MGD-DECOMPOSITION, START-UP ;05/09/07
- ;;4.0;PAID;**45,92,102,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8ST ;HISC/MGD-DECOMPOSITION, START-UP ;12/12/05
+ ;;4.0;PAID;**45,92,102**;Sep 21, 1995
  ;
  ;This routine is the one which actually gets everything moving.
@@ -15,5 +14,5 @@
  .S LP=$S(DAY=1:"0,1,2",1:(DAY+1)),JURY=0
  .F II=1:1 S DY=$P(LP,",",II) Q:DY=""  D
- ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W","r" D
+ ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W" D
  ...S DAY(DY,J)=$G(^TMP($J,"PRS8",DY,J))
  ...;
@@ -26,11 +25,9 @@
  ..S WK=$S(DY<8:1,1:2)
  ..S TOUR=$S(TYP'["W":1,+DAY(DY,"TOUR"):+DAY(DY,"TOUR"),1:+TOUR(WK))
- ..D MOVE^PRS8AC
- ..S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
+ ..D MOVE^PRS8AC S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
  ..I N["UN" S X1="UN" D 2 ;unavailable
  ..I N["HX" S X1="HX" D 2 ;holiday excused
  ..I N["ON" S X1="ON" D 2 ;on-call
  ..I N["SB" S X1="SB" D 2 ;standby
- ..; Process the scheduled tours
  ..S N=DAY(DY,1),DH=DAY(DY,"DH1"),NN=1 D  I DAY(DY,"TWO") S N=DAY(DY,4),DH=DAY(DY,"DH2"),NN=4 D
  ...S QT=0 F PRS8=1:3 S V=$P(N,"^",PRS8,PRS8+2) Q:QT  D
@@ -51,31 +48,12 @@
  .....F J=4,8,12,16,20,24,28 S:$P(JURY,"^",J)=6 JURY=1 Q
  ....D ^PRS8AC ;build "W" node
- ..; Process the exceptions
  ..S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
- ..S QT=0
- ..; If there are Recess exceptions, process them first
- ..I N["RS" D
- ...; Since Recess will reduce hours worked in the week add P to TYP
- ...I TYP'["P" S TYP=TYP_"P"
- ...F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
- ....Q:$P(V,"^",3)='"RS"
- ....I TYP["D",$P(V,"^",3)="" S QT=1 Q  ;doctor
- ....I TYP'["D",'+V,$P(V,"^",3)="" S QT=1 Q  ;all others
- ....S X=$P(V,"^",3)
- ....I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
- ...;
- ...; Process all other types of exceptions
- ..S QT=0
- ..F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
- ...Q:$P(V,"^",3)="RS"
+ ..S QT=0 F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
  ...I TYP["D",$P(V,"^",3)="" S QT=1 Q  ;doctor
  ...I TYP'["D",'+V,$P(V,"^",3)="" S QT=1 Q  ;all others
- ...S X=$P(V,"^",3)
- ...I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
- ..;
+ ...S X=$P(V,"^",3) I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
  ..S ^TMP($J,"PRS8",DY,"W")=DAY(DY,"W") ;save in ^TMP
  ..S ^TMP($J,"PRS8",DY,"P")=DAY(DY,"P") ;save non-prem ot in ^TMP
  ..S ^TMP($J,"PRS8",DY,"HOL")=DAY(DY,"HOL") ;holiday
- ..S ^TMP($J,"PRS8",DY,"r")=DAY(DY,"r") ; Recess for 9mo AWS nurse
  .S WK=$S(DAY<8:1,1:2),OFF=+DAY(DAY,"OFF") ;week/day off
  .S TOUR=$S(TYP'["W":1,+DAY(DAY,"TOUR"):+DAY(DAY,"TOUR"),1:+TOUR(WK))
@@ -86,17 +64,10 @@
  .Q
  ;
- ;make DAY array available for prior, current, and next day
  F DAY=1:1:14 D
- .; I AWS Nurse check to see if hour counts need to be adjusted
- .S WK=$S(DAY<8:1,1:2)
- .; For each week, TYP should not contain "P" unless:
- .; 36/40 AWS has NP or WP
- .;   9mo AWS has Recess
- .I +NAWS,(DAY=1!(DAY=8)) S TYP=$TR(TYP,"P","") D NAWS
- .;
+ .;make DAY array available for prior, current, and next day
  .K DAY(DAY-2)
  .S LP=$S(DAY=1:"0,1,2",1:(DAY+1))
  .F II=1:1 S DY=$P(LP,",",II) Q:DY=""  D
- ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W","F","r" S DAY(DY,J)=$G(^TMP($J,"PRS8",DY,J))
+ ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W","F" S DAY(DY,J)=$G(^TMP($J,"PRS8",DY,J))
  .;
  .S WK=$S(DAY<8:1,1:2),OFF=+DAY(DAY,"OFF") ;week/day off
@@ -104,5 +75,5 @@
  .;
  .I ((TYP["I")!(TYP["P")),DAY>0,DAY<15 D  ;FOR CY
- ..I $S('CYA:1,DAY<CYA:1,1:0) Q  ;quit if no calendar year adjustment
+ ..I $S('CYA:1,DAY<CYA:1,1:0) Q  ;quit if no calander year adjustment
  ..S IIX=0 I $E(ENT,2)'="D" F II=1:1:$L(DAY(DAY,"W")) D
  ...I "4E"[$E(DAY(DAY,"W"),II) S IIX=IIX+1
@@ -119,5 +90,5 @@
  ...I T=96!("BbCct"'[$E(DAY(DAY,"W"),T+1)) S OK=T
  ...I DOUB D ^PRS8OC,^PRS8SB Q  ;Prem. Pay of "W" or "V"
- ...I VAR1'=""&("Cct"[VAR1) D ^PRS8OC Q  ;compute on-call/2hr minimum
+ ...I VAR1'=""&("Cct"[VAR1) D ^PRS8OC Q  ;compte on-call/2hr minimum
  ...I "Bb"[VAR1 D ^PRS8SB ;standby
  .I $G(SBY) D UP^PRS8SB
@@ -141,5 +112,5 @@
  I '$E(ENT,$P("12^28^^29^26^^^29","^",+X)) S Q=1 ;entitlement string
  ;PATCH 45: ADD CHECK FOR FIRE FIGHTER ADDITIONAL HOURS
- ;SINCE THIS TYPE OF TIME IS NOT IN THE ENTITLEMENT TABLE
+ ;SINCE THIS TYPE OF TIME IS NOT IN THE ENTITLMENT TABLE
  ;IT IS SET UP WITH TOUR IND. WITH CODE 9
  I "Ff"[TYP,X=9 S Q=0
@@ -150,29 +121,3 @@
  F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+2) Q:$P(V,"^",1)=""  D
  .S X=$P(V,"^",3) I X=X1 D ^PRS8EX
- K PRS8,X,V
- Q
- ;
-NAWS ; NAWS Nurse Alternate Work Schedules
- ; If any NP or WP has been incurred for a nurse on the 36/40 AWS,
- ; adjust their hours worked counts.  40 hrs/wk will now be used to 
- ; determine their qualification for OT and CT.  Check piece 16 of
- ; 0 node as NH will have been updated to 320 in PRS8SU.
- ;
- I +NAWS=36 D
- .Q:$P(WK(WK),U,3)=""&($P(WK(WK),U,4)="")
- .S TH(WK)=144-($P(WK(WK),U,3)+$P(WK(WK),U,4)) ; Adjust Total Hours per week
- .S TH=TH(1)+TH(2) ; Adjust Total Hours per pay period
- .S NH(WK)=144,NH=288 ; Adjust Normal Hours
- .I TYP'["P" S TYP=TYP_"P" ; Make them into a PT employee
- .S $E(ENT,2)=1 ; Make employee eligible for UN/US
- ;
- ; If any Recess has occurred for a nurse on the 9month AWS, adjust 
- ; their hours worked counts.  These employees will be treated as PT
- ; in determining the eligibility for OT/CT.
- ;
- I +NAWS=9 D
- .Q:$P(WK(WK),U,48)=""
- .S TH(WK)=TH(WK)-$P(WK(WK),U,48) ; Adjust total hours per week
- .S TH=TH(1)+TH(2) ; Adjust Total Hours
- .I TYP'["P" S TYP=TYP_"P" ; Adjust TYP to represent a PT employee
- Q
+ K PRS8,X,V Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8SU.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8SU.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8SU.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8SU ;HISC/MRL-DECOMPOSITION, SET-UP ;02/20/08
- ;;4.0;PAID;**112,116**;Sep 21, 1995;Build 23
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8SU ;HISC/MRL-DECOMPOSITION, SET-UP ;7/15/93  10:40
+ ;;4.0;PAID;;Sep 21, 1995
  ;
  ;This routine sets up various data elements required to process
@@ -8,5 +7,5 @@
  ;holiday information, etc.  All times are converted to 15-minute
  ;increments in this routine (the number of 15-minute increments
- ;into the day).  Additionally, the credit tour for WG
+ ;into the day).  Additionally, the credity tour for WG
  ;employees is determined in this routine.
  ;
@@ -36,5 +35,5 @@
  ....S FLAG=1 I N=2&(K1=1)&("^HW^"[("^"_$P(Z,"^",K+2)_"^")) S FLAG=$S(NDAY=1!(LAST>96)&("^HW^"[("^"_$P(Z,"^",K+2)_"^"))&((X["A")!(X["MID")):0,1:1),NDAY=0
  ....S:$P(D(0),"^",14)'=""&(X="MID")&(LAST=96)&(N=2)&(K1=1) FLAG=0 S:N=2&(K1=1)&(FLAG=1) (NDAY,LAST)=0 S Y=K1-1 D 15
- ....I N=2,"^RG^OT^CT^ON^SB^"'[("^"_$P(Z,"^",K+2)_"^") D
+ ....I N=2,"^RG^OT^CT^ON^SB^HW^"'[("^"_$P(Z,"^",K+2)_"^") D
  .....S Y=+$O(DADRFM("S",(-X-.01))),Y1=+$O(DADRFM("F",(X-.01)))
  .....I $G(DADRFM("S",Y))'=$G(DADRFM("F",Y1)) S X=X+96
@@ -63,5 +62,4 @@
  .S X="HOL" D SET ;save holiday string
  .S X="P" D SET ;premium node
- .S X="r" D SET ;Recess node
  .S X=D(0),OFF=0 I $P(X,"^",2)=1 S OFF=1 ;day off
  .S Z=OFF,X="OFF" D SET
@@ -81,8 +79,4 @@
  I TYP["B" S NH=320,(NH(1),NH(2))=160,TH=192,(TH(1),TH(2))=96 ; Baylor NH=40 hrs to mimic full time, TH = 24 hrs for reality
  E  S TH=NH,TH(1)=NH(1),TH(2)=NH(2) ;total hrs for pp
- ; 
- ; Update NH for the nurses on the 36/40 AWS
- I "KM"[$E(AC,1),$E(AC,2)=1,NH=288 S NH=320,(NH(1),NH(2))=160,TH=320,(TH(1),TH(2))=160
- ;
  I TYP["W",L>1 S $P(WK(3),"^",3)=L ;last tour (IN) in misc for WG
  S VALOLD=$G(^PRST(458,+PY,"E",+DFN,5)) ;existing decomp
@@ -93,5 +87,5 @@
  ;
  ; Need to conditionally set Y $S(Y=0 mid=00:00, y=1: mid=24:00)
- ; based on whether exception is within or outside the tour.
+ ; based on whether exception is within or outsided tour.
  D MIL^PRSATIM ;convert to military (24hr) time
  I +Y<1000 S Y=$E("0000",0,4-$L(Y))_Y
Index: FOIAVistA/tag/r/PAID-PRS/PRS8VW.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8VW.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8VW.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8VW ;HISC/MRL-DECOMPOSITION, VIEW RESULTS ;03/22/07
- ;;4.0;PAID;**2,6,27,45,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8VW ;HISC/MRL-DECOMPOSITION, VIEW RESULTS ;11/4/97
+ ;;4.0;PAID;**2,6,27,45**;Sep 21, 1995
  ;
  ;This routine is used to view the results of the decomposition.
@@ -11,6 +10,4 @@
  ;Called by Routines:  PRS8, PRS8DR
  S (NEW,VAL)=$G(VAL),(OLD,VALOLD)=$G(VALOLD)
- N DASH1,DASH2
- S $P(DASH1,"-",79)="-",$P(DASH2,"=",79)="="
  I +$E(NEW,2,4) S NEW=$E(VAL,33,999) ; 33rd position because CP field
  I +$E(OLD,2,4) S OLD=$E(VALOLD,33,999) ;is added(either "C","F"or" ")
@@ -26,5 +23,5 @@
  S X="Pay Period: "_(^PRST(458,+PY,0)) W ?(79-$L(X)),$P(X,"^",1)
  D CTID
- W !,DASH2
+ W ! F I=1:1:79 W "="
  W !,"Loc.",?10,"Data Element",?44,"Code",?52,"Old Value",?67,"New Value"
  W !,"----",?10,"------------",?44,"----",?52,"---------",?67,"---------"
@@ -33,11 +30,9 @@
  D STUB
  I "C"'[$E(IOST) D
- .W !,DASH1
+ .W ! F I=1:1:79 W "-"
  .W !,TR
  D ONE^PRS8CV,^%ZISC Q
  ;
 CERT ; entry point to show supervisor result of decomp before certifying
- N DASH1,DASH2
- S $P(DASH1,"-",79)="-",$P(DASH2,"=",79)="="
  S (NEW,VAL)=$G(VAL)
  I +$E(NEW,2,4) S NEW=$E(VAL,33,999) ;because CP field is added to STUB
@@ -51,18 +46,18 @@
  .S X="Run Date: "_Y,TR=$E(TR,1,(79-$L(X)))_X
  S H="PAY PERIOD SUMMARY" W !,$J(H,40+($L(H)/2)),!
- S X=$P(C0,"^",1)_" [SSN: "_$E($P(C0,"^",9))_"XXXX"_$E($P(C0,"^",9),6,9)_"]" W !,X
+ S X=$P(C0,"^",1)_" [SSN: "_$P(C0,"^",9)_"]" W !,X
  S X="Pay Period: "_(^PRST(458,+PY,0)) W ?(79-$L(X)),$P(X,"^",1)
  D CTID
- W !,DASH2
+ W ! F I=1:1:79 W "="
  W !
  K I,L,X,USED
  D ^PRS8VW2
  I "C"'[$E(IOST) D
- .W !,DASH1
+ .W ! F I=1:1:79 W "-"
  .W !,TR
  K H,R,Z Q
 E2 ; --- create E array
- S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEAEBTATCFAFCADNTRSSRSDND"
- S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSECEDTBTDFBFDAFNHRNSSSHNU"
+ S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEAEBTATCFAFCADNT"
+ S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSECEDTBTDFBFDAFNH"
  S E(3)="NLDWMLCAPCCYFE" Q
 STUB ; --- show stub record
@@ -74,6 +69,6 @@
  ;
 E ; --- create E array
- S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEAEBTATCFAFCADNTRSSRSDND"
- S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSECEDTBTDFBFDAFNHRNSSSHNU"
+ S E(1)="ANSKWDNOAURTCECUUNNANBSPSASBSCDADBDCTFOAOBOCYAOKOMRARBRCHAHBHCPTPAONYDHDVCEAEBTATCFAFCADNT"
+ S E(2)="ALSLWPNPABRLCTCOUSNRNSSQSESFSGDEDFDGTGOEOFOGYEOSOURERFRGHLHMHNPHPBCLYHHOVSECEDTBTDFBFDAFNH"
  S E(3)="NLDWINTLLULNLDDTTOLAMLCAPCCYRRFFFECD" Q
 CTID ; compressed tour indicator display
Index: FOIAVistA/tag/r/PAID-PRS/PRS8VW1.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8VW1.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8VW1.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8VW1 ;HISC/MRL-DECOMPOSITION, VIEW RESULTS, CONT. ;01/23/07
- ;;4.0;PAID;**6,35,45,69,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8VW1 ;HISC/MRL-DECOMPOSITION, VIEW RESULTS, CONT. ;8/23/01
+ ;;4.0;PAID;**6,35,45,69**;Sep 21, 1995
  ;
  ;This routine is used to view the results of the decomposition.
@@ -18,5 +17,5 @@
  S E=E(3),W="Misc",LOC=0 D SHOW
  I 'CHECK,"C"'[$E(IOST) D
- .W !,DASH1
+ .W ! F I=1:1:79 W "-"
  .W !,TR
  K %,CHECK,D,E,I,L,LOC,USED,W,X,Y Q
@@ -31,5 +30,5 @@
  ..S FOUND(LOC(1))=$G(FOUND(LOC(1)))
  ..S $P(FOUND(LOC(1)),"^",$S(LOC<2:1,1:4))=X
- .S Y=$P($T(@($E(X)_"^PRS8VW2")),";;",2)
+ .S Y=$P($T(@$E(X)),";;",2)
  .S Y(1)=$F(Y,$E(X,2)_":")
  .S Y=$P($E(Y,Y(1),999),":",1,2)
@@ -55,2 +54,34 @@
  I 'S,LOC'=1 K FOUND(LOC(1))
  Q
+ ;
+ ; This internal table stores types of time codes and their
+ ; corresponding descriptions and TT8B value field lengths. Each
+ ; single char line label below is the 1st char of a type of time code.
+ ; The text on the corresponding line contains '^' delimited
+ ; pieces.  The 1st char of those pieces is the 2nd char of a type of
+ ; time.  The text description for that time code is given by the
+ ; the number in the 2nd ':' delimited piece.  That number indicates 
+ ; the line number below the label TYP in routine PRS8VW2.  The 3rd 
+ ; ':' delimited piece is the length of the time code's value in the 
+ ; TT8B String. 
+ ;
+A ;;N:1:3^U:5:3^L:1:3^B:5:3^D:63:3^F:63:3
+C ;;E:7:3^U:8:3^T:7:3^O:8:3^L:34:4^A:55:4^Y:57:3^D:60:6
+D ;;A:16:3^B:17:3^C:18:3^E:16:3^F:17:3^G:18:3^W:45:2^T:48:6
+E ;;A:38:5^B:40:5^C:38:5^D:40:5
+F ;;F:59:4^A:61:3^B:61:3^C:62:3^D:62:3^E:64:6
+H ;;A:29:3^B:30:3^C:31:3^L:29:3^M:30:3^N:31:3^D:36:3^O:36:3
+I ;;N:46:1
+L ;;U:48:4^N:49:4^D:50:4^A:53:1
+M ;;L:54:4
+N ;;O:4:3^A:10:3^B:11:3^P:4:3^R:10:3^S:11:3^L:44:2^T:65:3^H:65:3
+O ;;A:20:3^B:21:3^C:22:3^K:24:3^M:25:3^N:34:4^E:20:3^F:21:3^G:22:3^S:24:3^U:25:3
+P ;;T:32:3^A:33:3^H:32:3^B:33:3^C:56:2
+R ;;T:6:3^A:26:3^B:27:3^C:28:3^L:6:3^E:26:3^F:27:3^G:28:3^R:58:1
+S ;;K:2:3^P:12:3^A:13:3^B:14:3^C:15:3^L:2:3^Q:12:3^E:13:3^F:14:3^G:15:3
+T ;;F:19:3^A:42:3^C:43:3^G:19:3^B:42:3^D:43:3^L:47:3^O:52:1
+U ;;N:9:3^S:9:3
+V ;;C:37:6^S:37:6
+W ;;D:3:3^P:3:3
+Y ;;A:23:3^D:35:4^E:23:3^H:35:4
+ Q
Index: FOIAVistA/tag/r/PAID-PRS/PRS8VW2.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8VW2.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8VW2.m	(revision 636)
@@ -1,5 +1,4 @@
-PRS8VW2 ;HISC/MRL,RTK-DECOMPOSITION, VIEW RESULTS ;03/28/07
- ;;4.0;PAID;**6,32,34,45,69,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8VW2 ;HISC/MRL,RTK-DECOMPOSITION, VIEW RESULTS ;09/27/01
+ ;;4.0;PAID;**6,32,34,45,69**;Sep 21, 1995
  ; 
  ; This routine is used to show the results of the decomp to
@@ -17,5 +16,5 @@
  S E=E(3),W="Misc",LOC=0 D SHOW
  I 'CHECK,"C"'[$E(IOST) D
- .W !,DASH1
+ .W ! F I=1:1:79 W "-"
  .W !,TR
  K %,CHECK,D,E,I,L,LOC,USED,W,X,Y Q
@@ -48,14 +47,6 @@
  Q
  ;
- ; This internal table stores types of time codes and their
- ; corresponding descriptions and TT8B value field lengths. Each
- ; single char line label below is the 1st char of a type of time code.
- ; The text on the corresponding line contains '^' delimited
- ; pieces.  The 1st char of those pieces is the 2nd char of a type of
- ; time.  The text description for that time code is given by the
- ; the number in the 2nd ':' delimited piece.  That number indicates
- ; the line number below the label TYP in routine PRS8VW2.  The 3rd
- ; ':' delimited piece is the length of the time code's value in the
- ; TT8B String.
+ ; See description of similar table in routine PRS8VW1 for 
+ ; explanation of table below.
  ;
 A ;;N:1:3^U:5:3^L:1:3^B:5:3^D:63:3^F:63:3
@@ -65,12 +56,12 @@
 F ;;F:59:4^A:61:3^B:61:3^C:62:3^D:62:3^E:64:6
 H ;;A:29:3^B:30:3^C:31:3^L:29:3^M:30:3^N:31:3^D:36:3^O:36:3
-I ;;N:46:1
-L ;;U:48:4^N:49:4^D:50:4^A:53:1
+I ;;N:46:1       
+L ;;U:48:4^N:49:4^D:50:4^A:53:1       
 M ;;L:54:4
-N ;;O:4:3^A:10:3^B:11:3^P:4:3^R:10:3^S:11:3^L:44:2^T:65:3^H:65:3^D:69:3^U:69:3
+N ;;O:4:3^A:10:3^B:11:3^P:4:3^R:10:3^S:11:3^L:44:2^T:65:3^H:65:3
 O ;;A:20:3^B:21:3^C:22:3^K:24:3^M:25:3^N:34:4^E:20:3^F:21:3^G:22:3^S:24:3^U:25:3
 P ;;T:32:3^A:33:3^H:32:3^B:33:3^C:56:2
-R ;;T:6:3^A:26:3^B:27:3^C:28:3^L:6:3^E:26:3^F:27:3^G:28:3^R:58:1^S:66:3^N:66:3
-S ;;K:2:3^P:12:3^A:13:3^B:14:3^C:15:3^L:2:3^Q:12:3^E:13:3^F:14:3^G:15:3^R:67:3^S:67:3^D:68:3^H:68:3
+R ;;T:6:3^A:26:3^B:27:3^C:28:3^L:6:3^E:26:3^F:27:3^G:28:3^R:58:1
+S ;;K:2:3^P:12:3^A:13:3^B:14:3^C:15:3^L:2:3^Q:12:3^E:13:3^F:14:3^G:15:3
 T ;;F:19:3^A:42:3^C:43:3^G:19:3^B:42:3^D:43:3^L:47:3^O:52:1
 U ;;N:9:3^S:9:3
@@ -79,5 +70,5 @@
 Y ;;A:23:3^D:35:4^E:23:3^H:35:4
  ;
-TYP ; literal values of activities (actual name)
+TYP ; literal values of acitivites (actual name)
  ;;Annual Leave
  ;;Sick Leave
@@ -145,6 +136,2 @@
  ;;Fee Basis
  ;;Base Tour Non Pay Hours
- ;;Recess
- ;;Saturday Premium-AWS
- ;;Sunday Premium-AWS
- ;;Night Differential-AWS
Index: FOIAVistA/tag/r/PAID-PRS/PRS8WE2.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRS8WE2.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRS8WE2.m	(revision 636)
@@ -1,5 +1,5 @@
-PRS8WE2 ;WCIOFO/MGD-DECOMPOSITION, WEEKEND PREMIUM PART 2 ;3/23/07
- ;;4.0;PAID;**90,92,96,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRS8WE2 ;WCIOFO/MGD-DECOMPOSITION, WEEKEND PREMIUM PART 2 ;10/22/04
+ ;;4.0;PAID;**90,92,96**;Sep 21, 1995
+ ;
 COUNT(DAYN,SEG) ; Increase count of premium for tour
  ; input
@@ -41,7 +41,7 @@
  . . . Q:TOURS=1!(TOURS=4)  ; If on a Tour it counts as Premium
  . . . S RC=$P(TOUR,"^",POST+3)
- . . . ; Remarks Code must be OT/CT on Premium (#9), Tour Coverage (#12),
- . . . ; CB - Premium T&L (#14) or OT/CT With Premiums (#17) to qualify for Premium pay.
- . . . I "^9^12^14^17^"'[("^"_RC_"^") S NOTELG=1
+ . . . ; Remarks Code must be OT/CT on Premium (#9), Tour Coverage (#12)
+ . . . ; or CB - Premium T&L (#14) to qualify for Premium pay.
+ . . . I "^9^12^14^"'[("^"_RC_"^") S NOTELG=1
  . Q:FND
  . ;
@@ -61,7 +61,7 @@
  . . . Q:TOURS=1!(TOURS=4)  ; If on a Tour it counts as Premium
  . . . S RC=$P(TOUR,"^",POST+3)
- . . . ; Remarks Code must be OT/CT on Premium (#9), Tour Coverage (#12),
- . . . ; CB - Premium T&L (#14) or OT/CT With Premiums to qualify for premium pay.
- . . . I "^9^12^14^17^"'[("^"_RC_"^") S NOTELG=1
+ . . . ; Remarks Code must be OT/CT on Premium (#9), Tour Coverage (#12)
+ . . . ; or CB - Premium T&L (#14) to qualify for premium pay.
+ . . . I "^9^12^14^"'[("^"_RC_"^") S NOTELG=1
  ;
  I $E(H(DAYN),SEG)=1!($E(P(DAYN),SEG)=5) Q
@@ -85,8 +85,4 @@
  . . . . . . I "^2^3^"[(U_SHIFT_U) S FND=1
  ;
- ;Set shift 2 for 36/40 AWS nurses with premium time outside tour
- ;for this time segment  i.e. overtime(O), comp time(C) or called in from
- ;on-call(c)
- I +NAWS=36,"cOE"[$E(D(DAYN),SEG) S SHIFT=2
  ; add to count
  S CNT(DAYN,SHIFT)=$G(CNT(DAYN,SHIFT))+1
@@ -105,9 +101,4 @@
  . . S AMT=CNT(DAYN,SHIFT)
  . . S PC=$S(TP="SAT":0,1:SHIFT)+12
- . . ;Shift 2 used for 36/40 nurses premium time within tour using the 2080 divisor (40*52).
- . . ;Saturday Premium-AWS (SR/SS) and Sunday Premium-AWS (SD/SH)
- . . ;Paid at the AAC with the 1872 divisor for the hourly rate (36*52)
- . . ;for time outside the tour.
- . . S:+NAWS=36 PC=$S(SHIFT=2:$S(TP="SAT":12,1:13),TP="SAT":49,1:50)
  . . S $P(WK(WEEK),U,PC)=$P(WK(WEEK),U,PC)+AMT
  Q
Index: FOIAVistA/tag/r/PAID-PRS/PRSACED2.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSACED2.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSACED2.m	(revision 636)
@@ -1,5 +1,4 @@
 PRSACED2 ; HISC/FPT-T&A Edits ;11/24/1999
- ;;4.0;PAID;**45,54,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+ ;;4.0;PAID;**45,54**;Sep 21, 1995
  ;
  ; initialize array that stores 8b values.  This array is used
@@ -36,6 +35,5 @@
 E2 I NOR=112,DUT=1,'$P(C0,"^",42)!('$P(C1,"^",24)) S ERR=67 D ERR^PRSACED
  I E(9),'$P(C1,"^",46),E(9)'=+NOR S ERR=65 D ERR^PRSACED
- ;exclude 9/3 month employee
- I DUT=2,'(NOR="01"&("LMN"[PAY)),'(NOR="80"&(PAY="M")),$P(C0,"^",42)=""!($P(C1,"^",24)="") S ERR=66 D ERR^PRSACED
+ I DUT=2,'(NOR="01"&("LMN"[PAY)),$P(C0,"^",42)=""!($P(C1,"^",24)="") S ERR=66 D ERR^PRSACED
  G ^PRSACED3
 OA ;
Index: FOIAVistA/tag/r/PAID-PRS/PRSACED5.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSACED5.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSACED5.m	(revision 636)
@@ -1,6 +1,4 @@
-PRSACED5 ; HISC/REL/FPT/PLT-T&A Cross-Edits ;11/20/06  12:53
- ;;4.0;PAID;**102,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;
+PRSACED5 ; HISC/REL/FPT-T&A Cross-Edits ;02/07/06  12:53
+ ;;4.0;PAID;**102**;Sep 21, 1995
  G D1:DUT=1,D2:DUT=2,D3:DUT=3 Q
 D1 G:+NOR N1
@@ -13,6 +11,5 @@
  I LVG=5 I E(1)+E(2)+$P(C1,"^",30)>14 S ERR=160 D ERR^PRSACED
  Q
- ;36/40 employee has 8b normal hour = 72
-N1 I '(NOR=48!(NOR=72)&("KM"[PAY)),NOR<80 S ERR=153 D ERR^PRSACED
+N1 I '(NOR=48&("KM"[PAY)),NOR<80 S ERR=153 D ERR^PRSACED
  I '(PAY="W"&(LVG=0)),"123"'[LVG S ERR=154 D ERR^PRSACED
  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)
@@ -27,10 +24,8 @@
  I CWK="C",E(1)+E(2)>80 S ERR=166 D ERR^PRSACED
  Q
- ;exclude 9/3 month employee
-D2 I PAY'="M"!(FLSA'="E"),NOR<1!(NOR>79) S ERR=155 D ERR^PRSACED
+D2 I NOR<1!(NOR>79) S ERR=155 D ERR^PRSACED
  I "0123"'[LVG S ERR=156 D ERR^PRSACED
  I "ABCGLMNRU0123456789PQT"'[PAY S ERR=157 D ERR^PRSACED
- ;exclude 9/3 month employee
- QUIT:"123"'[LVG!(NOR="80"&(PAY="M"))
+ Q:"123"'[LVG
  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)
  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)
Index: FOIAVistA/tag/r/PAID-PRS/PRSACED6.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSACED6.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSACED6.m	(revision 636)
@@ -1,10 +1,9 @@
 PRSACED6 ; HISC/FPT-T&A Cross-Edits ;11/27/95  10:01
- ;;4.0;PAID;**6,45,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+ ;;4.0;PAID;**6,45**;Sep 21, 1995
 CODES ; Set variables T0 and T1 with 8B code list
- ;      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
+ ;      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
  ;
  S T0="AN SK WD NO AU RT CE CU UN NA NB SP DA SA SB SC OA OB OC OK DB OM RA RB RC HA HB HC HD PT PA ON VC EA EB AL SL WP NP AB RL FA FB FC FD AD AF FE",N1=60
- S T1="CT CO US NR NS DC TF SE SF SG OE OF OG OS TA OU RE RF RG HL HM HN HO PH PB CL VS EC ED NL DW IN TL LU LN LD TO LA ML CA PC TC CY RR SQ FF DE DF YA DG TG YD YE TB DT YH TD NT NH RS RN ND NU SR SS SD SH",N2=67
+ S T1="CT CO US NR NS DC TF SE SF SG OE OF OG OS TA OU RE RF RG HL HM HN HO PH PB CL VS EC ED NL DW IN TL LU LN LD TO LA ML CA PC TC CY RR SQ FF DE DF YA DG TG YD YE TB DT YH TD NT NH",N2=59
  Q
 STUB ; parse out 'stub' variables from 8b record
Index: FOIAVistA/tag/r/PAID-PRS/PRSAENT.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAENT.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAENT.m	(revision 636)
@@ -1,5 +1,4 @@
 PRSAENT ;HISC/MGD-Entitlement String ;10/21/04
- ;;4.0;PAID;**6,21,45,69,75,76,90,96,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+ ;;4.0;PAID;**6,21,45,69,75,76,90,96**;Sep 21, 1995
  ;
  ;VARS:
@@ -102,5 +101,4 @@
  S LVG=$P(C0,"^",15) S:LVG=5 AC=AC_"*" Q
 M I $E(AC,2)=1,NH=48 S AC=AC_"B" Q
- I $E(AC,2)=2,NH=80 S AC=AC_"R" Q
  I $E(AC,2)=2 S PB=$P(C0,"^",20) I PB=0 S AC=AC_"0" Q
  I $E(AC,2)=3 S PB=$P(C0,"^",20) I PB=2 S AC=AC_"2" Q
Index: FOIAVistA/tag/r/PAID-PRS/PRSAENX.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAENX.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAENX.m	(revision 636)
@@ -1,5 +1,4 @@
 PRSAENX ; HISC/REL-List Entitlement ;3/12/93  12:58
- ;;4.0;PAID;**34,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+ ;;4.0;PAID;**34**;Sep 21, 1995
  K DIC S DIC="^PRST(457.5,",DIC(0)="AEQM" W ! D ^DIC G:Y<1 EX S ENT=^PRST(457.5,+Y,1),NAM=$P(Y,"^",2)
  W ! K IOP,%ZIS S %ZIS("A")="Select Device: ",%ZIS="MQ" D ^%ZIS K %ZIS,IOP G:POP EX
@@ -19,7 +18,7 @@
 1 ;;Regular Scheduled
 2 ;;Regular Unscheduled
-3 ;;FF Reg. Sch. Hrs. Over 53
-4 ;;Reserved for future use
-5 ;;Recess Periods
+3 ;;Reg. Hrs. at OT Rate - Day
+4 ;;Reg. Hrs. at OT Rate - 2
+5 ;;Reg. Hrs. at OT Rate - 3
 6 ;;Night Differential - 2
 7 ;;Night Differential - 3
Index: FOIAVistA/tag/r/PAID-PRS/PRSALVS.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSALVS.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSALVS.m	(revision 636)
@@ -1,5 +1,4 @@
-PRSALVS ;HISC/REL-Display Leave Request ;11/21/06
- ;;4.0;PAID;**9,69,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSALVS ;HISC/REL-Display Leave Request ;09/21/01
+ ;;4.0;PAID;**9,69**;Sep 21, 1995
  S DFN="",SSN=$P($G(^VA(200,DUZ,1)),"^",9) I SSN'="" S DFN=$O(^PRSPC("SSN",SSN,0))
  I 'DFN W !!,*7,"Your SSN was not found in both the New Person & Employee File!" G EX
@@ -48,10 +47,8 @@
  S EDT=$P($G(^PRST(458.1,DA,0)),"^",5) I EDT'>SDT G B3
  S X1=EDT,X2=SDT D ^%DTC S INC=X+13\14*$S(Z="AL":AINC,1:SINC)
- I NH=80,DB=2 S X1=EDT,X2=X+13\14*14-X D C^%DTC S INC=INC-$$RT(X,SDT) S:INC<0 INC=0
  I PRT W !,Z," Estimated Earnings: ",$J(INC,8,3)
  S LST=9999999-SDT,CNT=0
  F DTI=0:0 S DTI=$O(^PRST(458.1,"AD",DFN,DTI)) Q:DTI=""!(DTI>LST)  F RDA=0:0 S RDA=$O(^PRST(458.1,"AD",DFN,DTI,RDA)) Q:RDA=""  I $G(^(RDA))'>EDT D
  .S Z1=$G(^PRST(458.1,RDA,0)) S X1=$P(Z1,"^",7) S:"CB AD"[X1 X1="SL" Q:X1'=Z  Q:"AR"'[$P(Z1,"^",9)
- .I NH=72,DB=1 S $P(Z1,U,15)=$$LC($P(Z1,U,15))
  .S CNT=CNT+$P(Z1,"^",15)
  .I $P(Z1,"^",3)'<SDT,$P(Z1,"^",5)'>EDT Q
@@ -66,17 +63,6 @@
 HDR ; Display Header
  W:$E(IOST,1,2)="C-" @IOF W !?26,"VA TIME & ATTENDANCE SYSTEM",!?32,"LEAVE REQUESTS"
- S X=$G(^PRSPC(DFN,0)) W !!,$P(X,"^",1) S X=$P(X,"^",9) I X W ?50,"XXX-XX-",$E(X,6,9) Q
+ S X=$G(^PRSPC(DFN,0)) W !!,$P(X,"^",1) S X=$P(X,"^",9) I X W ?50,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9) Q
 H1 I $E(IOST,1,2)="C-" R !!,"Press RETURN to Continue.",X:DTIME S:'$T!(X["^") QT=1 I 'QT W @IOF,!
  Q
 EX G KILL^XUSCLEAN
- ;Multiply leave request by 1.111 and round down to the quarter hour
- ;for 36/40 nurses
-LC(X) S X=X*1.111\.25*.25 Q X
- ;Calculate number of Recess hours scheduled for a 9-month AWS Nurse 
- ;before the date leave has been requested for
-RT(EDT,SDT) N SFY,EFY,T,WK
- S SFY=$E($P($$GETFSCYR^PRSARC04(SDT),U,2),3,6),EFY=$E($P($$GETFSCYR^PRSARC04(EDT),U,2),3,6)
- D RES^PRSARC05(.WK,DFN,SFY,EFY,SDT,EDT) S (I,T)=0 F  S I=$O(WK(I)) Q:I=""  S T=T+WK(I)
- ;Calculate the number of hours of leave that would have been
- ;accumulated for the time the nurse was on recess.
- Q T/80*$S(Z="AL":AINC,1:SINC)\.25*.25
Index: FOIAVistA/tag/r/PAID-PRS/PRSAOTT.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAOTT.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAOTT.m	(revision 636)
@@ -1,5 +1,4 @@
-PRSAOTT ;WCIOFO/JAH/PLT- 8B CODES ARRAY.  COMPARE OT (8B-vs-APPROVED). ;11/29/2006
- ;;4.0;PAID;**37,43,54,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSAOTT ;WCIOFO/JAH- 8B CODES ARRAY.  COMPARE OT (8B-vs-APPROVED). ;11/29/1999
+ ;;4.0;PAID;**37,43,54**;Sep 21, 1995
  ;
  ;Function & subroutine Index for this routine.
@@ -227,7 +226,7 @@
  ;
  Q:$G(WEEK)="" 0
- Q:WEEK=1 "AN SK WD NO AU RT CE CU UN NA NB SP SA SB SC DA DB DC TF OA OB OC YA OK OM RA RB RC HA HB HC PT PA ON YD HD VC EA EB TA TC FA FC AD NT RS ND SR SD"
- ;
- Q:WEEK=2 "AL SL WP NP AB RL CT CO US NR NS SQ SE SF SG DE DF DG TG OE OF OG YE OS OU RE RF RG HL HM HN PH PB CL YH HO VS EC ED TB TD FB FD AF NH RN NU SS SH"
+ Q:WEEK=1 "AN SK WD NO AU RT CE CU UN NA NB SP SA SB SC DA DB DC TF OA OB OC YA OK OM RA RB RC HA HB HC PT PA ON YD HD VC EA EB TA TC FA FC AD"
+ ;
+ Q:WEEK=2 "AL SL WP NP AB RL CT CO US NR NS SQ SE SF SG DE DF DG TG OE OF OG YE OS OU RE RF RG HL HM HN PH PB CL YH HO VS EC ED TB TD FB FD AF"
  ;
  Q:WEEK=3 "NL DW IN TL LU LN LD DT TO LA ML CA PC CY RR FF FE CD"
Index: FOIAVistA/tag/r/PAID-PRS/PRSAPPH.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAPPH.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAPPH.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSAPPH ; WOIFO/JAH - Holiday Utilities ;12/07/07
- ;;4.0;PAID;**33,66,113,112,116**;Sep 21, 1995;Build 23
+PRSAPPH ; HISC/REL-Holiday Utilities ;01/03/07
+ ;;4.0;PAID;**33,66,113**;Sep 21, 1995;Build 3
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  K HOL S PDT=$G(^PRST(458,PPI,1)) Q:PDT=""  S X1=$P(PDT,"^",1),X2=-6 D C^%DTC
@@ -14,5 +14,5 @@
 E0 ; Find Benefit Day
  Q:DAY=15  I DAY>0,DAY<15 G P0
- Q:DB'=1  Q:NH=48!(NH=72)  G P1:DAY<0,P3:DAY>14
+ Q:DB'=1  Q:NH=48  G P1:DAY<0,P3:DAY>14
 P0 S TC=$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",2) Q:'TC
  I (TC=3)!(TC=4) G U1
@@ -21,5 +21,5 @@
  I TC=2!$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",8)!$P($G(^(0)),"^",14),'$P($G(^(0)),"^",12) G S0
  Q:$P($G(^(0)),"^",12)=LLL&(TT="HX") 
- G U1:DB=2!(NH=72) I FLX'="C" G EF:(DAY#7=1),EB:(DAY#7=0)
+ G:DB=2 U1 I FLX'="C" G EF:(DAY#7=1),EB:(DAY#7=0)
  S C=0 F X1=$S(DAY<8:1,1:8):1:DAY I '$P($G(^PRST(458,PPI,"E",DFN,"D",X1,0)),"^",8),'$P($G(^(0)),"^",14) S C=C+1
  I FLX'="C" G EF:C<2,EB
Index: FOIAVistA/tag/r/PAID-PRS/PRSAPPO.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAPPO.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAPPO.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSAPPO ; HISC/MGD - Open New Pay Period ;07/30/07
- ;;4.0;PAID;**93,112**;Sep 21, 1995;Build 54
+PRSAPPO ; HISC/MGD - Open New Pay Period ;03/15/06
+ ;;4.0;PAID;**93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  S PPI=$P(^PRST(458,0),"^",3),PPE=$P(^PRST(458,PPI,0),"^",1)
@@ -27,7 +27,4 @@
  .I $P($G(^PRSPC(DFN,1)),"^",20)="Y" Q
  .I $P($G(^PRSPC(DFN,1)),"^",33)'="N" Q
- .S C0=^PRSPC(DFN,0)
- .I $P(C0,U,10)=2,$P(C0,U,16)=80 S NAWS="9Mo AWS",CT9=$G(CT9)+1
- .I $P(C0,U,10)=1,$P(C0,U,16)=72 S NAWS="36/40 AWS",CT36=$G(CT36)+1
  .S PRSIEN=DFN,MDAT=$P(PDT,U,1)
  .S MIEN=$$MIEN^PRSPUT1(PRSIEN,MDAT)
@@ -37,22 +34,7 @@
  .I $G(MIEN) D PLPP^PRSPLVA(PRSIEN,PPI)
  .;
- .; Call to Autopost PT Phy Extended Absence
+ .; Call to autopost PT Phy Extended Absence
  .I $G(MIEN) D PEAPP^PRSPEAA(PRSIEN,PPI)
  .S N=N+1 W:N#100=0 "." Q
- ;SEND A MESSAGE WHEN A 9 MONTH AWS NURSE IS ACTIVATED AT A SITE
- I +$G(NAWS) D
- .I $G(CT9) S TMP(1)=CT9_" 9 month AWS nurse(s) set up"
- .I $G(CT36) S TMP(2)=CT36_" 36/40 AWS nurse(s) set up"
- .S S=$$KSP^XUPARAM("INST")_"," D FIND^DIC(456,,,"Q",+S)
- .S IND=$S($D(^TMP("DILIST",$J,0)):+^(0),1:$O(^PRST(456,0)))
- .S CM9=$$GET1^DIQ(456,IND,2),CM36=$$GET1^DIQ(456,IND,4)
- .S MAX=$$GET1^DIQ(456,IND,3) N FDA,DIERR
- .I $G(CT9),CM9<MAX S FDA(456,IND_",",2)=CM9+1
- .I $G(CT36),CM36<MAX S FDA(456,IND_",",4)=CM36+1
- .Q:'$D(FDA)  D FILE^DIE("","FDA"),MSG^DIALOG()
- .S S=$$GET1^DIQ(4,+S,99)_" "_$$GET1^DIQ(4,+S,100),XMTEXT="TMP("
- .S TMP(3)="At "_S,XMDUZ=.5,XMY("VHAOIPAIDETANAWSBULLETIN@VA.GOV")=""
- .S XMSUB=+S_" 36/40, 9 month AWS nurse(s) deployed PRS*4.0*112"
- .D ^XMD K TMP
  S $P(^PRST(458,PPI,"E",0),"^",3,4)=N_"^"_N W !!,N," Employee Records created.",!
 EX G KILL^XUSCLEAN
Index: FOIAVistA/tag/r/PAID-PRS/PRSASR.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSASR.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSASR.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSASR ;HISC/MGD,WOIFO/JAH/PLT - Supervisor Certification ;02/05/2005
- ;;4.0;PAID;**2,7,8,22,37,43,82,93,112**;Sep 21, 1995;Build 54
+PRSASR ;HISC/MGD,WOIFO/JAH - Supervisor Certification ;02/05/2005
+ ;;4.0;PAID;**2,7,8,22,37,43,82,93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -79,9 +79,8 @@
  ;     ---------------------------------------------------
 CHK ; Check for needed approvals
- N PRSENT,PRSWOC
  S STAT=$P($G(^PRST(458,PPI,"E",DFN,0)),"^",2) I "PX"[STAT Q
  I USR=DFN Q:'$D(^XUSEC("PRSA SIGN",DUZ))
  E  I CKS S SSN=$P($G(^PRSPC(DFN,0)),"^",9) I SSN S EDUZ=+$O(^VA(200,"SSN",SSN,0)) I $D(^PRST(455.5,"AS",EDUZ,TLI)) Q:$P($G(^PRST(455.5,TLI,"S",EDUZ,0)),"^",2)'=TLE
- S HDR=0 D HDR,^PRSAENT S PRSENT=ENT
+ S HDR=0 D HDR
  ;
  ;Loop to display tour, exceptions(leave, etc..) & errors.
@@ -111,10 +110,4 @@
  .  D WARNSUP^PRSAOTT(PPE,DFN,VAL,WK,.OTERR,.O8,.OA)
  .  I OTERR S ^TMP($J,"OT",DFN,WK)=O8_"^"_OA
- ;
- ;warning message for rs/rn and on type of time
- I $E(PRSENT,5) D
- . I @($TR($$CD8B^PRSU1B2(VAL,"RS^3^RN^3",1),U,"+")_"-("_$TR($$RSHR^PRSU1B2(DFN,PPI),U,"+")_")") W !,?3,"WARNING: The total scheduled recess hours for this pay period does not match the total RS/RN posted."
- . I $G(PRSWOC)]"" W !,?3,"Warning: The entire tour for day# ",PRSWOC," is posted RECESS. The On-Call will be paid unless posted UNAVAILABLE."
- . QUIT
  ;
 LD ; Check for changes to the Labor Distribution Codes made during the pay
@@ -170,5 +163,5 @@
 HDR ; Display Header
  I HDR S QT=$$ASK^PRSLIB00() Q:QT
- S X=$G(^PRSPC(DFN,0)) W !,@IOF,?3,$P(X,"^",1) S X=$P(X,"^",9) I X W ?68,$E(X),"XX-XX-",$E(X,6,9) S HDR=1
+ S X=$G(^PRSPC(DFN,0)) W !,@IOF,?3,$P(X,"^",1) S X=$P(X,"^",9) I X W ?68,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9) S HDR=1
  W !,?6,"Date",?20,"Scheduled Tour",?40,"Tour Exceptions",?63,IORVON,"Tour Errors",IORVOFF
  W !?3 F I=1:1:72 W "-"
@@ -178,5 +171,5 @@
  N HOLD
  S HOLD=$$ASK^PRSLIB00(1)
- S X=$G(^PRSPC(DFN,0)) W !,@IOF,?3,$P(X,"^",1) S X=$P(X,"^",9) I X W ?68,$E(X),"XX-XX-",$E(X,6,9)
+ S X=$G(^PRSPC(DFN,0)) W !,@IOF,?3,$P(X,"^",1) S X=$P(X,"^",9) I X W ?68,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9)
  W !,?6,"Date",?20,"Scheduled Tour",?40,"Tour Exceptions",?63,IORVON,"Tour Errors",IORVOFF
  W !?3 F I=1:1:72 W "-"
@@ -193,5 +186,5 @@
  Q
  ;
- ;
+ ;====================================================================
  ;These extrinsic functions simply remove lengthy code from long, 
  ;single line, nested loop.
Index: FOIAVistA/tag/r/PAID-PRS/PRSASR1.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSASR1.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSASR1.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSASR1 ;WCIOFO/JAH - Display VCS, Fee, ED ;02/20/08
- ;;4.0;PAID;**6,21,82,93,116**;Sep 21, 1995;Build 23
+PRSASR1 ;HISC/MGD - Display VCS, Fee, ED ;04/19/05
+ ;;4.0;PAID;**6,21,82,93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
 VCS ; Display VCS Sales/Fee Basis
@@ -93,5 +93,5 @@
  W !,@IOF,?3,$P(X,"^",1)
  S X=$P(X,"^",9)
- I X W ?68,$E(X),"XX-XX-",$E(X,6,9)
+ I X W ?68,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9)
  W !,DASH
  D LDHDR
Index: FOIAVistA/tag/r/PAID-PRS/PRSATE.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSATE.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSATE.m	(revision 636)
@@ -1,4 +1,4 @@
 PRSATE ;WCIOFO/JAH - Enter/Edit Employee (emp) Tour of Duty (ToD) ;03/15/2005
- ;;4.0;PAID;**8,11,27,45,55,93,112**;Sep 21, 1995;Build 54
+ ;;4.0;PAID;**8,11,27,45,55,93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  N PPI,PPE,PRSTLV,TLI,TLE,DFN
@@ -46,5 +46,5 @@
  ; Display header/Ask pp (NOL^PRSATE2 returns SRT = Current, Next, Last)
  ;
- D NOW^%DTC S NOW=% K %
+ D NOW^%DTC S NOW=%
  W:$E(IOST,1,2)="C-" @IOF
  W !?26,"VA TIME & ATTENDANCE SYSTEM"
@@ -97,5 +97,5 @@
  ...    E  D
  ....      S NOERROR=1
- K NOW Q
+ Q
  ;=======================
  ;
@@ -120,5 +120,5 @@
  ; ask TK about all others.
  ;
- S DB=$P(C0,U,10) I FLX="C"!("KM"[PP&(DB=1)&(NH=72)) D
+ I FLX="C" D
  .   D VAR
  E  D
@@ -128,5 +128,5 @@
  ..    D VAR
  .  E  D FX
- K DB Q
+ Q
  ;=======================
  ;
@@ -147,5 +147,5 @@
  .  W "  ... done" D:HRS'=NH ERROR(2,NH,HRS)
  .  D T2,^PRSATE5
- D HOL,RS K HRS,STR
+ D HOL,RS
  Q
  ;=======================
@@ -205,5 +205,5 @@
  S $P(^PRST(458,PPI,"E",DFN,0),U,$S(SRT="N":7,1:6))=Y
  I $D(^PRST(458,"ATC",DFN)) D UPD^PRSASAL
- K PAY,ZENT Q
+ Q
  ;=======================
  ;
@@ -268,5 +268,5 @@
  ;
  D S1
- K OLD,SCH Q
+ Q
  ;=======================
  ;
@@ -298,5 +298,5 @@
  Q:'$D(HOL)
  S TT="HX",DUP=1
- D E^PRSAPPH K DUP,HOL,TT
+ D E^PRSAPPH
  Q
  ;=======================
@@ -332,5 +332,6 @@
  S DIR("?",1)="Fixed tours are Monday - Friday with the same hours."
  D ^DIR
- Q $S(Y=1:"Y",Y=0:"N",1:"^")
+ S RESP=$S(Y=1:"Y",Y=0:"N",1:"^")
+ Q RESP
  ;=======================
  ;
@@ -343,5 +344,6 @@
  S DIR("?")="Enter ^ to escape and cancel this tour change."
  D ^DIR
- Q $S(Y=1:"Y",Y=0:"N",1:"^")
- ;=======================
- ;
+ S RESP=$S(Y=1:"Y",Y=0:"N",1:"^")
+ Q RESP
+ ;=======================
+ ;
Index: FOIAVistA/tag/r/PAID-PRS/PRSATE0.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSATE0.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSATE0.m	(revision 636)
@@ -1,7 +1,6 @@
 PRSATE0 ; HISC/REL-Edit Variable Tours ;5/30/95  14:37
- ;;4.0;PAID;**112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+ ;;4.0;PAID;;Sep 21, 1995
  S TOLD="" F K=1:1:14 S Z=$P($G(^PRST(458,PPI,"E",DFN,"D",K,0)),"^",2),$P(TOLD,"^",K)=Z I SRT="N",$P($G(^(0)),"^",3) S $P(TOLD,"^",K)=$P(^(0),"^",4)
- K K S ^PRST(458,PPI,"E",DFN,"T")=TOLD D DT^PRSATE2
+ S ^PRST(458,PPI,"E",DFN,"T")=TOLD D DT^PRSATE2
  K DDSFILE,DA,DR,PRSAERR S DDSFILE=458,DDSFILE(1)=458.01,DA(1)=PPI,DA=DFN
  S DR="[PRSA TE EDIT]" D ^DDS K DS Q:$D(PRSAERR)
@@ -9,5 +8,5 @@
  I '$D(^PRST(458,PPI,"E",DFN,"D",0)) S ^(0)="^458.02^14^14"
  F DAY=1:1:14 S TD=$P(TNEW,"^",DAY) I TD>0 D S1
- K TNEW,TOLD Q
+ Q
 S1 ; Set Tour if necessary
  I TD=$P(TOLD,"^",DAY),$G(^PRST(457.1,+TD,1))=$G(^PRST(457.1,+$P(TOLD,"^",DAY),1)) Q
@@ -21,20 +20,8 @@
  Q
 VAL ; Validate Tour
- N NAWS,SNAWS,TDT S (ZENT,STR)="" K PRSAERR D OT^PRSATP S DB=$P(C0,U,10) I "KM"[PP,DB=1,NH=72 S NAWS=1
- S (HRS,TRS,TDT)=0 F DAY=1:1:14 D  I STR'="" G V1
- .S TD=$$GET^DDSVAL(DIE,.DA,DAY+200),Z=$P($G(^PRST(457.1,+TD,0)),"^",6) S:Z HRS=HRS+Z S Y=$G(^(1))
- .I DAY=7!(DAY=14)&'TDT S TDT=$P($G(^PRST(457.1,+TD,0)),U,5)="Y"
- .I $D(NAWS) S:Z'=12&Z NAWS=0 S $P(SNAWS,U,DAY)=TD I Z=12 S NAWS(DAY-1\7+1)=$G(NAWS(DAY-1\7+1))+1
- .D VS S:TRG TRS=TRS+1
+ S (ZENT,STR)="" K PRSAERR D OT^PRSATP
+ S (HRS,TRS)=0 F DAY=1:1:14 S TD=$$GET^DDSVAL(DIE,.DA,DAY+200) S Z=$P($G(^PRST(457.1,+TD,0)),"^",6) S:Z HRS=HRS+Z S Y=$G(^(1)) D VS S:TRG TRS=TRS+1 I STR'="" G V1
  I FLX="C",TRS>9 S STR="Warning: Compressed Schedule has more than 9 Tours!" D HLP^DDSUTL(.STR)
  I NH'=HRS,NH'=112 S STR="Warning: Normal Hours are "_NH_"; Tour Hours are "_HRS D HLP^DDSUTL(.STR)
- I $D(NAWS) D
- .I $G(NAWS(1))'=3!($G(NAWS(2))'=3)!'NAWS S STR=$P($T(NAWS1),";",3) D HLP^DDSUTL(.STR)
- .D TOURHRS^PRSARC07(.HRS,PPI,DFN,SNAWS)
- .I $G(HRS("W1"))'=36!($G(HRS("W2"))'=36) S STR=$P($T(NAWS2),";",3) D HLP^DDSUTL(.STR)
- .I $G(TDT) S STR=$P($T(NAWS3),";",3) D HLP^DDSUTL(.STR)
- K K,STR,TRG,TRS Q
-V1 S (DDSERROR,PRSAERR)=1 D HLP^DDSUTL(.STR) K DDSERROR Q
-NAWS1 ;;Warning: There are not three 12 hour tours in week 1 and/or week 2 for this AWS 36/40 Nurse
-NAWS2 ;;Warning: Hours in week 1 and/or week 2 are not 36 for this AWS 36/40 Nurse.
-NAWS3 ;;Warning: Tour overlaps two administrative work weeks for this 36/40 Nurse.
+ Q
+V1 S (DDSERROR,PRSAERR)=1 D HLP^DDSUTL(.STR) Q
Index: FOIAVistA/tag/r/PAID-PRS/PRSATP.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSATP.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSATP.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSATP ;HISC/REL,WIRMFO/MGD/PLT - Timekeeper Post Time ;11/21/06
- ;;4.0;PAID;**22,57,69,92,102,93,112**;Sep 21, 1995;Build 54
+PRSATP ;HISC/REL,WIRMFO/MGD - Timekeeper Post Time ;3/21/06
+ ;;4.0;PAID;**22,57,69,92,102,93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ; input (from calling option)
@@ -86,10 +86,12 @@
  ; ML to list if they are.  Added to be compliant with Public Law
  ; 106-554.
- S:$E(ENT,34) Z1=Z1_" 34",Z2=Z2_" ML"
- ;9/3 month employee entitled RS with recess hours in file# 458.8
- S:$E(ENT,5)&$P($$RSHR^PRSU1B2(DFN,PPE),U,DAY>7+1) Z1=Z1_" 5",Z2=Z2_" RS"
- F K=1:1:$L(Z1," ") I $E(ENT,$P(Z1," ",K)) S ZENT=ZENT_$P(Z2," ",K)_" "
- QUIT
  ;
+ I $E(ENT,34) D
+ . S Z1=Z1_" 34",Z2=Z2_" ML"
+ . F K=1:1:14 I $E(ENT,$P(Z1," ",K)) S ZENT=ZENT_$P(Z2," ",K)_" "
+ ;
+ I '$E(ENT,34) D
+ . F K=1:1:13 I $E(ENT,$P(Z1," ",K)) S ZENT=ZENT_$P(Z2," ",K)_" "
+ Q
 OT ; Get entitled out-of-tour types of time
  S Z1="12 28 26",Z2="OT CT ON" F K=1:1:3 I $E(ENT,$P(Z1," ",K)) S ZENT=ZENT_$P(Z2," ",K)_" " I ZENT'["UN" S ZENT=ZENT_"UN "
Index: FOIAVistA/tag/r/PAID-PRS/PRSATP1.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSATP1.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSATP1.m	(revision 636)
@@ -1,5 +1,4 @@
-PRSATP1 ; HISC/REL,WOIFO/PLT - Daily Post verification ;11/28/2006
- ;;4.0;PAID;**34,57,112**;Sep 21, 1995;Build 54
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSATP1 ; HISC/REL-Daily Post verification ;2/28/2000
+ ;;4.0;PAID;**34,57**;Sep 21, 1995
  ;routine is called to validate data entered during the 
  ;screenman posting of an employees pay period
@@ -12,21 +11,10 @@
  .I Z2>2880 D E5 Q
  .I $P(Z,"^",K+2)="" D E9 Q
- .;check duplicate start time if no rs-type of time in exception string z for node 2
- .I Z'["^RS",'(Z["HX"&("ON HW"[$P(Z,"^",K+2))),'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")),$D(T(Z1)) D E3 Q
+ .I '(Z["HX"&("ON HW"[$P(Z,"^",K+2))),'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")),$D(T(Z1)) D E3 Q
  .I $P(Z,"^",K+2)="HW",Z'["HX",'$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",12) D E7 Q
- .I $P(Z,"^",K+2)'="" S T(Z1)=$G(T(Z1))_$P(Z,U,K+2)_U,T(Z1,K)=Z2_"^"_$P(Z,"^",K,K+3)
+ .I $P(Z,"^",K+2)'="" S T(Z1,K)=Z2_"^"_$P(Z,"^",K,K+3)
  .Q
  I '$D(T) Q
- ;check duplicate start time if rs in exception string z for node 2.
- S Z1="" I Z["^RS",'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")) F  S Z1=$O(T(Z1)) QUIT:Z1=""  QUIT:Z["HX"&("^ON^HW^"[T(Z1))  I $L(T(Z1),U)>2 D  QUIT:Z1="*"
- . N A
- . S A=T(Z1),A=U_A
- . I $L(A,U)>4 S Z1="*" QUIT
- . I A'["^RS^" S A=$P(A,"^ON")_$P(A,"^ON",2) S:A="" A="^ON" I "^CT^"'[A,"^OT^"'[A,Z'["^HX"!("^HW^"'[A) S Z1="*" QUIT
- . I A["^RS^" S A=$P(A,"^RS")_$P(A,"^RS",2) S:A="" A="^RS" I "^CT^OT^RG^ON^HW^"'[A S Z1="*" QUIT
- . QUIT
- G:Z1="*" E3
- ;exclude rs with ct, ot, rg, on, hw for error e2 check
- I Z'["HX",'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")) S Z1="" F  S Z1=$O(T(Z1)) Q:Z1=""  G:Z1'<T(Z1,$O(T(Z1,0))) E1 S Y=$O(T(Z1)) I Y,T(Z1,$O(T(Z1,0)))>Y G E2:'(T(Z1)["RS^"&("^CT^OT^RG^ON^HW^"[T(Y)))&'("^CT^OT^RG^ON^HW^"[T(Z1)&(T(Y)["RS^"))
+ I Z'["HX",'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")) S Z1="" F  S Z1=$O(T(Z1)) Q:Z1=""  G:Z1'<T(Z1,$O(T(Z1,0))) E1 S Y=$O(T(Z1)) I Y,T(Z1,$O(T(Z1,0)))>Y G E2
  S Z1="",LL=1 F  S Z1=$O(T(Z1)) Q:Z1=""  F K=0:0 S K=$O(T(Z1,K)) Q:K<1  D
  .S $P(ZS,"^",LL)=$P(T(Z1,K),"^",2),$P(ZS,"^",LL+1)=$P(T(Z1,K),"^",3),$P(ZS,"^",LL+2)=$P(T(Z1,K),"^",4) S:$P(T(Z1,K),"^",5)'="" $P(ZS,"^",LL+3)=$P(T(Z1,K),"^",5)
Index: FOIAVistA/tag/r/PAID-PRS/PRSATPE.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSATPE.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSATPE.m	(revision 636)
@@ -1,35 +1,11 @@
-PRSATPE ;WOIFO/PLT - Find Exceptions ;12/3/07
- ;;4.0;PAID;**26,34,69,102,112,116**;Sep 21, 1995;Build 23
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSATPE ;HISC/REL-Find Exceptions ;12/08/05
+ ;;4.0;PAID;**26,34,69,102**;Sep 21, 1995
  K ER S (ECNT,FATAL)=0,X0=$G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),STAT=$P($G(^(10)),"^",1)
  N MLTIME S MLTIME=0
  S TC=$P(X0,"^",2) I 'TC S ER(1)=$P($T(ERTX+1),";;",2),FATAL=1 G EX
- ;
- ;ensure Normal Hrs = tour hrs for hourly employees
- I DAY=14 I '$$HRSMATCH(PPI,DFN) S FATAL=1,ERR=21 D ERR3640 G EX
- ;
  I "1 3 4"'[TC,STAT="" S ER(1)=$P($T(ERTX+2),";;",2),FATAL=1 G EX
- ;
- ;  Validate NAWS 36/40 nurse tours--can't certify if errors
- N NAWSERR S NAWSERR=0
- I DAY=7!(DAY=14),$$NAWS3640(DFN,PPI) D
- .  I $$SAT2DAY(DAY/7,DFN,PPI) D
- ..    S FATAL=1 S ERR=16 D ERR3640 S ERR=17 D ERR3640
- ..    S NAWSERR=1
- .  I $$THREE12(DAY/7,DFN,PPI) D
- ..    S FATAL=1 I 'NAWSERR S ERR=16 D ERR3640
- ..    S ERR=$S(DAY=7:19,1:20) D ERR3640
- I DAY=1,$$NAWS3640(DFN,PPI),$$CARRYOVR(DFN,PPI) D
- .    S FATAL=1 S ERR=16 D ERR3640 S ERR=18 D ERR3640
- ;
- S X2=$G(^PRST(458,PPI,"E",DFN,"D",DAY,2)) G:X2="" EX S X1=$G(^(1)),X4=$G(^(4)),K=$P($G(^(10)),U,4)
- ;check recess entire day having un-unavailable posted for all scheduled on-on call
- I $E($G(PRSENT),5),K=2,X2["^RS" D
- . F K=1:3 QUIT:$P(X1,U,K,999)=""  S Z=$P(X1,U,K+2) I Z,$P($G(^PRST(457.2,Z,0)),"^",2)="ON",X2'[($P(X1,U,K,K+1)_"^UN") S PRSWOC=$G(PRSWOC)_DAY_"," QUIT
- . I $G(PRSWOC)'[(DAY_",") F K=1:3 QUIT:$P(X4,U,K,999)=""  S Z=$P(X4,U,K+2) I Z,$P($G(^PRST(457.2,Z,0)),"^",2)="ON",X2'[($P(X4,U,K,K+1)_"^UN") S PRSWOC=$G(PRSWOC)_DAY_"," QUIT
- . QUIT
- ;
+ S X2=$G(^PRST(458,PPI,"E",DFN,"D",DAY,2)) G:X2="" EX S X1=$G(^(1)),X4=$G(^(4))
  K TM I X2["OT"!(X2["CT") D TM
- K T,TRS F K=1:3 Q:$P(X1,"^",K)=""  S Z=$P(X1,"^",K+2) I $S('Z:1,1:$P($G(^PRST(457.2,Z,0)),"^",2)="RG") D
+ K T F K=1:3 Q:$P(X1,"^",K)=""  S Z=$P(X1,"^",K+2) I $S('Z:1,1:$P($G(^PRST(457.2,Z,0)),"^",2)="RG") D
  .S X=$P(X1,"^",K,K+1) D CNV^PRSATIM S Z1=$P(Y,"^",1),Z2=$P(Y,"^",2) D V0
  .I Z1'="",$G(T(Z1))="*" K T(Z1) S T(Z2)="*" Q
@@ -40,26 +16,15 @@
  .S T(Z1)="",T(Z2)="*" Q
  ;
- ;find rs-type of time segments of trs array in x2 posted string
- I X2["^RS" F K=1:4:25 QUIT:$P(X2,U,K,999)=""  S X=$P(X2,"^",K,K+1) I "^"'[X,$P(X2,"^",K+2)="RS" D
- . S TT=$P(X2,"^",K+2) D CNV^PRSATIM S Z1=$P(Y,"^",1),Z2=$P(Y,"^",2) D V1
- . I Z1'="",$G(TRS(Z1))="*" K TRS(Z1) S TRS(Z2)="*" QUIT
- . S TRS(Z1)="",TRS(Z2)="*"
- . QUIT
  ; Checks for Daily employees
  I "^"[$P(X2,"^",1,2) S TT=$P(X2,"^",3),K=1,DN=0,Y0="" G L0
  F K=1:4:25 S X=$P(X2,"^",K,K+1) I "^"'[X D
- . N Z3,Z4
- . S TT=$P(X2,"^",K+2)
- . D CNV^PRSATIM S Y0=Y,Z1=$P(Y,"^",1),Z2=$P(Y,"^",2) D V1 S TIM=Z2-Z1/60
- . S Z3=Z1,Z4=Z2
- . I TT="ML" S MLTIME=MLTIME+TIM
- . S Z1=$O(T(Z1)) S:Z1'="" Z1=T(Z1)
- . S Z2=$O(T(Z2-1)) S:Z2'="" Z2=T(Z2)
- . ;trs=1 if absolute outside rs, 2 if absolute inside rs, 3 if overlap (in/outside) rs and inside tour of duty
- . ;if exception segment start/ending time outside tour of duty, reset z3 and z4
- . I Z1]""!(Z2]""),X2["^RS" S:Z1=""&(Z2="*") Z3=$O(T(Z3)) S:Z1="*"&(Z2="") Z4=$O(T(Z3)) S Z3=$O(TRS(Z3)) S:Z3]"" Z3=TRS(Z3) S Z4=$O(TRS(Z4-1)) S:Z4]"" Z4=TRS(Z4) S TRS=$S(Z3=""&(Z4=""):1,Z3="*"&(Z4="*"):2,1:3)
- . I TT="UN" D UN^PRSATPH QUIT
- . I "CT OT ON SB RG"[TT D OT QUIT
- . D LV QUIT
+ .S TT=$P(X2,"^",K+2)
+ .D CNV^PRSATIM S Y0=Y,Z1=$P(Y,"^",1),Z2=$P(Y,"^",2) D V1 S TIM=Z2-Z1/60
+ .I TT="ML" S MLTIME=MLTIME+TIM
+ .S Z1=$O(T(Z1)) S:Z1'="" Z1=T(Z1)
+ .S Z2=$O(T(Z2-1)) S:Z2'="" Z2=T(Z2)
+ .I TT="UN" D UN^PRSATPH Q
+ .I "CT OT ON SB RG"[TT D OT Q
+ .D LV Q
  ;
  ; Check for a minimum of 1 hour ML
@@ -95,6 +60,5 @@
  I TT="ON"&(X2["HX") Q
  ;I "OT CT"[TT,TIM'>1 Q
- ;none-leave hours are inside tour hours, but quit if inside rs hours
- QUIT:$G(TRS)=2!(TT="HW"&(X2["^RS"))  S ERR=6 QUIT
+ S ERR=6 Q
 TM ; Get OT,CT request,approve times
  S DTI=$P($G(^PRST(458,PPI,1)),"^",DAY),DA=0 Q:'DTI
@@ -108,13 +72,10 @@
  I TC=3!(TC=4) Q
  I TC=1,TT="HW" Q
- ;leave hours are (overlap) outside tour hours or (overlap) inside recess hours
- I ($G(TRS)'=1&(TT="HW")&$G(TRS)) QUIT
- I Z1'="*"!(Z2'="*")!($G(TRS)'=1&(TT'="RS")&$G(TRS)) S ERR=5,FATAL=1 D ERR
+ I Z1'="*"!(Z2'="*") S ERR=5,FATAL=1 D ERR
  ;
 L0 N REMARK S REMARK=$P(X2,"^",K+3)
  Q:REMARK&(REMARK'=15&(REMARK'=16))
  I "HX"[TT D HENCAP
- ;no leave request for non-leave hour and rs types
- QUIT:"RG CP NP HX HW TR TV RS"[TT
+ Q:"RG CP NP HX HW TR TV"[TT
  S DTI=$P($G(^PRST(458,PPI,1)),"^",DAY) Q:'DTI  S (DT1,DT2)=DTI
  I DN D D2 S:DN=2 DT1=DT2
@@ -142,59 +103,7 @@
  S ERR=15 D ERR Q  ; Holiday in current PP
  Q
-NAWS3640(PRSEMP,PPI) ; return true if NAWS 36/40 Nurse for this PPI
- N EMPNODE,PAYPLAN,DTYBASIS,NORMHRS,S8
- S S8=$G(^PRST(458,PPI,"E",PRSEMP,5))
- I S8'="",($E(S8,26,27)'=72!("KM"'[$E(S8,28))!($E(S8,29)'=1)) Q 0
- S EMPNODE=$G(^PRSPC(PRSEMP,0))
- S PAYPLAN=$P(EMPNODE,U,21)
- S DTYBASIS=$P(EMPNODE,U,10)
- S NORMHRS=$P(EMPNODE,U,16)
- Q "KM"[PAYPLAN&(DTYBASIS=1)&(NORMHRS=72)
-SAT2DAY(WK,PRSIEN,PPI) ;
- N HRS,SUNTRHRS,SAT2DAY,PRSD
- S SAT2DAY=0
- S PRSD=$S(WK=1:7,1:14)
- S SAT2DAY=$P($G(^PRST(458,PPI,"E",PRSIEN,"D",PRSD,0)),"^",2)
- I SAT2DAY>0 S SAT2DAY=$P($G(^PRST(457.1,SAT2DAY,0)),U,5)="Y"
- Q SAT2DAY
-CARRYOVR(PRSIEN,PPI) ; true if hours are coming in from last pp
- N PRIORSAT,SAT2DAY
- S SAT2DAY=0
- S PRIORSAT=$P($G(^PRST(458,PPI-1,"E",PRSIEN,"D",14,0)),U,2)
- I PRIORSAT>0 S SAT2DAY=$P($G(^PRST(457.1,PRIORSAT,0)),U,5)="Y"
- Q SAT2DAY
-THREE12(WK,PRSIEN,PPI) ;
- N PRSD,TOURDTY,COUNT,ST,EN
- S COUNT=0
- S ST=$S(WK=1:1,1:8),EN=$S(WK=1:7,1:14)
- F PRSD=ST:1:EN D
- . S TOURDTY=$P($G(^PRST(458,PPI,"E",PRSIEN,"D",PRSD,0)),"^",2)
- . I $P($G(^PRST(457.1,TOURDTY,0)),U,6)=12 S COUNT=COUNT+1
- I COUNT'=3 Q 1
- N HRS
- D TOURHRS^PRSARC07(.HRS,PPI,PRSIEN)
- Q:(HRS($S(WK=1:"W1",1:"W2"))'=36) 1
- Q 0
-HRSMATCH(PPI,DFN) ; Return true if hourly employee tour hrs '= 8B normal hrs
- N MATCH,HRS,NH,ENT,ENTPTR
- I $G(PPI)'>0!($G(DFN)'>0) Q 1
- S MATCH=1
- S NH=-1
- S ENTPTR=$P($G(^PRST(458,PPI,"E",DFN,0)),U,5)
- I ENTPTR'="" D
- .  S ENT=$P($G(^PRST(457.5,ENTPTR,1)),U)
- .  S NH=$E($G(^PRST(458,PPI,"E",DFN,5)),26,27)
- .  Q:NH="00"
- .  I +NH'>0 S NH=$P($G(^PRSPC(DFN,0)),U,50)
- I $G(ENT)="" D ^PRSAENT
- I $G(ENT)'="",$E(ENT)'="D",($E(ENT,1,2)'="0D"),$G(NH)'=112 D
- .  D TOURHRS^PRSARC07(.HRS,PPI,DFN)
- .  I ($G(HRS("W1"))+$G(HRS("W2")))'=+$G(NH) S MATCH=0
- Q MATCH
  ;
 ERR ; Set Error
  S ECNT=ECNT+1,ER(ECNT)=TT_$P($T(ERTX+ERR),";;",2)_"^"_$P(X2,"^",K) Q
-ERR3640 ; Set NAWS (36/40) Errors and errors not related to a single segment
- S ECNT=ECNT+1,ER(ECNT)=$P($T(ERTX+ERR),";;",2) Q
 ERTX ;;
 1 ;;No Tour Entered^
@@ -202,6 +111,6 @@
 3 ;; not Requested
 4 ;; Requested but not Approved
-5 ;; Posted outside of Tour Hours or within Recess Hours
-6 ;; Posted within Tour Hours or outside of Recess Hours
+5 ;; Posted outside of Tour Hours
+6 ;; Posted within Tour Hours
 7 ;; Posted exceeds Requested Hours
 8 ;; Requested but pending Supervisor Approval
@@ -213,8 +122,2 @@
 14 ;; The minimum charge for Military Leave is one hour
 15 ;; was encapsulated by non-pay
-16 ;;36/40 AWS tours require
-17 ;; -no 2 day tours on Sat
-18 ;; -no prior pp carryover
-19 ;; -3 12 hr tours/wk 1
-20 ;; -3 12 hr tours/wk 2
-21 ;;Normal/Tour hrs unequal
Index: FOIAVistA/tag/r/PAID-PRS/PRSAUDP.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSAUDP.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSAUDP.m	(revision 636)
@@ -1,13 +1,8 @@
-PRSAUDP ; WOIFO/DWA - Display Employee Pay Period Audit Data ;12/3/07
- ;;4.0;PAID;**116**;Sep 21, 1995;Build 23
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSAUDP ; HISC/JLS-Display Employee Pay Period Audit Data ;5/13/94  09:43
+ ;;4.0;PAID;;Sep 21, 1995
  ;called by PRSADP2
  D RET Q:QT
  S STATYPE=$P(^DD(458.1101,4,0),"^",3)
- S PG=PG+1,X=$G(^PRSPC(DFN,0)) W @IOF,!,?3,$P(X,U,1) S X=$P(X,U,9)
- I '$G(PRSTLV)!($G(PRSTLV)=1) W ?68,"XXX-XX-",$E(X,6,9)
- I $G(PRSTLV)=2!($G(PRSTLV)=3) W ?68,$E(X),"XX-XX-",$E(X,6,9)
- I $G(PRSTLV)=7 W ?68,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9)
- W !,?26,"Corrected  T&A  History",!!
+ S PG=PG+1,X=$G(^PRSPC(DFN,0)) W @IOF,!,?3,$P(X,U,1) S X=$P(X,U,9) W ?68,$E(X,1,3),"-",$E(X,4,5),"-",$E(X,6,9),!,?26,"Corrected  T&A  History",!!
 AUN S AUN=0 F  S AUN=$O(^PRST(458,PPI,"E",DFN,"X",AUN)) Q:AUN=""!(QT=1)  D B
  W @IOF
Index: FOIAVistA/tag/r/PAID-PRS/PRSDSERV.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSDSERV.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSDSERV.m	(revision 636)
@@ -1,7 +1,6 @@
-PRSDSERV ;WOIFO/MGD,PLT - PAID DOWNLOAD MESSAGE SERVER ;12/3/07
- ;;4.0;PAID;**6,78,82,116**;Sep 21, 1995;Build 23
- ;;Per VHA Directive 2004-038, this routine should not be modified.
+PRSDSERV ;HISC/MGD-PAID DOWNLOAD MESSAGE SERVER ;09/13/2003
+ ;;4.0;PAID;**6,78,82**;Sep 21, 1995
  D NOW^%DTC S TIME=% S XMPOS=1 D REC^XMS3 G:XMER'=0 EXIT
- S LPE=$E(XMRG,1,7) I LPE'?1"**"2N1"PDH",LPE'="****PDH" G EXIT
+ G:$E(XMRG,1,7)'="****PDH" EXIT
  ; EMPCNT = # emp in this mail message
  ; SEQNUM = Mail message sequence number if more than one message
@@ -12,6 +11,4 @@
  I $D(^PRSD(450.12,"B",XMZ)) G EXIT
  S MTYPE=$S(TYPE="I":"Initial",TYPE="E":"Edit & Update",TYPE="P":"Payrun",TYPE="T":"Transfer",1:"")
- ; Set Lines Per Employee (LPE) for the correct interface
- S LPE=$E(LPE,3,4),LPE=$S(LPE?2N:+LPE,TYPE="I":20,(TYPE="E")!(TYPE="T"):15,TYPE="P":9,1:0)
  D REC^XMS3 G:XMER'=0 EXIT S STA=$E(XMRG,1,3) I STA'?3N G EXIT
  I TYPE="D" D ^PRSDDL G EXIT  ; Process Separation download
@@ -26,5 +23,6 @@
  S $P(^PRSD(450.12,+Y,0),U,3)="R",$P(^PRSD(450.12,+Y,0),U,4)=TIME
  S ^PRSD(450.12,"C",TYPE_"-"_DATE_"-"_STA_"-"_SEQNUM,+Y)=""
-SETPRS ;start employee record
+ ; Set Lines Per Employee (LPE) for the correct interface
+SETPRS S LPE=$S(TYPE="I":20,(TYPE="E")!(TYPE="T"):15,TYPE="P":9,1:0)
  S XMPOS=2 F A=1:1:EMPCNT D SSNLOOP Q:SSN=999999999
  I $D(^XTMP("PRS","MNR",TYPE,DATE,STA,SEQNUM)) K ^XTMP("PRS","MNR",TYPE,DATE,STA,SEQNUM) Q
@@ -70,5 +68,5 @@
  Q
  ; Piece together the routine name and call the routine
-PROC S TMPIEN="" F  S TMPIEN=$O(^XTMP("PRS",SUB,DATE,TYPE,STA,SSN,TMPIEN)) Q:TMPIEN=""  S RCD=^XTMP("PRS",SUB,DATE,TYPE,STA,SSN,TMPIEN),RTNNUM=$P(TMPIEN,"-",3) S:$L(RTNNUM)=1 RTNNUM=0_RTNNUM S RTN="^PRSD"_RTYPE_RTNNUM D:$T(@RTN)]"" @RTN
+PROC S TMPIEN="" F  S TMPIEN=$O(^XTMP("PRS",SUB,DATE,TYPE,STA,SSN,TMPIEN)) Q:TMPIEN=""  S RCD=^XTMP("PRS",SUB,DATE,TYPE,STA,SSN,TMPIEN),RTNNUM=$P(TMPIEN,"-",3) S:$L(RTNNUM)=1 RTNNUM=0_RTNNUM S RTN="^PRSD"_RTYPE_RTNNUM D @RTN
  Q
 PROC2 I TYPE="P",PP'="" D ^PRSDCOMP  ;Compute calculated fields
Index: FOIAVistA/tag/r/PAID-PRS/PRSPUT3.m
===================================================================
--- FOIAVistA/trunk/r/PAID-PRS/PRSPUT3.m	(revision 631)
+++ FOIAVistA/tag/r/PAID-PRS/PRSPUT3.m	(revision 636)
@@ -1,4 +1,4 @@
-PRSPUT3 ;WOIFO/MGD,JAH - PART TIME PHYSICIAN UTILITIES #1 ;03/23/07
- ;;4.0;PAID;**93,112**;Sep 21, 1995;Build 54
+PRSPUT3 ;WOIFO/MGD,JAH - PART TIME PHYSICIAN UTILITIES #1 ;06/15/05
+ ;;4.0;PAID;**93**;Sep 21, 1995;Build 7
  ;;Per VHA Directive 2004-038, this routine should not be modified.
  ;
@@ -268,5 +268,5 @@
  S TCH1=$E(T,1,1)
  D E2^PRS8VW
- S CHKLN=$P($T(@(TCH1)+0^PRS8VW2),";;",2)
+ S CHKLN=$P($T(@(TCH1)+0^PRS8VW1),";;",2)
  F I=1:1:$L(CHKLN,"^") D  Q:FOUND
  .  S CHUNK=$P(CHKLN,U,I)
