mphapi 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mphapi/claim.py
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
from enum import Enum, IntEnum
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Annotated, Optional
|
|
3
3
|
|
|
4
|
-
from pydantic import
|
|
5
|
-
from pydantic.alias_generators import to_camel
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
6
5
|
|
|
7
6
|
from .date import Date
|
|
8
|
-
|
|
9
|
-
camel_case_model_config = ConfigDict(
|
|
10
|
-
alias_generator=AliasGenerator(
|
|
11
|
-
validation_alias=to_camel, serialization_alias=to_camel
|
|
12
|
-
),
|
|
13
|
-
populate_by_name=True,
|
|
14
|
-
)
|
|
7
|
+
from .fields import camel_case_model_config, field_name
|
|
15
8
|
|
|
16
9
|
|
|
17
10
|
class FormType(str, Enum):
|
|
18
11
|
"""Type of form used to submit the claim. Can be HCFA or UB-04 (from CLM05_02)"""
|
|
19
12
|
|
|
20
|
-
HCFA = "HCFA"
|
|
21
13
|
UB_04 = "UB-04"
|
|
14
|
+
HCFA = "HCFA"
|
|
22
15
|
|
|
23
16
|
|
|
24
17
|
class BillTypeSequence(str, Enum):
|
|
@@ -26,24 +19,24 @@ class BillTypeSequence(str, Enum):
|
|
|
26
19
|
Discharge, 7: Replacement, etc.) (from CLM05_03)
|
|
27
20
|
"""
|
|
28
21
|
|
|
29
|
-
NON_PAY = "
|
|
30
|
-
ADMIT_THROUGH_DISCHARGE = "
|
|
31
|
-
FIRST_INTERIM = "
|
|
32
|
-
CONTINUING_INTERIM = "
|
|
33
|
-
LAST_INTERIM = "
|
|
34
|
-
LATE_CHARGE = "
|
|
35
|
-
FIRST_INTERIM_DEPRECATED = "
|
|
36
|
-
REPLACEMENT = "
|
|
37
|
-
VOID_OR_CANCEL = "
|
|
38
|
-
FINAL_CLAIM = "
|
|
39
|
-
CWF_ADJUSTMENT = "
|
|
40
|
-
CMS_ADJUSTMENT = "
|
|
41
|
-
INTERMEDIARY_ADJUSTMENT = "
|
|
42
|
-
OTHER_ADJUSTMENT = "
|
|
43
|
-
OIG_ADJUSTMENT = "
|
|
44
|
-
MSP_ADJUSTMENT = "
|
|
45
|
-
QIO_ADJUSTMENT = "
|
|
46
|
-
PROVIDER_ADJUSTMENT = "
|
|
22
|
+
NON_PAY = "0"
|
|
23
|
+
ADMIT_THROUGH_DISCHARGE = "1"
|
|
24
|
+
FIRST_INTERIM = "2"
|
|
25
|
+
CONTINUING_INTERIM = "3"
|
|
26
|
+
LAST_INTERIM = "4"
|
|
27
|
+
LATE_CHARGE = "5"
|
|
28
|
+
FIRST_INTERIM_DEPRECATED = "6"
|
|
29
|
+
REPLACEMENT = "7"
|
|
30
|
+
VOID_OR_CANCEL = "8"
|
|
31
|
+
FINAL_CLAIM = "9"
|
|
32
|
+
CWF_ADJUSTMENT = "G"
|
|
33
|
+
CMS_ADJUSTMENT = "H"
|
|
34
|
+
INTERMEDIARY_ADJUSTMENT = "I"
|
|
35
|
+
OTHER_ADJUSTMENT = "J"
|
|
36
|
+
OIG_ADJUSTMENT = "K"
|
|
37
|
+
MSP_ADJUSTMENT = "M"
|
|
38
|
+
QIO_ADJUSTMENT = "P"
|
|
39
|
+
PROVIDER_ADJUSTMENT = "Q"
|
|
47
40
|
|
|
48
41
|
|
|
49
42
|
class SexType(IntEnum):
|
|
@@ -55,12 +48,17 @@ class SexType(IntEnum):
|
|
|
55
48
|
|
|
56
49
|
|
|
57
50
|
class Provider(BaseModel):
|
|
51
|
+
"""
|
|
52
|
+
Provider represents the service provider that rendered healthcare services on behalf of the patient.
|
|
53
|
+
This can be found in Loop 2000A and/or Loop 2310 NM101-77 at the claim level, and may also be overridden at the service level in the 2400 loop
|
|
54
|
+
"""
|
|
55
|
+
|
|
58
56
|
model_config = camel_case_model_config
|
|
59
57
|
|
|
60
58
|
npi: str
|
|
61
59
|
"""National Provider Identifier of the provider (from NM109, required)"""
|
|
62
60
|
|
|
63
|
-
provider_tax_id: Optional[str] = None
|
|
61
|
+
provider_tax_id: Annotated[Optional[str], field_name("providerTaxID")] = None
|
|
64
62
|
"""City of the provider (from N401, highly recommended)"""
|
|
65
63
|
|
|
66
64
|
provider_phones: Optional[list[str]] = None
|
|
@@ -102,31 +100,30 @@ class Provider(BaseModel):
|
|
|
102
100
|
provider_state: Optional[str] = None
|
|
103
101
|
"""Address line 2 of the provider (from N302, optional)"""
|
|
104
102
|
|
|
105
|
-
provider_zip: str
|
|
103
|
+
provider_zip: Annotated[str, field_name("providerZIP")]
|
|
106
104
|
"""ZIP code of the provider (from N403, required)"""
|
|
107
105
|
|
|
108
106
|
|
|
109
107
|
class ValueCode(BaseModel):
|
|
110
|
-
"""Code indicating the type of value provided (from HIxx_02)"""
|
|
111
|
-
|
|
112
108
|
model_config = camel_case_model_config
|
|
113
109
|
|
|
114
110
|
code: str
|
|
111
|
+
"""Code indicating the type of value provided (from HIxx_02)"""
|
|
115
112
|
|
|
116
|
-
"""Amount associated with the value code (from HIxx_05)"""
|
|
117
113
|
amount: float
|
|
114
|
+
"""Amount associated with the value code (from HIxx_05)"""
|
|
118
115
|
|
|
119
116
|
|
|
120
117
|
class Diagnosis(BaseModel):
|
|
121
|
-
"""Principal
|
|
118
|
+
"""Principal, Other Diagnosis, Admitting Diagnosis, External Cause of Injury"""
|
|
122
119
|
|
|
123
120
|
model_config = camel_case_model_config
|
|
124
121
|
|
|
125
122
|
code: str
|
|
126
|
-
"""ICD code
|
|
123
|
+
"""ICD-10 diagnosis code (from HIxx_02)"""
|
|
127
124
|
|
|
128
125
|
description: Optional[str] = None
|
|
129
|
-
"""
|
|
126
|
+
"""Flag indicates whether diagnosis was present at the time of admission (from HIxx_09)"""
|
|
130
127
|
|
|
131
128
|
|
|
132
129
|
class Service(BaseModel):
|
|
@@ -144,6 +141,8 @@ class Service(BaseModel):
|
|
|
144
141
|
procedure_code: Optional[str] = None
|
|
145
142
|
"""Procedure code (from SV101_02 / SV202_02)"""
|
|
146
143
|
|
|
144
|
+
hipps_code: Optional[str] = None
|
|
145
|
+
|
|
147
146
|
procedure_modifiers: Optional[list[str]] = None
|
|
148
147
|
"""Procedure modifiers (from SV101_03, 4, 5, 6 / SV202_03, 4, 5, 6)"""
|
|
149
148
|
|
|
@@ -177,14 +176,16 @@ class Service(BaseModel):
|
|
|
177
176
|
diagnosis_pointers: Optional[list[int]] = None
|
|
178
177
|
"""Diagnosis pointers (from SV107)"""
|
|
179
178
|
|
|
180
|
-
ambulance_pickup_zip: Optional[str] =
|
|
179
|
+
ambulance_pickup_zip: Annotated[Optional[str], field_name("ambulancePickupZIP")] = (
|
|
180
|
+
None
|
|
181
|
+
)
|
|
181
182
|
"""ZIP code where ambulance picked up patient. Supplied if different than claim-level value (from NM1 PW)"""
|
|
182
183
|
|
|
183
184
|
|
|
184
185
|
class Claim(Provider, BaseModel):
|
|
185
186
|
model_config = camel_case_model_config
|
|
186
187
|
|
|
187
|
-
claim_id: Optional[str] = None
|
|
188
|
+
claim_id: Annotated[Optional[str], field_name("claimID")] = None
|
|
188
189
|
"""Unique identifier for the claim (from REF D9)"""
|
|
189
190
|
|
|
190
191
|
plan_code: Optional[str] = None
|
|
@@ -198,13 +199,19 @@ class Claim(Provider, BaseModel):
|
|
|
198
199
|
patient_date_of_birth: Optional[Date] = None
|
|
199
200
|
"""Patient date of birth (from DMG03)"""
|
|
200
201
|
|
|
201
|
-
patient_height_in_cm:
|
|
202
|
+
patient_height_in_cm: Annotated[
|
|
203
|
+
Optional[float], field_name("patientHeightInCM")
|
|
204
|
+
] = None
|
|
202
205
|
"""Patient height in centimeters (from HI value A9, MEA value HT)"""
|
|
203
206
|
|
|
204
|
-
patient_weight_in_kg:
|
|
207
|
+
patient_weight_in_kg: Annotated[
|
|
208
|
+
Optional[float], field_name("patientWeightInKG")
|
|
209
|
+
] = None
|
|
205
210
|
"""Patient weight in kilograms (from HI value A8, PAT08, CR102 [ambulance only])"""
|
|
206
211
|
|
|
207
|
-
ambulance_pickup_zip: Optional[str] =
|
|
212
|
+
ambulance_pickup_zip: Annotated[Optional[str], field_name("ambulancePickupZIP")] = (
|
|
213
|
+
None
|
|
214
|
+
)
|
|
208
215
|
"""Location where patient was picked up in ambulance (from HI with HIxx_01=BE and HIxx_02=A0
|
|
209
216
|
or NM1 loop with NM1 PW)
|
|
210
217
|
"""
|
|
@@ -212,13 +219,11 @@ class Claim(Provider, BaseModel):
|
|
|
212
219
|
form_type: Optional[FormType] = None
|
|
213
220
|
"""Type of form used to submit the claim. Can be HCFA or UB-04 (from CLM05_02)"""
|
|
214
221
|
|
|
215
|
-
bill_type_or_pos: Optional[str] = None
|
|
222
|
+
bill_type_or_pos: Annotated[Optional[str], field_name("billTypeOrPOS")] = None
|
|
216
223
|
"""Describes type of facility where services were rendered (from CLM05_01)"""
|
|
217
224
|
|
|
218
225
|
bill_type_sequence: Optional[BillTypeSequence] = None
|
|
219
|
-
"""Where the claim is at in its billing lifecycle (e.g. 0: Non-Pay, 1: Admit Through
|
|
220
|
-
Discharge, 7: Replacement, etc.) (from CLM05_03)
|
|
221
|
-
"""
|
|
226
|
+
"""Where the claim is at in its billing lifecycle (e.g. 0: Non-Pay, 1: Admit Through Discharge, 7: Replacement, etc.) (from CLM05_03)"""
|
|
222
227
|
|
|
223
228
|
billed_amount: Optional[float] = None
|
|
224
229
|
"""Billed amount from provider (from CLM02)"""
|
|
@@ -272,16 +277,16 @@ class Claim(Provider, BaseModel):
|
|
|
272
277
|
class RateSheetService(BaseModel):
|
|
273
278
|
model_config = camel_case_model_config
|
|
274
279
|
|
|
275
|
-
procedure_code: str
|
|
280
|
+
procedure_code: Optional[str] = None
|
|
276
281
|
"""Procedure code (from SV101_02 / SV202_02)"""
|
|
277
282
|
|
|
278
|
-
procedure_modifiers: list[str]
|
|
283
|
+
procedure_modifiers: Optional[list[str]] = None
|
|
279
284
|
"""Procedure modifiers (from SV101_03, 4, 5, 6 / SV202_03, 4, 5, 6)"""
|
|
280
285
|
|
|
281
|
-
billed_amount: float
|
|
286
|
+
billed_amount: Optional[float] = None
|
|
282
287
|
"""Billed charge for the service (from SV102 / SV203)"""
|
|
283
288
|
|
|
284
|
-
allowed_amount: float
|
|
289
|
+
allowed_amount: Optional[float] = None
|
|
285
290
|
"""Plan allowed amount for the service (non-EDI)"""
|
|
286
291
|
|
|
287
292
|
|
|
@@ -289,44 +294,44 @@ class RateSheet(BaseModel):
|
|
|
289
294
|
npi: str
|
|
290
295
|
"""National Provider Identifier of the provider (from NM109, required)"""
|
|
291
296
|
|
|
292
|
-
provider_first_name: str
|
|
297
|
+
provider_first_name: Optional[str] = None
|
|
293
298
|
"""First name of the provider (NM104, highly recommended)"""
|
|
294
299
|
|
|
295
|
-
provider_last_name: str
|
|
300
|
+
provider_last_name: Optional[str] = None
|
|
296
301
|
"""Last name of the provider (from NM103, highly recommended)"""
|
|
297
302
|
|
|
298
|
-
provider_org_name: str
|
|
303
|
+
provider_org_name: Optional[str] = None
|
|
299
304
|
"""Organization name of the provider (from NM103, highly recommended)"""
|
|
300
305
|
|
|
301
|
-
provider_address: str
|
|
306
|
+
provider_address: Optional[str] = None
|
|
302
307
|
"""Address of the provider (from N301, highly recommended)"""
|
|
303
308
|
|
|
304
|
-
provider_city: str
|
|
309
|
+
provider_city: Optional[str] = None
|
|
305
310
|
"""City of the provider (from N401, highly recommended)"""
|
|
306
311
|
|
|
307
|
-
provider_state: str
|
|
312
|
+
provider_state: Optional[str] = None
|
|
308
313
|
"""State of the provider (from N402, highly recommended)"""
|
|
309
314
|
|
|
310
|
-
provider_zip: str
|
|
315
|
+
provider_zip: Annotated[str, field_name("providerZIP")]
|
|
311
316
|
"""ZIP code of the provider (from N403, required)"""
|
|
312
317
|
|
|
313
|
-
form_type: FormType
|
|
318
|
+
form_type: Optional[FormType] = None
|
|
314
319
|
"""Type of form used to submit the claim. Can be HCFA or UB-04 (from CLM05_02)"""
|
|
315
320
|
|
|
316
|
-
bill_type_or_pos: str
|
|
321
|
+
bill_type_or_pos: Annotated[Optional[str], field_name("billTypeOrPOS")] = None
|
|
317
322
|
"""Describes type of facility where services were rendered (from CLM05_01)"""
|
|
318
323
|
|
|
319
|
-
drg: str
|
|
324
|
+
drg: Optional[str] = None
|
|
320
325
|
"""Diagnosis Related Group for inpatient services (from HI DR)"""
|
|
321
326
|
|
|
322
|
-
billed_amount: float
|
|
327
|
+
billed_amount: Optional[float] = None
|
|
323
328
|
"""Billed amount from provider (from CLM02)"""
|
|
324
329
|
|
|
325
|
-
allowed_amount: float
|
|
330
|
+
allowed_amount: Optional[float] = None
|
|
326
331
|
"""Amount allowed by the plan for payment. Both member and plan responsibility (non-EDI)"""
|
|
327
332
|
|
|
328
|
-
paid_amount: float
|
|
333
|
+
paid_amount: Optional[float] = None
|
|
329
334
|
"""Amount paid by the plan for the claim (non-EDI)"""
|
|
330
335
|
|
|
331
|
-
services: list[RateSheetService]
|
|
336
|
+
services: Optional[list[RateSheetService]] = None
|
|
332
337
|
"""One or more services provided to the patient (from LX loop)"""
|
mphapi/fields.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from pydantic import AliasGenerator, ConfigDict, Field
|
|
4
|
+
from pydantic.alias_generators import to_camel
|
|
5
|
+
|
|
6
|
+
camel_case_model_config = ConfigDict(
|
|
7
|
+
alias_generator=AliasGenerator(
|
|
8
|
+
validation_alias=to_camel, serialization_alias=to_camel
|
|
9
|
+
),
|
|
10
|
+
populate_by_name=True,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# The return value of Field itself is typed as Any even though it's technically always of type `FieldInfo`.
|
|
15
|
+
# For once this unsoundness is desired, as it's meant to be assignable to any field type.
|
|
16
|
+
def field_name(alias: str) -> Any:
|
|
17
|
+
return Field(validation_alias=alias, serialization_alias=alias)
|
mphapi/pricing.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from enum import Enum
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Annotated, Optional
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel, Field
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from .fields import camel_case_model_config, field_name
|
|
7
7
|
from .response import ResponseError
|
|
8
8
|
|
|
9
9
|
|
|
@@ -20,22 +20,22 @@ class ClaimRepricingCode(str, Enum):
|
|
|
20
20
|
class LineRepricingCode(str, Enum):
|
|
21
21
|
# line-level Medicare repricing codes
|
|
22
22
|
MEDICARE = "MED"
|
|
23
|
-
SYNTHETIC_MEDICARE = "SYN"
|
|
24
|
-
COST_PERCENT = "CST"
|
|
25
23
|
MEDICARE_PERCENT = "MPT"
|
|
26
24
|
MEDICARE_NO_OUTLIER = "MNO"
|
|
25
|
+
SYNTHETIC_MEDICARE = "SYN"
|
|
27
26
|
BILLED_PERCENT = "BIL"
|
|
28
27
|
FEE_SCHEDULE = "FSC"
|
|
29
28
|
PER_DIEM = "PDM"
|
|
30
29
|
FLAT_RATE = "FLT"
|
|
30
|
+
COST_PERCENT = "CST"
|
|
31
31
|
LIMITED_TO_BILLED = "LTB"
|
|
32
32
|
|
|
33
33
|
# line-level zero dollar repricing explanations
|
|
34
|
+
NOT_REPRICED_PER_REQUEST = "NRP"
|
|
34
35
|
NOT_ALLOWED_BY_MEDICARE = "NAM"
|
|
35
36
|
PACKAGED = "PKG"
|
|
36
37
|
NEEDS_MORE_INFO = "IFO"
|
|
37
38
|
PROCEDURE_CODE_PROBLEM = "CPB"
|
|
38
|
-
NOT_REPRICED_PER_REQUEST = "NRP"
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class HospitalType(str, Enum):
|
|
@@ -46,6 +46,12 @@ class HospitalType(str, Enum):
|
|
|
46
46
|
ACUTE_CARE_DOD = "Acute Care - Department of Defense"
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
class RuralIndicator(str, Enum):
|
|
50
|
+
RURAL = "R"
|
|
51
|
+
SUPER_RURAL = "B"
|
|
52
|
+
URBAN = ""
|
|
53
|
+
|
|
54
|
+
|
|
49
55
|
class InpatientPriceDetail(BaseModel):
|
|
50
56
|
"""InpatientPriceDetail contains pricing details for an inpatient claim"""
|
|
51
57
|
|
|
@@ -109,12 +115,6 @@ class OutpatientPriceDetail(BaseModel):
|
|
|
109
115
|
"""Credit for devices that are not used due to a terminated procedure"""
|
|
110
116
|
|
|
111
117
|
|
|
112
|
-
class RuralIndicator(str, Enum):
|
|
113
|
-
RURAL = "R"
|
|
114
|
-
SUPER_RURAL = "B"
|
|
115
|
-
URBAN = ""
|
|
116
|
-
|
|
117
|
-
|
|
118
118
|
class ProviderDetail(BaseModel):
|
|
119
119
|
"""
|
|
120
120
|
ProviderDetail contains basic information about the provider and/or locality used for pricing.
|
|
@@ -163,63 +163,6 @@ class ClaimEdits(BaseModel):
|
|
|
163
163
|
line_item_denial_reasons: Optional[list[str]] = None
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
class Pricing(BaseModel):
|
|
167
|
-
"""Pricing contains the results of a pricing request"""
|
|
168
|
-
|
|
169
|
-
model_config = camel_case_model_config
|
|
170
|
-
|
|
171
|
-
claim_id: Optional[str] = None
|
|
172
|
-
"""The unique identifier for the claim (copied from input)"""
|
|
173
|
-
|
|
174
|
-
medicare_amount: Optional[float] = None
|
|
175
|
-
"""The amount Medicare would pay for the service"""
|
|
176
|
-
|
|
177
|
-
allowed_amount: Optional[float] = None
|
|
178
|
-
"""The allowed amount based on a contract or RBP pricing"""
|
|
179
|
-
|
|
180
|
-
allowed_calculation_error: Optional[str] = None
|
|
181
|
-
"""The reason the allowed amount was not calculated"""
|
|
182
|
-
|
|
183
|
-
medicare_repricing_code: Optional[ClaimRepricingCode] = None
|
|
184
|
-
"""Explains the methodology used to calculate Medicare (MED or IFO)"""
|
|
185
|
-
|
|
186
|
-
medicare_repricing_note: Optional[str] = None
|
|
187
|
-
"""Note explaining approach for pricing or reason for error"""
|
|
188
|
-
|
|
189
|
-
allowed_repricing_code: Optional[ClaimRepricingCode] = None
|
|
190
|
-
"""Explains the methodology used to calculate allowed amount (CON, RBP, SCA, or IFO)"""
|
|
191
|
-
|
|
192
|
-
allowed_repricing_note: Optional[str] = None
|
|
193
|
-
"""Note explaining approach for pricing or reason for error"""
|
|
194
|
-
|
|
195
|
-
medicare_std_dev: Optional[float] = None
|
|
196
|
-
"""The standard deviation of the estimated Medicare amount (estimates service only)"""
|
|
197
|
-
|
|
198
|
-
medicare_source: Optional[str] = None
|
|
199
|
-
"""Source of the Medicare amount (e.g. physician fee schedule, OPPS, etc.)"""
|
|
200
|
-
|
|
201
|
-
inpatient_price_detail: Optional[InpatientPriceDetail] = None
|
|
202
|
-
"""Details about the inpatient pricing"""
|
|
203
|
-
|
|
204
|
-
outpatient_price_detail: Optional[OutpatientPriceDetail] = None
|
|
205
|
-
"""Details about the outpatient pricing"""
|
|
206
|
-
|
|
207
|
-
provider_detail: Optional[ProviderDetail] = None
|
|
208
|
-
"""The provider details used when pricing the claim"""
|
|
209
|
-
|
|
210
|
-
edit_detail: Optional[ClaimEdits] = None
|
|
211
|
-
"""Errors which cause the claim to be denied, rejected, suspended, or returned to the provider"""
|
|
212
|
-
|
|
213
|
-
pricer_result: Optional[str] = None
|
|
214
|
-
"""Pricer return details"""
|
|
215
|
-
|
|
216
|
-
services: list[Service] = Field(min_length=1)
|
|
217
|
-
"""Pricing for each service line on the claim"""
|
|
218
|
-
|
|
219
|
-
edit_error: Optional[ResponseError] = None
|
|
220
|
-
"""An error that occurred during some step of the pricing process"""
|
|
221
|
-
|
|
222
|
-
|
|
223
166
|
class LineEdits(BaseModel):
|
|
224
167
|
"""LineEdits contains errors which cause the line item to be unable to be priced."""
|
|
225
168
|
|
|
@@ -242,50 +185,107 @@ class PricedService(BaseModel):
|
|
|
242
185
|
|
|
243
186
|
model_config = camel_case_model_config
|
|
244
187
|
|
|
245
|
-
line_number: str
|
|
188
|
+
line_number: Optional[str] = None
|
|
246
189
|
"""Number of the service line item (copied from input)"""
|
|
247
190
|
|
|
248
191
|
provider_detail: Optional[ProviderDetail] = None
|
|
249
192
|
"""Provider Details used when pricing the service if different than the claim"""
|
|
250
193
|
|
|
251
|
-
medicare_amount: float
|
|
194
|
+
medicare_amount: Optional[float] = None
|
|
252
195
|
"""Amount Medicare would pay for the service"""
|
|
253
196
|
|
|
254
|
-
allowed_amount: float
|
|
197
|
+
allowed_amount: Optional[float] = None
|
|
255
198
|
"""Allowed amount based on a contract or RBP pricing"""
|
|
256
199
|
|
|
257
|
-
|
|
258
|
-
"""Reason the allowed amount was not calculated"""
|
|
259
|
-
|
|
260
|
-
repricing_code: LineRepricingCode
|
|
200
|
+
medicare_repricing_code: Optional[LineRepricingCode] = None
|
|
261
201
|
"""Explains the methodology used to calculate Medicare"""
|
|
262
202
|
|
|
263
|
-
|
|
203
|
+
medicare_repricing_note: Optional[str] = None
|
|
264
204
|
"""Note explaining approach for pricing or reason for error"""
|
|
265
205
|
|
|
266
|
-
|
|
206
|
+
allowed_repricing_code: Optional[LineRepricingCode] = None
|
|
207
|
+
"""Explains the methodology used to calculate allowed amount"""
|
|
208
|
+
|
|
209
|
+
allowed_repricing_note: Optional[str] = None
|
|
210
|
+
"""Note explaining approach for pricing or reason for error"""
|
|
211
|
+
|
|
212
|
+
technical_component_amount: Optional[float] = None
|
|
267
213
|
"""Amount Medicare would pay for the technical component"""
|
|
268
214
|
|
|
269
|
-
professional_component_amount: float
|
|
215
|
+
professional_component_amount: Optional[float] = None
|
|
270
216
|
"""Amount Medicare would pay for the professional component"""
|
|
271
217
|
|
|
272
|
-
medicare_std_dev: float
|
|
218
|
+
medicare_std_dev: Optional[float] = None
|
|
273
219
|
"""Standard deviation of the estimated Medicare amount (estimates service only)"""
|
|
274
220
|
|
|
275
|
-
medicare_source: str
|
|
221
|
+
medicare_source: Optional[str] = None
|
|
276
222
|
"""Source of the Medicare amount (e.g. physician fee schedule, OPPS, etc.)"""
|
|
277
223
|
|
|
278
|
-
pricer_result: str
|
|
224
|
+
pricer_result: Optional[str] = None
|
|
279
225
|
"""Pricing service return details"""
|
|
280
226
|
|
|
281
|
-
status_indicator: str
|
|
227
|
+
status_indicator: Optional[str] = None
|
|
282
228
|
"""Code which gives more detail about how Medicare pays for the service"""
|
|
283
229
|
|
|
284
|
-
payment_indicator: str
|
|
230
|
+
payment_indicator: Optional[str] = None
|
|
285
231
|
"""Text which explains the type of payment for Medicare"""
|
|
286
232
|
|
|
287
|
-
payment_apc: str
|
|
233
|
+
payment_apc: Annotated[Optional[str], field_name("paymentAPC")] = None
|
|
288
234
|
"""Ambulatory Payment Classification"""
|
|
289
235
|
|
|
290
236
|
edit_detail: Optional[LineEdits] = None
|
|
291
237
|
"""Errors which cause the line item to be unable to be priced"""
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class Pricing(BaseModel):
|
|
241
|
+
"""Pricing contains the results of a pricing request"""
|
|
242
|
+
|
|
243
|
+
model_config = camel_case_model_config
|
|
244
|
+
|
|
245
|
+
claim_id: Annotated[Optional[str], field_name(alias="claimID")] = None
|
|
246
|
+
"""The unique identifier for the claim (copied from input)"""
|
|
247
|
+
|
|
248
|
+
medicare_amount: Optional[float] = None
|
|
249
|
+
"""The amount Medicare would pay for the service"""
|
|
250
|
+
|
|
251
|
+
allowed_amount: Optional[float] = None
|
|
252
|
+
"""The allowed amount based on a contract or RBP pricing"""
|
|
253
|
+
|
|
254
|
+
medicare_repricing_code: Optional[ClaimRepricingCode] = None
|
|
255
|
+
"""Explains the methodology used to calculate Medicare (MED or IFO)"""
|
|
256
|
+
|
|
257
|
+
medicare_repricing_note: Optional[str] = None
|
|
258
|
+
"""Note explaining approach for pricing or reason for error"""
|
|
259
|
+
|
|
260
|
+
allowed_repricing_code: Optional[ClaimRepricingCode] = None
|
|
261
|
+
"""Explains the methodology used to calculate allowed amount (CON, RBP, SCA, or IFO)"""
|
|
262
|
+
|
|
263
|
+
allowed_repricing_note: Optional[str] = None
|
|
264
|
+
"""Note explaining approach for pricing or reason for error"""
|
|
265
|
+
|
|
266
|
+
medicare_std_dev: Optional[float] = None
|
|
267
|
+
"""The standard deviation of the estimated Medicare amount (estimates service only)"""
|
|
268
|
+
|
|
269
|
+
medicare_source: Optional[str] = None
|
|
270
|
+
"""Source of the Medicare amount (e.g. physician fee schedule, OPPS, etc.)"""
|
|
271
|
+
|
|
272
|
+
inpatient_price_detail: Optional[InpatientPriceDetail] = None
|
|
273
|
+
"""Details about the inpatient pricing"""
|
|
274
|
+
|
|
275
|
+
outpatient_price_detail: Optional[OutpatientPriceDetail] = None
|
|
276
|
+
"""Details about the outpatient pricing"""
|
|
277
|
+
|
|
278
|
+
provider_detail: Optional[ProviderDetail] = None
|
|
279
|
+
"""The provider details used when pricing the claim"""
|
|
280
|
+
|
|
281
|
+
edit_detail: Optional[ClaimEdits] = None
|
|
282
|
+
"""Errors which cause the claim to be denied, rejected, suspended, or returned to the provider"""
|
|
283
|
+
|
|
284
|
+
pricer_result: Optional[str] = None
|
|
285
|
+
"""Pricer return details"""
|
|
286
|
+
|
|
287
|
+
services: list[PricedService] = Field(min_length=1)
|
|
288
|
+
"""Pricing for each service line on the claim"""
|
|
289
|
+
|
|
290
|
+
edit_error: Optional[ResponseError] = None
|
|
291
|
+
"""An error that occurred during some step of the pricing process"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
mphapi/__init__.py,sha256=pY3H-ikyEKrkHm8f3L7-5_IaDf8G9vYMUVsWJRV8e04,210
|
|
2
|
+
mphapi/claim.py,sha256=L9g2PHPd9nLY0WH8_WL4zlHkPztjBR217tMvcFyxg9s,11518
|
|
3
|
+
mphapi/client.py,sha256=AHEClAKS3j0wMdrjFhAmQqCJ_4Axc01DiOxZiOMzWhs,6297
|
|
4
|
+
mphapi/date.py,sha256=Vdv3xqZh610xFl1HK1e_YGK9tkdFs0giUTvCT5bbbRU,1504
|
|
5
|
+
mphapi/fields.py,sha256=nRFqDwFONLiYcYXb4I54vuvNAUlCTErtp7S3BB16aNo,604
|
|
6
|
+
mphapi/pricing.py,sha256=gYkVsyXn--69CjHoyHYVYPXYXXejoSmbDjqmWdknodY,10159
|
|
7
|
+
mphapi/response.py,sha256=opgHtRH7hIgz9tMSVV7966OJDAIB9O4BvOUW_KcJzqI,2958
|
|
8
|
+
mphapi-0.4.0.dist-info/METADATA,sha256=etBXZHvEp_ia9poyQ2OZEBrv9EgutD57egAXQMr5f_o,382
|
|
9
|
+
mphapi-0.4.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
10
|
+
mphapi-0.4.0.dist-info/RECORD,,
|
mphapi-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
mphapi/__init__.py,sha256=pY3H-ikyEKrkHm8f3L7-5_IaDf8G9vYMUVsWJRV8e04,210
|
|
2
|
-
mphapi/claim.py,sha256=eYHVNddhM-F6IKWuRQJxIlp5XFG2jDMp9xPY6z-Gx9w,10567
|
|
3
|
-
mphapi/client.py,sha256=AHEClAKS3j0wMdrjFhAmQqCJ_4Axc01DiOxZiOMzWhs,6297
|
|
4
|
-
mphapi/date.py,sha256=Vdv3xqZh610xFl1HK1e_YGK9tkdFs0giUTvCT5bbbRU,1504
|
|
5
|
-
mphapi/pricing.py,sha256=SLLFpJ1GJTLcaw43wRHmROglrN5-5xR_ZHGmjtyw1oQ,9776
|
|
6
|
-
mphapi/response.py,sha256=opgHtRH7hIgz9tMSVV7966OJDAIB9O4BvOUW_KcJzqI,2958
|
|
7
|
-
mphapi-0.2.0.dist-info/METADATA,sha256=sGXrjA424oDr2z6FeILQwvQ61dq-DN3uimm-2B28_xE,382
|
|
8
|
-
mphapi-0.2.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
9
|
-
mphapi-0.2.0.dist-info/RECORD,,
|
|
File without changes
|