medicafe 0.250812.6__py3-none-any.whl → 0.250813.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.
- MediBot/update_medicafe.py +73 -61
- MediCafe/api_core.py +39 -12
- MediCafe/submission_index.py +44 -0
- MediLink/MediLink_DataMgmt.py +74 -43
- MediLink/MediLink_Decoder.py +38 -9
- MediLink/MediLink_Down.py +358 -21
- MediLink/MediLink_Parser.py +80 -1
- MediLink/MediLink_main.py +101 -1
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/METADATA +1 -1
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/RECORD +14 -14
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/LICENSE +0 -0
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/WHEEL +0 -0
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/entry_points.txt +0 -0
- {medicafe-0.250812.6.dist-info → medicafe-0.250813.1.dist-info}/top_level.txt +0 -0
MediLink/MediLink_main.py
CHANGED
@@ -54,6 +54,10 @@ if PERFORMANCE_LOGGING:
|
|
54
54
|
# - XP note: default to console prompts; optional UI later.
|
55
55
|
# This already happens when MediLink is opened.
|
56
56
|
|
57
|
+
# Simple in-process scheduler for ack polls
|
58
|
+
_last_ack_updated_at = None
|
59
|
+
_scheduled_ack_checks = [] # list of epoch timestamps
|
60
|
+
|
57
61
|
def _tools_menu(config, medi):
|
58
62
|
"""Low-use maintenance tools submenu."""
|
59
63
|
while True:
|
@@ -136,6 +140,21 @@ def main_menu():
|
|
136
140
|
if PERFORMANCE_LOGGING:
|
137
141
|
print("Test mode check completed in {:.2f} seconds".format(test_mode_end - test_mode_start))
|
138
142
|
|
143
|
+
# Boot-time one-time ack poll (silent policy: just show summary output)
|
144
|
+
try:
|
145
|
+
print("\nChecking acknowledgements (boot-time scan)...")
|
146
|
+
ack_result = MediLink_Down.check_for_new_remittances(config, is_boot_scan=True)
|
147
|
+
_last_ack_updated_at = int(time.time())
|
148
|
+
except Exception:
|
149
|
+
ack_result = False
|
150
|
+
pass
|
151
|
+
|
152
|
+
# Clear screen before showing menu header
|
153
|
+
try:
|
154
|
+
os.system('cls' if os.name == 'nt' else 'clear')
|
155
|
+
except Exception:
|
156
|
+
pass # Fallback if cls/clear fails
|
157
|
+
|
139
158
|
# Display Welcome Message
|
140
159
|
welcome_start = time.time()
|
141
160
|
MediLink_UI.display_welcome()
|
@@ -143,6 +162,11 @@ def main_menu():
|
|
143
162
|
if PERFORMANCE_LOGGING:
|
144
163
|
print("Welcome display completed in {:.2f} seconds".format(welcome_end - welcome_start))
|
145
164
|
|
165
|
+
# Show message if new records were found during boot-time scan
|
166
|
+
if ack_result:
|
167
|
+
print("\n[INFO] New records were found during the boot-time acknowledgement scan.")
|
168
|
+
print("You can view them by selecting 'Check for new remittances' from the menu.")
|
169
|
+
|
146
170
|
# Normalize the directory path for file operations.
|
147
171
|
path_norm_start = time.time()
|
148
172
|
medi = extract_medilink_config(config)
|
@@ -179,12 +203,55 @@ def main_menu():
|
|
179
203
|
if PERFORMANCE_LOGGING:
|
180
204
|
print("Main menu initialization completed in {:.2f} seconds".format(menu_init_end - menu_start_time))
|
181
205
|
|
206
|
+
# Validate the calculated date range
|
207
|
+
try:
|
208
|
+
from datetime import datetime, timedelta
|
209
|
+
current_date = datetime.now()
|
210
|
+
start_date = current_date - timedelta(days=15) # Default to 15-day range
|
211
|
+
end_date = current_date - timedelta(days=1)
|
212
|
+
def validate_date_range(start_date, end_date):
|
213
|
+
if start_date > end_date:
|
214
|
+
raise ValueError("Start date cannot be after end date.")
|
215
|
+
if start_date < (current_date - timedelta(days=30)): # Ensure it's not too far in the past
|
216
|
+
raise ValueError("Start date must be within the last 30 days.")
|
217
|
+
if end_date < (current_date - timedelta(days=30)): # Ensure it's not too far in the past
|
218
|
+
raise ValueError("End date must be within the last 30 days.")
|
219
|
+
except ImportError:
|
220
|
+
print("Date validation requires the 'datetime' module. Please ensure it's installed.")
|
221
|
+
# Fallback to a safe date range within 30 days
|
222
|
+
end_date = current_date - timedelta(days=1)
|
223
|
+
start_date = end_date - timedelta(days=15) # 15-day range as fallback
|
224
|
+
|
225
|
+
end_date_str = end_date.strftime('%m/%d/%Y')
|
226
|
+
start_date_str = start_date.strftime('%m/%d/%Y')
|
227
|
+
|
182
228
|
while True:
|
229
|
+
# Run any due scheduled ack checks before showing menu
|
230
|
+
try:
|
231
|
+
now_ts = int(time.time())
|
232
|
+
if _scheduled_ack_checks:
|
233
|
+
due = [t for t in _scheduled_ack_checks if t <= now_ts]
|
234
|
+
if due:
|
235
|
+
print("\nAuto-checking acknowledgements (scheduled)...")
|
236
|
+
MediLink_Down.check_for_new_remittances(config, is_boot_scan=False)
|
237
|
+
_last_ack_updated_at = now_ts
|
238
|
+
# remove executed
|
239
|
+
_scheduled_ack_checks = [t for t in _scheduled_ack_checks if t > now_ts]
|
240
|
+
except Exception:
|
241
|
+
pass
|
242
|
+
|
183
243
|
# Define static menu options for consistent numbering
|
184
244
|
options = ["Check for new remittances", "Submit claims", "Exit", "Tools"]
|
185
245
|
|
186
246
|
# Display the menu options.
|
187
247
|
menu_display_start = time.time()
|
248
|
+
# Show last updated info if available
|
249
|
+
try:
|
250
|
+
if _last_ack_updated_at:
|
251
|
+
ts_str = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(_last_ack_updated_at))
|
252
|
+
print("Last acknowledgements update: {}".format(ts_str))
|
253
|
+
except Exception:
|
254
|
+
pass
|
188
255
|
MediLink_UI.display_menu(options)
|
189
256
|
menu_display_end = time.time()
|
190
257
|
if PERFORMANCE_LOGGING:
|
@@ -200,10 +267,35 @@ def main_menu():
|
|
200
267
|
if choice == '1':
|
201
268
|
# Handle remittance checking.
|
202
269
|
remittance_start = time.time()
|
203
|
-
MediLink_Down.check_for_new_remittances(config)
|
270
|
+
result = MediLink_Down.check_for_new_remittances(config, is_boot_scan=False)
|
271
|
+
_last_ack_updated_at = int(time.time())
|
204
272
|
remittance_end = time.time()
|
205
273
|
if PERFORMANCE_LOGGING:
|
206
274
|
print("Remittance check completed in {:.2f} seconds".format(remittance_end - remittance_start))
|
275
|
+
|
276
|
+
# If no records found, offer connectivity diagnostics
|
277
|
+
if not result:
|
278
|
+
print("\nNo records found. Would you like to run connectivity diagnostics? (y/n): ", end="")
|
279
|
+
try:
|
280
|
+
diagnostic_choice = input().strip().lower()
|
281
|
+
if diagnostic_choice in ['y', 'yes']:
|
282
|
+
print("\nRunning connectivity diagnostics...")
|
283
|
+
connectivity_results = MediLink_Down.test_endpoint_connectivity(config)
|
284
|
+
print("\nConnectivity Test Results:")
|
285
|
+
for endpoint, result in connectivity_results.items():
|
286
|
+
print(" {}: {} - {}".format(
|
287
|
+
endpoint,
|
288
|
+
result["status"],
|
289
|
+
"; ".join(result["details"])
|
290
|
+
))
|
291
|
+
except Exception:
|
292
|
+
pass # Ignore input errors
|
293
|
+
|
294
|
+
# UX hint: suggest deeper United details
|
295
|
+
try:
|
296
|
+
print("Tip: For United details, run the United Claims Status option for the same date window.")
|
297
|
+
except Exception:
|
298
|
+
pass
|
207
299
|
elif choice == '2':
|
208
300
|
if not all_files:
|
209
301
|
print("No files available to submit. Please check for new remittances first.")
|
@@ -226,6 +318,14 @@ def main_menu():
|
|
226
318
|
|
227
319
|
# Process the claims submission.
|
228
320
|
handle_submission(detailed_patient_data, config, crosswalk)
|
321
|
+
# Schedule ack checks for SFTP-based systems post-submit: T+90s and T+7200s
|
322
|
+
try:
|
323
|
+
now_ts2 = int(time.time())
|
324
|
+
_scheduled_ack_checks.append(now_ts2 + 90)
|
325
|
+
_scheduled_ack_checks.append(now_ts2 + 7200)
|
326
|
+
print("Scheduled acknowledgements checks in 1-2 minutes and again ~2 hours.")
|
327
|
+
except Exception:
|
328
|
+
pass
|
229
329
|
submission_end = time.time()
|
230
330
|
if PERFORMANCE_LOGGING:
|
231
331
|
print("Claims submission flow completed in {:.2f} seconds".format(submission_end - submission_start))
|
@@ -15,11 +15,11 @@ MediBot/PDF_to_CSV_Cleaner.py,sha256=ZZphmq-5K04DkrZNlcwNAIoZPOD_ROWvS3PMkKFxeiM
|
|
15
15
|
MediBot/__init__.py,sha256=6IdVLXaWxV5ZdpefonWrC1R8RsJn4V26K0PmUEZ_vU8,3192
|
16
16
|
MediBot/get_medicafe_version.py,sha256=uyL_UIE42MyFuJ3SRYxJp8sZx8xjTqlYZ3FdQuxLduY,728
|
17
17
|
MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
|
18
|
-
MediBot/update_medicafe.py,sha256=
|
18
|
+
MediBot/update_medicafe.py,sha256=VTcQA_tfVILSAV29DM8nG-X4RJAQYdEiXY6oaeZfy4I,29072
|
19
19
|
MediCafe/MediLink_ConfigLoader.py,sha256=Ia79dZQBvgbc6CtOaNZVlFHaN-fvUmJRpmmVHz_MFv8,8205
|
20
20
|
MediCafe/__init__.py,sha256=DF0XUu3G43AejXvEmd5aCyy0GDQahQD0pMwexmxem-E,5477
|
21
21
|
MediCafe/__main__.py,sha256=mRNyk3D9Ilnu2XhgVI_rut7r5Ro7UIKtwV871giAHI8,12992
|
22
|
-
MediCafe/api_core.py,sha256=
|
22
|
+
MediCafe/api_core.py,sha256=rF-8XNc6ILSsoD_YQV-L9R_nW9_XAd0D4VMgqAMY5U4,66420
|
23
23
|
MediCafe/api_core_backup.py,sha256=Oy_Fqt0SEvGkQN1Oqw5iUPVFxPEokyju5CuPEb9k0OY,18686
|
24
24
|
MediCafe/api_factory.py,sha256=I5AeJoyu6m7oCrjc2OvVvO_4KSBRutTsR1riiWhTZV0,12086
|
25
25
|
MediCafe/api_utils.py,sha256=KWQB0q1k5E6frOFFlKWcFpHNcqfrS7KJ_82672wbupw,14041
|
@@ -29,7 +29,7 @@ MediCafe/logging_config.py,sha256=auT65LN5oDEXVhkMeLke63kJHTWxYf2o8YihAfQFgzU,54
|
|
29
29
|
MediCafe/logging_demo.py,sha256=TwUhzafna5pMdN3zSKGrpUWRqX96F1JGGsSUtr3dygs,1975
|
30
30
|
MediCafe/migration_helpers.py,sha256=48GnP4xcgvDNNlzoWsKASCpF4H0KnyveHPbz6kjQy50,17737
|
31
31
|
MediCafe/smart_import.py,sha256=23pttO7QTZyvOP9HR9czDIv7lUsE1sHaE2CWC94Xxxo,19800
|
32
|
-
MediCafe/submission_index.py,sha256=
|
32
|
+
MediCafe/submission_index.py,sha256=35gz8Anx1dIqG1I14GvuLY0nTO4dSBr2YsZwof9aIQg,11175
|
33
33
|
MediLink/InsuranceTypeService.py,sha256=FKWC1nRfKV_OtCDUtZustauXNhmCYDFiY9jsAGHPPUM,2178
|
34
34
|
MediLink/MediLink.py,sha256=p91MYghOCbNf3ikTzm5P9V1Luj035yd83EDbQ-Ov6oM,33258
|
35
35
|
MediLink/MediLink_277_decoder.py,sha256=Z3hQK2j-YzdXjov6aDlDRc7M_auFBnl3se4OF5q6_04,4358
|
@@ -44,17 +44,17 @@ MediLink/MediLink_APIs.py,sha256=jm3f9T034MJKH8A_CIootULoeuk7H8s7PazpFZRCbKI,622
|
|
44
44
|
MediLink/MediLink_Azure.py,sha256=Ow70jctiHFIylskBExN7WUoRgrKOvBR6jNTnQMk6lJA,210
|
45
45
|
MediLink/MediLink_ClaimStatus.py,sha256=cO9drHSIBtltHfLSKeEf18_m75ixpxIOao5I-TGiHiI,18100
|
46
46
|
MediLink/MediLink_ConfigLoader.py,sha256=u9ecB0SIN7zuJAo8KcoQys95BtyAo-8S2n4mRd0S3XU,4356
|
47
|
-
MediLink/MediLink_DataMgmt.py,sha256=
|
48
|
-
MediLink/MediLink_Decoder.py,sha256=
|
47
|
+
MediLink/MediLink_DataMgmt.py,sha256=dKJtq8BibgGsfnTyWmayX4cTPWB8zgFMsgwKJVb7cJ8,52369
|
48
|
+
MediLink/MediLink_Decoder.py,sha256=1gzdybNg4Vv69s5PNbX8bPNrXT_N_kPpFpt2HpkauWA,16430
|
49
49
|
MediLink/MediLink_Deductible.py,sha256=fLBDQHDcTk86JtJUtUwrVl-o0KfNackFrWosMxr7qHU,45559
|
50
50
|
MediLink/MediLink_Deductible_Validator.py,sha256=2g-lZd-Y5fJ1mfP87vM6oABg0t5Om-7EkEkilVvDWYY,22888
|
51
51
|
MediLink/MediLink_Display_Utils.py,sha256=QyHk23VU1rJtNZr_QhtL76Avo66CEc7MZU84uIs-1Lo,4187
|
52
|
-
MediLink/MediLink_Down.py,sha256
|
52
|
+
MediLink/MediLink_Down.py,sha256=q4ByEh1h1WSHUyRy68e8wT8pXMXP6q8NaqS1LKveMFo,28093
|
53
53
|
MediLink/MediLink_ERA_decoder.py,sha256=MiOtDcXnmevPfHAahIlTLlUc14VcQWAor9Xa7clA2Ts,8710
|
54
54
|
MediLink/MediLink_Gmail.py,sha256=8iQjqcJMSa_Zfr5azR0dShKAQeXqt-9C-s8seYB9pic,23961
|
55
55
|
MediLink/MediLink_GraphQL.py,sha256=O6OCaumT0zIC7YcIAwLOOYxiQnYhoMc48UL8ilNIBec,45720
|
56
56
|
MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
|
-
MediLink/MediLink_Parser.py,sha256=
|
57
|
+
MediLink/MediLink_Parser.py,sha256=eRVZ4ckZ5gDOrcvtCUZP3DOd3Djly66rCIk0aYXLz14,12567
|
58
58
|
MediLink/MediLink_PatientProcessor.py,sha256=9r2w4p45d30Tn0kbXL3j5574MYOehP83tDirNOw_Aek,19977
|
59
59
|
MediLink/MediLink_Scan.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
60
|
MediLink/MediLink_Scheduler.py,sha256=UJvxhDvHraqra2_TlQVlGeh5jRFrrfK6nCVUHnKOEMY,38
|
@@ -64,7 +64,7 @@ MediLink/MediLink_Up.py,sha256=QFdUtpEySc7ceZfFJ2q9XWClnhYJssG-UywFFedlv9w,34899
|
|
64
64
|
MediLink/MediLink_api_utils.py,sha256=dsGLRPRvSwfXPLrrfgnkIKGDIF00wE93TrDB6HMDPQU,11857
|
65
65
|
MediLink/MediLink_batch.bat,sha256=nqL5QwCLyRQFSPdv6kgtcV_cpky7FXSOWVl6OxjRXb4,118
|
66
66
|
MediLink/MediLink_insurance_utils.py,sha256=g741Fj2K26cMy0JX5d_XavMw9LgkK6hjaUJYfysT7t8,9301
|
67
|
-
MediLink/MediLink_main.py,sha256=
|
67
|
+
MediLink/MediLink_main.py,sha256=Y26Bl_7KNIbz18lbgK-18dkqANfWK6QO4sQLFFRQGGw,23337
|
68
68
|
MediLink/MediLink_smart_import.py,sha256=B5SfBn_4bYEWJJDolXbjnwKx_-MaqGZ76LyXQwWDV80,9838
|
69
69
|
MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
|
70
70
|
MediLink/__init__.py,sha256=Z4Uxt4XZk4n-GwAkUoEeFiL-D7xHbttYiiWGjgKT_ng,3391
|
@@ -77,9 +77,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
|
|
77
77
|
MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
|
78
78
|
MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
|
79
79
|
MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
|
80
|
-
medicafe-0.
|
81
|
-
medicafe-0.
|
82
|
-
medicafe-0.
|
83
|
-
medicafe-0.
|
84
|
-
medicafe-0.
|
85
|
-
medicafe-0.
|
80
|
+
medicafe-0.250813.1.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
|
81
|
+
medicafe-0.250813.1.dist-info/METADATA,sha256=s9Q_U782C7BfIXiRYe496dzLC8l5yaOhDAjjvpYRCgQ,3384
|
82
|
+
medicafe-0.250813.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
83
|
+
medicafe-0.250813.1.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
|
84
|
+
medicafe-0.250813.1.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
|
85
|
+
medicafe-0.250813.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|