medicafe 0.250812.1__tar.gz → 0.250812.2__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.250812.1 → medicafe-0.250812.2}/MediBot/MediBot.bat +1 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_837p_encoder.py +26 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_837p_encoder_library.py +6 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Up.py +23 -2
- {medicafe-0.250812.1 → medicafe-0.250812.2}/PKG-INFO +1 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/PKG-INFO +1 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/setup.py +1 -1
- {medicafe-0.250812.1 → medicafe-0.250812.2}/LICENSE +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MANIFEST.in +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Charges.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Crosswalk_Library.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Crosswalk_Utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Post.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Preprocessor.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_Preprocessor_lib.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_UI.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_dataformat_library.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_docx_decoder.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/MediBot_smart_import.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/__init__.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/get_medicafe_version.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/update_json.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediBot/update_medicafe.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/MediLink_ConfigLoader.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/__init__.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/__main__.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/api_core.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/api_core_backup.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/api_factory.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/api_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/core_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/graphql_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/logging_config.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/logging_demo.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/migration_helpers.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediCafe/smart_import.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_837p_cob_library.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_837p_utilities.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_API_Generator.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Azure.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_ClaimStatus.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_DataMgmt.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Decoder.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Deductible.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Deductible_Validator.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Display_Utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Down.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Gmail.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Mailer.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Parser.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_PatientProcessor.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Scan.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_Scheduler.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_UI.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_insurance_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_main.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/MediLink_smart_import.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/Soumit_api.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/__init__.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/gmail_http_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/gmail_oauth_utils.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/insurance_type_integration_test.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/openssl.cnf +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/test.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/test_cob_library.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/test_timing.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/test_validation.py +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/MediLink/webapp.html +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/SOURCES.txt +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/dependency_links.txt +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/entry_points.txt +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/not-zip-safe +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/requires.txt +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/medicafe.egg-info/top_level.txt +0 -0
- {medicafe-0.250812.1 → medicafe-0.250812.2}/setup.cfg +0 -0
@@ -509,7 +509,7 @@ echo echo Update process exited with code %%RET%%>> "%_UPD_RUNNER%"
|
|
509
509
|
echo if %%RET%% neq 0 (>> "%_UPD_RUNNER%"
|
510
510
|
echo echo Update failed. Press any key to close...>> "%_UPD_RUNNER%"
|
511
511
|
echo pause ^>nul>> "%_UPD_RUNNER%"
|
512
|
-
echo exit
|
512
|
+
echo exit %%RET%%>> "%_UPD_RUNNER%"
|
513
513
|
echo ) else (>> "%_UPD_RUNNER%"
|
514
514
|
echo rem Relaunch MediBot on success>> "%_UPD_RUNNER%"
|
515
515
|
echo if exist "%%MEDIBOT_PATH%%" start "MediBot" "%%MEDIBOT_PATH%%" >> "%_UPD_RUNNER%"
|
@@ -499,6 +499,14 @@ def convert_files_for_submission(detailed_patient_data, config, crosswalk, clien
|
|
499
499
|
- Future implementation may include progress tracking using tools like `tqdm`.
|
500
500
|
"""
|
501
501
|
|
502
|
+
# Ensure crosswalk is a dictionary to avoid NoneType access downstream
|
503
|
+
if not isinstance(crosswalk, dict):
|
504
|
+
try:
|
505
|
+
MediLink_ConfigLoader.log("[convert_files_for_submission] crosswalk is not a dict; type={}".format(type(crosswalk)), config, level="WARNING")
|
506
|
+
except Exception:
|
507
|
+
pass
|
508
|
+
crosswalk = {}
|
509
|
+
|
502
510
|
# Initialize a dictionary to hold patient data segregated by confirmed endpoints
|
503
511
|
data_by_endpoint = {}
|
504
512
|
|
@@ -528,12 +536,20 @@ def convert_files_for_submission(detailed_patient_data, config, crosswalk, clien
|
|
528
536
|
|
529
537
|
# Iterate over each endpoint and process its corresponding patient data
|
530
538
|
for endpoint, patient_data_list in data_by_endpoint.items():
|
539
|
+
try:
|
540
|
+
MediLink_ConfigLoader.log("[convert_files_for_submission] Endpoint {} has {} records".format(endpoint, len(patient_data_list)), config, level="INFO")
|
541
|
+
except Exception:
|
542
|
+
pass
|
531
543
|
# Retrieve submission type from config; default to "batch" if not specified
|
532
544
|
medi = extract_medilink_config(config)
|
533
545
|
endpoint_cfg = medi.get('endpoints', {}).get(endpoint)
|
534
546
|
if not isinstance(endpoint_cfg, dict):
|
535
547
|
endpoint_cfg = {}
|
536
548
|
submission_type = endpoint_cfg.get('submission_type', 'batch')
|
549
|
+
try:
|
550
|
+
MediLink_ConfigLoader.log("[convert_files_for_submission] submission_type for {}: {}".format(endpoint, submission_type), config, level="DEBUG")
|
551
|
+
except Exception:
|
552
|
+
pass
|
537
553
|
|
538
554
|
if submission_type == 'single':
|
539
555
|
# Process each patient's data individually for single-patient submissions
|
@@ -547,7 +563,16 @@ def convert_files_for_submission(detailed_patient_data, config, crosswalk, clien
|
|
547
563
|
converted_files_paths.append(converted_path)
|
548
564
|
else:
|
549
565
|
# Process all patient data together for batch submissions
|
550
|
-
|
566
|
+
try:
|
567
|
+
converted_path = process_claim(config, endpoint, patient_data_list, crosswalk, client)
|
568
|
+
except Exception as e:
|
569
|
+
import traceback as _tb
|
570
|
+
tb_s = _tb.format_exc()
|
571
|
+
try:
|
572
|
+
MediLink_ConfigLoader.log("[convert_files_for_submission] process_claim failed for {}: {}\nTraceback: {}".format(endpoint, e, tb_s), config, level="ERROR")
|
573
|
+
except Exception:
|
574
|
+
pass
|
575
|
+
raise
|
551
576
|
if converted_path:
|
552
577
|
converted_files_paths.append(converted_path)
|
553
578
|
|
@@ -779,7 +779,12 @@ def _original_insurance_type_selection_logic(parsed_data):
|
|
779
779
|
|
780
780
|
# Retrieve insurance options with codes and descriptions
|
781
781
|
config, _ = MediLink_ConfigLoader.load_configuration()
|
782
|
-
|
782
|
+
try:
|
783
|
+
from MediCafe.core_utils import extract_medilink_config
|
784
|
+
medi = extract_medilink_config(config)
|
785
|
+
insurance_options = medi.get('insurance_options', {})
|
786
|
+
except Exception:
|
787
|
+
insurance_options = {}
|
783
788
|
|
784
789
|
# If COB library is available, augment options with Medicare codes (MB/MA/MC)
|
785
790
|
if COB is not None:
|
@@ -131,9 +131,30 @@ def submit_claims(detailed_patient_data_grouped_by_endpoint, config, crosswalk):
|
|
131
131
|
continue
|
132
132
|
# Process files per endpoint
|
133
133
|
try:
|
134
|
-
|
134
|
+
# Sanitize patient data structure before conversion
|
135
|
+
safe_patients = []
|
136
|
+
if isinstance(patients_data, list):
|
137
|
+
safe_patients = [item for item in patients_data if isinstance(item, dict)]
|
138
|
+
elif isinstance(patients_data, dict):
|
139
|
+
safe_patients = [patients_data]
|
140
|
+
else:
|
141
|
+
log("[submit_claims] Unexpected patients_data type for {}: {}".format(endpoint, type(patients_data)), level="ERROR")
|
142
|
+
safe_patients = []
|
143
|
+
|
144
|
+
converted_files = MediLink_837p_encoder.convert_files_for_submission(safe_patients, config, crosswalk, client)
|
135
145
|
except Exception as e:
|
136
|
-
|
146
|
+
tb = traceback.format_exc()
|
147
|
+
# Log via logger (may fail if logger expects config); also print to stderr to guarantee visibility
|
148
|
+
try:
|
149
|
+
log("[submit_claims] convert_files_for_submission failed for endpoint {}: {}\nTraceback: {}".format(endpoint, e, tb), level="ERROR")
|
150
|
+
except Exception:
|
151
|
+
pass
|
152
|
+
try:
|
153
|
+
import sys as _sys
|
154
|
+
_sys.stderr.write("[submit_claims] convert_files_for_submission failed for endpoint {}: {}\n".format(endpoint, e))
|
155
|
+
_sys.stderr.write(tb + "\n")
|
156
|
+
except Exception:
|
157
|
+
pass
|
137
158
|
raise
|
138
159
|
if converted_files:
|
139
160
|
if method == 'winscp':
|
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
|
File without changes
|