medicafe 0.250725.2__tar.gz → 0.250725.5__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.
Potentially problematic release.
This version of medicafe might be problematic. Click here for more details.
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot.py +35 -7
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_UI.py +39 -13
- {medicafe-0.250725.2 → medicafe-0.250725.5}/PKG-INFO +1 -1
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/PKG-INFO +1 -1
- {medicafe-0.250725.2 → medicafe-0.250725.5}/setup.py +1 -1
- {medicafe-0.250725.2 → medicafe-0.250725.5}/LICENSE +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MANIFEST.in +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot.bat +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_Charges.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_Crosswalk_Library.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_Post.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_Preprocessor.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_Preprocessor_lib.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_dataformat_library.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/MediBot_docx_decoder.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/PDF_to_CSV_Cleaner.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/__init__.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/update_json.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediBot/update_medicafe.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_837p_cob_library.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_837p_encoder.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_837p_encoder_library.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_837p_utilities.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_API_Generator.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_API_v2.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_API_v3.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_APIs.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Azure.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_ClaimStatus.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_ConfigLoader.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_DataMgmt.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Decoder.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Deductible.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Deductible_Validator.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Down.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Gmail.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_GraphQL.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Mailer.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Parser.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Scan.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Scheduler.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_UI.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_Up.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/MediLink_batch.bat +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/Soumit_api.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/__init__.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/openssl.cnf +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/test.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/test_cob_library.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/test_validation.py +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/MediLink/webapp.html +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/README.md +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/SOURCES.txt +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/dependency_links.txt +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/not-zip-safe +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/requires.txt +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/medicafe.egg-info/top_level.txt +0 -0
- {medicafe-0.250725.2 → medicafe-0.250725.5}/setup.cfg +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#MediBot.py
|
|
2
|
-
import subprocess, os, tempfile, traceback, re, sys, time, msvcrt
|
|
2
|
+
import subprocess, os, tempfile, traceback, re, sys, time, msvcrt, ctypes
|
|
3
3
|
from collections import OrderedDict
|
|
4
4
|
import MediBot_dataformat_library
|
|
5
5
|
import MediBot_Preprocessor
|
|
@@ -12,6 +12,36 @@ sys.path.append(project_dir)
|
|
|
12
12
|
|
|
13
13
|
from MediLink import MediLink_ConfigLoader
|
|
14
14
|
|
|
15
|
+
def flush_console_input_buffer():
|
|
16
|
+
"""
|
|
17
|
+
Remove any keystrokes already sitting in the console input buffer.
|
|
18
|
+
Necessary on Windows XP where a stray CR/LF can remain after the
|
|
19
|
+
script is launched.
|
|
20
|
+
"""
|
|
21
|
+
if sys.platform != "win32":
|
|
22
|
+
return # no-op on non-Windows
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
|
|
26
|
+
STD_INPUT_HANDLE = -10
|
|
27
|
+
h_stdin = kernel32.GetStdHandle(STD_INPUT_HANDLE)
|
|
28
|
+
kernel32.FlushConsoleInputBuffer(h_stdin)
|
|
29
|
+
except Exception:
|
|
30
|
+
# Fallback: drain any leading newlines manually
|
|
31
|
+
while msvcrt.kbhit():
|
|
32
|
+
msvcrt.getch()
|
|
33
|
+
|
|
34
|
+
def discard_leading_blank():
|
|
35
|
+
"""
|
|
36
|
+
Alternative fallback that uses non-blocking msvcrt to drain any available input.
|
|
37
|
+
"""
|
|
38
|
+
if sys.platform != "win32":
|
|
39
|
+
return # no-op on non-Windows
|
|
40
|
+
|
|
41
|
+
# Use non-blocking msvcrt approach to drain any available input
|
|
42
|
+
while msvcrt.kbhit():
|
|
43
|
+
msvcrt.getch()
|
|
44
|
+
|
|
15
45
|
try:
|
|
16
46
|
from MediBot_Crosswalk_Library import crosswalk_update
|
|
17
47
|
except ImportError:
|
|
@@ -400,9 +430,8 @@ if __name__ == "__main__":
|
|
|
400
430
|
sys.stdout.flush()
|
|
401
431
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
402
432
|
|
|
403
|
-
#
|
|
404
|
-
|
|
405
|
-
msvcrt.getch()
|
|
433
|
+
# Flush console input buffer to remove any stray CR/LF
|
|
434
|
+
flush_console_input_buffer()
|
|
406
435
|
|
|
407
436
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
408
437
|
proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
|
|
@@ -412,9 +441,8 @@ if __name__ == "__main__":
|
|
|
412
441
|
sys.stdout.flush()
|
|
413
442
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
414
443
|
|
|
415
|
-
#
|
|
416
|
-
|
|
417
|
-
msvcrt.getch()
|
|
444
|
+
# Flush console input buffer to remove any stray CR/LF
|
|
445
|
+
flush_console_input_buffer()
|
|
418
446
|
|
|
419
447
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
420
448
|
proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
|
|
@@ -18,6 +18,36 @@ config, crosswalk = MediLink_ConfigLoader.load_configuration()
|
|
|
18
18
|
VK_END = int(config.get('VK_END', ""), 16) # Try F12 (7B). Virtual key code for 'End' (23)
|
|
19
19
|
VK_PAUSE = int(config.get('VK_PAUSE', ""), 16) # Try F11 (7A). Virtual-key code for 'Home' (24)
|
|
20
20
|
|
|
21
|
+
def flush_console_input_buffer():
|
|
22
|
+
"""
|
|
23
|
+
Remove any keystrokes already sitting in the console input buffer.
|
|
24
|
+
Necessary on Windows XP where a stray CR/LF can remain after the
|
|
25
|
+
script is launched.
|
|
26
|
+
"""
|
|
27
|
+
if sys.platform != "win32":
|
|
28
|
+
return # no-op on non-Windows
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
|
|
32
|
+
STD_INPUT_HANDLE = -10
|
|
33
|
+
h_stdin = kernel32.GetStdHandle(STD_INPUT_HANDLE)
|
|
34
|
+
kernel32.FlushConsoleInputBuffer(h_stdin)
|
|
35
|
+
except Exception:
|
|
36
|
+
# Fallback: drain any leading newlines manually
|
|
37
|
+
while msvcrt.kbhit():
|
|
38
|
+
msvcrt.getch()
|
|
39
|
+
|
|
40
|
+
def discard_leading_blank():
|
|
41
|
+
"""
|
|
42
|
+
Alternative fallback that uses non-blocking msvcrt to drain any available input.
|
|
43
|
+
"""
|
|
44
|
+
if sys.platform != "win32":
|
|
45
|
+
return # no-op on non-Windows
|
|
46
|
+
|
|
47
|
+
# Use non-blocking msvcrt approach to drain any available input
|
|
48
|
+
while msvcrt.kbhit():
|
|
49
|
+
msvcrt.getch()
|
|
50
|
+
|
|
21
51
|
class AppControl:
|
|
22
52
|
def __init__(self):
|
|
23
53
|
self.script_paused = False
|
|
@@ -152,9 +182,8 @@ def display_patient_selection_menu(csv_data, reverse_mapping, proceed_as_medicar
|
|
|
152
182
|
sys.stdout.flush()
|
|
153
183
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
154
184
|
|
|
155
|
-
#
|
|
156
|
-
|
|
157
|
-
msvcrt.getch()
|
|
185
|
+
# Flush console input buffer to remove any stray CR/LF
|
|
186
|
+
flush_console_input_buffer()
|
|
158
187
|
|
|
159
188
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
160
189
|
proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
|
|
@@ -171,9 +200,8 @@ def display_patient_selection_menu(csv_data, reverse_mapping, proceed_as_medicar
|
|
|
171
200
|
sys.stdout.flush()
|
|
172
201
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
173
202
|
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
msvcrt.getch()
|
|
203
|
+
# Flush console input buffer to remove any stray CR/LF
|
|
204
|
+
flush_console_input_buffer()
|
|
177
205
|
|
|
178
206
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
179
207
|
selection = sys.stdin.readline().strip()
|
|
@@ -255,9 +283,8 @@ def handle_user_interaction(interaction_mode, error_message):
|
|
|
255
283
|
sys.stdout.flush()
|
|
256
284
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
257
285
|
|
|
258
|
-
#
|
|
259
|
-
|
|
260
|
-
msvcrt.getch()
|
|
286
|
+
# Flush console input buffer to remove any stray CR/LF
|
|
287
|
+
flush_console_input_buffer()
|
|
261
288
|
|
|
262
289
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
263
290
|
choice = sys.stdin.readline().strip()
|
|
@@ -289,6 +316,9 @@ def user_interaction(csv_data, interaction_mode, error_message, reverse_mapping)
|
|
|
289
316
|
|
|
290
317
|
# Force flush for Windows XP compatibility
|
|
291
318
|
sys.stdout.flush()
|
|
319
|
+
|
|
320
|
+
# Flush console input buffer to remove any stray CR/LF from script launch
|
|
321
|
+
flush_console_input_buffer()
|
|
292
322
|
|
|
293
323
|
while True:
|
|
294
324
|
try:
|
|
@@ -298,10 +328,6 @@ def user_interaction(csv_data, interaction_mode, error_message, reverse_mapping)
|
|
|
298
328
|
sys.stdout.flush()
|
|
299
329
|
time.sleep(0.2) # Increased delay for Windows XP
|
|
300
330
|
|
|
301
|
-
# Clear any leftover input in stdin buffer for Windows XP compatibility
|
|
302
|
-
while msvcrt.kbhit():
|
|
303
|
-
msvcrt.getch()
|
|
304
|
-
|
|
305
331
|
# Use sys.stdin.readline() for more reliable input on Windows XP
|
|
306
332
|
response = sys.stdin.readline().lower().strip()
|
|
307
333
|
|
|
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
|