medicafe 0.250708.1__tar.gz → 0.250711.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.
Potentially problematic release.
This version of medicafe might be problematic. Click here for more details.
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_API_v3.py +1 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Deductible.py +38 -41
- {medicafe-0.250708.1/medicafe.egg-info → medicafe-0.250711.0}/PKG-INFO +1 -1
- {medicafe-0.250708.1 → medicafe-0.250711.0/medicafe.egg-info}/PKG-INFO +1 -1
- {medicafe-0.250708.1 → medicafe-0.250711.0}/setup.py +1 -1
- {medicafe-0.250708.1 → medicafe-0.250711.0}/LICENSE +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MANIFEST.in +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot.bat +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_Charges.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_Crosswalk_Library.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_Post.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_Preprocessor.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_Preprocessor_lib.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_UI.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_dataformat_library.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/MediBot_docx_decoder.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/PDF_to_CSV_Cleaner.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/__init__.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/update_json.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediBot/update_medicafe.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_837p_encoder.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_837p_encoder_library.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_API_Generator.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_API_v2.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_APIs.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Azure.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_ClaimStatus.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_ConfigLoader.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_DataMgmt.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Decoder.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Down.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Gmail.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_GraphQL.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Mailer.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Parser.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Scan.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Scheduler.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_UI.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_Up.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/MediLink_batch.bat +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/Soumit_api.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/__init__.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/openssl.cnf +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/test.py +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/MediLink/webapp.html +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/README.md +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/medicafe.egg-info/SOURCES.txt +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/medicafe.egg-info/dependency_links.txt +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/medicafe.egg-info/not-zip-safe +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/medicafe.egg-info/requires.txt +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/medicafe.egg-info/top_level.txt +0 -0
- {medicafe-0.250708.1 → medicafe-0.250711.0}/setup.cfg +0 -0
|
@@ -73,6 +73,7 @@ class TokenCache:
|
|
|
73
73
|
return token_info['access_token']
|
|
74
74
|
|
|
75
75
|
# Log cache miss
|
|
76
|
+
# BUG In the future, check the token refresh flow here to make sure we're not picking up unnecessary tokens.
|
|
76
77
|
log_message = "No valid token found for {}".format(endpoint_name)
|
|
77
78
|
MediLink_ConfigLoader.log(log_message, level="INFO")
|
|
78
79
|
|
|
@@ -213,6 +213,7 @@ def get_eligibility_info(client, payer_id, provider_last_name, date_of_birth, me
|
|
|
213
213
|
return None
|
|
214
214
|
|
|
215
215
|
# Helper functions to extract data from different API response formats
|
|
216
|
+
# BUG the API response is coming through correctly but the parsers below are not correctly extracting the super_connector variables.
|
|
216
217
|
|
|
217
218
|
def extract_legacy_patient_info(policy):
|
|
218
219
|
"""Extract patient information from legacy API response format"""
|
|
@@ -225,21 +226,14 @@ def extract_legacy_patient_info(policy):
|
|
|
225
226
|
|
|
226
227
|
def extract_super_connector_patient_info(eligibility_data):
|
|
227
228
|
"""Extract patient information from Super Connector API response format"""
|
|
228
|
-
if not eligibility_data
|
|
229
|
+
if not eligibility_data:
|
|
229
230
|
return {'lastName': '', 'firstName': '', 'middleName': ''}
|
|
230
231
|
|
|
231
|
-
#
|
|
232
|
-
eligibility_list = eligibility_data.get('data', {}).get('checkEligibility', {}).get('eligibility', [])
|
|
233
|
-
if not eligibility_list:
|
|
234
|
-
return {'lastName': '', 'firstName': '', 'middleName': ''}
|
|
235
|
-
|
|
236
|
-
first_eligibility = eligibility_list[0]
|
|
237
|
-
member_info = first_eligibility.get('eligibilityInfo', {}).get('member', {})
|
|
238
|
-
|
|
232
|
+
# The response structure is flat at the top level
|
|
239
233
|
return {
|
|
240
|
-
'lastName':
|
|
241
|
-
'firstName':
|
|
242
|
-
'middleName':
|
|
234
|
+
'lastName': eligibility_data.get("lastName", ""),
|
|
235
|
+
'firstName': eligibility_data.get("firstName", ""),
|
|
236
|
+
'middleName': eligibility_data.get("middleName", "")
|
|
243
237
|
}
|
|
244
238
|
|
|
245
239
|
def extract_legacy_remaining_amount(policy):
|
|
@@ -254,11 +248,23 @@ def extract_legacy_remaining_amount(policy):
|
|
|
254
248
|
|
|
255
249
|
def extract_super_connector_remaining_amount(eligibility_data):
|
|
256
250
|
"""Extract remaining amount from Super Connector API response format"""
|
|
257
|
-
if not eligibility_data
|
|
251
|
+
if not eligibility_data:
|
|
258
252
|
return ""
|
|
259
253
|
|
|
260
|
-
#
|
|
261
|
-
|
|
254
|
+
# First, check top-level metYearToDateAmount which might indicate deductible met
|
|
255
|
+
met_amount = eligibility_data.get('metYearToDateAmount')
|
|
256
|
+
if met_amount is not None:
|
|
257
|
+
return str(met_amount)
|
|
258
|
+
|
|
259
|
+
# Navigate to the rawGraphQLResponse structure
|
|
260
|
+
raw_response = eligibility_data.get('rawGraphQLResponse', {})
|
|
261
|
+
if not raw_response:
|
|
262
|
+
return ""
|
|
263
|
+
|
|
264
|
+
data = raw_response.get('data', {})
|
|
265
|
+
check_eligibility = data.get('checkEligibility', {})
|
|
266
|
+
eligibility_list = check_eligibility.get('eligibility', [])
|
|
267
|
+
|
|
262
268
|
if not eligibility_list:
|
|
263
269
|
return ""
|
|
264
270
|
|
|
@@ -274,6 +280,12 @@ def extract_super_connector_remaining_amount(eligibility_data):
|
|
|
274
280
|
# Look for deductible-related information
|
|
275
281
|
if service.get('service') == 'deductible' or 'deductible' in service.get('text', '').lower():
|
|
276
282
|
return service.get('remainingAmount', "")
|
|
283
|
+
|
|
284
|
+
# Check the message.deductible.text field for deductible information
|
|
285
|
+
message = service.get('message', {})
|
|
286
|
+
deductible_msg = message.get('deductible', {})
|
|
287
|
+
if deductible_msg and deductible_msg.get('text'):
|
|
288
|
+
return deductible_msg.get('text', "")
|
|
277
289
|
|
|
278
290
|
# If no specific deductible found, try to get from plan levels
|
|
279
291
|
plan_levels = first_eligibility.get('eligibilityInfo', {}).get('planLevels', [])
|
|
@@ -297,28 +309,20 @@ def extract_legacy_insurance_info(policy):
|
|
|
297
309
|
|
|
298
310
|
def extract_super_connector_insurance_info(eligibility_data):
|
|
299
311
|
"""Extract insurance information from Super Connector API response format"""
|
|
300
|
-
if not eligibility_data
|
|
301
|
-
return {'insuranceType': '', 'insuranceTypeCode': '', 'memberId': '', 'payerId': ''}
|
|
302
|
-
|
|
303
|
-
# Navigate to the first eligibility record
|
|
304
|
-
eligibility_list = eligibility_data.get('data', {}).get('checkEligibility', {}).get('eligibility', [])
|
|
305
|
-
if not eligibility_list:
|
|
312
|
+
if not eligibility_data:
|
|
306
313
|
return {'insuranceType': '', 'insuranceTypeCode': '', 'memberId': '', 'payerId': ''}
|
|
307
314
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
# Get coverage type from coverageTypes array
|
|
312
|
-
coverage_types = insurance_info.get('coverageTypes', [])
|
|
315
|
+
# Get coverage type from coverageTypes array at the top level
|
|
316
|
+
coverage_types = eligibility_data.get('coverageTypes', [])
|
|
313
317
|
insurance_type = ""
|
|
314
318
|
if coverage_types:
|
|
315
319
|
insurance_type = coverage_types[0].get('description', '')
|
|
316
320
|
|
|
317
321
|
return {
|
|
318
322
|
'insuranceType': insurance_type,
|
|
319
|
-
'insuranceTypeCode':
|
|
320
|
-
'memberId':
|
|
321
|
-
'payerId':
|
|
323
|
+
'insuranceTypeCode': eligibility_data.get("productServiceCode", ""),
|
|
324
|
+
'memberId': eligibility_data.get("subscriberId", ""),
|
|
325
|
+
'payerId': eligibility_data.get("legalEntityCode", "")
|
|
322
326
|
}
|
|
323
327
|
|
|
324
328
|
def extract_legacy_policy_status(policy):
|
|
@@ -328,26 +332,19 @@ def extract_legacy_policy_status(policy):
|
|
|
328
332
|
|
|
329
333
|
def extract_super_connector_policy_status(eligibility_data):
|
|
330
334
|
"""Extract policy status from Super Connector API response format"""
|
|
331
|
-
if not eligibility_data
|
|
335
|
+
if not eligibility_data:
|
|
332
336
|
return ""
|
|
333
337
|
|
|
334
|
-
#
|
|
335
|
-
|
|
336
|
-
if not eligibility_list:
|
|
337
|
-
return ""
|
|
338
|
-
|
|
339
|
-
first_eligibility = eligibility_list[0]
|
|
340
|
-
insurance_info = first_eligibility.get('eligibilityInfo', {}).get('insuranceInfo', {})
|
|
341
|
-
|
|
342
|
-
return insurance_info.get("policyStatus", "")
|
|
338
|
+
# Policy status is at the top level
|
|
339
|
+
return eligibility_data.get("policyStatus", "")
|
|
343
340
|
|
|
344
341
|
def is_legacy_response_format(data):
|
|
345
342
|
"""Determine if the response is in legacy format (has memberPolicies)"""
|
|
346
343
|
return data is not None and "memberPolicies" in data
|
|
347
344
|
|
|
348
345
|
def is_super_connector_response_format(data):
|
|
349
|
-
"""Determine if the response is in Super Connector format (has
|
|
350
|
-
return data is not None and "
|
|
346
|
+
"""Determine if the response is in Super Connector format (has rawGraphQLResponse)"""
|
|
347
|
+
return data is not None and "rawGraphQLResponse" in data
|
|
351
348
|
|
|
352
349
|
# Function to extract required fields and display in a tabular format
|
|
353
350
|
def display_eligibility_info(data, dob, member_id, output_file):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|