source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPS34.m@ 1015

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

initial load of WorldVistAEHR

File size: 6.3 KB
Line 
1RMPRPS34 ;HISC/RVD/HNC -Check 661.1 and Save Inventory flag ;9/2/04 12:13
2 ;;3.0;PROSTHETICS;**34,39,48,58,64,69,76,84,91**;FEB 09,1996
3 ;RVD patch #76 - 2003 HCPCS update
4 ; replace inactive CPT Code in #660, starting 1/1/03
5 ;
6 ;AAC Patch #84 - 2004 HCPCS Update
7 ; Replace all CPT Codes with pointer 104840 - code A9900 1/1/04
8 ; Update all Modifier codes with null
9 ;
10 ;HNC Patch #91 - 2004 HCPCS Update - 6/2004
11 ; Convert R10 to R10 A
12 Q
13EN ;entry point
14 S U="^",RMEXIT=0
15 ;Check on 2907, shipping and null 2804 (patch 48)
16 ;Check on 2972, shipping and null 2973 (patch 58)
17 ;Check on 3475, shipping and null 3476 (patch 69)
18 ;Check on 3915 for patch 84.
19 ;check for the last entry and next available entry.
20 ;
21 ;Patch 76
22 ;Wheelchair HCPCS not grouped together prior to calculation flag update.
23 ;hnc/April 2003
24 ;Wheelchair HCPCS list under HLST
25 ;
26 S RM661=$P($G(^RMPR(661.1,0)),U,3) D:RM661'=3915!($D(^RMPR(661.1,3916))) G:$G(RMEXIT) EXIT
27 . W !,"*********************************************************"
28 . W !,"* Your RMPR(661.1 global is CORRUPTED, DO NOT INSTALL *"
29 . W !,"* the new RMPR(661.1 global. Please, contact *"
30 . W !,"* National IRM Help Desk at 1-888-596-4357 for HELP!!!! *"
31 . W !,"*********************************************************",!
32 . H 1 S RMEXIT=1
33 . Q
34 ;
35 ; Continue with post init...
36SAVE W !,"Saving Inventory Data ...."
37 K RM0
38 K ^RMPR("INV")
39 S BDC=0
40 F S BDC=$O(^RMPR(661.1,BDC)) Q:'+BDC D
41 . S RM0=$P(^RMPR(661.1,BDC,0),U,9)
42 . Q:RM0=""
43 . S ^RMPR("INV",BDC)=1
44 . Q
45 W !,"Done Saving Inventory Data, please load the ^RMPR(661.1) global now"
46 W !,"File RMPR_3_84.GBL",!
47 K RM661,RMEXIT,RM0,BDC
48 Q
49 ;
50RESET W !,"Start Reset of the Inventory flag...."
51 S U="^"
52 S BDC=0
53 F S BDC=$O(^RMPR("INV",BDC)) Q:BDC'>0 D
54 . S $P(^RMPR(661.1,BDC,0),U,9)=1
55 . Q
56 W !!,"End Reset of the Inventory flag.",!
57 ;
58 ; Patch 58 - call utilities to merge duplicate HCPCS and replace
59 ; DVG specified old HCPCS with new HCPCS
60 ; ********** Remove or update this call for the next HCPCS update
61 ;D PATCH58^RMPRPS35
62 ; Patch 69 - replace specified deactivated HCPCS with new HCPCS.
63 ;
64 ;conversion for site with patch #61
65 I $D(^RMPR(661.6)),$D(^RMPR(661.7)),$D(^RMPR(661.9)) D CONV^RMPRPS36
66 ;conversion for site without patch #61
67 I '$D(^RMPR(661.6)),'$D(^RMPR(661.7)),'$D(^RMPR(661.9)) D PAT76^RMPRPS35
68 ;
69UPCPT ;update Inactive CPT code starting 4/1/02
70 W !,"Start Converting Inactive CPT code....",!
71 K RMUPD
72 S U="^"
73 F ROI=3031231:0 S ROI=$O(^RMPR(660,"B",ROI)) Q:ROI'>0 F ROJ=0:0 S ROJ=$O(^RMPR(660,"B",ROI,ROJ)) Q:ROJ'>0 S RM0=$G(^RMPR(660,ROJ,0)) D
74 .S RMCPI=$P(RM0,U,22)
75 .Q:'$G(RMCPI)
76 .S RM60=ROJ
77 .S RMCPT="104840"
78 .S RMUPD(660,RM60_",",4.1)=RMCPT
79 .D FILE^DIE("","RMUPD","")
80 .;Update PCE, if Inactive CPT code was generated with PCE data.
81 .K RMUPD
82 .I $D(^RMPR(660,RM60,10)),$P(^RMPR(660,RM60,10),U,12) D
83 ..S RMCHK=$$SENDPCE^RMPRPCEA(RM60)
84 K RMUPD,ROI,ROJ,RMCPT,RMCPI,RM0,RM60
85 W !,"Done Converting Inactive CPT code....",!
86 ;
87DUP ;repoint duplicate HCPCS (660, 664, 664.1, 665, 661.2, 661.3
88 ;and delete from file 661.1
89 ;D HCPCD^RMPRPS35(113,952)
90 ;convert amis grouper for entries w/ wheelchair hcpcs.
91 ;D WHUP
92 ;
93KILLB ;kill & set 'B' cross reference in 661.1.
94 K ^RMPR(661.1,"B"),DIK
95 S DIK="^RMPR(661.1,",DIK(1)=".01^B" D ENALL^DIK
96 ;
97 ;
98KILLC ;kill & set 'C' cross reference in 661.1.
99 K ^RMPR(661.1,"C"),DIK
100 S DIK="^RMPR(661.1,",DIK(1)=".02^C" D ENALL^DIK
101 ;
102KILLE ;kill & set 'E' cross reference in 661.1.
103 K ^RMPR(661.1,"E"),DIK
104 ; Line below commented out for Patch 84 - Multi-index Lookup for "A9900"
105 ; S DIK="^RMPR(661.1,",DIK(1)="2^E" D ENALL^DIK K DIK
106 ;
107 W !,"Done with Installation of Patch RMPR*3*84"
108 ;
109EXIT ;EXIT
110 K ^RMPR("INV"),^RMPR(661.1,"RMPR"),I,RMEXIT,RM661,BDC
111 Q
112 ; Patch 64 Fixes to HCPCS file
113PAT64 N RMPR,RMPRFME,RMPRI,RMPR11,I
114 ;
115 ; Change NPPD NEW CODE
116 S RMPR11("D5924")=""
117 S RMPR11("D5934")=""
118 S RMPR11("L8500")=""
119 S RMPR11("L8501")=""
120 S RMPR11("L8614")=""
121 S RMPR11("L8619")=""
122 S I="" F S I=$O(RMPR11(I)) Q:I="" D
123 .S RMPRI=$O(^RMPR(661.1,"B",I,""))
124 .Q:RMPRI=""
125 .S RMPRI=RMPRI_","
126 .S RMPR(661.1,RMPRI,6)="960 A"
127 .D FILE^DIE("","RMPR","RMPRFME")
128 .W !,"HCPCS ",I," updated"
129 W !!,"Done HCPCS update!!!"
130 W !!,"Start Reindexing the 'B' cross reference of file #661.1 ..."
131 K ^RMPR(661.1,"B")
132 S DIK="^RMPR(661.1,",DIK(1)=".01^B" D ENALL^DIK
133 W !!,"Done Reindexing file #661.1!!!",!!
134PAT64X Q
135WHUP ;Wheelchair Update Record with new Grouper Number
136 ;
137 Q ;DO NOT RUN
138 N RMPRI,RMPR,RMPRFME,RMPRY,RMPRPH,RMPRPHE,RMPRPHL,RMPRG,RMPRSTN,RMPRSITE
139 ;loop H xref PSAS HCPCS
140 S RMPRPH=0
141 F S RMPRPH=$O(^RMPR(660,"H",RMPRPH)) Q:RMPRPH'>0 D
142 .S RMPRPHE=$P($G(^RMPR(661.1,RMPRPH,0)),U,1)
143 .;RMPRPHE external psas hcpcs file 660
144 .Q:RMPRPHE=""
145 .S RMPRI=""
146 .F RMPRI=1:1:58 S RMPRY=$P($T(HLST+RMPRI),";",3) D
147 ..Q:RMPRY=""
148 ..;RMPRY is wheelchair hcpcs
149 ..Q:RMPRY'=RMPRPHE
150 ..;hcpcs to update records
151 ..S RMPRPHL=0
152 ..F S RMPRPHL=$O(^RMPR(660,"H",RMPRPH,RMPRPHL)) Q:RMPRPHL'>0 D
153 ...;record level
154 ...;need site param and grouper number
155 ...;field 8 station p4 translate to 699.9 rmprsite
156 ...Q:'$D(^RMPR(660,RMPRPHL,0))
157 ...S RMPRSTN=$P(^RMPR(660,RMPRPHL,0),U,10)
158 ...Q:RMPRSTN=""
159 ...S RMPRSITE=0
160 ...S RMPRSITE=$O(^RMPR(669.9,"C",RMPRSTN,RMPRSITE))
161 ...Q:RMPRSITE=""
162 ...L +^RMPR(669.9,RMPRSITE,0):9999 I $T=0 S RMPRG=8822
163 ...S RMPRG=$P(^RMPR(669.9,RMPRSITE,0),U,7),RMPRG=RMPRG-1,$P(^RMPR(669.9,RMPRSITE,0),U,7)=RMPRG L -^RMPR(669.9,RMPRSITE,0)
164 ...S RMPRPHLL=RMPRPHL_","
165 ...S RMPR(660,RMPRPHLL,68)=RMPRG
166 ...D FILE^DIE("","RMPR","RMPRFME")
167 Q
168KILLNDS ;
169 F L=0:0 S PD=$O(^RMPR(661.1,L)) W !,PD," ",L Q:L=""
170 Q
171P91 ;Patch 91
172 S RMPRI=""
173 F RMPRI=1:1:56 S RMPRY=$P($T(HLST+RMPRI),";",3) D
174 .S $P(^RMPR(661.1,RMPRY,0),U,6)="R10 A"
175 S $P(^RMPR(661.1,2763,0),U,6)="R10 B"
176 S $P(^RMPR(661.1,2770,0),U,6)="R10 B"
177 S $P(^RMPR(661.1,2864,0),U,7)="960 D"
178 W !,"ALL DONE"
179 K RMPRI,RMPRY
180 Q
181HLST ;Wheelchair IEN to update to R10 A
182 ;;245
183 ;;246
184 ;;249
185 ;;252
186 ;;254
187 ;;340
188 ;;341
189 ;;342
190 ;;344
191 ;;346
192 ;;348
193 ;;351
194 ;;354
195 ;;359
196 ;;360
197 ;;363
198 ;;364
199 ;;365
200 ;;366
201 ;;367
202 ;;368
203 ;;369
204 ;;370
205 ;;371
206 ;;372
207 ;;373
208 ;;374
209 ;;386
210 ;;387
211 ;;392
212 ;;393
213 ;;395
214 ;;396
215 ;;400
216 ;;401
217 ;;417
218 ;;418
219 ;;426
220 ;;427
221 ;;438
222 ;;439
223 ;;445
224 ;;447
225 ;;453
226 ;;2095
227 ;;2096
228 ;;2097
229 ;;2099
230 ;;2100
231 ;;2101
232 ;;2102
233 ;;2103
234 ;;2104
235 ;;2790
236 ;;2791
237 ;;3591
238 ;end
Note: See TracBrowser for help on using the repository browser.