source: FOIAVistA/tag/r/PAID-PRS/PRSDSTAT.m@ 1251

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1PRSDSTAT ;HISC/GWB-PAID DOWNLOAD STATISTICS GENERATOR ;02/20/03
2 ;;4.0;PAID;**28,78**;Sep 21, 1995
3 S ^TMP($J,"PRSD",1)="Download statistics for station "_STA_" for "_$E(DATE,5,6)_"/"_$E(DATE,7,8)_"/"_$E(DATE,3,4)_":"
4 S ^TMP($J,"PRSD",2)=" "
5 S ^TMP($J,"PRSD",3)="Download type: "_MTYPE
6 S ^TMP($J,"PRSD",4)=$S(TYPE="P":"Pay Period: "_PP,1:" ")
7 S ^TMP($J,"PRSD",5)="Number of employees processed: "_ECNT
8 S ^TMP($J,"PRSD",6)=" "
9 S ^TMP($J,"PRSD",8)=" "
10 S (ERRCNT,ERRIEN)=0,ERRID=TYPE_"-"_DATE_"-"_STA,SUBS=9
11 F EE=1:1 S ERRIEN=$O(^PRSD(450.11,"B",ERRID,ERRIEN)) Q:ERRIEN'>0 D ERRS
12 I ERRCNT=0 S ^TMP($J,"PRSD",7)="There were no processing errors."
13 I ERRCNT>0 S ^TMP($J,"PRSD",7)="The following errors were encountered:"
14 I TYPE="D" S ^TMP($J,"PRSD",SUBS)="The following employees were separated in the previous pay period:" D ADLIST
15 I (TYPE="E")!(TYPE="I"),$D(^TMP($J,"PRS")) S ^TMP($J,"PRSD",SUBS)="The following employees have been added to the PAID EMPLOYEE file:" D ADLIST
16 I TYPE="E",$D(^TMP($J,"PRSNC")) S ^TMP($J,"PRSD",SUBS)="The following employees' names have been changed in the PAID EMPLOYEE file:" D NCLIST
17 I TYPE="T",$D(^TMP($J,"PRS")) S ^TMP($J,"PRSD",SUBS)="The following employees are transfers to your station or SSN changes:" D ADLIST
18 I (TYPE="E")!(TYPE="I")!(TYPE="T"),$D(^TMP($J,"ORG")) S SUBS=SUBS+1 S ^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)="The following cost center/organizations were added to the PAID CODE FILES file:" D ORGLIST
19 S XMY("G.PAD@"_^XMB("NETNAME"))=""
20 S XMDUZ=.5,XMSUB="PAID "_MTYPE_" statistics "_$E(DATE,5,6)_"/"_$E(DATE,7,8)_"/"_$E(DATE,3,4),XMTEXT="^TMP($J,""PRSD""," D ^XMD
21 K ^TMP($J),SUBS
22DELMSG ;D NOW^%DTC S DT=X
23 ;S MBIEN=0,MBIEN=$O(^XMB(3.7,.5,2,"B","S.PRSD",MBIEN))
24 ;S MMIEN=0 F S MMIEN=$O(^XMB(3.7,.5,2,MBIEN,1,MMIEN)) Q:MMIEN'>0 D
25 ;.I '$D(^XMB(3.9,MMIEN)) S XMSER="S.PRSD",XMZ=MMIEN D REMSBMSG^XMA1C Q
26 ;.S X=$P(^XMB(3.9,MMIEN,0),U,3),X=$P(X," ",1)_$P(X," ",2)_$P(X," ",3) D ^%DT I Y'=-1 S X1=DT,X2=Y D ^%DTC I X>90 S XMSER="S.PRSD",XMZ=MMIEN D REMSBMSG^XMA1C
27 K MBIEN,MMIEN,X,Y,XMSER,NOS,SPACES
28 Q
29ERRS S ERRMSG=$P(^PRSD(450.11,ERRIEN,0),U,3)
30 S ^TMP($J,"PRSD",SUBS)=ERRMSG,SUBS=SUBS+1
31 S ^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
32 I ERRMSG'["Unable to add",ERRMSG'["already used by" S ERRCNT=ERRCNT+1
33 S DIK="^PRSD(450.11,",DA=ERRIEN D ^DIK
34 K ERRMSG Q
35ADLIST S NAME="" F S NAME=$O(^TMP($J,"PRS",NAME)) Q:NAME="" S SSN="" F S SSN=$O(^TMP($J,"PRS",NAME,SSN)) Q:SSN="" D
36 .S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
37 .S SPACES="" S NOS=27-$L(NAME),$P(SPACES," ",NOS)=" "
38 .S ^TMP($J,"PRSD",SUBS)=$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9)_" "_NAME_SPACES_$P(^TMP($J,"PRS",NAME,SSN),U,1)_" "_$P(^TMP($J,"PRS",NAME,SSN),U,2)
39 S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
40 I $D(^TMP($J,"PRSNP")) D
41 .S ^TMP($J,"PRSD",SUBS)="The following employees' SSNs could not be found in the NEW PERSON file."
42 .S SUBS=SUBS+1
43 .S ^TMP($J,"PRSD",SUBS)="They may need:"
44 .S SUBS=SUBS+1
45 .S ^TMP($J,"PRSD",SUBS)="1) To be added to the NEW PERSON file,"
46 .S SUBS=SUBS+1
47 .S ^TMP($J,"PRSD",SUBS)="2) To have their SSNs added to the NEW PERSON file,"
48 .S SUBS=SUBS+1
49 .S ^TMP($J,"PRSD",SUBS)="3) To have their SSNs corrected in the NEW PERSON file or"
50 .S SUBS=SUBS+1
51 .S ^TMP($J,"PRSD",SUBS)="4) To have their SSNs corrected (via OLDE) in the PAID EMPLOYEE file."
52 .S SUBS=SUBS+1
53 .S ^TMP($J,"PRSD",SUBS)="Please notify or forward this message to your IRM representative."
54 .S NAME="" F S NAME=$O(^TMP($J,"PRSNP",NAME)) Q:NAME="" S SSN="" F S SSN=$O(^TMP($J,"PRSNP",NAME,SSN)) Q:SSN="" D
55 ..S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
56 ..S ^TMP($J,"PRSD",SUBS)=$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9)_" "_NAME
57 S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
58 Q
59NCLIST S NAME=""
60 F S NAME=$O(^TMP($J,"PRSNC",NAME)) Q:NAME="" S SSN="" F S SSN=$O(^TMP($J,"PRSNC",NAME,SSN)) Q:SSN="" D
61 .S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1
62 .S SPACES="" S NOS=27-$L(NAME),$P(SPACES," ",NOS)=" "
63 .S ^TMP($J,"PRSD",SUBS)=$E(SSN,1,3)_"-"_$E(SSN,4,5)_"-"_$E(SSN,6,9)_" "_NAME_SPACES_$P(^TMP($J,"PRSNC",NAME,SSN),U,1)
64 S SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=" "
65 Q
66ORGLIST S NAME=""
67 F S NAME=$O(^TMP($J,"ORG",NAME)) Q:NAME="" S SUBS=SUBS+1 S ^TMP($J,"PRSD",SUBS)=" ",SUBS=SUBS+1,^TMP($J,"PRSD",SUBS)=NAME
68 Q
Note: See TracBrowser for help on using the repository browser.