medicafe 0.250816.0__py3-none-any.whl → 0.250819.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.
- MediBot/MediBot.py +40 -4
- MediBot/MediBot_Crosswalk_Utils.py +1 -4
- MediBot/MediBot_Preprocessor.py +88 -14
- MediBot/MediBot_Preprocessor_lib.py +128 -38
- MediBot/MediBot_UI.py +51 -28
- MediBot/__init__.py +1 -1
- MediBot/update_medicafe.py +202 -727
- MediCafe/__init__.py +1 -1
- MediLink/MediLink_837p_encoder.py +1 -1
- MediLink/MediLink_837p_encoder_library.py +580 -318
- MediLink/MediLink_837p_utilities.py +1 -4
- MediLink/MediLink_API_Generator.py +1 -1
- MediLink/MediLink_DataMgmt.py +2 -2
- MediLink/MediLink_Down.py +1 -1
- MediLink/MediLink_Up.py +45 -4
- MediLink/MediLink_main.py +2 -1
- MediLink/__init__.py +1 -1
- MediLink/gmail_oauth_utils.py +1 -4
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/METADATA +1 -1
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/RECORD +24 -24
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/LICENSE +0 -0
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/WHEEL +0 -0
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/entry_points.txt +0 -0
- {medicafe-0.250816.0.dist-info → medicafe-0.250819.0.dist-info}/top_level.txt +0 -0
@@ -20,10 +20,7 @@ circular dependencies. Other modules import from this utilities module.
|
|
20
20
|
"""
|
21
21
|
|
22
22
|
from datetime import datetime
|
23
|
-
import sys
|
24
|
-
import os
|
25
|
-
import re
|
26
|
-
import difflib
|
23
|
+
import sys, os, difflib
|
27
24
|
|
28
25
|
# Import MediLink_ConfigLoader for logging functionality
|
29
26
|
from MediCafe.core_utils import get_shared_config_loader
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This script requires Python 3.11 and is to be used for intalling new API clients.
|
2
|
-
import os, time, subprocess, shutil, tempfile, shlex, re
|
2
|
+
import os, time, subprocess, shutil, tempfile, shlex, re, sys
|
3
3
|
from pathlib import Path
|
4
4
|
|
5
5
|
# Add workspace directory to Python path for MediCafe imports
|
MediLink/MediLink_DataMgmt.py
CHANGED
@@ -278,7 +278,7 @@ def consolidate_csvs(source_directory, file_prefix="Consolidated", interactive=F
|
|
278
278
|
continue # Skip files not modified in the last day
|
279
279
|
|
280
280
|
try:
|
281
|
-
with open(filepath, 'r') as csvfile:
|
281
|
+
with open(filepath, 'r', encoding='utf-8') as csvfile:
|
282
282
|
reader = csv.reader(csvfile)
|
283
283
|
header = next(reader) # Read the header
|
284
284
|
if not header_saved:
|
@@ -301,7 +301,7 @@ def consolidate_csvs(source_directory, file_prefix="Consolidated", interactive=F
|
|
301
301
|
MediLink_ConfigLoader.log("Deleted source file after consolidation: {}".format(filepath), level="INFO")
|
302
302
|
|
303
303
|
if consolidated_data:
|
304
|
-
with open(consolidated_filepath, 'w') as csvfile:
|
304
|
+
with open(consolidated_filepath, 'w', encoding='utf-8') as csvfile:
|
305
305
|
writer = csv.writer(csvfile)
|
306
306
|
writer.writerows(consolidated_data)
|
307
307
|
MediLink_ConfigLoader.log("Consolidated CSVs into {}".format(consolidated_filepath), level="INFO")
|
MediLink/MediLink_Down.py
CHANGED
@@ -452,7 +452,7 @@ def process_endpoint(endpoint_key, endpoint_info, config):
|
|
452
452
|
log("[Process Endpoint] WinSCP log exists at: {}".format(log_path), level="INFO")
|
453
453
|
# Read last few lines of log for diagnostics
|
454
454
|
try:
|
455
|
-
with open(log_path, 'r') as f:
|
455
|
+
with open(log_path, 'r', encoding='utf-8') as f:
|
456
456
|
lines = f.readlines()
|
457
457
|
if lines:
|
458
458
|
last_lines = lines[-5:] # Last 5 lines
|
MediLink/MediLink_Up.py
CHANGED
@@ -162,6 +162,47 @@ def submit_claims(detailed_patient_data_grouped_by_endpoint, config, crosswalk):
|
|
162
162
|
log("[submit_claims] Unexpected patients_data type for {}: {}".format(endpoint, type(patients_data)), level="ERROR")
|
163
163
|
safe_patients = []
|
164
164
|
|
165
|
+
# CRITICAL: Validate configuration before submission
|
166
|
+
try:
|
167
|
+
# Import the validation function from the encoder library
|
168
|
+
import MediLink_837p_encoder_library
|
169
|
+
config_issues = MediLink_837p_encoder_library.validate_config_sender_codes(config, endpoint)
|
170
|
+
if config_issues:
|
171
|
+
log("[CRITICAL] Configuration validation failed for endpoint {}: {}".format(endpoint, config_issues), level="ERROR")
|
172
|
+
print("\n" + "="*80)
|
173
|
+
print("CRITICAL: Configuration issues detected for endpoint '{}'".format(endpoint))
|
174
|
+
print("="*80)
|
175
|
+
for i, issue in enumerate(config_issues, 1):
|
176
|
+
print(" {}. {}".format(i, issue))
|
177
|
+
print("\nWARNING: These issues may cause claim rejections at the clearinghouse!")
|
178
|
+
print(" - Claims may be rejected due to missing sender identification")
|
179
|
+
print(" - Processing may fail due to invalid configuration values")
|
180
|
+
print("="*80)
|
181
|
+
|
182
|
+
should_continue = False
|
183
|
+
while True:
|
184
|
+
user_choice = input("\nContinue with potentially invalid claims anyway? (y/N): ").strip().lower()
|
185
|
+
if user_choice in ['y', 'yes']:
|
186
|
+
print("WARNING: Proceeding with submission despite configuration issues...")
|
187
|
+
log("[WARNING] User chose to continue submission despite config issues for endpoint {}".format(endpoint), level="WARNING")
|
188
|
+
should_continue = True
|
189
|
+
break
|
190
|
+
elif user_choice in ['n', 'no', '']:
|
191
|
+
print("SUCCESS: Submission aborted for endpoint '{}' due to configuration issues.".format(endpoint))
|
192
|
+
log("[INFO] Submission aborted by user for endpoint {} due to config issues".format(endpoint), level="INFO")
|
193
|
+
should_continue = False
|
194
|
+
break
|
195
|
+
else:
|
196
|
+
print("Please enter 'y' for yes or 'n' for no.")
|
197
|
+
|
198
|
+
# Skip this endpoint if user chose not to continue
|
199
|
+
if not should_continue:
|
200
|
+
continue
|
201
|
+
except Exception as validation_error:
|
202
|
+
# Don't let validation errors block submission entirely
|
203
|
+
log("[ERROR] Configuration validation check failed: {}".format(validation_error), level="ERROR")
|
204
|
+
print("WARNING: Unable to validate configuration - proceeding with submission")
|
205
|
+
|
165
206
|
converted_files = MediLink_837p_encoder.convert_files_for_submission(safe_patients, config, crosswalk, client)
|
166
207
|
except Exception as e:
|
167
208
|
tb = traceback.format_exc()
|
@@ -232,7 +273,7 @@ def submit_claims(detailed_patient_data_grouped_by_endpoint, config, crosswalk):
|
|
232
273
|
try:
|
233
274
|
api_responses = []
|
234
275
|
for file_path in filtered_files:
|
235
|
-
with open(file_path, 'r') as file:
|
276
|
+
with open(file_path, 'r', encoding='utf-8') as file:
|
236
277
|
# Optimize string operations by doing replacements in one pass
|
237
278
|
x12_request_data = file.read().replace('\n', '').replace('\r', '').strip()
|
238
279
|
try:
|
@@ -352,7 +393,7 @@ def handle_transmission_result(transmission_result, config, operation_type, meth
|
|
352
393
|
|
353
394
|
try:
|
354
395
|
# Read the contents of the WinSCP log file
|
355
|
-
with open(log_path, 'r') as log_file:
|
396
|
+
with open(log_path, 'r', encoding='utf-8') as log_file:
|
356
397
|
log_contents = log_file.readlines()
|
357
398
|
|
358
399
|
if not log_contents:
|
@@ -521,7 +562,7 @@ def parse_837p_file(file_path):
|
|
521
562
|
patient_details = []
|
522
563
|
date_of_submission = None
|
523
564
|
try:
|
524
|
-
with open(file_path, 'r') as file:
|
565
|
+
with open(file_path, 'r', encoding='utf-8') as file:
|
525
566
|
content = file.read()
|
526
567
|
log("Parsing submitted 837p...")
|
527
568
|
|
@@ -638,7 +679,7 @@ def save_receipt_to_file(receipt_content, config):
|
|
638
679
|
cfg = {}
|
639
680
|
file_path = os.path.join(cfg.get('local_claims_path', '.'), file_name)
|
640
681
|
|
641
|
-
with open(file_path, 'w') as file:
|
682
|
+
with open(file_path, 'w', encoding='utf-8') as file:
|
642
683
|
file.write(receipt_content)
|
643
684
|
|
644
685
|
log("Receipt saved to:", file_path)
|
MediLink/MediLink_main.py
CHANGED
@@ -162,7 +162,8 @@ def main_menu():
|
|
162
162
|
if PERFORMANCE_LOGGING:
|
163
163
|
print("Welcome display completed in {:.2f} seconds".format(welcome_end - welcome_start))
|
164
164
|
|
165
|
-
# Show message if new records were found during boot-time scan
|
165
|
+
# Show message if new records were found during boot-time scan. TODO we need this to use the 'Last acknowledgements update:' timestamp to decide if it has already run in the last day so
|
166
|
+
# that we're not running it multiple times in rapid succession automatically. (user-initiated checks are fine like via selection of (1. Check for new remittances))
|
166
167
|
if ack_result:
|
167
168
|
print("\n[INFO] New records were found during the boot-time acknowledgement scan.")
|
168
169
|
print("You can view them by selecting 'Check for new remittances' from the menu.")
|
MediLink/__init__.py
CHANGED
MediLink/gmail_oauth_utils.py
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
MediBot/MediBot.bat,sha256=67wcth3JTvS1v0ycagk6HjY4MpJ8BoFOIUfC6ZPhczI,26687
|
2
|
-
MediBot/MediBot.py,sha256=
|
2
|
+
MediBot/MediBot.py,sha256=Kto3af79nWYndoPmStJK3KjyyUq2pAXXUb5ETBBtqRs,46326
|
3
3
|
MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
MediBot/MediBot_Crosswalk_Library.py,sha256=jIaYdoxfT9YgQ5dWZC4jmTYxRX1Y14X-AJ6YEjR58Gc,25158
|
5
|
-
MediBot/MediBot_Crosswalk_Utils.py,sha256=
|
5
|
+
MediBot/MediBot_Crosswalk_Utils.py,sha256=hTLPioU9A5XfdTZ7LqeOiYXdsi8Bwf9fuMJGxofyTmg,38983
|
6
6
|
MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
MediBot/MediBot_Preprocessor.py,sha256=
|
8
|
-
MediBot/MediBot_Preprocessor_lib.py,sha256=
|
9
|
-
MediBot/MediBot_UI.py,sha256=
|
7
|
+
MediBot/MediBot_Preprocessor.py,sha256=gQRVAWbRHx_PMK6a7q93tp7Z-Dhjn5r0lJz3d0wAzeU,19067
|
8
|
+
MediBot/MediBot_Preprocessor_lib.py,sha256=lyl2Q5V1MQHiZ54kmTYPxor3pm2gf8mAq-IwYu7FX2c,87236
|
9
|
+
MediBot/MediBot_UI.py,sha256=iG8UK71aHYBmB0lkjwl-C6L9DbsOyLaq-wt9kChV0jo,23781
|
10
10
|
MediBot/MediBot_dataformat_library.py,sha256=D46fdPtxcgfWTzaLBtSvjtozzZBNqNiODgu4vKMZrBg,10746
|
11
11
|
MediBot/MediBot_docx_decoder.py,sha256=gn7I7Ng5khVIzU0HTTOqi31YSSn1yW8Pyk-i_P9r1oA,32472
|
12
12
|
MediBot/MediBot_smart_import.py,sha256=Emvz7NwemHGCHvG5kZcUyXMcCheidbGKaPfOTg-YCEs,6684
|
13
|
-
MediBot/__init__.py,sha256=
|
13
|
+
MediBot/__init__.py,sha256=_awKwV7ZRqHaI4S1SWV9WhMuZ1cpi3b0-YVHcyt0xAg,3192
|
14
14
|
MediBot/get_medicafe_version.py,sha256=uyL_UIE42MyFuJ3SRYxJp8sZx8xjTqlYZ3FdQuxLduY,728
|
15
15
|
MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
|
16
|
-
MediBot/update_medicafe.py,sha256=
|
16
|
+
MediBot/update_medicafe.py,sha256=09asEEgnGEOq4HH4dmnF18hZdzggqn8zDutQqymdVws,8550
|
17
17
|
MediCafe/MediLink_ConfigLoader.py,sha256=zqN0p3il4E5hPiGvd0a5xWo8gAGu4dEAQEKEVknpB0s,9803
|
18
|
-
MediCafe/__init__.py,sha256=
|
18
|
+
MediCafe/__init__.py,sha256=nMfu7hqqzY9BOLfVdbVxAtIl9UHS3Nb3ty2Bht1zNxg,5721
|
19
19
|
MediCafe/__main__.py,sha256=mRNyk3D9Ilnu2XhgVI_rut7r5Ro7UIKtwV871giAHI8,12992
|
20
20
|
MediCafe/api_core.py,sha256=IZaBXnP4E7eHzxVbCk2HtxywiVBuhaUyHeaqss8llgY,66378
|
21
21
|
MediCafe/api_core_backup.py,sha256=Oy_Fqt0SEvGkQN1Oqw5iUPVFxPEokyju5CuPEb9k0OY,18686
|
@@ -30,18 +30,18 @@ MediCafe/smart_import.py,sha256=KJtjmEvaiZ2ChQMjSb09_TFtz1DChU5KQCvTiK2gOKw,2049
|
|
30
30
|
MediCafe/submission_index.py,sha256=35gz8Anx1dIqG1I14GvuLY0nTO4dSBr2YsZwof9aIQg,11175
|
31
31
|
MediLink/InsuranceTypeService.py,sha256=FKWC1nRfKV_OtCDUtZustauXNhmCYDFiY9jsAGHPPUM,2178
|
32
32
|
MediLink/MediLink_837p_cob_library.py,sha256=glc7SJBDx0taCGmwmCs81GFJJcvA_D7nycIkTfmIuwE,30650
|
33
|
-
MediLink/MediLink_837p_encoder.py,sha256=
|
34
|
-
MediLink/MediLink_837p_encoder_library.py,sha256=
|
35
|
-
MediLink/MediLink_837p_utilities.py,sha256=
|
36
|
-
MediLink/MediLink_API_Generator.py,sha256=
|
33
|
+
MediLink/MediLink_837p_encoder.py,sha256=lJnly96LsSBnzEgF8Ne-nQTL7cmRhoFL2fJajtpvOcU,32209
|
34
|
+
MediLink/MediLink_837p_encoder_library.py,sha256=cpnp4RBdypvu3NHdO4hricGVnRw5qbWNOSHKBzSBMp0,86873
|
35
|
+
MediLink/MediLink_837p_utilities.py,sha256=AJ0F22LoF8du20zPBH4TZXgsdXCD-1qYKBnHJM-mXl0,16260
|
36
|
+
MediLink/MediLink_API_Generator.py,sha256=VZBL9W8yFTMJ4ikSwbUI8ANtaJCLnUyqoF8xQEJQn_E,11176
|
37
37
|
MediLink/MediLink_Azure.py,sha256=Ow70jctiHFIylskBExN7WUoRgrKOvBR6jNTnQMk6lJA,210
|
38
38
|
MediLink/MediLink_ClaimStatus.py,sha256=cO9drHSIBtltHfLSKeEf18_m75ixpxIOao5I-TGiHiI,18100
|
39
|
-
MediLink/MediLink_DataMgmt.py,sha256=
|
39
|
+
MediLink/MediLink_DataMgmt.py,sha256=9hc5jyWU65nYT66afDybOyYAcW-DvEYuHpWTun96U50,52407
|
40
40
|
MediLink/MediLink_Decoder.py,sha256=1gzdybNg4Vv69s5PNbX8bPNrXT_N_kPpFpt2HpkauWA,16430
|
41
41
|
MediLink/MediLink_Deductible.py,sha256=fLBDQHDcTk86JtJUtUwrVl-o0KfNackFrWosMxr7qHU,45559
|
42
42
|
MediLink/MediLink_Deductible_Validator.py,sha256=2g-lZd-Y5fJ1mfP87vM6oABg0t5Om-7EkEkilVvDWYY,22888
|
43
43
|
MediLink/MediLink_Display_Utils.py,sha256=QyHk23VU1rJtNZr_QhtL76Avo66CEc7MZU84uIs-1Lo,4187
|
44
|
-
MediLink/MediLink_Down.py,sha256=
|
44
|
+
MediLink/MediLink_Down.py,sha256=s4_z-RaqHYanjwbQCl-OSkg4XIpcIQ2Q6jXa8-q_QXw,28111
|
45
45
|
MediLink/MediLink_Gmail.py,sha256=8iQjqcJMSa_Zfr5azR0dShKAQeXqt-9C-s8seYB9pic,23961
|
46
46
|
MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
47
|
MediLink/MediLink_Parser.py,sha256=eRVZ4ckZ5gDOrcvtCUZP3DOd3Djly66rCIk0aYXLz14,12567
|
@@ -49,14 +49,14 @@ MediLink/MediLink_PatientProcessor.py,sha256=9r2w4p45d30Tn0kbXL3j5574MYOehP83tDi
|
|
49
49
|
MediLink/MediLink_Scan.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
MediLink/MediLink_Scheduler.py,sha256=UJvxhDvHraqra2_TlQVlGeh5jRFrrfK6nCVUHnKOEMY,38
|
51
51
|
MediLink/MediLink_UI.py,sha256=6OR2obKUuBO12l3k6B53MXu1a3fCiV3FVBE2QrIYRqk,9279
|
52
|
-
MediLink/MediLink_Up.py,sha256=
|
52
|
+
MediLink/MediLink_Up.py,sha256=uB6J63hWOn8Ot8iGtc2_OgcejNWVgnX7Se_e_UWBNho,38082
|
53
53
|
MediLink/MediLink_insurance_utils.py,sha256=g741Fj2K26cMy0JX5d_XavMw9LgkK6hjaUJYfysT7t8,9301
|
54
|
-
MediLink/MediLink_main.py,sha256=
|
54
|
+
MediLink/MediLink_main.py,sha256=MzF6XeoBMVPqdhD2AoH7Xz01eOfpge-FZQHAHZs-YKk,23630
|
55
55
|
MediLink/MediLink_smart_import.py,sha256=B5SfBn_4bYEWJJDolXbjnwKx_-MaqGZ76LyXQwWDV80,9838
|
56
56
|
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
57
|
-
MediLink/__init__.py,sha256=
|
57
|
+
MediLink/__init__.py,sha256=PxqhoGoFOL6ySymgLqtqiZdiHSNxUVBJbkkbLNn80bw,3888
|
58
58
|
MediLink/gmail_http_utils.py,sha256=gtqCCrzJC7e8JFQzMNrf7EbK8na2h4sfTu-NMaZ_UHc,4006
|
59
|
-
MediLink/gmail_oauth_utils.py,sha256=
|
59
|
+
MediLink/gmail_oauth_utils.py,sha256=Ugr-DEqs4_RddRMSCJ_dbgA3TVeaxpbAor-dktcTIgY,3713
|
60
60
|
MediLink/insurance_type_integration_test.py,sha256=pz2OCXitAznqDciYn6OL9M326m9CYU7YiK-ynssdQ5g,15172
|
61
61
|
MediLink/openssl.cnf,sha256=76VdcGCykf0Typyiv8Wd1mMVKixrQ5RraG6HnfKFqTo,887
|
62
62
|
MediLink/test.py,sha256=DM_E8gEbhbVfTAm3wTMiNnK2GCD1e5eH6gwTk89QIc4,3116
|
@@ -64,9 +64,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
|
|
64
64
|
MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
|
65
65
|
MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
|
66
66
|
MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
|
67
|
-
medicafe-0.
|
68
|
-
medicafe-0.
|
69
|
-
medicafe-0.
|
70
|
-
medicafe-0.
|
71
|
-
medicafe-0.
|
72
|
-
medicafe-0.
|
67
|
+
medicafe-0.250819.0.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
68
|
+
medicafe-0.250819.0.dist-info/METADATA,sha256=ux7tzkK-Dib742ftrTx0Jx96GH7yvEA6HxyCp2pxf14,3384
|
69
|
+
medicafe-0.250819.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
70
|
+
medicafe-0.250819.0.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
|
71
|
+
medicafe-0.250819.0.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
|
72
|
+
medicafe-0.250819.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|