Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/PAID-PRS/PRS8ST.m

    r628 r636  
    1 PRS8ST ;HISC/MGD-DECOMPOSITION, START-UP ;05/09/07
    2  ;;4.0;PAID;**45,92,102,112**;Sep 21, 1995;Build 54
    3  ;;Per VHA Directive 2004-038, this routine should not be modified.
     1PRS8ST ;HISC/MGD-DECOMPOSITION, START-UP ;12/12/05
     2 ;;4.0;PAID;**45,92,102**;Sep 21, 1995
    43 ;
    54 ;This routine is the one which actually gets everything moving.
     
    1514 .S LP=$S(DAY=1:"0,1,2",1:(DAY+1)),JURY=0
    1615 .F II=1:1 S DY=$P(LP,",",II) Q:DY=""  D
    17  ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W","r" D
     16 ..F J=0,1,2,4,10,"CP","DH1","DH2","HOL","ML","MT1","MT2","OFF","P","TOUR","TWO","W" D
    1817 ...S DAY(DY,J)=$G(^TMP($J,"PRS8",DY,J))
    1918 ...;
     
    2625 ..S WK=$S(DY<8:1,1:2)
    2726 ..S TOUR=$S(TYP'["W":1,+DAY(DY,"TOUR"):+DAY(DY,"TOUR"),1:+TOUR(WK))
    28  ..D MOVE^PRS8AC
    29  ..S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
     27 ..D MOVE^PRS8AC S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
    3028 ..I N["UN" S X1="UN" D 2 ;unavailable
    3129 ..I N["HX" S X1="HX" D 2 ;holiday excused
    3230 ..I N["ON" S X1="ON" D 2 ;on-call
    3331 ..I N["SB" S X1="SB" D 2 ;standby
    34  ..; Process the scheduled tours
    3532 ..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
    3633 ...S QT=0 F PRS8=1:3 S V=$P(N,"^",PRS8,PRS8+2) Q:QT  D
     
    5148 .....F J=4,8,12,16,20,24,28 S:$P(JURY,"^",J)=6 JURY=1 Q
    5249 ....D ^PRS8AC ;build "W" node
    53  ..; Process the exceptions
    5450 ..S N=DAY(DY,2),WK=$S(DY<8:1,1:2) ;exception node/week
    55  ..S QT=0
    56  ..; If there are Recess exceptions, process them first
    57  ..I N["RS" D
    58  ...; Since Recess will reduce hours worked in the week add P to TYP
    59  ...I TYP'["P" S TYP=TYP_"P"
    60  ...F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
    61  ....Q:$P(V,"^",3)='"RS"
    62  ....I TYP["D",$P(V,"^",3)="" S QT=1 Q  ;doctor
    63  ....I TYP'["D",'+V,$P(V,"^",3)="" S QT=1 Q  ;all others
    64  ....S X=$P(V,"^",3)
    65  ....I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
    66  ...;
    67  ...; Process all other types of exceptions
    68  ..S QT=0
    69  ..F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
    70  ...Q:$P(V,"^",3)="RS"
     51 ..S QT=0 F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+3) Q:QT  D
    7152 ...I TYP["D",$P(V,"^",3)="" S QT=1 Q  ;doctor
    7253 ...I TYP'["D",'+V,$P(V,"^",3)="" S QT=1 Q  ;all others
    73  ...S X=$P(V,"^",3)
    74  ...I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
    75  ..;
     54 ...S X=$P(V,"^",3) I "^UN^ON^SB^HX^"'[("^"_X_"^") D ^PRS8EX
    7655 ..S ^TMP($J,"PRS8",DY,"W")=DAY(DY,"W") ;save in ^TMP
    7756 ..S ^TMP($J,"PRS8",DY,"P")=DAY(DY,"P") ;save non-prem ot in ^TMP
    7857 ..S ^TMP($J,"PRS8",DY,"HOL")=DAY(DY,"HOL") ;holiday
    79  ..S ^TMP($J,"PRS8",DY,"r")=DAY(DY,"r") ; Recess for 9mo AWS nurse
    8058 .S WK=$S(DAY<8:1,1:2),OFF=+DAY(DAY,"OFF") ;week/day off
    8159 .S TOUR=$S(TYP'["W":1,+DAY(DAY,"TOUR"):+DAY(DAY,"TOUR"),1:+TOUR(WK))
     
    8664 .Q
    8765 ;
    88  ;make DAY array available for prior, current, and next day
    8966 F DAY=1:1:14 D
    90  .; I AWS Nurse check to see if hour counts need to be adjusted
    91  .S WK=$S(DAY<8:1,1:2)
    92  .; For each week, TYP should not contain "P" unless:
    93  .; 36/40 AWS has NP or WP
    94  .;   9mo AWS has Recess
    95  .I +NAWS,(DAY=1!(DAY=8)) S TYP=$TR(TYP,"P","") D NAWS
    96  .;
     67 .;make DAY array available for prior, current, and next day
    9768 .K DAY(DAY-2)
    9869 .S LP=$S(DAY=1:"0,1,2",1:(DAY+1))
    9970 .F II=1:1 S DY=$P(LP,",",II) Q:DY=""  D
    100  ..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))
     71 ..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))
    10172 .;
    10273 .S WK=$S(DAY<8:1,1:2),OFF=+DAY(DAY,"OFF") ;week/day off
     
    10475 .;
    10576 .I ((TYP["I")!(TYP["P")),DAY>0,DAY<15 D  ;FOR CY
    106  ..I $S('CYA:1,DAY<CYA:1,1:0) Q  ;quit if no calendar year adjustment
     77 ..I $S('CYA:1,DAY<CYA:1,1:0) Q  ;quit if no calander year adjustment
    10778 ..S IIX=0 I $E(ENT,2)'="D" F II=1:1:$L(DAY(DAY,"W")) D
    10879 ...I "4E"[$E(DAY(DAY,"W"),II) S IIX=IIX+1
     
    11990 ...I T=96!("BbCct"'[$E(DAY(DAY,"W"),T+1)) S OK=T
    12091 ...I DOUB D ^PRS8OC,^PRS8SB Q  ;Prem. Pay of "W" or "V"
    121  ...I VAR1'=""&("Cct"[VAR1) D ^PRS8OC Q  ;compute on-call/2hr minimum
     92 ...I VAR1'=""&("Cct"[VAR1) D ^PRS8OC Q  ;compte on-call/2hr minimum
    12293 ...I "Bb"[VAR1 D ^PRS8SB ;standby
    12394 .I $G(SBY) D UP^PRS8SB
     
    141112 I '$E(ENT,$P("12^28^^29^26^^^29","^",+X)) S Q=1 ;entitlement string
    142113 ;PATCH 45: ADD CHECK FOR FIRE FIGHTER ADDITIONAL HOURS
    143  ;SINCE THIS TYPE OF TIME IS NOT IN THE ENTITLEMENT TABLE
     114 ;SINCE THIS TYPE OF TIME IS NOT IN THE ENTITLMENT TABLE
    144115 ;IT IS SET UP WITH TOUR IND. WITH CODE 9
    145116 I "Ff"[TYP,X=9 S Q=0
     
    150121 F PRS8=1:4:25 S V=$P(N,"^",PRS8,PRS8+2) Q:$P(V,"^",1)=""  D
    151122 .S X=$P(V,"^",3) I X=X1 D ^PRS8EX
    152  K PRS8,X,V
    153  Q
    154  ;
    155 NAWS ; NAWS Nurse Alternate Work Schedules
    156  ; If any NP or WP has been incurred for a nurse on the 36/40 AWS,
    157  ; adjust their hours worked counts.  40 hrs/wk will now be used to
    158  ; determine their qualification for OT and CT.  Check piece 16 of
    159  ; 0 node as NH will have been updated to 320 in PRS8SU.
    160  ;
    161  I +NAWS=36 D
    162  .Q:$P(WK(WK),U,3)=""&($P(WK(WK),U,4)="")
    163  .S TH(WK)=144-($P(WK(WK),U,3)+$P(WK(WK),U,4)) ; Adjust Total Hours per week
    164  .S TH=TH(1)+TH(2) ; Adjust Total Hours per pay period
    165  .S NH(WK)=144,NH=288 ; Adjust Normal Hours
    166  .I TYP'["P" S TYP=TYP_"P" ; Make them into a PT employee
    167  .S $E(ENT,2)=1 ; Make employee eligible for UN/US
    168  ;
    169  ; If any Recess has occurred for a nurse on the 9month AWS, adjust
    170  ; their hours worked counts.  These employees will be treated as PT
    171  ; in determining the eligibility for OT/CT.
    172  ;
    173  I +NAWS=9 D
    174  .Q:$P(WK(WK),U,48)=""
    175  .S TH(WK)=TH(WK)-$P(WK(WK),U,48) ; Adjust total hours per week
    176  .S TH=TH(1)+TH(2) ; Adjust Total Hours
    177  .I TYP'["P" S TYP=TYP_"P" ; Adjust TYP to represent a PT employee
    178  Q
     123 K PRS8,X,V Q
Note: See TracChangeset for help on using the changeset viewer.