source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBY371PO.m@ 648

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

initial load of WorldVistAEHR

File size: 9.1 KB
RevLine 
[613]1IBY371PO ;ALB/WCJ - Post Install for IB patch 371 ;17-APR-2007
2 ;;2.0;INTEGRATED BILLING;**371**;21-MAR-94;Build 57
3 ;
4EN ;
5 N XPDIDTOT S XPDIDTOT=5
6 D RIT ; 1. Recompile input templates
7 D CUINS ; 2. Clean up duplicate insurance address lines
8 D MEDWNR ; 3. Pre-populate Medicare WNR with professional payer ID 2U and station number
9 D VCHELP ; 4. Add help text to Value Codes and Deactivate some value codes.
10 D NEWXREF ; 5. Add NEW STYLE XREF to Value Code Subfile in 399.047
11EX ;
12 Q
13 ;
14RIT ; Recompile input templates for billing screens
15 NEW X,Y,DMAX
16 D BMES^XPDUTL(" STEP 1 of "_XPDIDTOT)
17 D MES^XPDUTL("-------------")
18 D MES^XPDUTL("Recompiling Input Templates for Billing Screens 3 through 7 ....")
19 S X="IBXSC3",Y=$$FIND1^DIC(.402,,"X","IB SCREEN3","B"),DMAX=8000
20 I Y D EN^DIEZ
21 S X="IBXSC4",Y=$$FIND1^DIC(.402,,"X","IB SCREEN4","B"),DMAX=8000
22 I Y D EN^DIEZ
23 S X="IBXSC5",Y=$$FIND1^DIC(.402,,"X","IB SCREEN5","B"),DMAX=8000
24 I Y D EN^DIEZ
25 S X="IBXSC6",Y=$$FIND1^DIC(.402,,"X","IB SCREEN6","B"),DMAX=8000
26 I Y D EN^DIEZ
27 S X="IBXSC7",Y=$$FIND1^DIC(.402,,"X","IB SCREEN7","B"),DMAX=8000
28 I Y D EN^DIEZ
29RITX ;
30 D MES^XPDUTL(" Done.")
31 D UPDATE^XPDID(1)
32 Q
33 ;
34CUINS ; Clean up Insurance company address line duplicates
35 ;
36 D BMES^XPDUTL(" STEP 2 of "_XPDIDTOT)
37 D MES^XPDUTL("-------------")
38 D MES^XPDUTL("Removing duplicate address lines in insurance company file")
39 ;
40 N INSCO,ADDLOC,I,FIELD,VALUE
41 S INSCO=0 F S INSCO=$O(^DIC(36,INSCO)) Q:'+INSCO D
42 . F ADDLOC=.11,.12,.14,.15,.16,.18 D
43 .. N ADDRESS
44 .. F I=1:1:3 D
45 ... S FIELD=ADDLOC_I
46 ... S ADDRESS(I)=$$UP^XLFSTR($$GET1^DIQ(36,INSCO,FIELD))
47 ... D CLEAN^DILF
48 .. ;
49 .. I ADDRESS(3)]"",ADDRESS(3)=ADDRESS(2)!(ADDRESS(3)=ADDRESS(1)) D
50 ... S VALUE="@",FIELD=ADDLOC_3
51 ... D POPULATE(INSCO,FIELD,VALUE)
52 ... S ADDRESS(3)=""
53 .. ;
54 .. I ADDRESS(2)]"",ADDRESS(2)=ADDRESS(1) D
55 ... S FIELD=ADDLOC_2
56 ... S VALUE=$S(ADDRESS(3)="":"@",1:ADDRESS(3))
57 ... D POPULATE(INSCO,FIELD,VALUE)
58 ;
59CUINSX ;
60 D MES^XPDUTL(" Done.")
61 D UPDATE^XPDID(2)
62 Q
63 ;
64POPULATE(INSCO,FLD,VAL) ;
65 N X,Y,DA,DIE,DR
66 S DA=INSCO
67 S DIE=36
68 S DR=FLD_"////"_VAL
69 D ^DIE
70 Q
71 ;
72MEDWNR ; Prepopulate Medicare WNR with professional payer ID 2U and station number
73 ;
74 D BMES^XPDUTL(" STEP 3 of "_XPDIDTOT)
75 D MES^XPDUTL("-------------")
76 D MES^XPDUTL("Prepopulate Medicare WNR with professional payer ID")
77 ;
78 N INSCO,SITE
79 S SITE="VA"_$P($$SITE^VASITE,U,3)
80 S INSCO=0 F S INSCO=$O(^DIC(36,"B","MEDICARE (WNR)",INSCO)) Q:'+INSCO D
81 . N X,Y,DA,DIE,DR
82 . S DA=INSCO
83 . S DIE=36
84 . S DR="6.05////2U;6.06////"_SITE
85 . D ^DIE
86MEDWNRX ;
87 D MES^XPDUTL(" Done.")
88 D UPDATE^XPDID(3)
89 Q
90 ;
91VCHELP ;
92 ;
93 D BMES^XPDUTL(" STEP 4 of "_XPDIDTOT)
94 D MES^XPDUTL("-------------")
95 D MES^XPDUTL("Add help text and obsolete date to value codes")
96 ;
97 N VC
98 S VC("45",1)="Enter the hour when the accident occurred that caused"
99 S VC("45",2)="the need for medical treatment. "
100 S VC("45",3)=" "
101 S VC("45",4)="Enter correct code."
102 S VC("45",5)="00 12:00-12:59 (Midnight)"
103 S VC("45",6)="01 01:00-01:59 AM"
104 S VC("45",7)="02 02:00-02:59 AM"
105 S VC("45",8)="03 03:00-03:59 AM"
106 S VC("45",9)="04 04:00-04:59 AM"
107 S VC("45",10)="05 05:00-05:59 AM"
108 S VC("45",11)="06 06:00-06:59 AM"
109 S VC("45",12)="07 07:00-07:59 AM"
110 S VC("45",13)="08 08:00-08:59 AM"
111 S VC("45",14)="09 09:00-09:59 AM"
112 S VC("45",15)="10 10:00-10:59 AM"
113 S VC("45",16)="11 11:00-11:59 AM"
114 S VC("45",17)="12 12:00-12:59 (Noon)"
115 S VC("45",18)="13 01:00-01:59 PM"
116 S VC("45",19)="14 02:00-02:59 PM"
117 S VC("45",20)="15 03:00-03:59 PM"
118 S VC("45",21)="16 04:00-04:59 PM"
119 S VC("45",22)="17 05:00-05:59 PM"
120 S VC("45",23)="18 06:00-06:59 PM"
121 S VC("45",24)="19 07:00-07:59 PM"
122 S VC("45",25)="20 08:00-08:59 PM"
123 S VC("45",26)="21 09:00-09:59 PM"
124 S VC("45",27)="22 10:00-10:59 PM"
125 S VC("45",28)="23 11:00-11:59 PM"
126 S VC("45",29)="99 Unknown"
127 S VC("24",1)="Medicaid-eligibility requirements to be determined at state level."
128 S VC("37",1)="Enter the total number of pints of whole blood or"
129 S VC("37",2)="units of packed red cells furnished to the patient."
130 S VC("38",1)="Enter the total number of pints of whole blood or"
131 S VC("38",2)="units of packed red cells furnished to the patient."
132 S VC("46",1)="Enter the number of days determined by the QIO (medical"
133 S VC("46",2)="necessity reviewer) as needed to arrange for post-discharge"
134 S VC("46",3)="care."
135 S VC("48",1)="Enter the most recent hemoglobin reading taken before"
136 S VC("48",2)="the start of this billing period."
137 S VC("48",3)="Enter it in the format XX.X."
138 S VC("49",1)="Enter the most recent hematocrit reading taken before"
139 S VC("49",2)="the start of this billing period."
140 S VC("49",3)="Enter it in the format XX.X."
141 S VC("50",1)="Enter the number of physical therapy visits provided"
142 S VC("50",2)="from the onset of treatment by this billing provider"
143 S VC("50",3)="through this billing period."
144 S VC("51",1)="Enter the number of occupational therapy visits provided"
145 S VC("51",2)="from the onset of treatment by this billing provider"
146 S VC("51",3)="through this billing period."
147 S VC("52",1)="Enter the number of speech therapy visits provided"
148 S VC("52",2)="from the onset of treatment by this billing provider"
149 S VC("52",3)="through this billing period."
150 S VC("53",1)="Enter the number of cardiac rehabilitation visits provided"
151 S VC("53",2)="from the onset of treatment by this billing provider"
152 S VC("53",3)="through this billing period."
153 S VC("56",1)="Enter the number of home visit hours of skilled"
154 S VC("56",2)="nursing provided during the billing period. Do"
155 S VC("56",3)="not include travel time. Enter whole hours."
156 S VC("57",1)="Enter the number of home health aide hours of service"
157 S VC("57",2)="provided during the billing period. Do"
158 S VC("57",3)="not include travel time. Enter whole hours."
159 S VC("58",1)="Enter arterial blood gas value at the beginning of "
160 S VC("58",2)="each reporting period for oxygen therapy. Code 58 "
161 S VC("58",3)="or 59 required on the initial bill and the fourth "
162 S VC("58",4)="month's bill. Enter the nearest whole number "
163 S VC("58",5)="(Example: 56.5 is entered as 57.)"
164 S VC("59",1)="Enter oxygen saturation value at the beginning of "
165 S VC("59",2)="each reporting period for oxygen therapy. Code 58 "
166 S VC("59",3)="or 59 required on the initial bill and the fourth "
167 S VC("59",4)="month's bill. Enter the nearest whole percent "
168 S VC("59",5)="(Example: 93.5 is entered as 94.)"
169 S VC("60",1)="Enter the MSA number in which the HHA branch is located "
170 S VC("60",2)="when the MSA's branch location is different than the "
171 S VC("60",3)="HHA's. "
172 S VC("68",1)="Enter the number of units of EPO administered and/or"
173 S VC("68",2)="supplied related to this billing period. Enter amount"
174 S VC("68",3)="in whole units."
175 S VC("39",1)="Enter the total number of pints of whole blood or"
176 S VC("39",2)="units of packed red cells furnished to the patient."
177 S VC("61",1)="Enter MSA or Core Based Statistical Area (CBSA)"
178 S VC("61",2)="number (or rural state code) of the location"
179 S VC("61",3)="where the home health or hospice service was "
180 S VC("61",4)="delivered. Do not include travel time. Enter a "
181 S VC("61",5)="whole number rounded to the nearest whole hour."
182 S VC("67",1)="Enter the number of hours of peritoneal dialysis"
183 S VC("67",2)="provided during the billing period. "
184 S VC("A0",1)="Enter the 5 digit ZIP Code of the location at which "
185 S VC("A0",2)="the beneficiary is initially placed on board the"
186 S VC("A0",3)="ambulance."
187 ; defaults
188 S VC("AMT",1)="Enter a monetary amount associated with this value code."
189 S VC("AMT",2)="Enter it in the format of dollars and cents (00.00)."
190 S VC("AMT",3)=" "
191 S VC("AMT",4)="If you enter only dollars (00), the system will add on .00 cents."
192 S VC("AMT",5)="Maximum length INCLUDING the cents, is 9 numbers."
193 ;
194 N DA,CODE,DAT,AMTFLG
195 S DA=0 F S DA=$O(^DGCR(399.1,DA)) Q:DA="" D
196 . N HLPTXT,FDA
197 . S DAT=$G(^(DA,0))
198 . Q:'$P(DAT,U,11) ; not a value code
199 . S CODE=$P(DAT,U,2)
200 . Q:CODE=""
201 . I ".E1.E2.E3.F1.F2.F3.G1.G2.G3."[("."_CODE_".") S FDA(399.1,DA_",",.26)=3070301
202 . S AMTFLG=0
203 . I '$D(VC(CODE)) S CODE="AMT",AMTFLG=1
204 . M HLPTXT=VC(CODE)
205 . S FDA(399.1,DA_",",1)="HLPTXT"
206 . S FDA(399.1,DA_",",.19)=$S(AMTFLG:1,1:0)
207 . S FDA="FDA"
208 . D FILE^DIE("",FDA)
209 ;
210VCHELPX ;
211 D MES^XPDUTL(" Done.")
212 D UPDATE^XPDID(4)
213 Q
214 ;
215NEWXREF ;
216 ;
217 D BMES^XPDUTL(" STEP 5 of "_XPDIDTOT)
218 D MES^XPDUTL("-------------")
219 D MES^XPDUTL("Adding new style cross reference")
220 ;
221 N ZZWJXR,ZZWJRES,ZZWJOUT
222 S ZZWJXR("FILE")=399.047
223 S ZZWJXR("NAME")="AC"
224 S ZZWJXR("TYPE")="MU"
225 S ZZWJXR("USE")="A"
226 S ZZWJXR("EXECUTION")="F"
227 S ZZWJXR("ACTIVITY")=""
228 S ZZWJXR("SHORT DESCR")="VALUE field clean up"
229 S ZZWJXR("DESCR",1)="If the VALUE CODE field is modified, make sure the VALUE field associated"
230 S ZZWJXR("DESCR",2)="with it is still VALID. If not, delete the VALUE."
231 S ZZWJXR("SET")="D REMOVE^IBCVC(.DA)"
232 S ZZWJXR("KILL")="Q"
233 S ZZWJXR("SET CONDITION")="S X=$$COND^IBCVC(.DA,X1(1),X2(1))"
234 S ZZWJXR("VAL",1)=.01
235 S ZZWJXR("VAL",1,"COLLATION")="F"
236 D CREIXN^DDMOD(.ZZWJXR,"",.ZZWJRES,"ZZWJOUT")
237 ;
238NEWXREFX ;
239 D MES^XPDUTL(" Done.")
240 D UPDATE^XPDID(5)
241 Q
Note: See TracBrowser for help on using the repository browser.