source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG53705I.m@ 1259

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

initial load of WorldVistAEHR

File size: 5.0 KB
Line 
1DG53705I ;ALB/TMK - DG*5.3*705 Pre-Install Routine ; 05-APR-2006
2 ;;5.3;Registration;**705**;Aug 13, 1993
3 ;
4EN ; Description: This entry point will be used as a driver for
5 ; pre-installation updates.
6 ; DBIA: 4542 for direct DD global access/kills and for one-time
7 ; call to Fileman PT node cleanup (PT^DDUCHK1)
8 ;
9 ; If the patch DVB*4*54 was not installed, skip the cleanup
10 N %
11 K ^TMP("DG*5.3*705",$J)
12 S %=$$CKUPD^DG53705E()
13 I '% D Q
14 . N ZMES,I
15 . F I=1,2 S ZMES(I)=" "
16 . S ZMES(3)="**** PATCH IS BEING INSTALLED IN NON-UPDATE MODE ****"
17 . S ZMES(4)=" "
18 . S ZMES(5)="NOTE: THE SYSTEM HAS DETERMINED THAT YOUR PATIENT FILE DOES NOT HAVE BAD"
19 . S ZMES(6)=" DATA FROM PATCH DVB*4*54. THEREFORE, THE STATUS OF PATCH DG*5.3*705"
20 . S ZMES(7)=" WILL BE 'INSTALLED', HOWEVER NO UPDATES TO YOUR SYSTEM WILL BE MADE."
21 . D MES^XPDUTL(.ZMES)
22 ;
23 D BMES^XPDUTL("**** PATCH IS BEING INSTALLED IN UPDATE MODE ****")
24 D DELMISC
25 D DELPTR
26 D DELXREF
27 D DELID
28 D DELDESCR
29 D DONE
30 Q
31 ;
32DELMISC ; Delete various miscellaneous nodes:
33 ; write access, help, executable help, audit, etc
34 D BMES^XPDUTL(">>> Deleting bad write access, help, audit, other miscellaneous nodes")
35 K ^DD(2,.12113,9),^DD(2,.14112,9)
36 K ^DD(2,.108,3)
37 K ^DD(2,.391,4)
38 F Z=.01,.2924,.3111,.3192,991.07 K ^DD(2,Z,"AUDIT")
39 K ^DD(2.312,.18,"AUDIT")
40 K ^DIC(2,0,"AUDIT")
41 K ^DD(2,0,"VR")
42 K ^DD(2,0,"VRPK")
43 K ^DIC(2,"%",7,0)
44 K ^DIC(2,"%","B","QAM",7)
45 D STEP
46 Q
47 ;
48DELPTR ; Delete bad pointer nodes
49 N Z,Z0
50 D BMES^XPDUTL(">>> Deleting bad pointer nodes")
51 S DDUCFI=2,DDUCFIX=1 D PT^DDUCHK1 ; IA
52 D STEP
53 Q
54 ;
55DELID ; Delete bad identifier nodes
56 N Z
57 D BMES^XPDUTL(">>> Deleting bad identifier nodes")
58 F Z=.2924,.302,.351,"GARB","WARD","WR","ZREW" K ^DD(2,0,"ID",Z)
59 D STEP
60 Q
61 ;
62DELDESCR ;Delete excess description nodes
63 N Z
64 D BMES^XPDUTL(">>> Deleting bad field description nodes")
65 S Z=1 F S Z=$O(^DD(2,.107,21,Z)) Q:'Z K ^DD(2,.107,21,Z,0)
66 D STEP
67 Q
68 ;
69DELXREF ; Delete cross references and indexes
70 N DGZ,DGZF,DGZFLD,DGZN,DGDEL,DGXREF,X,Z
71 D BMES^XPDUTL(">>> Deleting bad cross references and indexes")
72 ;
73 ; Delete indexes 'ADGFM01', 'ADGFM03', 'ADGFM09', 'ADGFM351'
74 F DGZ="ADGFM01","ADGFM03","ADGFM09","ADGFM351" D DELIXN^DDMOD(2,DGZ)
75 ; Delete a trigger xref for file 2.01, field 100.03
76 S Z=0 F S Z=$O(^DD(2.01,100.03,1,Z)) Q:'Z I $P($G(^DD(2.01,100.03,1,Z,0)),U,3,5)="TRIGGER^20^.01" D DELIX^DDMOD(2.01,100.03,Z) Q
77 ;
78 F Z=2:1 S X=$P($T(@("XREF+"_Z)),";;",2) Q:X="" S DGZ(+X,+$P(X,U,2),$P(X,U,4))=$P(X,U,3) ;Extracts xrefs to delete
79 ;
80 S DGZF=0
81 F S DGZF=$O(DGZ(DGZF)) Q:'DGZF S DGZFLD=0 F S DGZFLD=$O(DGZ(DGZF,DGZFLD)) Q:'DGZFLD S DGZN="" F S DGZN=$O(DGZ(DGZF,DGZFLD,DGZN)) Q:DGZN="" D
82 . S DGZ=$G(DGZ(DGZF,DGZFLD,DGZN))
83 . I 'DGZ,'$$CHK1(DGZF,DGZFLD,DGZN) K ^DD(DGZF,0,"IX",DGZN,DGZF,DGZFLD)
84 . I DGZ S Z=$$CHK2(DGZF,DGZFLD,DGZN,DGZ) I Z D DELIX^DDMOD(DGZF,DGZFLD,Z)
85 K ^TMP("DIERR",$J)
86 D STEP
87 Q
88 ;
89CHK1(FILE,FLD,XREFNM) ; Check if xref exists
90 ; Functon returns 1 if it exists, 0 if it doesn't
91 N Z,OK
92 S (OK,Z)=0
93 F S Z=$O(^DD(FILE,FLD,1,Z)) Q:'Z I $P($G(^(Z,0)),U,2)=XREFNM S OK=1 Q
94 Q OK
95 ;
96CHK2(FILE,FLD,XREFNM,XREFNO) ; Returns ien of xref
97 N Z,NUM
98 S Z=0
99 S NUM=$S($P($G(^DD(FILE,FLD,1,XREFNO,0)),U,2)=XREFNM:XREFNO,1:0)
100 I 'NUM F S Z=$O(^DD(FILE,FLD,1,Z)) Q:'Z I $P($G(^DD(FILE,FLD,1,Z,0)),U,2)=XREFNM S NUM=Z Q
101 Q NUM
102 ;
103STEP D BMES^XPDUTL(">>> Step Completed.")
104 Q
105 ;
106DONE D BMES^XPDUTL(">>> Pre-install Cleanup Completed.")
107 S ^TMP("DG*5.3*705",$J)="1^PATCH DVB*4*54 INSTALLED"
108 Q
109 ;
110CLEAN ; Erase TMP global used to screen DD update
111 K ^TMP("DG*5.3*705",$J)
112 Q
113 ;
114XREF ; Xrefs that must be deleted
115 ;; Pieces are: File #^Fld #^xref default #or null^xref name
116 ;;2^.01^^AHL
117 ;;2^.02^^AHL2
118 ;;2^.03^^AHL3
119 ;;2^.03^5^DGFCMON
120 ;;2^.05^993^AENR05
121 ;;2^.06^^AHL5
122 ;;2^.09^^AHL4
123 ;;2^.102^^A4EC
124 ;;2^.118^3^AENR118
125 ;;2^.121^1^AENR121
126 ;;2^.12111^1^AENR12111
127 ;;2^.1219^1^AENR1219
128 ;;2^.14111^1^AENR14111
129 ;;2^.152^4^AU
130 ;;2^.1656^1^AENR1656
131 ;;2^.293^1^AENR293
132 ;;2^.302^^ACP
133 ;;2^.302^^AP
134 ;;2^.3025^3^AENR3025
135 ;;2^.3025^^CHK4
136 ;;2^.304^1^AENR304
137 ;;2^.307^1^AENR307
138 ;;2^.3111^2^AENR3111
139 ;;2^.31115^^AEMP
140 ;;2^.31115^992^AENR31115
141 ;;2^.31115^^MAC
142 ;;2^.312^2^AENR312
143 ;;2^.313^992^AENR313
144 ;;2^.3192^1^AENR3192
145 ;;2^.32102^^AI
146 ;;2^.32103^^AK
147 ;;2^.323^992^AENR323
148 ;;2^.351^^AEXP
149 ;;2^.351^^AHL6
150 ;;2^.351^^AT
151 ;;2^.353^1^AENR353
152 ;;2^.354^1^AENR354
153 ;;2^.361^^AR
154 ;;2^.3611^3^AENR3611
155 ;;2^.3612^2^AENR3612
156 ;;2^.3615^1^AENR3615
157 ;;2^.3617^1^AENR3617
158 ;;2^.3618^1^AENR3618
159 ;;2^.36205^^BEN
160 ;;2^.36205^^CHK1
161 ;;2^.36215^^CHK2
162 ;;2^.36235^^CHK3
163 ;;2^.381^^AT
164 ;;2^.382^1^AENR382
165 ;;2^.391^1^AENR391
166 ;;2^.392^1^AENR392
167 ;;2^.393^1^AENR393
168 ;;2^.394^1^AENR394
169 ;;2^.395^1^AENR395
170 ;;2^.532^2^AENR532
171 ;;2^.533^1^AENR533
172 ;;2^1010.1511^1^AENR10101511
173 ;;2^1010.159^1^AENR1010159
174 ;;2^1901^2^AN
175 ;;2.04^.01^1^AENR01
176 ;;2.04^2^1^AENR2
177 ;;2.04^3^1^AENR3
178 ;;2.312^.01^6^AENR01
179 ;;2.312^.18^2^AENR18
180 ;;2.312^1^2^AENR1
181 ;;2.312^2^1^AENR2
182 ;;2.312^3^2^AENR3
183 ;;2.312^6^1^AENR6
184 ;;2.312^8^2^AENR8
185 ;;2.312^17^1^AENR17
186 ;;2.396^.01^2^AENR01
187 ;;2.397^.01^2^AENR01
188 ;;2.397^1^1^AENR1
189 ;;2.398^.01^2^AENR01
190 ;;2.398^1^1^AENR1
191 ;;2.398^2^1^AENR2
Note: See TracBrowser for help on using the repository browser.