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

PRSAPPQ.m

Go to the documentation of this file.
  1. PRSAPPQ ; HISC/REL-Display Time Data for Prior Pay Periods ;11/29/95 13:44
  1. ;;4.0;PAID;**6,132**;Sep 21, 1995;Build 13
  1. DIS W !!,?7,"Date",?17,"TW Scheduled Tour",?46,"Tour Exceptions"
  1. F0 ; Display Frames
  1. N Y8
  1. K Y1,Y2 S Y1=AUR(2),Y2=AUR(3),Y3=AUR(5),Y4=AUR(6),TC=$P(AUR(1),"^",2),Y8=$G(AUR(7))
  1. I Y1="" S Y1=$S(TC=1:"Day Off",TC=2:"Day Tour",TC=3!(TC=4):"Intermittent",1:"")
  1. I " 1 3 4 "'[TC,$P(AUR(4),"^",1)="" S Y2(1)="Unposted"
  1. I TC=3,$P(AUR(4),"^",4)=1 S Y2(1)="Day Worked"
  1. W !?3,DTE S (L3,L4)=0 I Y1="",Y2="" G EX
  1. D S1
  1. F K=1:1 Q:'$D(Y1(K))&'$D(Y2(K)) W:K>1 ! W:$D(Y1(K)) ?17,$P($G(Y8),U),?21,Y1(K) W:$D(Y2(K)) ?45,$P(Y2(K),"^",1),?63,$P(Y2(K),"^",2)
  1. W:Y3'="" !?10,Y3
  1. EX Q
  1. S1 ; Set Schedule Array
  1. F L1=1:3:19 S A1=$P(Y1,"^",L1) Q:A1="" S L3=L3+1,Y1(L3)=A1 S:$P(Y1,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y1,"^",L1+1) I $P(Y1,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y1,"^",L1+2),0)),"^",1)
  1. G:Y4="" S2
  1. F L1=1:3:19 S A1=$P(Y4,"^",L1) Q:A1="" S L3=L3+1,Y1(L3)=A1 S:$P(Y4,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y4,"^",L1+1) I $P(Y4,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y4,"^",L1+2),0)),"^",1)
  1. S2 ; Set Worked Array
  1. F L1=1:4:25 D I A1="" G S8
  1. .S A1=$P(Y2,"^",L1+2) Q:A1="" S L4=L4+1
  1. .S A2=$P(Y2,"^",L1) I A2'="" S Y2(L4)=A2_"-"_$P(Y2,"^",L1+1)
  1. .S K=$O(^PRST(457.3,"B",A1,0)) S $P(Y2(L4),"^",2)=A1_" "_$P($G(^PRST(457.3,+K,0)),"^",2)
  1. .I $P(Y2,"^",L1+3)'="" S L4=L4+1,Y2(L4)=" "_$P($G(^PRST(457.4,+$P(Y2,"^",L1+3),0)),"^",1)
  1. .QUIT
  1. QUIT
  1. ;
  1. S8 ;telweork hours of node 8
  1. F L1=2,3,4 I $P(Y8,U,L1) S L4=L4+1,Y2(L4)=$J($P(Y8,U,L1),0,2)_" "_$S(TC=2!(TC=3):"Day",1:"Hrs")_" - Telework "_$P("REG^MED^Ad Hoc",U,L1-1)
  1. QUIT
  1. ;
  1. VCS ; Display VCS Sales/Fee Basis
  1. S PAYP=$P($G(^PRSPC(DFN,0)),"^",21) W !!?30,$S(PAYP="F":"Fee Basis Appointee",1:"VCS Commission Sales")
  1. W !?11,"Sun Mon Tue Wed Thu Fri Sat Total",!
  1. W !,"Week 1" S VS=0,L1=1 F K=1:1:7 S L1=L1+8,Z1=$P(Z,"^",K) I Z1'="" S VS=VS+Z1 W ?L1,$J(Z1,7,2)
  1. W ?63,$J(VS,9,2)
  1. W !,"Week 2" S VS=0,L1=1 F K=8:1:14 S L1=L1+8,Z1=$P(Z,"^",K) I Z1'="" S VS=VS+Z1 W ?L1,$J(Z1,7,2)
  1. W ?63,$J(VS,9,2)
  1. I PAYP="F" W !! F K=19:1:21 S Z1=$P(Z,"^",K) W "Total ",$P("Hours Days Procedures"," ",K-18),": ",Z1," "
  1. Q
  1. ED ; Display Envir. Diff.
  1. W !!?26,"Environmental Differentials",!
  1. S Y="" F K=1:2:5 S Z1=$P(Z,"^",K) Q:'Z1 S:Y'="" Y=Y_"; " S Y=Y_$P($G(^PRST(457.6,+Z1,0)),"^",1)_" ( "_$P($G(^(0)),"^",3)_" % ) "_$P(Z,"^",K+1)_" Hrs."
  1. I Y'="" W !,"Week 1: ",Y
  1. S Y="" F K=7:2:11 S Z1=$P(Z,"^",K) Q:'Z1 S:Y'="" Y=Y_"; " S Y=Y_$P($G(^PRST(457.6,+Z1,0)),"^",1)_" ( "_$P($G(^(0)),"^",3)_" % ) "_$P(Z,"^",K+1)_" Hrs."
  1. I Y'="" W !,"Week 2: ",Y
  1. Q