1 | PRSXP82 ;WCIOFO/MGD-ADD CENTRAL,PAID TO #200 ;09/16/2003
|
---|
2 | ;;4.0;PAID;**82**;Sep 21, 1995
|
---|
3 | ;
|
---|
4 | Q
|
---|
5 | ;
|
---|
6 | ; This program will add the new entry CENTRAL,PAID to the NEW PERSON
|
---|
7 | ; (#200) file. This entry will be used by the VistA PAID/ETA
|
---|
8 | ; software to track changes in the employee's Labor Distribution(s)
|
---|
9 | ; through the processing of the various downloads received from
|
---|
10 | ; Central Paid in Austin, Texas. It will also add
|
---|
11 | ;
|
---|
12 | ; For more details see the patch description on FORUM.
|
---|
13 | ;
|
---|
14 | START ; Main Driver
|
---|
15 | ;
|
---|
16 | N DIC,DIERR,DLAYGO,I,IENS,LCNT,MSG,PRSFDA,STA1,STA2,STA3,STANUM
|
---|
17 | N STATUS,TIME,TOI,U,UCIX,X,Y
|
---|
18 | S U="^",LCNT=1,(STA1,STA2,STA3)=""
|
---|
19 | K ^TMP($J)
|
---|
20 | D NOW^%DTC
|
---|
21 | S Y=%
|
---|
22 | D DD^%DT
|
---|
23 | S TIME=Y
|
---|
24 | W !!,"Post install routine PRSXP82 beginning at ",TIME_".",!
|
---|
25 | ;
|
---|
26 | ; Get Station Number
|
---|
27 | ;
|
---|
28 | S STANUM=$$KSP^XUPARAM("INST")_","
|
---|
29 | S STANUM=$$GET1^DIQ(4,STANUM,99)
|
---|
30 | S MSG="Station: "_STANUM_" - "
|
---|
31 | ;
|
---|
32 | ; Check for UCI,VOL
|
---|
33 | ;
|
---|
34 | X ^%ZOSF("UCI")
|
---|
35 | S UCIX=$G(Y)
|
---|
36 | I UCIX=""!(UCIX'?3U1","3U) S UCIX="???,???"
|
---|
37 | S MSG=MSG_UCIX_" - "
|
---|
38 | ;
|
---|
39 | S X=$O(^VA(200,"B","CENTRAL,PAID",0))
|
---|
40 | I X D ERR1
|
---|
41 | ;
|
---|
42 | I 'X D
|
---|
43 | . S X="CENTRAL,PAID",DIC(0)="L",DLAYGO=200,DIC="^VA(200,"
|
---|
44 | . D FILE^DICN
|
---|
45 | . I Y=-1 D ERR2
|
---|
46 | . I $P(Y,U,3) D
|
---|
47 | . . S ^TMP($J,"MGD",LCNT)=MSG_" CENTRAL,PAID added."
|
---|
48 | . . S LCNT=LCNT+1
|
---|
49 | . . W !,MSG_" CENTRAL,PAID added."
|
---|
50 | ;
|
---|
51 | TOI ; Create entries for the Types Of Interfaces
|
---|
52 | K PRSFDA
|
---|
53 | W !
|
---|
54 | S LCNT=LCNT+1
|
---|
55 | S ^TMP($J,"MGD",LCNT)=""
|
---|
56 | S LCNT=LCNT+1
|
---|
57 | F I=1:1:4 D
|
---|
58 | . S TOI=$S(I=1:"INITIAL",I=2:"EDIT & UPDATE",I=3:"TRANSFER",4:"PAYRUN",1:"INITIAL")
|
---|
59 | . S IENS="?+"_I_",1,"
|
---|
60 | . S PRSFDA(454.02,IENS,.01)=I
|
---|
61 | . S PRSFDA(454.02,IENS,1)=TOI
|
---|
62 | . D UPDATE^DIE("","PRSFDA")
|
---|
63 | . I $D(DIERR)>0 D
|
---|
64 | . . S LCNT=LCNT+1
|
---|
65 | . . S ^TMP($J,"MGD",LCNT)=MSG_" unable to add "_TOI_" entry."
|
---|
66 | . . W !,MSG_" unable to add "_TOI_" entry.",!
|
---|
67 | . . S STA3=" ERROR #3"
|
---|
68 | . I $D(DIERR)<1 D
|
---|
69 | . . S LCNT=LCNT+1
|
---|
70 | . . S ^TMP($J,"MGD",LCNT)=MSG_" entry "_TOI_" added."
|
---|
71 | . . W !,MSG_" entry "_TOI_" added."
|
---|
72 | ;
|
---|
73 | XMT ; Send status via mail message
|
---|
74 | ;
|
---|
75 | I $D(^TMP($J,"MGD")) D
|
---|
76 | . S STATUS=STA1_STA2_STA3
|
---|
77 | . I STATUS'["ERROR" S STATUS="NO ERRORS"
|
---|
78 | . N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
|
---|
79 | . S XMDUZ=.5
|
---|
80 | . S XMSUB=MSG_" - "_STATUS_"."
|
---|
81 | . S XMTEXT="^TMP($J,""MGD"","
|
---|
82 | . S XMY("DILL.MATT@FORUM.VA.GOV")="",XMY(DUZ)=""
|
---|
83 | . S XMY("MCCLARAN.PAM@FORUM.VA.GOV")=""
|
---|
84 | . D ^XMD
|
---|
85 | ;
|
---|
86 | K ^TMP($J),Y,%
|
---|
87 | W !!,"Post install routine PRSXP82 completed."
|
---|
88 | W !,"Status: ",STATUS_"."
|
---|
89 | Q
|
---|
90 | ;
|
---|
91 | ERR1 ; Error message if CENTRAL,PAID already exists
|
---|
92 | S ^TMP($J,"MGD",LCNT)=MSG_" CENTRAL,PAID entry already exists."
|
---|
93 | S LCNT=LCNT+1
|
---|
94 | W !,MSG_" CENTRAL,PAID entry already exists."
|
---|
95 | S STA1="ERROR #1 "
|
---|
96 | Q
|
---|
97 | ;
|
---|
98 | ERR2 ; Error message if unable to add CENTRAL,PAID entry
|
---|
99 | S ^TMP($J,"MGD",LCNT)=MSG_" unable to add CENTRAL,PAID entry."
|
---|
100 | S LCNT=LCNT+1
|
---|
101 | W !,MSG_" unable to add CENTRAL,PAID entry."
|
---|
102 | S STA2=" ERROR #2 "
|
---|
103 | Q
|
---|
104 | ;
|
---|