source: FOIAVistA/trunk/r/PAID-PRS/PRSEPMC.m@ 1499

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1PRSEPMC ;HISC/DAD-EMPLOYEE MANDATORY TRAINING GROUP/CLASS REPORT ;4/24/1998
2 ;;4.0;PAID;**41**;Sep 21, 1995
3EN1 ; ENTRY POINT FROM OPTION
4 S X=$G(^PRSE(452.7,1,"OFF")) I X=""!(X=1) D MSG6^PRSEMSG Q
5 D EN2^PRSEUTL3($G(DUZ))
6 I PRSESER'>0,'(DUZ(0)="@") D MSG3^PRSEMSG G EXIT
7 S PSPC=PRSESER,PSPC("TX")=PRSESER("TX")
8SEL K Y S DIR(0)="SO^M:Mandatory Training Group/Employee Report;E:Employee Mandatory Training Group/Class Report",DIR("A")="Select Option" D ^DIR K DIR I $D(DTOUT)!($D(DUOUT))!(U[X)!(Y="") D ^PRSEKILL Q
9 I Y="M" D ^PRSEPRG0 G EN1
10 E I (DUZ(0)["@"!(+$$EN4^PRSEUTL3($G(DUZ)))) D G:Y'>0 EXIT
11 . N DIC
12 . S DIC="^PRSP(454.1,",DIC(0)="AQEMZ",DIC("A")="Select SERVICE: "
13 . I PRSESER("TX")]"" S DIC("B")=PRSESER("TX")
14 . W ! D ^DIC Q:Y'>0
15 . S PSPC=+Y,PSPC("TX")=$P(Y,"^",2)
16 . Q
17SELECT S DIR(0)="SO^A:(A)ll Employees For a Service;S:(S)elected Service Employees",DIR("A")="Select ASSIGNMENT OPTION" D ^DIR K DIR G EXIT:$G(DIRUT) S PRSESEL=Y
18 I PRSESEL="S" W ! K PRSEXMY F S Y=-1 W !,$S($O(PRSEXMY(0))>0:"Select Another Employee: ",1:"Select EMPLOYEE: ") R X:DTIME S:'$T X="^^" S:X="" Y="" Q:"^^"[X D Q:(Y<0)
19 . I X["?" D
20 .. D MSG21^PRSEMSG I '($O(PRSEXMY(0))>0) S Y=1
21 .. D MSG2^PRSEMSG S Y=1
22 .. Q
23 . S PRSEN=0 S:"'-"[$E(X) X=$E(X,2,999),PRSEN=1
24 . S DIC("S")="I $P($G(^PRSPC(+Y,1)),U,33)'=""Y"",$G(PSPC(""TX""))=$$EN2^PRSEUTL4(+$G(Y))"
25 . S DIC="^PRSPC(",DIC(0)="ZMEQ" D ^DIC K DIC I Y'>0,X]"" S Y=0 Q
26 . I Y>0,PRSEN W $S($D(PRSEXMY(+Y)):" Deleted.",1:" Not selected.") K PRSEXMY(+Y) Q
27 . S (X,PRSEXMY(+Y))=""
28 . Q
29 I PRSESEL="S",'$D(PRSEXMY) G EXIT
30DEV ;
31 S ZTRTN="ENTSK^PRSEPMC"
32 S (ZTSAVE("PRSESEL"),ZTSAVE("PRSEXMY"),ZTSAVE("PRSEXMY("),ZTSAVE("PSPC"),ZTSAVE("PSPC("))=""
33 S ZTDESC="Education Tracking mandatory training group/class report"
34 K %ZIS,IOP D DEV^PRSEUTL G:POP!($D(ZTSK)) EXIT
35ENTSK ;
36 K ^TMP("PRSE",$J)
37 I PRSESEL="S" D
38 . S PRSED0=0
39 . F S PRSED0=$O(PRSEXMY(PRSED0)) Q:PRSED0'>0 D SORT
40 . Q
41 I PRSESEL="A",$G(PSPC) D
42 . S PRS454=0
43 . F S PRS454=$O(^PRSP(454,1,"ORG","C",PSPC,PRS454)) Q:PRS454'>0 D
44 .. S CORGCODE=$TR($P($G(^PRSP(454,1,"ORG",PRS454,0)),U),":")
45 .. S PRSED0=0
46 .. F S PRSED0=$O(^PRSPC("ACC",CORGCODE,PRSED0)) Q:PRSED0'>0 D SORT
47 .. Q
48 . Q
49 D PRINT
50EXIT ;
51 K ^TMP("PRSE",$J) D CLOSE^PRSEUTL,^PRSEKILL
52 G:IOST="C" EN1
53 Q
54SORT ;
55 ; ^TMP("PRSE" , $J , Employee_Name , Review_Group_Name , Class_Name)=""
56 S PRSENAME=$P($G(^PRSPC(PRSED0,0)),"^") Q:PRSENAME=""
57 S PRSED1=0
58 F S PRSED1=$O(^PRSPC(PRSED0,5,PRSED1)) Q:PRSED1'>0 D
59 . S PRSEGD0=+$G(^PRSPC(PRSED0,5,PRSED1,0)),PRSEDT=$P($G(^(0)),U,2)
60 . S PRSEGRP=$P($G(^PRSE(452.3,PRSEGD0,0)),"^") Q:PRSEGRP=""
61 . S PRSEGD1=0
62 . F S PRSEGD1=$O(^PRSE(452.3,PRSEGD0,1,PRSEGD1)) Q:PRSEGD1'>0 D
63 .. S PRSECD0=+$G(^PRSE(452.3,PRSEGD0,1,PRSEGD1,0))
64 .. S PRSECLAS=$P($G(^PRSE(452.1,PRSECD0,0)),"^") Q:PRSECLAS=""
65 .. S ^TMP("PRSE",$J,PRSENAME,PRSEGRP)=PRSEDT
66 .. S ^TMP("PRSE",$J,PRSENAME,PRSEGRP,PRSECLAS)=""
67 .. Q
68 . I $O(^TMP("PRSE",$J,PRSENAME,PRSEGRP,""))="" D
69 .. S ^TMP("PRSE",$J,PRSENAME,PRSEGRP,"NONE")=""
70 .. Q
71 . Q
72 S PRSEGRP="~INDV. CLASSES"
73 S PRSED1=0
74 F S PRSED1=$O(^PRSPC(PRSED0,6,PRSED1)) Q:PRSED1'>0 D
75 . S PRSE=$G(^PRSPC(PRSED0,6,PRSED1,0))
76 . S PRSECD0=+PRSE,PRSECNT=+$P(PRSE,"^",2),PRSEDT=$P(PRSE,"^",3)
77 . Q:PRSECNT
78 . S PRSECLAS=$P($G(^PRSE(452.1,PRSECD0,0)),"^") Q:PRSECLAS=""
79 . S ^TMP("PRSE",$J,PRSENAME,PRSEGRP,PRSECLAS)=PRSEDT
80 . Q
81 I $O(^TMP("PRSE",$J,PRSENAME,""))="" D
82 . S ^TMP("PRSE",$J,PRSENAME,"NONE","NONE")=""
83 . Q
84 Q
85PRINT ;
86 S POUT=0,PRSEPAGE=1,PRSEUNDL="",$P(PRSEUNDL,"-",81)=""
87 S Y=DT D DD^%DT S PRSENOW=Y
88 U IO D HEADER
89 I $O(^TMP("PRSE",$J,""))="" W !!,"No data found for this report." Q
90 S PRSENAME=""
91 F S PRSENAME=$O(^TMP("PRSE",$J,PRSENAME)) Q:PRSENAME=""!POUT D
92 . W !!,PRSENAME I $Y>(IOSL-6) D PAUSE,HEADER
93 . S PRSEGRP=""
94 . F S PRSEGRP=$O(^TMP("PRSE",$J,PRSENAME,PRSEGRP)) Q:PRSEGRP=""!POUT D
95 .. S Y="" S:PRSEGRP'["~" Y=$G(^TMP("PRSE",$J,PRSENAME,PRSEGRP)) D:Y>0 DD^%DT W !?5,$E(PRSEGRP,$E(PRSEGRP)="~"+1,20) W:Y'="" ?26,Y I $Y>(IOSL-6) D PAUSE,HEADER
96 .. S PRSECLAS=""
97 .. F S PRSECLAS=$O(^TMP("PRSE",$J,PRSENAME,PRSEGRP,PRSECLAS)) Q:PRSECLAS=""!POUT S PRSEDT=^(PRSECLAS) D
98 ... S Y=$S(PRSEGRP["~":$G(^TMP("PRSE",$J,PRSENAME,PRSEGRP,PRSECLAS)),1:$G(^TMP("PRSE",$J,PRSENAME,PRSEGRP))) D:Y>0 DD^%DT W ! W:Y'="" ?26,Y W ?42,$E(PRSECLAS,1,36) I $Y>(IOSL-6) D PAUSE,HEADER
99 ... Q
100 .. Q
101 . Q
102 Q
103PAUSE ;
104 I $E(IOST)'="C" Q
105 K DIR S DIR(0)="E" D ^DIR S POUT=$S(Y'>0:1,1:0)
106 Q
107HEADER ;
108 I POUT Q
109 I ($E(IOST)="C")!(PRSEPAGE>1) W @IOF
110 W !?17,"EMPLOYEE MANDATORY TRAINING GROUP/CLASS REPORT",?68,PRSENOW
111 W !?80-$L(PSPC("TX"))/2,PSPC("TX")
112 W !,"EMPLOYEE",?10,"REVIEW GROUP",?26,"DATE ASSIGNED",?42,"PROGRAM/CLASS"
113 W ?68,"PAGE: ",PRSEPAGE,!,PRSEUNDL
114 S PRSEPAGE=PRSEPAGE+1
115 Q
Note: See TracBrowser for help on using the repository browser.