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/PRS8AC.m

    r628 r636  
    1 PRS8AC ;HISC/MRL-DECOMPOSITION, ACTIVITY STRING ;05/18/07
    2  ;;4.0;PAID;**40,45,54,52,69,75,90,96,112**;Sep 21, 1995;Build 54
    3  ;;Per VHA Directive 2004-038, this routine should not be modified.
     1PRS8AC ;HISC/MRL-DECOMPOSITION, ACTIVITY STRING ;01/22/04
     2 ;;4.0;PAID;**40,45,54,52,69,75,90,96**;Sep 21, 1995
    43 ;
    54 ;The primary purpose of this routine is to create the activity
     
    1615 S Q=0
    1716 I DY>0,DY<15 D  G END:Q
    18  .I DAY(DY,"OFF"),"LSWARUHFGDr"[VAR S Q=1 ;exc invalid day off VAR
     17 .I DAY(DY,"OFF"),"LSWARUHFGD"[VAR S Q=1 ;exc invalid day off VAR
    1918 K OC,FLAG
    2019 ;
    2120 S DAYZ=DAY(DY,"W")_$G(DAY(DY,"N")),MTM=0
    2221 S DAYH=$G(DAY(DY,"HOL"))_$G(DAY(DY+1,"HOL")) ;holiday node
    23  N DAYR
    24  S DAYR=DAY(DY,"r")_$G(DAY(DY,"rN")) ; Recess
    2522 ;
    2623 ;P 45 FIREFIGHTERS F NODE TO TRACK ADDITIONAL FF HRS
     
    2926 F T=+V:1:+$P(V,"^",2) D
    3027 .I +VAR,$E(DAYH,T),$E(DAYZ,T)?1A Q  ;no override holiday
    31  .; Don't override Recess but allow Unscheduled Regular (VAR=4)
    32  .I +VAR,VAR'=4,$E(DAYR,T)="r" Q  ; don't override Recess
    3328 .I VAR="A"&(JURY=1) S VAR="J"
    3429 .S VAR1=VAR Q:VAR1=""  S DAYZ(1)=$E(DAYZ,T)
     
    3732 .I T=+V,"Vh"[VAR1,TYP["I" S DAY(DY,"DWK")=1 ;count days worked for cop
    3833 .I "JLSWNnARUXYFGD"[VAR1,T'>96,'$E(DAYZ,T) Q  ;invalid outside tour
    39  .; Regular employees can't earn ct/use ot during work
    40  .I +NAWS'=9,"EOPQT4"[VAR1,T'>96,$E(DAYZ,T) Q
    41  .; 9mo AWS checks
    42  .I +NAWS=9,"PQT"[VAR1,T'>96,$E(DAYZ,T) Q  ;can't earn ct/use ot during work
    43  .; Allow CT/OT/UN/ON if posted over Recess otherwise don't allow
    44  .I +NAWS=9,"4OEC"[VAR1,T'>96,$E(DAYZ,T),$E(DAYR,T)'="r" S $E(DAYR,T)=VAR1 Q
     34 .I "EOPQT4"[VAR1,T'>96,$E(DAYZ,T) Q  ;can't earn ct/use ot during work
    4535 .I "OE"[VAR1,"BC"[DAYZ(1),$L(DAYZ(1)) D  ; Change OT or CT to CB/SB OT
    4636 ..S VAR1=$C($A($E(DAYZ,T))+32)
     
    5444 .I $E(DAYZ,T)=5,"ALSRUFGD"[VAR1 S VAR1=$E(DAYZ,T)
    5545 .I $E(DAYZ,T)="-","BbCctes"[VAR1 Q  ;unavail for oc/sb or sch ot/ct
    56  .;
    57  .I VAR'="r" D
    58  ..S DAYZ=$E(DAYZ,0,T-1)_VAR1_$E(DAYZ,T+1,999)
    59  ..I $E($G(DAY(DY-1,"N")),T)'="",VAR1'=$E($G(DAY(DY-1,"N")),T) D
    60  ...S DAY(DY-1,"N")=$E(DAY(DY-1,"N"),0,T-1)_VAR1_$E(DAY(DY-1,"N"),T+1,999) ;save VAR
    61  ..; When processing tour time also copy tour into DAYR
    62  ..I "1235"[VAR1 D
    63  ...S DAYR=$E(DAYZ,0,T-1)_VAR1_$E(DAYZ,T+1,999)
    64  ...I $E($G(DAY(DY-1,"N")),T)'="",VAR1'=$E($G(DAY(DY-1,"N")),T) D
    65  ....S DAY(DY-1,"rN")=$E(DAY(DY-1,"rN"),0,T-1)_VAR1_$E(DAY(DY-1,"rN"),T+1,999)
    66  .;
    67  .; The following check will record Recess and will then update VAR1 to 0 which
    68  .; will result in the normally scheduled tour being marked as being no tour.
    69  .; This will allow Unscheduled Regular, OT and CT to be posted over the tour.
    70  .I VAR="r" D
    71  ..S DAYR=$E(DAYR,0,T-1)_VAR1_$E(DAYR,T+1,999)
    72  ..S DAYZ=$E(DAYZ,0,T-1)_0_$E(DAYZ,T+1,999) ; Overwrite tour
    73  ..I $E($G(DAY(DY-1,"rN")),T)'="",VAR1'=$E($G(DAY(DY-1,"rN")),T) D
    74  ...S DAY(DY-1,"rN")=$E(DAY(DY-1,"rN"),0,T-1)_VAR1_$E(DAY(DY-1,"rN"),T+1,999)
    75  ...S DAY(DY-1,"N")=$E(DAY(DY-1,"N"),0,T-1)_0_$E(DAY(DY-1,"N"),T+1,999)
    76  ..S Y=48 D SET ; Count Recess
    77  .;
     46 .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
    7847 .I VAR1="J" S Y=5 D SET ;set authorized absence for jury duty
    7948 .I VAR1="M" S Y=5 D SET ; authorized absence for ML
    8049 .;ot on non-premium T&L
    81  .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
     50 .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
    8251 ..Q:$E(DAY(DY,"P"),T)=5&("ALSRUFGD"'[VAR)
    8352 ..I $D(FLAG) S FLAG=VAR1,VAR1=5
     
    8958 ...I "^7^8^9^11^"[("^"_$P(V,"^",4)_"^")&(TYP'["N")&(TYP'["H")&('$$HYBRID^PRSAENT1($G(DFN))) S CODE="n" Q
    9059 ...I "^7^8^9^11^"[("^"_$P(V,"^",4)_"^")&("^S^T^U^V^"'[(U_PMP_U)) S CODE="n" Q
    91  ...I $P(V,"^",4)=17 S CODE="N" Q  ; Code 17 - OT/CT with premiums
    9260 ...I VAR1=5 S CODE=VAR Q
    9361 ...S CODE=1
     
    12593 ..K S,VAR1
    12694 ;
     95 ;
    12796 S DAY(DY,"W")=$E(DAYZ,1,96) ;todays activity
    12897 S DAY(DY,"N")=$E(DAYZ,97,999) ;tomorrows activity from today/if any
    129  S DAY(DY,"r")=$E(DAYR,1,96) ; Today's Recess
    130  S DAY(DY,"rN")=$E(DAYR,97,999) ; Tomorrow's Recess/if any
    13198 S:$E(DAY(DY,"P"),97,999)'="" DAY(DY,"P1")=$E(DAY(DY,"P"),97,999) ;non-prem ot for next day
    13299 S DAY(DY,"P")=$E(DAY(DY,"P"),1,96) ;non-prem ot for today
    133  I DAY(DY,"N")?1"0"."0",DAY(DY,"rN")'["r" S DAY(DY,"N")=""
     100 I DAY(DY,"N")?1"0"."0" S DAY(DY,"N")=""
    134101 S DAY(DY,"HOL")=$E(DAYH,1,96)
    135102 ;
     
    167134 .S X=DAY(DY-1,"P1")_$E(DAY(DY,"P"),$L(DAY(DY-1,"P1"))+1,96)
    168135 .S DAY(DY,"P")=X
    169  I $D(DAY(DY-1,"rN")),$L(DAY(DY-1,"rN")) D
    170  .S X=DAY(DY-1,"rN")_$E(DAY(DY,"r"),$L(DAY(DY-1,"rN"))+1,96)
    171  .S DAY(DY,"r")=X
    172136 ;
    173137END ; --- all done here
Note: See TracChangeset for help on using the changeset viewer.