medicafe 0.250723.0__py3-none-any.whl → 0.250723.1__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.
Potentially problematic release.
This version of medicafe might be problematic. Click here for more details.
- MediBot/MediBot.py +7 -0
- MediBot/MediBot_Crosswalk_Library.py +27 -9
- {medicafe-0.250723.0.dist-info → medicafe-0.250723.1.dist-info}/METADATA +1 -1
- {medicafe-0.250723.0.dist-info → medicafe-0.250723.1.dist-info}/RECORD +7 -7
- {medicafe-0.250723.0.dist-info → medicafe-0.250723.1.dist-info}/LICENSE +0 -0
- {medicafe-0.250723.0.dist-info → medicafe-0.250723.1.dist-info}/WHEEL +0 -0
- {medicafe-0.250723.0.dist-info → medicafe-0.250723.1.dist-info}/top_level.txt +0 -0
MediBot/MediBot.py
CHANGED
|
@@ -66,13 +66,16 @@ def run_ahk_script(script_content):
|
|
|
66
66
|
|
|
67
67
|
if process.returncode != 0:
|
|
68
68
|
print("AHK script failed with exit status: {}".format(process.returncode)) # Log the exit status of the failed script
|
|
69
|
+
MediLink_ConfigLoader.log("AHK script failed with exit status: {}".format(process.returncode), level="ERROR")
|
|
69
70
|
if stderr:
|
|
70
71
|
print("AHK Error: {}".format(stderr.decode('utf-8', errors='ignore')))
|
|
72
|
+
MediLink_ConfigLoader.log("AHK Error: {}".format(stderr.decode('utf-8', errors='ignore')), level="ERROR")
|
|
71
73
|
return # Success - no file cleanup needed
|
|
72
74
|
|
|
73
75
|
except Exception as e:
|
|
74
76
|
# If stdin method fails, fall back to traditional file method
|
|
75
77
|
print("AHK stdin execution failed, falling back to file method: {}".format(e))
|
|
78
|
+
MediLink_ConfigLoader.log("AHK stdin execution failed, falling back to file method: {}".format(e), level="ERROR")
|
|
76
79
|
# Continue to fallback implementation below
|
|
77
80
|
|
|
78
81
|
# Traditional file-based method (fallback or when optimization disabled)
|
|
@@ -87,9 +90,12 @@ def run_ahk_script(script_content):
|
|
|
87
90
|
subprocess.check_call([AHK_EXECUTABLE, temp_script_name]) # Execute the AHK script using the AutoHotkey executable
|
|
88
91
|
except subprocess.CalledProcessError as e:
|
|
89
92
|
print("AHK script failed with exit status: {}".format(e.returncode)) # Log the exit status of the failed script
|
|
93
|
+
MediLink_ConfigLoader.log("AHK script failed with exit status: {}".format(e.returncode), level="ERROR")
|
|
90
94
|
print("Output from AHK script: {}".format(e.output)) # Log the output from the failed script
|
|
95
|
+
MediLink_ConfigLoader.log("Output from AHK script: {}".format(e.output), level="ERROR")
|
|
91
96
|
except Exception as e:
|
|
92
97
|
print("An unexpected error occurred while running the AHK script: {}".format(e)) # Log any unexpected errors
|
|
98
|
+
MediLink_ConfigLoader.log("An unexpected error occurred while running the AHK script: {}".format(e), level="ERROR")
|
|
93
99
|
traceback.print_exc() # Print the full traceback for debugging purposes
|
|
94
100
|
finally:
|
|
95
101
|
# Delete the temporary script file
|
|
@@ -98,6 +104,7 @@ def run_ahk_script(script_content):
|
|
|
98
104
|
os.unlink(temp_script_name) # Attempt to delete the temporary script file
|
|
99
105
|
except OSError as e:
|
|
100
106
|
print("Error deleting temporary script file: {}".format(e)) # Log any errors encountered while deleting the file
|
|
107
|
+
MediLink_ConfigLoader.log("Error deleting temporary script file: {}".format(e), level="ERROR")
|
|
101
108
|
# Future Improvement: Implement a cleanup mechanism to handle orphaned temporary files
|
|
102
109
|
|
|
103
110
|
# Global variable to store the last processed entry
|
|
@@ -279,19 +279,22 @@ def check_crosswalk_health(crosswalk):
|
|
|
279
279
|
crosswalk (dict): The crosswalk dictionary to check.
|
|
280
280
|
|
|
281
281
|
Returns:
|
|
282
|
-
tuple: (is_healthy, missing_names_count, missing_medisoft_ids_count)
|
|
282
|
+
tuple: (is_healthy, missing_names_count, missing_medisoft_ids_count, missing_names_list, missing_medisoft_ids_list)
|
|
283
283
|
"""
|
|
284
284
|
if 'payer_id' not in crosswalk or not crosswalk['payer_id']:
|
|
285
|
-
return False, 0, 0
|
|
285
|
+
return False, 0, 0, [], []
|
|
286
286
|
|
|
287
287
|
missing_names = 0
|
|
288
288
|
missing_medisoft_ids = 0
|
|
289
|
+
missing_names_list = []
|
|
290
|
+
missing_medisoft_ids_list = []
|
|
289
291
|
|
|
290
292
|
for payer_id, details in crosswalk['payer_id'].items():
|
|
291
293
|
# Check if name is missing or "Unknown"
|
|
292
294
|
name = details.get('name', '')
|
|
293
295
|
if not name or name == 'Unknown':
|
|
294
296
|
missing_names += 1
|
|
297
|
+
missing_names_list.append(payer_id)
|
|
295
298
|
|
|
296
299
|
# Check if at least one medisoft ID exists in either field
|
|
297
300
|
medisoft_id = details.get('medisoft_id', [])
|
|
@@ -306,10 +309,11 @@ def check_crosswalk_health(crosswalk):
|
|
|
306
309
|
# If both are empty, count as missing; if either has at least one, it's healthy
|
|
307
310
|
if not medisoft_id and not medisoft_medicare_id:
|
|
308
311
|
missing_medisoft_ids += 1
|
|
312
|
+
missing_medisoft_ids_list.append(payer_id)
|
|
309
313
|
|
|
310
314
|
# Consider healthy if no missing names and no missing medisoft IDs
|
|
311
315
|
is_healthy = (missing_names == 0 and missing_medisoft_ids == 0)
|
|
312
|
-
return is_healthy, missing_names, missing_medisoft_ids
|
|
316
|
+
return is_healthy, missing_names, missing_medisoft_ids, missing_names_list, missing_medisoft_ids_list
|
|
313
317
|
|
|
314
318
|
def prompt_user_for_api_calls(crosswalk, config):
|
|
315
319
|
"""
|
|
@@ -324,7 +328,7 @@ def prompt_user_for_api_calls(crosswalk, config):
|
|
|
324
328
|
bool: True if should proceed with API calls, False if should skip
|
|
325
329
|
"""
|
|
326
330
|
|
|
327
|
-
is_healthy, missing_names, missing_medisoft_ids = check_crosswalk_health(crosswalk)
|
|
331
|
+
is_healthy, missing_names, missing_medisoft_ids, missing_names_list, missing_medisoft_ids_list = check_crosswalk_health(crosswalk)
|
|
328
332
|
total_payers = len(crosswalk.get('payer_id', {}))
|
|
329
333
|
|
|
330
334
|
if is_healthy:
|
|
@@ -362,13 +366,27 @@ def prompt_user_for_api_calls(crosswalk, config):
|
|
|
362
366
|
else:
|
|
363
367
|
print("\nCrosswalk needs attention:")
|
|
364
368
|
print(" - {} payers found".format(total_payers))
|
|
369
|
+
|
|
370
|
+
# Show detailed information about missing names
|
|
365
371
|
if missing_names > 0:
|
|
366
|
-
print(" - {} payers missing names".format(missing_names))
|
|
372
|
+
print(" - {} payers missing names: {}".format(missing_names, ", ".join(missing_names_list)))
|
|
373
|
+
|
|
374
|
+
# Show detailed information about missing medisoft IDs
|
|
367
375
|
if missing_medisoft_ids > 0:
|
|
368
|
-
print(" - {} payers missing medisoft IDs".format(missing_medisoft_ids))
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
376
|
+
print(" - {} payers missing medisoft IDs: {}".format(missing_medisoft_ids, ", ".join(missing_medisoft_ids_list)))
|
|
377
|
+
# API validation CANNOT resolve missing medisoft IDs
|
|
378
|
+
print(" TODO: Need user interface to manually input medisoft IDs for these payers")
|
|
379
|
+
|
|
380
|
+
# Only proceed with API calls if there are missing names (API can help with those)
|
|
381
|
+
if missing_names > 0:
|
|
382
|
+
print("Proceeding with API validation calls to resolve missing names...")
|
|
383
|
+
MediLink_ConfigLoader.log("Crosswalk has missing names - proceeding with API calls", config, level="INFO")
|
|
384
|
+
return True
|
|
385
|
+
else:
|
|
386
|
+
print("No missing names to resolve via API. Skipping API validation calls.")
|
|
387
|
+
print("TODO: Manual intervention needed for missing medisoft IDs")
|
|
388
|
+
MediLink_ConfigLoader.log("Crosswalk has missing medisoft IDs but no missing names - skipping API calls", config, level="INFO")
|
|
389
|
+
return False
|
|
372
390
|
|
|
373
391
|
def crosswalk_update(client, config, crosswalk, skip_known_payers=True): # Upstream of this is only MediBot_Preprocessor.py and MediBot.py
|
|
374
392
|
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MediBot/MediBot.bat,sha256=anz5i-Td1k3HhRUvkCqHsw9lBLVmO6q9bt5kLTfr1Iw,13282
|
|
2
|
-
MediBot/MediBot.py,sha256
|
|
2
|
+
MediBot/MediBot.py,sha256=-7_Jk1qHruYxorWKcIFXvIopu1CRCF1c3JOj5cIXASk,24059
|
|
3
3
|
MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
MediBot/MediBot_Crosswalk_Library.py,sha256=
|
|
4
|
+
MediBot/MediBot_Crosswalk_Library.py,sha256=Ix4QlAcg3O9Y6n6ZeSUtbmtV-_n-t0-jnefXDBFlhhI,51441
|
|
5
5
|
MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
MediBot/MediBot_Preprocessor.py,sha256=Lc9uQnE5SAa0dQTOREdPV1QUB2cywXTHJ1h2w-fyeeQ,13331
|
|
7
7
|
MediBot/MediBot_Preprocessor_lib.py,sha256=irojPF1oQCt78H1GjJ0hfILUpO12d4rfFjfoViVaBEk,41194
|
|
@@ -49,8 +49,8 @@ MediLink/test.py,sha256=kSvvJRL_3fWuNS3_x4hToOnUljGLoeEw6SUTHQWQRJk,3108
|
|
|
49
49
|
MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,13841
|
|
50
50
|
MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
|
|
51
51
|
MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
|
|
52
|
-
medicafe-0.250723.
|
|
53
|
-
medicafe-0.250723.
|
|
54
|
-
medicafe-0.250723.
|
|
55
|
-
medicafe-0.250723.
|
|
56
|
-
medicafe-0.250723.
|
|
52
|
+
medicafe-0.250723.1.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
|
53
|
+
medicafe-0.250723.1.dist-info/METADATA,sha256=8kXLtbfrw465DQriwAcRImPpUczYTqT_98nlHcpC1Lg,5501
|
|
54
|
+
medicafe-0.250723.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
55
|
+
medicafe-0.250723.1.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
|
|
56
|
+
medicafe-0.250723.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|