mphapi 0.1.0__tar.gz → 0.3.0__tar.gz
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-0.1.0 → mphapi-0.3.0}/PKG-INFO +2 -4
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/claim.py +1 -1
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/pricing.py +60 -106
- {mphapi-0.1.0 → mphapi-0.3.0}/pyproject.toml +2 -2
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/__init__.py +0 -0
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/client.py +0 -0
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/date.py +0 -0
- {mphapi-0.1.0 → mphapi-0.3.0}/mphapi/response.py +0 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mphapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Python interface to the MyPriceHealth API
|
|
5
5
|
Author: David Archibald
|
|
6
6
|
Author-email: davidarchibald@myprice.health
|
|
7
|
-
Requires-Python: >=3.
|
|
7
|
+
Requires-Python: >=3.12,<4.0
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
11
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
10
|
Requires-Dist: pydantic (>=2.6.4,<3.0.0)
|
|
13
11
|
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
@@ -144,7 +144,7 @@ class Service(BaseModel):
|
|
|
144
144
|
procedure_code: Optional[str] = None
|
|
145
145
|
"""Procedure code (from SV101_02 / SV202_02)"""
|
|
146
146
|
|
|
147
|
-
procedure_modifiers: Optional[str] = None
|
|
147
|
+
procedure_modifiers: Optional[list[str]] = None
|
|
148
148
|
"""Procedure modifiers (from SV101_03, 4, 5, 6 / SV202_03, 4, 5, 6)"""
|
|
149
149
|
|
|
150
150
|
drug_code: Optional[str] = None
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from enum import Enum
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Optional
|
|
3
3
|
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
5
|
-
from pydantic_core import core_schema
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
6
5
|
|
|
7
|
-
from .claim import
|
|
6
|
+
from .claim import camel_case_model_config
|
|
8
7
|
from .response import ResponseError
|
|
9
8
|
|
|
10
9
|
|
|
@@ -115,51 +114,6 @@ class RuralIndicator(str, Enum):
|
|
|
115
114
|
SUPER_RURAL = "B"
|
|
116
115
|
URBAN = ""
|
|
117
116
|
|
|
118
|
-
@classmethod
|
|
119
|
-
def __get_pydantic_core_schema__(
|
|
120
|
-
cls,
|
|
121
|
-
_source_type: Any,
|
|
122
|
-
_handler: GetCoreSchemaHandler,
|
|
123
|
-
) -> core_schema.CoreSchema:
|
|
124
|
-
def from_int(value: int) -> RuralIndicator:
|
|
125
|
-
if value == 82:
|
|
126
|
-
return RuralIndicator.RURAL
|
|
127
|
-
elif value == 66:
|
|
128
|
-
return RuralIndicator.SUPER_RURAL
|
|
129
|
-
elif value == 32:
|
|
130
|
-
return RuralIndicator.URBAN
|
|
131
|
-
else:
|
|
132
|
-
raise ValueError(f"Unknown rural indicator value: {value}")
|
|
133
|
-
|
|
134
|
-
def to_int(instance: RuralIndicator) -> int:
|
|
135
|
-
if instance == RuralIndicator.RURAL:
|
|
136
|
-
return 82
|
|
137
|
-
elif instance == RuralIndicator.SUPER_RURAL:
|
|
138
|
-
return 66
|
|
139
|
-
elif instance == RuralIndicator.URBAN:
|
|
140
|
-
return 32
|
|
141
|
-
else:
|
|
142
|
-
raise ValueError(f"Unknown rural indicator: {instance}")
|
|
143
|
-
|
|
144
|
-
from_int_schema = core_schema.chain_schema(
|
|
145
|
-
[
|
|
146
|
-
core_schema.int_schema(),
|
|
147
|
-
core_schema.no_info_plain_validator_function(from_int),
|
|
148
|
-
]
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
return core_schema.json_or_python_schema(
|
|
152
|
-
json_schema=from_int_schema,
|
|
153
|
-
python_schema=core_schema.union_schema(
|
|
154
|
-
[
|
|
155
|
-
# check if it's an instance first before doing any further work
|
|
156
|
-
core_schema.is_instance_schema(RuralIndicator),
|
|
157
|
-
from_int_schema,
|
|
158
|
-
]
|
|
159
|
-
),
|
|
160
|
-
serialization=core_schema.plain_serializer_function_ser_schema(to_int),
|
|
161
|
-
)
|
|
162
|
-
|
|
163
117
|
|
|
164
118
|
class ProviderDetail(BaseModel):
|
|
165
119
|
"""
|
|
@@ -209,63 +163,6 @@ class ClaimEdits(BaseModel):
|
|
|
209
163
|
line_item_denial_reasons: Optional[list[str]] = None
|
|
210
164
|
|
|
211
165
|
|
|
212
|
-
class Pricing(BaseModel):
|
|
213
|
-
"""Pricing contains the results of a pricing request"""
|
|
214
|
-
|
|
215
|
-
model_config = camel_case_model_config
|
|
216
|
-
|
|
217
|
-
claim_id: Optional[str] = None
|
|
218
|
-
"""The unique identifier for the claim (copied from input)"""
|
|
219
|
-
|
|
220
|
-
medicare_amount: Optional[float] = None
|
|
221
|
-
"""The amount Medicare would pay for the service"""
|
|
222
|
-
|
|
223
|
-
allowed_amount: Optional[float] = None
|
|
224
|
-
"""The allowed amount based on a contract or RBP pricing"""
|
|
225
|
-
|
|
226
|
-
allowed_calculation_error: Optional[str] = None
|
|
227
|
-
"""The reason the allowed amount was not calculated"""
|
|
228
|
-
|
|
229
|
-
medicare_repricing_code: Optional[ClaimRepricingCode] = None
|
|
230
|
-
"""Explains the methodology used to calculate Medicare (MED or IFO)"""
|
|
231
|
-
|
|
232
|
-
medicare_repricing_note: Optional[str] = None
|
|
233
|
-
"""Note explaining approach for pricing or reason for error"""
|
|
234
|
-
|
|
235
|
-
allowed_repricing_code: Optional[ClaimRepricingCode] = None
|
|
236
|
-
"""Explains the methodology used to calculate allowed amount (CON, RBP, SCA, or IFO)"""
|
|
237
|
-
|
|
238
|
-
allowed_repricing_note: Optional[str] = None
|
|
239
|
-
"""Note explaining approach for pricing or reason for error"""
|
|
240
|
-
|
|
241
|
-
medicare_std_dev: Optional[float] = None
|
|
242
|
-
"""The standard deviation of the estimated Medicare amount (estimates service only)"""
|
|
243
|
-
|
|
244
|
-
medicare_source: Optional[str] = None
|
|
245
|
-
"""Source of the Medicare amount (e.g. physician fee schedule, OPPS, etc.)"""
|
|
246
|
-
|
|
247
|
-
inpatient_price_detail: Optional[InpatientPriceDetail] = None
|
|
248
|
-
"""Details about the inpatient pricing"""
|
|
249
|
-
|
|
250
|
-
outpatient_price_detail: Optional[OutpatientPriceDetail] = None
|
|
251
|
-
"""Details about the outpatient pricing"""
|
|
252
|
-
|
|
253
|
-
provider_detail: Optional[ProviderDetail] = None
|
|
254
|
-
"""The provider details used when pricing the claim"""
|
|
255
|
-
|
|
256
|
-
edit_detail: Optional[ClaimEdits] = None
|
|
257
|
-
"""Errors which cause the claim to be denied, rejected, suspended, or returned to the provider"""
|
|
258
|
-
|
|
259
|
-
pricer_result: Optional[str] = None
|
|
260
|
-
"""Pricer return details"""
|
|
261
|
-
|
|
262
|
-
services: list[Service] = Field(min_length=1)
|
|
263
|
-
"""Pricing for each service line on the claim"""
|
|
264
|
-
|
|
265
|
-
edit_error: Optional[ResponseError] = None
|
|
266
|
-
"""An error that occurred during some step of the pricing process"""
|
|
267
|
-
|
|
268
|
-
|
|
269
166
|
class LineEdits(BaseModel):
|
|
270
167
|
"""LineEdits contains errors which cause the line item to be unable to be priced."""
|
|
271
168
|
|
|
@@ -335,3 +232,60 @@ class PricedService(BaseModel):
|
|
|
335
232
|
|
|
336
233
|
edit_detail: Optional[LineEdits] = None
|
|
337
234
|
"""Errors which cause the line item to be unable to be priced"""
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class Pricing(BaseModel):
|
|
238
|
+
"""Pricing contains the results of a pricing request"""
|
|
239
|
+
|
|
240
|
+
model_config = camel_case_model_config
|
|
241
|
+
|
|
242
|
+
claim_id: Optional[str] = None
|
|
243
|
+
"""The unique identifier for the claim (copied from input)"""
|
|
244
|
+
|
|
245
|
+
medicare_amount: Optional[float] = None
|
|
246
|
+
"""The amount Medicare would pay for the service"""
|
|
247
|
+
|
|
248
|
+
allowed_amount: Optional[float] = None
|
|
249
|
+
"""The allowed amount based on a contract or RBP pricing"""
|
|
250
|
+
|
|
251
|
+
allowed_calculation_error: Optional[str] = None
|
|
252
|
+
"""The reason the allowed amount was not calculated"""
|
|
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"""
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "mphapi"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "A Python interface to the MyPriceHealth API"
|
|
5
5
|
authors = ["David Archibald <davidarchibald@myprice.health>"]
|
|
6
6
|
|
|
7
7
|
[tool.poetry.dependencies]
|
|
8
|
-
python = "^3.
|
|
8
|
+
python = "^3.12"
|
|
9
9
|
pydantic = "^2.6.4"
|
|
10
10
|
requests = "^2.31.0"
|
|
11
11
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|