source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCDPESR9.m@ 1589

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

initial load of FOIAVistA 6/30/08 version

File size: 7.5 KB
Line 
1RCDPESR9 ;ALB/TMK - ERA return file field captions ;09-SEP-2003
2 ;;4.5;Accounts Receivable;**173**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; Note: if the 835 flat file changes, make the corresponding changes
6 ; in this routine.
7835 ;;HEADER DATA
8 ;;835^^Return Message ID^S Y=X_" (ERA HEADER DATA)"
9 ;;835^^X12/Proprietary flag^S Y=$S(X="X":"X12",1:X)
10 ;;835^^File Date^S Y=$$FDT^RCDPESR9(X)
11 ;;835^^File Time^S Y=$E(X,1,2)-$S($E(X,1,2)>12:12,1:0)_":"_$E(X,3,4)_$S($E(X,1,2)=24:" AM",$E(X,1,2)>11:" PM",1:" AM")
12 ;;835^1^MRA^S Y=""
13 ;;835^^Payer Name
14 ;;835^^Payer ID
15 ;;835^^Trace Number
16 ;;835^^Date Claims Paid^S Y=$$FDT^RCDPESR9(X)
17 ;;835^^Total ERA Amount^S Y=$$ZERO^RCDPESR9(X,1)
18 ;;835^^Erroneous Provider Tax ID
19 ;;835^^Tax ID correction Flag^S Y=$S(X="E":"CHANGED BY EPHRA",X="C":"DETERMINED FROM CLAIM DATA",X="":"NO CHANGE MADE",1:X)
20 ;;835^^Sequence Control #
21 ;;835^^Sequence #
22 ;;835^^Last Sequence #
23 ;;835^^Contact Information
24 ;;835^^Payment Method Code
25 ;
2601 ;;PAYER CONTACT INFORMATION
27 ;;01^^ERA Contact Name
28 ;;01^^ERA Contact #1
29 ;;01^^ERA Contact #1 Type^S Y=$$EXTERNAL^DILFD(344.4,3.03,,X)
30 ;;01^^ERA Contact #2
31 ;;01^^ERA Contact #2 Type^S Y=$$EXTERNAL^DILFD(344.4,3.05,,X)
32 ;;01^^ERA Contact #3
33 ;;01^^ERA Contact #3 Type^S Y=$$EXTERNAL^DILFD(344.4,3.07,,X)
34 ;
3502 ;;PAYER ADJUSTMENT RECORD
36 ;;02^^Line Type^S Y=X_" (ERA LEVEL PAYER ADJUSTMENT RECORD)"
37 ;;02^^X12 Adjustment Reason Code
38 ;;02^^Provider Adjustment Identifier
39 ;;02^^Adjustment Amount^S Y=$$ZERO^RCDPESR9(X,1)
40 ;;02^^X12 Reason Text
41 ;
4205 ;;CLAIM PATIENT ID
43 ;;05^^Line Type^S Y=X_" (CLAIM LEVEL PATIENT ID DATA)"
44 ;;05^^Bill #
45 ;;05^^Patient Last Name
46 ;;05^^Patient First Name
47 ;;05^^Patient Middle Name
48 ;;05^^Patient ID #
49 ;;05^1^Record Contains Patient Name Change^S Y=""
50 ;;05^1^Record Contains Patient ID Change^S Y=""
51 ;;05^^Statement Start Date^S Y=$$FDT^RCDPESR9(X)
52 ;;05^^Statement End Date^S Y=$$FDT^RCDPESR9(X)
53 ;
5410 ;;CLAIM STATUS DATA
55 ;;10^^Line Type^S Y=X_" (CLAIM LEVEL CLAIM STATUS DATA)"
56 ;;10^^Bill #
57 ;;10^^Claim Processed^S Y=$$YN^RCDPESR9(X)
58 ;;10^^Claim Denied^S Y=$$YN^RCDPESR9(X)
59 ;;10^^Claim Pended^S Y=$$YN^RCDPESR9(X)
60 ;;10^^Claim Reversal^S Y=$$YN^RCDPESR9(X)
61 ;;10^^Claim Status Code
62 ;;10^1^Crossed Over Name^S Y=""
63 ;;10^1^Crossed Over ID^S Y=""
64 ;;10^^Submitted Charge^S Y=$$ZERO^RCDPESR9(X,1)
65 ;;10^^Amount Paid^S Y=$$ZERO^RCDPESR9(X,1)
66 ;;10^^ICN
67 ;;10^^DRG Code Used
68 ;;10^^DRG Weight Used^S Y=$J($$ZERO^RCDPESR9(X,1)/100,4)
69 ;;10^^Discharge Fraction^S Y=$$ZERO^RCDPESR9(X,1)
70 ;
7115 ;;CLAIM STATUS DATA
72 ;;15^^Line Type^S Y=X_" (CLAIM LEVEL CLAIM STATUS DATA (CONTINUED))"
73 ;;15^^Bill #
74 ;;15^^Covered Amount^S Y=$$ZERO^RCDPESR9(X,1)
75 ;;15^1^Discount Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
76 ;;15^1^Day Limit Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
77 ;;15^1^Interest Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
78 ;;15^1^Tax Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
79 ;;15^1^Total Before Taxes Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
80 ;;15^^Patient Responsibility Amount^S Y=$$ZERO^RCDPESR9(X,1)
81 ;;15^1^Negative Reimbursement^S Y=$$ZERO^RCDPESR9(X,1,1)
82 ;
8317 ;;CLAIM LEVEL PAYER CONTACT INFORMATION
84 ;;17^^Line Type^S Y=X_" (CLAIM LEVEL PAYER CONTACT INFO)"
85 ;;17^^Bill #
86 ;;17^^Contact Name
87 ;;17^^Contact #1
88 ;;17^^Contact #1 Type^S Y=$$EXTERNAL^DILFD(361.1,25.03,,X)
89 ;;17^^Contact #2
90 ;;17^^Contact #2 Type^S Y=$$EXTERNAL^DILFD(361.1,25.05,,X)
91 ;;17^^Contact #3
92 ;;17^^Contact #3 Type^S Y=$$EXTERNAL^DILFD(361.1,25.07,,X)
93 ;
9420 ;;CLAIM LEVEL ADJUSTMENT DATA
95 ;;20^^Line Type^S Y=X_" (CLAIM LEVEL CLAIM ADJUSTMENT DATA)"
96 ;;20^^Bill #
97 ;;20^^Adjustment Group Code
98 ;;20^^Adjustment Reason Code
99 ;;20^^Adjustment Amount^S Y=$$ZERO^RCDPESR9(X,1)
100 ;;20^^Quantity^S Y=$$ZERO^RCDPESR9(X)
101 ;;20^^Reason Code Text
102 ;
10330 ;;CLAIM LEVEL MEDICARE INPT ADJUDICATION DATA
104 ;;30^^Line Type^S Y=X_" (CLAIM LEVEL MEDICARE INPATIENT ADJUDICATION DATA)"
105 ;;30^^Bill #
106 ;;30^^Covered Days/Visits^S Y=$$ZERO^RCDPESR9(X)
107 ;;30^1^Lifetime Reserve Days Count^S Y=$$ZERO^RCDPESR9(X,,1)
108 ;;30^1^Lifetime Psych Days Count^S Y=$$ZERO^RCDPESR9(X,,1)
109 ;;30^^Claim DRG Amt^S Y=$$ZERO^RCDPESR9(X,1)
110 ;;30^1^Claim Disproportionate Share Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
111 ;;30^1^Claim MSP Pass thru Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
112 ;;30^1^Claim PPS Capital Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
113 ;;30^1^PPS-Capital FSP DRG Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
114 ;;30^1^PPS-Capital HSP DRG Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
115 ;;30^1^PPS-Capital DSH DRG Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
116 ;;30^1^Old Capital Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
117 ;;30^^Non-Covered Days^S Y=$$ZERO^RCDPESR9(X)
118 ;
11935 ;;CLAIM LEVEL MEDICARE ADJUDICATION DATA
120 ;;35^^Line Type^S Y=X_" (CLAIM LEVEL MEDICARE ADJUDICATION DATA)"
121 ;;35^^Bill #
122 ;;35^1^PPS-Capital IME Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
123 ;;35^1^PPS-Operating Hosp Specific DRG Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
124 ;;35^1^Cost Report Day Count^S Y=$$ZERO^RCDPESR9(X)
125 ;;35^1^PPS-Operating Fed Specific DRG Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
126 ;;35^1^Claim PPS Capital Outlier Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
127 ;;35^1^Claim Indirect Teaching Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
128 ;;35^1^Non-payable Professional Component Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
129 ;;35^1^PPS-Capital Exception Amt^S Y=$$ZERO^RCDPESR9(X,1,1)
130 ;;35^1^Outpatient Reimbursement %^S Y=$$ZERO^RCDPESR9(X)
131 ;;35^1^HCPCS Payable Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
132 ;;35^1^ESRD Paid Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
133 ;;35^1^Non-payable Professional Component^S Y=$$ZERO^RCDPESR9(X,1,1)
134 ;
13537 ;;CLAIM LEVEL MEDICARE ADJUDICATION DATA REMARKS
136 ;;37^^Line Type^S Y=X_" (CLAIM LEVEL MEDICARE ADJUDICATION DATA REMARKS)"
137 ;;37^^Bill #
138 ;;37^^Type^S Y=$S(X="O":"MOA",X="I":"MIA",1:X)
139 ;;37^^Claim Payment Remark Code
140 ;;37^^Claim Payment Remark Code Message Text
141 ;
14240 ;;SERVICE LINE DATA
143 ;;40^^Line Type^S Y=X_" (CLAIM LEVEL SERVICE LINE DATA)"
144 ;;40^^Bill #
145 ;;40^^Procedure
146 ;;40^^Revenue Code
147 ;;40^^Modifier 1
148 ;;40^^Modifier 2
149 ;;40^^Modifier 3
150 ;;40^^Modifier 4
151 ;;40^^Description
152 ;;40^^Original Procedure
153 ;;40^^Original Modifier 1
154 ;;40^^Original Modifier 2
155 ;;40^^Original Modifier 3
156 ;;40^^Original Modifier 4
157 ;;40^^Original Charge^S Y=$$ZERO^RCDPESR9(X,1)
158 ;;40^^Original Units^S Y=$$ZERO^RCDPESR9(X,1)
159 ;;40^^Amount Paid^S Y=$$ZERO^RCDPESR9(X,1)
160 ;;40^^Covered Units^S Y=$$ZERO^RCDPESR9(X,1)
161 ;;40^^Service From Date^S Y=$$FDT^RCDPESR9(X)
162 ;;40^^Service To Date^S Y=$$FDT^RCDPESR9(X)
163 ;;40^^Procedure Type
164 ;;40^^Applies to Billing Line
165 ;
16641 ;;SERVICE LINE DATA
167 ;;41^^Line Type^S Y=X_" (CLAIM LEVEL SERVICE LINE DATA (CONTINUED))"
168 ;;41^^Bill #
169 ;;41^^Allowed Amount^S Y=$$ZERO^RCDPESR9(X,1)
170 ;;41^1^Per Diem Amount^S Y=$$ZERO^RCDPESR9(X,1,1)
171 ;
17242 ; SERVICE LINE DATA
173 ;;42^^Line Type^S Y=X_" (CLAIM LEVEL SERVICE LINE DATA (CONTINUED))"
174 ;;42^^Bill #
175 ;;42^^Line Item Remark Code
176 ;;42^^Line Item Remark Code Text
177 ;
17845 ;;SERVICE LINE ADJUSTMENT DATA
179 ;;45^^Line Type^S Y=X_" (CLAIM LEVEL SERVICE LINE ADJUSTMENT DATA)"
180 ;;45^^Bill #
181 ;;45^^Adjustment Group Code
182 ;;45^^Adjustment Reason Code
183 ;;45^^Adjustment Amount^S Y=$$ZERO^RCDPESR9(X,1)
184 ;;45^^Quantity^S Y=$$ZERO^RCDPESR9(X)
185 ;;45^^Reason Code Text
186 ;
187FDT(X) ; returns MM/DD/YYYY or MM/DD/YY from YYYYMMDD or YYMMDD in X
188 I $L(X)=8,X?8N S X=$E(X,5,6)_"/"_$E(X,7,8)_"/"_$E(X,1,4)
189 I $L(X)=6,X?6N S X=$E(X,3,4)_"/"_$E(X,5,6)_"/"_$E(X,1,2)
190 Q X
191 ;
192ZERO(X,D,NULL) ; Returns numeric value of X without leading 0's
193 ; or null if no value wanted for 0 amount
194 ; D = 1 if dollar amt
195 N Z
196 I X["." S Z=$P(X,"."),X=+Z_"."_$P(X,".",2)
197 I X'["." D
198 . I $G(D) S X=+$E(X,1,$L(X)-2)_"."_$E(X,$L(X)-1,$L(X))
199 . S X=$S('$G(D):+X,1:$J(X,"",2))
200 Q $S(X:X,$G(NULL):"",1:X)
201 ;
202YN(X) ; Returns YES for X="Y" and NO for X="N"
203 S X=$S(X="Y":"YES",X="N":"NO",1:X)
204 Q X
205 ;
Note: See TracBrowser for help on using the repository browser.