1 | DVB458P ;ALB/RBS - ENV/PRE/POST-INSTALL FOR PATCH DVB*4*58 ; 1/11/07 1:34pm
|
---|
2 | ;;4.0;HINQ;**58**;03/25/92;Build 29
|
---|
3 | ;
|
---|
4 | ;This routine is the main install routine that will update the
|
---|
5 | ;DISABILITY CONDITION (#31) file with the new mapping of Rated
|
---|
6 | ;Disabilities (VA) VBA DX CODES to specific ICD DIAGNOSIS codes.
|
---|
7 | ;There are 3,085 ICD9 codes that will be added to the (#31) file.
|
---|
8 | ;
|
---|
9 | ;
|
---|
10 | Q ;no direct entry
|
---|
11 | ;
|
---|
12 | ;
|
---|
13 | ENV ;Main entry point for Environment check point.
|
---|
14 | ;
|
---|
15 | S XPDABORT=""
|
---|
16 | ;checks programmer variables
|
---|
17 | D PROGCHK(.XPDABORT)
|
---|
18 | ;check if patch install is running
|
---|
19 | D ISRUNING(.XPDABORT)
|
---|
20 | ;
|
---|
21 | I XPDABORT="" K XPDABORT
|
---|
22 | Q
|
---|
23 | ;
|
---|
24 | ;
|
---|
25 | PRE ;Main entry point for Pre-init items.
|
---|
26 | ;
|
---|
27 | Q
|
---|
28 | ;
|
---|
29 | ;
|
---|
30 | POST ;Main entry point for Post-init items.
|
---|
31 | ;
|
---|
32 | N DVBTOT ;count of total ICD9 codes filed
|
---|
33 | N DVBTMP ;Closed Root global reference for error reporting
|
---|
34 | ;remove data from #field 20 in file #31 and repopulate
|
---|
35 | I $$VFIELD^DILFD(31,20) D
|
---|
36 | .D DELETE^DVB458P1
|
---|
37 | S DVBTMP=$NA(^TMP("DVB458P",$J))
|
---|
38 | K @DVBTMP
|
---|
39 | S @DVBTMP@(0)="PATCH DVB*4*58 POST-INSTALL^"_$$NOW^XLFDT
|
---|
40 | S DVBTOT=0
|
---|
41 | ;
|
---|
42 | D BMES^XPDUTL(" >>> *** Updating the DISABILITY CONDITION (#31) file...")
|
---|
43 | D MES^XPDUTL(" *** Please be patient, this should take less than 5 minutes.")
|
---|
44 | D MES^XPDUTL(" ")
|
---|
45 | ;
|
---|
46 | ;call to process (#31) file updates
|
---|
47 | D POST^DVB458P1(DVBTMP,.DVBTOT)
|
---|
48 | ;
|
---|
49 | S @DVBTMP@(0)=@DVBTMP@(0)_"^"_$$NOW^XLFDT_"^"_DVBTOT
|
---|
50 | ;
|
---|
51 | I '$D(@DVBTMP@("ERROR")) D
|
---|
52 | . D BMES^XPDUTL(" >>> *** SUCCESS updating the DISABILITY CONDITION (#31) file.")
|
---|
53 | . D MES^XPDUTL(" Total RELATED ICD9 CODES filed: "_DVBTOT)
|
---|
54 | . ;
|
---|
55 | E D
|
---|
56 | . D BMES^XPDUTL(" >>> *** FAILURE updating the DISABILITY CONDITION (#31) file.")
|
---|
57 | . D BMES^XPDUTL(" Filing error's have occurred when adding the new RELATED ICD9 CODES.")
|
---|
58 | . D MES^XPDUTL(" Immediate resolution is necessary to maintain database integrity.")
|
---|
59 | . D BMES^XPDUTL(" A MailMan message has been sent to the installer of this patch")
|
---|
60 | . D MES^XPDUTL(" with a listing of the error's.")
|
---|
61 | . D BMES^XPDUTL(" Once these filing error's have been resolved, please re-run")
|
---|
62 | . D MES^XPDUTL(" the Post-Installation routine directly from programmer mode")
|
---|
63 | . D MES^XPDUTL(" by entering the following command:")
|
---|
64 | . D MES^XPDUTL(" ")
|
---|
65 | . D MES^XPDUTL(" D POST^DVB458P")
|
---|
66 | . D MES^XPDUTL(" ")
|
---|
67 | . D BMES^XPDUTL(" >>> I'm now creating and sending the MailMan message...")
|
---|
68 | . ;
|
---|
69 | . D SENDMSG(DVBTMP,.DVBTOT)
|
---|
70 | . ;
|
---|
71 | . D MES^XPDUTL(" >>> All done.")
|
---|
72 | ;
|
---|
73 | ;cleanup temp file
|
---|
74 | K @DVBTMP
|
---|
75 | Q
|
---|
76 | ;
|
---|
77 | ;
|
---|
78 | SENDMSG(DVBTMP,DVBTOT) ;send failure MailMan message to installer of patch
|
---|
79 | ;
|
---|
80 | N DIFROM,DVBMSG
|
---|
81 | N XMY,XMDUZ,XMSUB,XMTEXT,XMDUN,XMZ
|
---|
82 | S XMSUB="DVB*4.0*58 Patch Post-Install Error Listing"
|
---|
83 | S XMTEXT="DVBMSG("
|
---|
84 | S XMDUZ=.5,(XMY(DUZ),XMY(XMDUZ))=""
|
---|
85 | S DVBMSG(1)="Patch: DVB*4.0*58 Automated Service Connected Designation"
|
---|
86 | S DVBMSG(2)=""
|
---|
87 | S DVBMSG(3)="The post-installation update of the DISABILITY CONDITION (#31) file"
|
---|
88 | S DVBMSG(4)="has FAILED to successfully complete. Filing error's have occurred when"
|
---|
89 | S DVBMSG(5)="attempting to add the new data mapping of RELATED ICD9 CODES."
|
---|
90 | S DVBMSG(6)=""
|
---|
91 | S DVBMSG(7)="Immediate resolution of ALL error's is needed to maintain database integrity."
|
---|
92 | S DVBMSG(8)=""
|
---|
93 | S DVBMSG(9)="Once these filing error's have been resolved, please re-run"
|
---|
94 | S DVBMSG(10)="the Post-Installation routine directly from programmer mode"
|
---|
95 | S DVBMSG(11)="by entering the following command:"
|
---|
96 | S DVBMSG(12)=""
|
---|
97 | S DVBMSG(13)="D POST^DVB458P"
|
---|
98 | S DVBMSG(14)=""
|
---|
99 | S DVBMSG(15)="The new update run time should take less than 5 minutes to complete."
|
---|
100 | S DVBMSG(16)=""
|
---|
101 | S DVBMSG(17)=">>> Please review and resolve the following error's:"
|
---|
102 | S DVBMSG(18)=""
|
---|
103 | S DVBMSG(19)="*** DISABILITY CONDITION FILE (#31) FILING ERRORS ***"
|
---|
104 | S DVBMSG(20)="-----------------------------------------------------"
|
---|
105 | ;
|
---|
106 | ;loop and list error's
|
---|
107 | N DVBICD,DVBHDR,DVBHDR1,DVBIEN,DVBLN,DVBMSS,DVBVBA,DVBDESC
|
---|
108 | S DVBHDR="VBA DX CODE: ",DVBHDR1=" ICD DIAGNOSIS CODE: "
|
---|
109 | S DVBLN=21,DVBVBA=0
|
---|
110 | F S DVBVBA=$O(@DVBTMP@("ERROR",DVBVBA)) Q:'DVBVBA D
|
---|
111 | . I $D(@DVBTMP@("ERROR",DVBVBA,0)) D Q
|
---|
112 | . . S DVBMSS=DVBHDR_DVBVBA_" - "_$G(@DVBTMP@("ERROR",DVBVBA,0))
|
---|
113 | . . S DVBMSG(DVBLN)=DVBMSS,DVBLN=DVBLN+1
|
---|
114 | . K DVBDESC D FIND^DIC(31,"","","X",DVBVBA,,"C","","","DVBDESC")
|
---|
115 | . S DVBMSS=DVBHDR_DVBVBA_" - "_$E($G(DVBDESC("DILIST",1,1)),1,50)
|
---|
116 | . S DVBMSG(DVBLN)=DVBMSS,DVBLN=DVBLN+1
|
---|
117 | . S DVBIEN=0
|
---|
118 | . F S DVBIEN=$O(@DVBTMP@("ERROR",DVBVBA,DVBIEN)) Q:'DVBIEN D
|
---|
119 | . . S DVBICD=""
|
---|
120 | . . F S DVBICD=$O(@DVBTMP@("ERROR",DVBVBA,DVBIEN,DVBICD)) Q:DVBICD="" D
|
---|
121 | . . . S DVBMSS=DVBHDR1_DVBICD_" - "_$G(@DVBTMP@("ERROR",DVBVBA,DVBIEN,DVBICD))
|
---|
122 | . . . S DVBMSG(DVBLN)=DVBMSS,DVBLN=DVBLN+1
|
---|
123 | S DVBMSG(DVBLN)="",DVBLN=DVBLN+1
|
---|
124 | S DVBMSG(DVBLN)="<End of Report>"
|
---|
125 | ;
|
---|
126 | D ^XMD
|
---|
127 | Q
|
---|
128 | ;
|
---|
129 | ;
|
---|
130 | PROGCHK(XPDABORT) ;checks for necessary programmer variables
|
---|
131 | ;
|
---|
132 | I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") D
|
---|
133 | . D BMES^XPDUTL("*****")
|
---|
134 | . D MES^XPDUTL("Your programming variables are not set up properly.")
|
---|
135 | . D MES^XPDUTL("Installation aborted.")
|
---|
136 | . D MES^XPDUTL("*****")
|
---|
137 | . S XPDABORT=2
|
---|
138 | Q
|
---|
139 | ;
|
---|
140 | ;
|
---|
141 | ISRUNING(XPDABORT) ;check if patch install is running
|
---|
142 | ;
|
---|
143 | I $D(^TMP("DVB458P")) D
|
---|
144 | . D BMES^XPDUTL("*****")
|
---|
145 | . D MES^XPDUTL("This patch is currently being Installed. Try later.")
|
---|
146 | . D MES^XPDUTL("Installation aborted.")
|
---|
147 | . D MES^XPDUTL("*****")
|
---|
148 | . S XPDABORT=2
|
---|
149 | Q
|
---|