PRSXP82 ;WCIOFO/MGD-ADD CENTRAL,PAID TO #200 ;09/16/2003
;;4.0;PAID;**82**;Sep 21, 1995
;
Q
;
; This program will add the new entry CENTRAL,PAID to the NEW PERSON
; (#200) file. This entry will be used by the VistA PAID/ETA
; software to track changes in the employee's Labor Distribution(s)
; through the processing of the various downloads received from
; Central Paid in Austin, Texas. It will also add
;
; For more details see the patch description on FORUM.
;
START ; Main Driver
;
N DIC,DIERR,DLAYGO,I,IENS,LCNT,MSG,PRSFDA,STA1,STA2,STA3,STANUM
N STATUS,TIME,TOI,U,UCIX,X,Y
S U="^",LCNT=1,(STA1,STA2,STA3)=""
K ^TMP($J)
D NOW^%DTC
S Y=%
D DD^%DT
S TIME=Y
W !!,"Post install routine PRSXP82 beginning at ",TIME_".",!
;
; Get Station Number
;
S STANUM=$$KSP^XUPARAM("INST")_","
S STANUM=$$GET1^DIQ(4,STANUM,99)
S MSG="Station: "_STANUM_" - "
;
; Check for UCI,VOL
;
X ^%ZOSF("UCI")
S UCIX=$G(Y)
I UCIX=""!(UCIX'?3U1","3U) S UCIX="???,???"
S MSG=MSG_UCIX_" - "
;
S X=$O(^VA(200,"B","CENTRAL,PAID",0))
I X D ERR1
;
I 'X D
. S X="CENTRAL,PAID",DIC(0)="L",DLAYGO=200,DIC="^VA(200,"
. D FILE^DICN
. I Y=-1 D ERR2
. I $P(Y,U,3) D
. . S ^TMP($J,"MGD",LCNT)=MSG_" CENTRAL,PAID added."
. . S LCNT=LCNT+1
. . W !,MSG_" CENTRAL,PAID added."
;
TOI ; Create entries for the Types Of Interfaces
K PRSFDA
W !
S LCNT=LCNT+1
S ^TMP($J,"MGD",LCNT)=""
S LCNT=LCNT+1
F I=1:1:4 D
. S TOI=$S(I=1:"INITIAL",I=2:"EDIT & UPDATE",I=3:"TRANSFER",4:"PAYRUN",1:"INITIAL")
. S IENS="?+"_I_",1,"
. S PRSFDA(454.02,IENS,.01)=I
. S PRSFDA(454.02,IENS,1)=TOI
. D UPDATE^DIE("","PRSFDA")
. I $D(DIERR)>0 D
. . S LCNT=LCNT+1
. . S ^TMP($J,"MGD",LCNT)=MSG_" unable to add "_TOI_" entry."
. . W !,MSG_" unable to add "_TOI_" entry.",!
. . S STA3=" ERROR #3"
. I $D(DIERR)<1 D
. . S LCNT=LCNT+1
. . S ^TMP($J,"MGD",LCNT)=MSG_" entry "_TOI_" added."
. . W !,MSG_" entry "_TOI_" added."
;
XMT ; Send status via mail message
;
I $D(^TMP($J,"MGD")) D
. S STATUS=STA1_STA2_STA3
. I STATUS'["ERROR" S STATUS="NO ERRORS"
. N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
. S XMDUZ=.5
. S XMSUB=MSG_" - "_STATUS_"."
. S XMTEXT="^TMP($J,""MGD"","
. S XMY("DILL.MATT@DOMAIN.EXT")="",XMY(DUZ)=""
. S XMY("MCCLARAN.PAM@DOMAIN.EXT")=""
. D ^XMD
;
K ^TMP($J),Y,%
W !!,"Post install routine PRSXP82 completed."
W !,"Status: ",STATUS_"."
Q
;
ERR1 ; Error message if CENTRAL,PAID already exists
S ^TMP($J,"MGD",LCNT)=MSG_" CENTRAL,PAID entry already exists."
S LCNT=LCNT+1
W !,MSG_" CENTRAL,PAID entry already exists."
S STA1="ERROR #1 "
Q
;
ERR2 ; Error message if unable to add CENTRAL,PAID entry
S ^TMP($J,"MGD",LCNT)=MSG_" unable to add CENTRAL,PAID entry."
S LCNT=LCNT+1
W !,MSG_" unable to add CENTRAL,PAID entry."
S STA2=" ERROR #2 "
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSXP82 2882 printed Sep 15, 2024@21:53:08 Page 2
PRSXP82 ;WCIOFO/MGD-ADD CENTRAL,PAID TO #200 ;09/16/2003
+1 ;;4.0;PAID;**82**;Sep 21, 1995
+2 ;
+3 QUIT
+4 ;
+5 ; This program will add the new entry CENTRAL,PAID to the NEW PERSON
+6 ; (#200) file. This entry will be used by the VistA PAID/ETA
+7 ; software to track changes in the employee's Labor Distribution(s)
+8 ; through the processing of the various downloads received from
+9 ; Central Paid in Austin, Texas. It will also add
+10 ;
+11 ; For more details see the patch description on FORUM.
+12 ;
START ; Main Driver
+1 ;
+2 NEW DIC,DIERR,DLAYGO,I,IENS,LCNT,MSG,PRSFDA,STA1,STA2,STA3,STANUM
+3 NEW STATUS,TIME,TOI,U,UCIX,X,Y
+4 SET U="^"
SET LCNT=1
SET (STA1,STA2,STA3)=""
+5 KILL ^TMP($JOB)
+6 DO NOW^%DTC
+7 SET Y=%
+8 DO DD^%DT
+9 SET TIME=Y
+10 WRITE !!,"Post install routine PRSXP82 beginning at ",TIME_".",!
+11 ;
+12 ; Get Station Number
+13 ;
+14 SET STANUM=$$KSP^XUPARAM("INST")_","
+15 SET STANUM=$$GET1^DIQ(4,STANUM,99)
+16 SET MSG="Station: "_STANUM_" - "
+17 ;
+18 ; Check for UCI,VOL
+19 ;
+20 XECUTE ^%ZOSF("UCI")
+21 SET UCIX=$GET(Y)
+22 IF UCIX=""!(UCIX'?3U1","3U)
SET UCIX="???,???"
+23 SET MSG=MSG_UCIX_" - "
+24 ;
+25 SET X=$ORDER(^VA(200,"B","CENTRAL,PAID",0))
+26 IF X
DO ERR1
+27 ;
+28 IF 'X
Begin DoDot:1
+29 SET X="CENTRAL,PAID"
SET DIC(0)="L"
SET DLAYGO=200
SET DIC="^VA(200,"
+30 DO FILE^DICN
+31 IF Y=-1
DO ERR2
+32 IF $PIECE(Y,U,3)
Begin DoDot:2
+33 SET ^TMP($JOB,"MGD",LCNT)=MSG_" CENTRAL,PAID added."
+34 SET LCNT=LCNT+1
+35 WRITE !,MSG_" CENTRAL,PAID added."
End DoDot:2
End DoDot:1
+36 ;
TOI ; Create entries for the Types Of Interfaces
+1 KILL PRSFDA
+2 WRITE !
+3 SET LCNT=LCNT+1
+4 SET ^TMP($JOB,"MGD",LCNT)=""
+5 SET LCNT=LCNT+1
+6 FOR I=1:1:4
Begin DoDot:1
+7 SET TOI=$SELECT(I=1:"INITIAL",I=2:"EDIT & UPDATE",I=3:"TRANSFER",4:"PAYRUN",1:"INITIAL")
+8 SET IENS="?+"_I_",1,"
+9 SET PRSFDA(454.02,IENS,.01)=I
+10 SET PRSFDA(454.02,IENS,1)=TOI
+11 DO UPDATE^DIE("","PRSFDA")
+12 IF $DATA(DIERR)>0
Begin DoDot:2
+13 SET LCNT=LCNT+1
+14 SET ^TMP($JOB,"MGD",LCNT)=MSG_" unable to add "_TOI_" entry."
+15 WRITE !,MSG_" unable to add "_TOI_" entry.",!
+16 SET STA3=" ERROR #3"
End DoDot:2
+17 IF $DATA(DIERR)<1
Begin DoDot:2
+18 SET LCNT=LCNT+1
+19 SET ^TMP($JOB,"MGD",LCNT)=MSG_" entry "_TOI_" added."
+20 WRITE !,MSG_" entry "_TOI_" added."
End DoDot:2
End DoDot:1
+21 ;
XMT ; Send status via mail message
+1 ;
+2 IF $DATA(^TMP($JOB,"MGD"))
Begin DoDot:1
+3 SET STATUS=STA1_STA2_STA3
+4 IF STATUS'["ERROR"
SET STATUS="NO ERRORS"
+5 NEW DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
+6 SET XMDUZ=.5
+7 SET XMSUB=MSG_" - "_STATUS_"."
+8 SET XMTEXT="^TMP($J,""MGD"","
+9 SET XMY("DILL.MATT@DOMAIN.EXT")=""
SET XMY(DUZ)=""
+10 SET XMY("MCCLARAN.PAM@DOMAIN.EXT")=""
+11 DO ^XMD
End DoDot:1
+12 ;
+13 KILL ^TMP($JOB),Y,%
+14 WRITE !!,"Post install routine PRSXP82 completed."
+15 WRITE !,"Status: ",STATUS_"."
+16 QUIT
+17 ;
ERR1 ; Error message if CENTRAL,PAID already exists
+1 SET ^TMP($JOB,"MGD",LCNT)=MSG_" CENTRAL,PAID entry already exists."
+2 SET LCNT=LCNT+1
+3 WRITE !,MSG_" CENTRAL,PAID entry already exists."
+4 SET STA1="ERROR #1 "
+5 QUIT
+6 ;
ERR2 ; Error message if unable to add CENTRAL,PAID entry
+1 SET ^TMP($JOB,"MGD",LCNT)=MSG_" unable to add CENTRAL,PAID entry."
+2 SET LCNT=LCNT+1
+3 WRITE !,MSG_" unable to add CENTRAL,PAID entry."
+4 SET STA2=" ERROR #2 "
+5 QUIT
+6 ;