medicafe 0.250819.4__tar.gz → 0.250820.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.
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot.bat +16 -3
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/__init__.py +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/update_medicafe.py +10 -3
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/__init__.py +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_ClaimStatus.py +110 -25
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Deductible.py +42 -33
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Deductible_Validator.py +0 -4
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/__init__.py +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/PKG-INFO +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/PKG-INFO +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/setup.py +1 -1
- {medicafe-0.250819.4 → medicafe-0.250820.0}/LICENSE +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MANIFEST.in +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Charges.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Crosswalk_Library.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Crosswalk_Utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Post.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Preprocessor.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_Preprocessor_lib.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_UI.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_dataformat_library.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_docx_decoder.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/MediBot_smart_import.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/get_medicafe_version.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediBot/update_json.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/MediLink_ConfigLoader.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/__main__.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/api_core.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/api_core_backup.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/api_factory.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/api_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/core_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/graphql_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/logging_config.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/logging_demo.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/migration_helpers.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/smart_import.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediCafe/submission_index.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/InsuranceTypeService.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_837p_cob_library.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_837p_encoder.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_837p_encoder_library.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_837p_utilities.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_API_Generator.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Azure.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_DataMgmt.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Decoder.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Display_Utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Down.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Gmail.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Mailer.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Parser.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_PatientProcessor.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Scan.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Scheduler.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_UI.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_Up.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_insurance_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_main.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/MediLink_smart_import.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/Soumit_api.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/gmail_http_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/gmail_oauth_utils.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/insurance_type_integration_test.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/openssl.cnf +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/test.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/test_cob_library.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/test_timing.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/test_validation.py +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/MediLink/webapp.html +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/README.md +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/SOURCES.txt +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/dependency_links.txt +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/entry_points.txt +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/not-zip-safe +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/requires.txt +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/medicafe.egg-info/top_level.txt +0 -0
- {medicafe-0.250819.4 → medicafe-0.250820.0}/setup.cfg +0 -0
@@ -366,6 +366,13 @@ if exist "%upgrade_medicafe_local%" (
|
|
366
366
|
)
|
367
367
|
)
|
368
368
|
|
369
|
+
:: Auto-run CSV processing on startup
|
370
|
+
echo.
|
371
|
+
echo Running startup CSV processing...
|
372
|
+
call "%~dp0process_csvs.bat"
|
373
|
+
echo Startup CSV processing complete.
|
374
|
+
echo.
|
375
|
+
|
369
376
|
:: Main menu
|
370
377
|
:main_menu
|
371
378
|
cls
|
@@ -578,7 +585,6 @@ if "!internet_available!"=="0" (
|
|
578
585
|
goto main_menu
|
579
586
|
)
|
580
587
|
|
581
|
-
call "%~dp0process_csvs.bat"
|
582
588
|
cls
|
583
589
|
echo Starting email download via MediCafe...
|
584
590
|
cd /d "%~dp0.."
|
@@ -586,8 +592,13 @@ python -m MediCafe download_emails
|
|
586
592
|
if errorlevel 1 (
|
587
593
|
echo [ERROR] Failed to download emails.
|
588
594
|
pause
|
595
|
+
goto main_menu
|
589
596
|
)
|
590
597
|
|
598
|
+
echo.
|
599
|
+
echo Processing CSV files after email download...
|
600
|
+
call "%~dp0process_csvs.bat"
|
601
|
+
|
591
602
|
pause
|
592
603
|
goto main_menu
|
593
604
|
|
@@ -714,14 +725,16 @@ echo 1. Open Latest Log File
|
|
714
725
|
echo 2. Clear Python Cache
|
715
726
|
echo 3. Toggle Performance Logging ^(session^)
|
716
727
|
echo 4. Forced MediCafe version rollback
|
717
|
-
echo 5.
|
728
|
+
echo 5. Process CSV Files
|
729
|
+
echo 6. Back to Main Menu
|
718
730
|
echo.
|
719
731
|
set /p tchoice=Enter your choice:
|
720
732
|
if "%tchoice%"=="1" goto open_latest_log
|
721
733
|
if "%tchoice%"=="2" goto clear_cache_menu
|
722
734
|
if "%tchoice%"=="3" goto toggle_perf_logging
|
723
735
|
if "%tchoice%"=="4" goto forced_version_rollback
|
724
|
-
if "%tchoice%"=="5" goto
|
736
|
+
if "%tchoice%"=="5" goto process_csvs
|
737
|
+
if "%tchoice%"=="6" goto main_menu
|
725
738
|
echo Invalid choice. Please try again.
|
726
739
|
pause
|
727
740
|
goto troubleshooting_menu
|
@@ -136,15 +136,22 @@ def run_pip_install(args):
|
|
136
136
|
|
137
137
|
def verify_post_install(package, expected_version):
|
138
138
|
# Try quick reads with minimal backoff to avoid unnecessary slowness
|
139
|
-
for
|
139
|
+
for attempt in range(1, 6): # Increased to 5 attempts
|
140
140
|
installed = get_installed_version(package)
|
141
141
|
if installed:
|
142
142
|
# Re-fetch latest once to avoid stale latest
|
143
143
|
latest_again = get_latest_version(package, retries=1) or expected_version
|
144
144
|
if compare_versions(installed, latest_again) >= 0:
|
145
145
|
return True, installed
|
146
|
-
|
147
|
-
|
146
|
+
else:
|
147
|
+
print_status('INFO', 'Verification attempt {}: No version detected yet'.format(attempt))
|
148
|
+
time.sleep(2) # Increased to 2 seconds for better propagation on slow systems
|
149
|
+
# Final re-fetch for robustness
|
150
|
+
installed = get_installed_version(package)
|
151
|
+
latest_again = get_latest_version(package, retries=1) or expected_version
|
152
|
+
if installed and compare_versions(installed, latest_again) >= 0:
|
153
|
+
return True, installed
|
154
|
+
return False, installed
|
148
155
|
|
149
156
|
|
150
157
|
def upgrade_package(package):
|
@@ -224,7 +224,13 @@ def handle_api_error(error, payer_id):
|
|
224
224
|
elif "LCLM_PS_201" in error_message:
|
225
225
|
return "No data found with given request parameters"
|
226
226
|
elif "LCLM_PS_306" in error_message:
|
227
|
+
# Print limit error as requested
|
228
|
+
print("LIMIT ERROR: Search exceeds 500 claims limit for payer ID {}".format(payer_id))
|
227
229
|
return "Search exceeds 500 claims limit - narrow date range"
|
230
|
+
elif "LCLM_PS_305" in error_message:
|
231
|
+
# Print retrieval limit error as requested
|
232
|
+
print("RETRIEVAL ERROR: System could not retrieve all claims for payer ID {}".format(payer_id))
|
233
|
+
return "System could not retrieve all claims - try pagination or narrower search"
|
228
234
|
elif "LCLM_PS_500" in error_message:
|
229
235
|
return "Server error: Exception from Claims 360 - try again later"
|
230
236
|
elif "401" in error_message:
|
@@ -236,10 +242,98 @@ def handle_api_error(error, payer_id):
|
|
236
242
|
else:
|
237
243
|
return "Unknown error: {}".format(error_message)
|
238
244
|
|
245
|
+
def process_claims_with_pagination(client, billing_provider_tin, start_date_str, end_date_str, payer_id):
|
246
|
+
"""
|
247
|
+
Process all claims for a single payer ID with proper pagination handling
|
248
|
+
"""
|
249
|
+
all_claims = []
|
250
|
+
transaction_id = None
|
251
|
+
page_count = 0
|
252
|
+
total_claims_retrieved = 0
|
253
|
+
|
254
|
+
while True:
|
255
|
+
page_count += 1
|
256
|
+
if DEBUG:
|
257
|
+
print(" Fetching page {} for Payer ID: {}".format(page_count, payer_id))
|
258
|
+
|
259
|
+
try:
|
260
|
+
# Import api_core locally to ensure it's available
|
261
|
+
from MediCafe import api_core
|
262
|
+
claim_summary = api_core.get_claim_summary_by_provider(
|
263
|
+
client, billing_provider_tin, start_date_str, end_date_str,
|
264
|
+
payer_id=payer_id, transaction_id=transaction_id
|
265
|
+
)
|
266
|
+
|
267
|
+
# Extract claims from this page
|
268
|
+
claims = claim_summary.get('claims', [])
|
269
|
+
page_claim_count = len(claims)
|
270
|
+
all_claims.extend(claims)
|
271
|
+
total_claims_retrieved += page_claim_count
|
272
|
+
|
273
|
+
# Response monitoring: Check for pagination token
|
274
|
+
new_transaction_id = claim_summary.get('transactionId')
|
275
|
+
|
276
|
+
if new_transaction_id:
|
277
|
+
MediLink_ConfigLoader.log(
|
278
|
+
"PAGINATION DETECTED: Payer {} page {} returned {} claims with transactionId: {}".format(
|
279
|
+
payer_id, page_count, page_claim_count, new_transaction_id
|
280
|
+
),
|
281
|
+
level="INFO"
|
282
|
+
)
|
283
|
+
transaction_id = new_transaction_id
|
284
|
+
else:
|
285
|
+
MediLink_ConfigLoader.log(
|
286
|
+
"PAGINATION COMPLETE: Payer {} page {} returned {} claims (final page)".format(
|
287
|
+
payer_id, page_count, page_claim_count
|
288
|
+
),
|
289
|
+
level="INFO"
|
290
|
+
)
|
291
|
+
break
|
292
|
+
|
293
|
+
# Safety check to prevent infinite loops (API max is 500 claims)
|
294
|
+
if page_count >= 10: # 10 pages * 50 claims = 500 claims (API limit)
|
295
|
+
MediLink_ConfigLoader.log(
|
296
|
+
"Reached maximum page limit (10) for payer {}. Total claims retrieved: {}".format(
|
297
|
+
payer_id, total_claims_retrieved
|
298
|
+
),
|
299
|
+
level="WARNING"
|
300
|
+
)
|
301
|
+
break
|
302
|
+
|
303
|
+
except Exception as e:
|
304
|
+
error_msg = handle_api_error(e, payer_id)
|
305
|
+
# Enhanced error handling for limit errors
|
306
|
+
if "LCLM_PS_306" in str(e) or "exceeds 500 claims" in str(e):
|
307
|
+
print(" LIMIT ERROR for Payer ID {}: Search exceeds 500 claims limit".format(payer_id))
|
308
|
+
MediLink_ConfigLoader.log(
|
309
|
+
"LIMIT ERROR for Payer ID {}: {}".format(payer_id, error_msg),
|
310
|
+
level="ERROR"
|
311
|
+
)
|
312
|
+
elif "LCLM_PS_305" in str(e) or "could not retrieve all claims" in str(e):
|
313
|
+
print(" RETRIEVAL ERROR for Payer ID {}: System could not retrieve all claims".format(payer_id))
|
314
|
+
MediLink_ConfigLoader.log(
|
315
|
+
"RETRIEVAL ERROR for Payer ID {}: {}".format(payer_id, error_msg),
|
316
|
+
level="ERROR"
|
317
|
+
)
|
318
|
+
else:
|
319
|
+
print(" Error processing Payer ID {}: {}".format(payer_id, error_msg))
|
320
|
+
MediLink_ConfigLoader.log(
|
321
|
+
"API Error for Payer ID {}: {}".format(payer_id, error_msg),
|
322
|
+
level="ERROR",
|
323
|
+
console_output=False
|
324
|
+
)
|
325
|
+
break
|
326
|
+
|
327
|
+
if DEBUG:
|
328
|
+
print(" Total claims retrieved for Payer ID {}: {} across {} pages".format(
|
329
|
+
payer_id, total_claims_retrieved, page_count))
|
330
|
+
|
331
|
+
return all_claims
|
332
|
+
|
239
333
|
def process_claims_with_payer_rotation(billing_provider_tin, start_date_str, end_date_str,
|
240
334
|
payer_ids, cache, consolidated_claims):
|
241
335
|
"""
|
242
|
-
Process claims across multiple payer IDs with caching and
|
336
|
+
Process claims across multiple payer IDs with caching, consolidation, and pagination
|
243
337
|
"""
|
244
338
|
from MediCafe.core_utils import get_api_client
|
245
339
|
client = get_api_client()
|
@@ -258,39 +352,30 @@ def process_claims_with_payer_rotation(billing_provider_tin, start_date_str, end
|
|
258
352
|
if DEBUG:
|
259
353
|
print("Processing Payer ID: {}".format(payer_id))
|
260
354
|
|
261
|
-
# Generate cache key
|
355
|
+
# Generate cache key (using base parameters, pagination handled separately)
|
262
356
|
cache_key = cache.get_cache_key(billing_provider_tin, start_date_str, end_date_str, payer_id)
|
263
357
|
|
264
358
|
# Check cache first
|
265
359
|
if cache.is_cached(cache_key):
|
266
360
|
if DEBUG:
|
267
361
|
print(" Using cached response for Payer ID: {}".format(payer_id))
|
268
|
-
|
362
|
+
# For cached responses, we assume all pages were already retrieved
|
363
|
+
cached_response = cache.get_cached_response(cache_key)
|
364
|
+
claims = cached_response.get('claims', [])
|
269
365
|
else:
|
270
366
|
if DEBUG:
|
271
|
-
print(" Making API call for Payer ID: {}".format(payer_id))
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
error_msg = handle_api_error(e, payer_id)
|
282
|
-
print(" Error processing Payer ID {}: {}".format(payer_id, error_msg))
|
283
|
-
|
284
|
-
# Log the error for debugging (file only, not console)
|
285
|
-
MediLink_ConfigLoader.log(
|
286
|
-
"API Error for Payer ID {}: {}".format(payer_id, error_msg),
|
287
|
-
level="ERROR",
|
288
|
-
console_output=False
|
289
|
-
)
|
290
|
-
continue
|
367
|
+
print(" Making API call(s) with pagination for Payer ID: {}".format(payer_id))
|
368
|
+
|
369
|
+
# Process all pages for this payer ID
|
370
|
+
claims = process_claims_with_pagination(
|
371
|
+
client, billing_provider_tin, start_date_str, end_date_str, payer_id
|
372
|
+
)
|
373
|
+
|
374
|
+
# Cache the consolidated result (all pages combined)
|
375
|
+
consolidated_response = {'claims': claims}
|
376
|
+
cache.cache_response(cache_key, consolidated_response, payer_id)
|
291
377
|
|
292
|
-
# Process claims from this payer
|
293
|
-
claims = claim_summary.get('claims', [])
|
378
|
+
# Process all claims from this payer (all pages)
|
294
379
|
for claim in claims:
|
295
380
|
claim_data = extract_claim_data(claim)
|
296
381
|
consolidated_claims.add_claim(claim_data, payer_id)
|
@@ -287,42 +287,51 @@ def get_eligibility_info(client, payer_id, provider_last_name, date_of_birth, me
|
|
287
287
|
MediLink_ConfigLoader.log("Super Connector API failed: {}".format(e), level="ERROR")
|
288
288
|
|
289
289
|
# Run validation if we have both responses
|
290
|
+
# BUG: XP doesn't give shit about generating the validation report or opening the notepad. So we need to fix this.
|
290
291
|
if legacy_eligibility and super_connector_eligibility:
|
291
292
|
validation_file_path = os.path.join(os.getenv('TEMP'), 'validation_report_{}_{}.txt'.format(member_id, date_of_birth))
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
293
|
+
try:
|
294
|
+
validation_report = MediLink_Deductible_Validator.run_validation_comparison(
|
295
|
+
legacy_eligibility, super_connector_eligibility, validation_file_path
|
296
|
+
)
|
297
|
+
if os.path.exists(validation_file_path):
|
298
|
+
print("\nValidation report generated: {}".format(validation_file_path))
|
299
|
+
|
300
|
+
# Log any Super Connector API errors
|
301
|
+
if "rawGraphQLResponse" in super_connector_eligibility:
|
302
|
+
raw_response = super_connector_eligibility.get('rawGraphQLResponse', {})
|
303
|
+
errors = raw_response.get('errors', [])
|
304
|
+
if errors:
|
305
|
+
print("Super Connector API returned {} error(s):".format(len(errors)))
|
306
|
+
for i, error in enumerate(errors):
|
307
|
+
error_code = error.get('code', 'UNKNOWN')
|
308
|
+
error_desc = error.get('description', 'No description')
|
309
|
+
print(" Error {}: {} - {}".format(i+1, error_code, error_desc))
|
310
|
+
|
311
|
+
# Check for data in error extensions (some APIs return data here)
|
312
|
+
extensions = error.get('extensions', {})
|
313
|
+
if extensions and 'details' in extensions:
|
314
|
+
details = extensions.get('details', [])
|
315
|
+
if details:
|
316
|
+
print(" Found {} detail records in error extensions".format(len(details)))
|
317
|
+
# Log first detail record for debugging
|
318
|
+
if details:
|
319
|
+
first_detail = details[0]
|
320
|
+
print(" First detail: {}".format(first_detail))
|
318
321
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
322
|
+
# Check status code
|
323
|
+
status_code = super_connector_eligibility.get('statuscode')
|
324
|
+
if status_code and status_code != '200':
|
325
|
+
print("Super Connector API status code: {} (non-200 indicates errors)".format(status_code))
|
326
|
+
|
327
|
+
# Open validation report in Notepad
|
328
|
+
ret = os.system('notepad.exe "{}"'.format(validation_file_path))
|
329
|
+
if ret != 0:
|
330
|
+
print("Failed to open Notepad (exit code: {}). Please open manually: {}".format(ret, validation_file_path))
|
331
|
+
else:
|
332
|
+
print("\nValidation report file was not created: {}".format(validation_file_path))
|
333
|
+
except Exception as e:
|
334
|
+
print("\nError generating validation report: {}".format(str(e)))
|
326
335
|
|
327
336
|
# Return legacy response for consistency
|
328
337
|
eligibility = legacy_eligibility
|
@@ -3,10 +3,6 @@ MediLink_Deductible_Validator.py
|
|
3
3
|
Validation helper functions to compare legacy API responses with Super Connector API responses
|
4
4
|
Compatible with Python 3.4.4
|
5
5
|
"""
|
6
|
-
|
7
|
-
import json
|
8
|
-
import os
|
9
|
-
import sys
|
10
6
|
from datetime import datetime
|
11
7
|
|
12
8
|
# Python 3.4.4 compatibility imports
|
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
|
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
|