source: WorldVistAEHR/trunk/r/PAID-PRS/PRSADP1.m@ 1093

Last change on this file since 1093 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1PRSADP1 ; HISC/REL,WIRMFO/JAH - Display Employee T&A Data ;AUG 07, 1997
2 ;;4.0;PAID;**22,114**;Sep 21, 1995;Build 6
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 W:$E(IOST,1,2)="C-" @IOF W !?26,"VA TIME & ATTENDANCE SYSTEM"
5 W !?23,"EMPLOYEE TIME AND ATTENDANCE DATA" D HDR
6 W !!,?7,"Date",?21,"Scheduled Tour",?46,"Tour Exceptions"
7 W !?3,"------------------------------------------------------------------------",!
8F0 ; Display Frames
9 K Y1,Y2 S Y1=$G(^PRST(458,PPI,"E",DFN,"D",DAY,1)),Y2=$G(^(2)),Y3=$G(^(3)),Y4=$G(^(4)),TC=$P($G(^(0)),"^",2)
10 I Y1="" S Y1=$S(TC=1:"Day Off",TC=2:"Day Tour",TC=3!(TC=4):"Intermittent",1:"")
11 I " 1 3 4 "'[TC,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",1)="" S Y2(1)="Unposted"
12 I TC=3,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",4)=1 S Y2(1)="Day Worked"
13 W !?3,DTE S (L3,L4)=0 I Y1="",Y2="" S Y31="" G EX
14 D S1
15 F K=1:1 Q:'$D(Y1(K))&'$D(Y2(K)) W:K>1 ! W:$D(Y1(K)) ?21,Y1(K) W:$D(Y2(K)) ?45,$P(Y2(K),"^",1),?63,$P(Y2(K),"^",2)
16 W:Y3'="" !?10,Y3
17EX Q
18F1 ; Display Pay period for Certification
19 K Y1,Y2 S Y1=$G(^PRST(458,PPI,"E",DFN,"D",DAY,1)),Y2=$G(^(2)),Y3=$G(^(3)),Y4=$G(^(4)),TC=$P($G(^(0)),"^",2)
20 I Y1="" S Y1=$S(TC=1:"Day Off",TC=2:"Day Tour",TC=3!(TC=4):"Intermittent",1:"")
21 I " 1 3 4 "'[TC,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",1)="" S Y2(1)="Unposted"
22 I TC=3,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",4)=1 S Y2(1)="Day Worked"
23 W !?3,DTE S (L3,L4)=0 I Y1="",Y2="" S Y31="" G EX
24 D S1
25 Q
26S1 ; Set Schedule Array
27 S Y31=""
28 F L1=1:3:19 S A1=$P(Y1,"^",L1) Q:A1="" D
29 .S L3=L3+1,Y1(L3)=A1 S:$P(Y1,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y1,"^",L1+1)
30 .S:Y31'="" Y31=Y31_", " S Y31=Y31_Y1(L3)
31 .I $P(Y1,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y1,"^",L1+2),0)),"^",1)
32 .I S Y31=Y31_" "_$P($G(^PRST(457.2,+$P(Y1,"^",L1+2),0)),"^",6)
33 .Q
34 G:Y4="" S2
35 F L1=1:3:19 S A1=$P(Y4,"^",L1) Q:A1="" D
36 .S L3=L3+1,Y1(L3)=A1 S:$P(Y4,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y4,"^",L1+1)
37 .S:Y31'="" Y31=Y31_", " S Y31=Y31_Y1(L3)
38 .I $P(Y4,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y4,"^",L1+2),0)),"^",1)
39 .I S Y31=Y31_" "_$P($G(^PRST(457.2,+$P(Y1,"^",L1+2),0)),"^",6)
40 .Q
41S2 ; Set Worked Array
42 F L1=1:4:25 D I A1="" G S3
43 .S A1=$P(Y2,"^",L1+2) Q:A1="" S L4=L4+1
44 .S A2=$P(Y2,"^",L1) I A2'="" S Y2(L4)=A2_"-"_$P(Y2,"^",L1+1)
45 .S K=$O(^PRST(457.3,"B",A1,0)) S $P(Y2(L4),"^",2)=A1_" "_$P($G(^PRST(457.3,+K,0)),"^",2)
46 .I $P(Y2,"^",L1+3)'="" S L4=L4+1,Y2(L4)=" "_$P($G(^PRST(457.4,+$P(Y2,"^",L1+3),0)),"^",1)
47 .Q
48S3 Q
49HDR ; Display Employee Data
50 S C0=^PRSPC(DFN,0) W !!,$P(C0,"^",1) S X=$P(C0,"^",9)
51 I '$G(PRSTLV)!($G(PRSTLV)=1) W ?65,"XXX-XX-",$E(X,6,9)
52 I $G(PRSTLV)=2!($G(PRSTLV)=3) W ?65,$E(X),"XX-XX-",$E(X,6,9)
53 I $G(PRSTLV)=7 W ?65,$E(X,1,3)_"-"_$E(X,4,5)_"-"_$E(X,6,9)
54 W !!,"Station: ",$P(C0,"^",7),?30,"Normal Hours: ",$J($P(C0,"^",16),3),?65,"Duty Basis:",?77,$P(C0,"^",10)
55 W !,"T&L: ",$P(C0,"^",8),?30,"Pay Plan:",?46,$P(C0,"^",21),?65,"Comp/Flex:",?77,$S(PPE'="":$P($G(^PRST(458,PPI,"E",DFN,0)),"^",6),1:$P($G(^PRSPC(DFN,1)),"^",7))
56 W ! W:PPE'="" "Pay Per: ",PPE W ?65,"FLSA:",?77,$P(C0,"^",12) Q
Note: See TracBrowser for help on using the repository browser.