medicafe 0.250725.2__tar.gz → 0.250725.4__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.

Files changed (59) hide show
  1. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot.py +48 -7
  2. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_UI.py +54 -13
  3. {medicafe-0.250725.2 → medicafe-0.250725.4}/PKG-INFO +1 -1
  4. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/PKG-INFO +1 -1
  5. {medicafe-0.250725.2 → medicafe-0.250725.4}/setup.py +1 -1
  6. {medicafe-0.250725.2 → medicafe-0.250725.4}/LICENSE +0 -0
  7. {medicafe-0.250725.2 → medicafe-0.250725.4}/MANIFEST.in +0 -0
  8. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot.bat +0 -0
  9. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_Charges.py +0 -0
  10. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_Crosswalk_Library.py +0 -0
  11. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_Post.py +0 -0
  12. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_Preprocessor.py +0 -0
  13. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_Preprocessor_lib.py +0 -0
  14. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_dataformat_library.py +0 -0
  15. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/MediBot_docx_decoder.py +0 -0
  16. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/PDF_to_CSV_Cleaner.py +0 -0
  17. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/__init__.py +0 -0
  18. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/update_json.py +0 -0
  19. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediBot/update_medicafe.py +0 -0
  20. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink.py +0 -0
  21. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_837p_cob_library.py +0 -0
  22. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_837p_encoder.py +0 -0
  23. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_837p_encoder_library.py +0 -0
  24. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_837p_utilities.py +0 -0
  25. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_API_Generator.py +0 -0
  26. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_API_v2.py +0 -0
  27. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_API_v3.py +0 -0
  28. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_APIs.py +0 -0
  29. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Azure.py +0 -0
  30. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_ClaimStatus.py +0 -0
  31. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_ConfigLoader.py +0 -0
  32. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_DataMgmt.py +0 -0
  33. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Decoder.py +0 -0
  34. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Deductible.py +0 -0
  35. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Deductible_Validator.py +0 -0
  36. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Down.py +0 -0
  37. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Gmail.py +0 -0
  38. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_GraphQL.py +0 -0
  39. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Mailer.py +0 -0
  40. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Parser.py +0 -0
  41. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Scan.py +0 -0
  42. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Scheduler.py +0 -0
  43. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_UI.py +0 -0
  44. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_Up.py +0 -0
  45. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/MediLink_batch.bat +0 -0
  46. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/Soumit_api.py +0 -0
  47. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/__init__.py +0 -0
  48. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/openssl.cnf +0 -0
  49. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/test.py +0 -0
  50. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/test_cob_library.py +0 -0
  51. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/test_validation.py +0 -0
  52. {medicafe-0.250725.2 → medicafe-0.250725.4}/MediLink/webapp.html +0 -0
  53. {medicafe-0.250725.2 → medicafe-0.250725.4}/README.md +0 -0
  54. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/SOURCES.txt +0 -0
  55. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/dependency_links.txt +0 -0
  56. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/not-zip-safe +0 -0
  57. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/requires.txt +0 -0
  58. {medicafe-0.250725.2 → medicafe-0.250725.4}/medicafe.egg-info/top_level.txt +0 -0
  59. {medicafe-0.250725.2 → medicafe-0.250725.4}/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,47 @@ 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 reads from stdin and discards leading newlines,
37
+ then puts back the first non-newline character for the real input() call.
38
+ """
39
+ if sys.platform != "win32":
40
+ return # no-op on non-Windows
41
+
42
+ try:
43
+ while True:
44
+ ch = sys.stdin.read(1)
45
+ if ch not in ('\r', '\n'):
46
+ # put it back for the real input() call
47
+ msvcrt.ungetch(ch.encode())
48
+ break
49
+ elif not ch: # EOF
50
+ break
51
+ except Exception:
52
+ # If stdin.read fails, fall back to msvcrt approach
53
+ while msvcrt.kbhit():
54
+ msvcrt.getch()
55
+
15
56
  try:
16
57
  from MediBot_Crosswalk_Library import crosswalk_update
17
58
  except ImportError:
@@ -400,9 +441,9 @@ if __name__ == "__main__":
400
441
  sys.stdout.flush()
401
442
  time.sleep(0.2) # Increased delay for Windows XP
402
443
 
403
- # Clear any leftover input in stdin buffer for Windows XP compatibility
404
- while msvcrt.kbhit():
405
- msvcrt.getch()
444
+ # Flush console input buffer to remove any stray CR/LF
445
+ flush_console_input_buffer()
446
+ discard_leading_blank()
406
447
 
407
448
  # Use sys.stdin.readline() for more reliable input on Windows XP
408
449
  proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
@@ -412,9 +453,9 @@ if __name__ == "__main__":
412
453
  sys.stdout.flush()
413
454
  time.sleep(0.2) # Increased delay for Windows XP
414
455
 
415
- # Clear any leftover input in stdin buffer for Windows XP compatibility
416
- while msvcrt.kbhit():
417
- msvcrt.getch()
456
+ # Flush console input buffer to remove any stray CR/LF
457
+ flush_console_input_buffer()
458
+ discard_leading_blank()
418
459
 
419
460
  # Use sys.stdin.readline() for more reliable input on Windows XP
420
461
  proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
@@ -18,6 +18,47 @@ 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 reads from stdin and discards leading newlines,
43
+ then puts back the first non-newline character for the real input() call.
44
+ """
45
+ if sys.platform != "win32":
46
+ return # no-op on non-Windows
47
+
48
+ try:
49
+ while True:
50
+ ch = sys.stdin.read(1)
51
+ if ch not in ('\r', '\n'):
52
+ # put it back for the real input() call
53
+ msvcrt.ungetch(ch.encode())
54
+ break
55
+ elif not ch: # EOF
56
+ break
57
+ except Exception:
58
+ # If stdin.read fails, fall back to msvcrt approach
59
+ while msvcrt.kbhit():
60
+ msvcrt.getch()
61
+
21
62
  class AppControl:
22
63
  def __init__(self):
23
64
  self.script_paused = False
@@ -152,9 +193,9 @@ def display_patient_selection_menu(csv_data, reverse_mapping, proceed_as_medicar
152
193
  sys.stdout.flush()
153
194
  time.sleep(0.2) # Increased delay for Windows XP
154
195
 
155
- # Clear any leftover input in stdin buffer for Windows XP compatibility
156
- while msvcrt.kbhit():
157
- msvcrt.getch()
196
+ # Flush console input buffer to remove any stray CR/LF
197
+ flush_console_input_buffer()
198
+ discard_leading_blank()
158
199
 
159
200
  # Use sys.stdin.readline() for more reliable input on Windows XP
160
201
  proceed = sys.stdin.readline().lower().strip() in ['yes', 'y']
@@ -171,9 +212,9 @@ def display_patient_selection_menu(csv_data, reverse_mapping, proceed_as_medicar
171
212
  sys.stdout.flush()
172
213
  time.sleep(0.2) # Increased delay for Windows XP
173
214
 
174
- # Clear any leftover input in stdin buffer for Windows XP compatibility
175
- while msvcrt.kbhit():
176
- msvcrt.getch()
215
+ # Flush console input buffer to remove any stray CR/LF
216
+ flush_console_input_buffer()
217
+ discard_leading_blank()
177
218
 
178
219
  # Use sys.stdin.readline() for more reliable input on Windows XP
179
220
  selection = sys.stdin.readline().strip()
@@ -255,9 +296,9 @@ def handle_user_interaction(interaction_mode, error_message):
255
296
  sys.stdout.flush()
256
297
  time.sleep(0.2) # Increased delay for Windows XP
257
298
 
258
- # Clear any leftover input in stdin buffer for Windows XP compatibility
259
- while msvcrt.kbhit():
260
- msvcrt.getch()
299
+ # Flush console input buffer to remove any stray CR/LF
300
+ flush_console_input_buffer()
301
+ discard_leading_blank()
261
302
 
262
303
  # Use sys.stdin.readline() for more reliable input on Windows XP
263
304
  choice = sys.stdin.readline().strip()
@@ -289,6 +330,10 @@ def user_interaction(csv_data, interaction_mode, error_message, reverse_mapping)
289
330
 
290
331
  # Force flush for Windows XP compatibility
291
332
  sys.stdout.flush()
333
+
334
+ # Flush console input buffer to remove any stray CR/LF from script launch
335
+ flush_console_input_buffer()
336
+ discard_leading_blank()
292
337
 
293
338
  while True:
294
339
  try:
@@ -298,10 +343,6 @@ def user_interaction(csv_data, interaction_mode, error_message, reverse_mapping)
298
343
  sys.stdout.flush()
299
344
  time.sleep(0.2) # Increased delay for Windows XP
300
345
 
301
- # Clear any leftover input in stdin buffer for Windows XP compatibility
302
- while msvcrt.kbhit():
303
- msvcrt.getch()
304
-
305
346
  # Use sys.stdin.readline() for more reliable input on Windows XP
306
347
  response = sys.stdin.readline().lower().strip()
307
348
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250725.2
3
+ Version: 0.250725.4
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250725.2
3
+ Version: 0.250725.4
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='medicafe',
5
- version="0.250725.2",
5
+ version="0.250725.4",
6
6
  description='MediCafe',
7
7
  long_description="""
8
8
  # Project Overview: MediCafe
File without changes
File without changes
File without changes
File without changes