medicafe 0.250728.9__py3-none-any.whl → 0.250805.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.

Potentially problematic release.


This version of medicafe might be problematic. Click here for more details.

Files changed (57) hide show
  1. MediBot/MediBot.bat +233 -19
  2. MediBot/MediBot.py +138 -46
  3. MediBot/MediBot_Crosswalk_Library.py +127 -623
  4. MediBot/MediBot_Crosswalk_Utils.py +618 -0
  5. MediBot/MediBot_Preprocessor.py +72 -17
  6. MediBot/MediBot_Preprocessor_lib.py +470 -76
  7. MediBot/MediBot_UI.py +32 -17
  8. MediBot/MediBot_dataformat_library.py +68 -20
  9. MediBot/MediBot_docx_decoder.py +120 -19
  10. MediBot/MediBot_smart_import.py +180 -0
  11. MediBot/__init__.py +89 -0
  12. MediBot/get_medicafe_version.py +25 -0
  13. MediBot/update_json.py +35 -6
  14. MediBot/update_medicafe.py +19 -1
  15. MediCafe/MediLink_ConfigLoader.py +160 -0
  16. MediCafe/__init__.py +171 -0
  17. MediCafe/__main__.py +222 -0
  18. MediCafe/api_core.py +1098 -0
  19. MediCafe/api_core_backup.py +427 -0
  20. MediCafe/api_factory.py +306 -0
  21. MediCafe/api_utils.py +356 -0
  22. MediCafe/core_utils.py +450 -0
  23. MediCafe/graphql_utils.py +445 -0
  24. MediCafe/logging_config.py +123 -0
  25. MediCafe/logging_demo.py +61 -0
  26. MediCafe/migration_helpers.py +463 -0
  27. MediCafe/smart_import.py +436 -0
  28. MediLink/MediLink_837p_cob_library.py +28 -28
  29. MediLink/MediLink_837p_encoder.py +33 -34
  30. MediLink/MediLink_837p_encoder_library.py +226 -150
  31. MediLink/MediLink_837p_utilities.py +129 -5
  32. MediLink/MediLink_API_Generator.py +83 -60
  33. MediLink/MediLink_API_v3.py +1 -1
  34. MediLink/MediLink_ClaimStatus.py +177 -31
  35. MediLink/MediLink_DataMgmt.py +378 -63
  36. MediLink/MediLink_Decoder.py +20 -1
  37. MediLink/MediLink_Deductible.py +155 -28
  38. MediLink/MediLink_Display_Utils.py +72 -0
  39. MediLink/MediLink_Down.py +127 -5
  40. MediLink/MediLink_Gmail.py +712 -653
  41. MediLink/MediLink_PatientProcessor.py +257 -0
  42. MediLink/MediLink_UI.py +85 -71
  43. MediLink/MediLink_Up.py +28 -4
  44. MediLink/MediLink_insurance_utils.py +227 -230
  45. MediLink/MediLink_main.py +248 -0
  46. MediLink/MediLink_smart_import.py +264 -0
  47. MediLink/__init__.py +93 -1
  48. MediLink/insurance_type_integration_test.py +13 -3
  49. MediLink/test.py +1 -1
  50. MediLink/test_timing.py +59 -0
  51. {medicafe-0.250728.9.dist-info → medicafe-0.250805.0.dist-info}/METADATA +1 -1
  52. medicafe-0.250805.0.dist-info/RECORD +81 -0
  53. medicafe-0.250805.0.dist-info/entry_points.txt +2 -0
  54. {medicafe-0.250728.9.dist-info → medicafe-0.250805.0.dist-info}/top_level.txt +1 -0
  55. medicafe-0.250728.9.dist-info/RECORD +0 -59
  56. {medicafe-0.250728.9.dist-info → medicafe-0.250805.0.dist-info}/LICENSE +0 -0
  57. {medicafe-0.250728.9.dist-info → medicafe-0.250805.0.dist-info}/WHEEL +0 -0
MediCafe/__main__.py ADDED
@@ -0,0 +1,222 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ MediCafe Entry Point (__main__.py)
4
+
5
+ This module serves as the main entry point for the MediCafe package.
6
+ It can be called directly from the batch file and routes user choices
7
+ to the appropriate sub-applications without adding interface layers.
8
+
9
+ Usage:
10
+ python -m MediCafe <command> [args...]
11
+
12
+ Commands:
13
+ medibot [config_file] - Run MediBot data entry automation
14
+ medilink - Run MediLink claims processing
15
+ claims_status - Run United Claims Status checker
16
+ deductible - Run United Deductible checker
17
+ download_emails - Run email download functionality
18
+ version - Show MediCafe version information
19
+
20
+ The entry point preserves user choices and navigational flow from the
21
+ batch script without adding unnecessary interface layers.
22
+ """
23
+
24
+ import sys
25
+ import os
26
+ import argparse
27
+ import os
28
+
29
+ # Set up module paths for proper imports
30
+ def setup_entry_point_paths():
31
+ """Set up paths for the MediCafe entry point"""
32
+ # Get the parent directory (workspace root)
33
+ current_dir = os.path.dirname(os.path.abspath(__file__))
34
+ workspace_root = os.path.dirname(current_dir)
35
+
36
+ # Add to Python path if not already present
37
+ workspace_str = workspace_root
38
+ if workspace_str not in sys.path:
39
+ sys.path.insert(0, workspace_str)
40
+
41
+ # Also add MediBot and MediLink directories specifically
42
+ medibot_dir = os.path.join(workspace_root, 'MediBot')
43
+ medilink_dir = os.path.join(workspace_root, 'MediLink')
44
+
45
+ if medibot_dir not in sys.path:
46
+ sys.path.insert(0, medibot_dir)
47
+ if medilink_dir not in sys.path:
48
+ sys.path.insert(0, medilink_dir)
49
+
50
+ def run_medibot(config_file=None):
51
+ """Run MediBot application"""
52
+ try:
53
+ print("Starting MediBot...")
54
+
55
+ # Set up command line arguments
56
+ if config_file:
57
+ sys.argv = ['MediBot.py', config_file]
58
+ else:
59
+ sys.argv = ['MediBot.py']
60
+
61
+ # Import and run MediBot directly
62
+ try:
63
+ from MediBot import MediBot
64
+ # If MediBot has a main function, call it
65
+ if hasattr(MediBot, 'main'):
66
+ return MediBot.main()
67
+ else:
68
+ # Otherwise, just import it (it will run its own code)
69
+ return 0
70
+ except ImportError:
71
+ # Fallback: try to run the file directly
72
+ import subprocess
73
+ medibot_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'MediBot', 'MediBot.py')
74
+ if os.path.exists(medibot_path):
75
+ # Use subprocess.call for Python 3.4.4 compatibility
76
+ result = subprocess.call([sys.executable, medibot_path] + sys.argv[1:],
77
+ cwd=os.path.dirname(medibot_path))
78
+ return result
79
+ else:
80
+ raise ImportError("MediBot.py not found at {}".format(medibot_path))
81
+
82
+ except ImportError as e:
83
+ print("Error: Unable to import MediBot: {}".format(e))
84
+ return 1
85
+ except Exception as e:
86
+ print("Error running MediBot: {}".format(e))
87
+ return 1
88
+
89
+ def run_medilink():
90
+ """Run MediLink application"""
91
+ try:
92
+ print("Starting MediLink...")
93
+ # Import and execute MediLink
94
+ import runpy
95
+ exit_code = runpy.run_module('MediLink.MediLink_main', run_name='__main__')
96
+ return 0
97
+
98
+ except ImportError as e:
99
+ print("Error: Unable to import MediLink: {}".format(e))
100
+ return 1
101
+ except Exception as e:
102
+ print("Error running MediLink: {}".format(e))
103
+ return 1
104
+
105
+ def run_claims_status():
106
+ """Run United Claims Status checker"""
107
+ try:
108
+ print("Starting United Claims Status...")
109
+ # Import and execute Claims Status
110
+ import runpy
111
+ exit_code = runpy.run_module('MediLink.MediLink_ClaimStatus', run_name='__main__')
112
+ return 0
113
+
114
+ except ImportError as e:
115
+ print("Error: Unable to import MediLink_ClaimStatus: {}".format(e))
116
+ return 1
117
+ except Exception as e:
118
+ print("Error running Claims Status: {}".format(e))
119
+ return 1
120
+
121
+ def run_deductible():
122
+ """Run United Deductible checker"""
123
+ try:
124
+ print("Starting United Deductible...")
125
+ # Import and execute Deductible checker
126
+ import runpy
127
+ exit_code = runpy.run_module('MediLink.MediLink_Deductible', run_name='__main__')
128
+ return 0
129
+
130
+ except ImportError as e:
131
+ print("Error: Unable to import MediLink_Deductible: {}".format(e))
132
+ return 1
133
+ except Exception as e:
134
+ print("Error running Deductible checker: {}".format(e))
135
+ return 1
136
+
137
+ def run_download_emails():
138
+ """Run email download functionality"""
139
+ try:
140
+ print("Starting email download...")
141
+ # Import and execute Gmail downloader
142
+ import runpy
143
+ exit_code = runpy.run_module('MediLink.MediLink_Gmail', run_name='__main__')
144
+ return 0
145
+
146
+ except ImportError as e:
147
+ print("Error: Unable to import MediLink_Gmail: {}".format(e))
148
+ return 1
149
+ except Exception as e:
150
+ print("Error running email download: {}".format(e))
151
+ return 1
152
+
153
+ def show_version():
154
+ """Show MediCafe version information"""
155
+ try:
156
+ from MediCafe import __version__, __author__
157
+ print("MediCafe version {}".format(__version__))
158
+ print("Author: {}".format(__author__))
159
+ return 0
160
+ except ImportError:
161
+ print("MediCafe version information not available")
162
+ return 1
163
+
164
+ def main():
165
+ """Main entry point for MediCafe"""
166
+ # Set up paths first
167
+ setup_entry_point_paths()
168
+
169
+ # Create argument parser
170
+ parser = argparse.ArgumentParser(
171
+ description='MediCafe - Medical Practice Management Automation Suite',
172
+ prog='python -m MediCafe'
173
+ )
174
+
175
+ parser.add_argument(
176
+ 'command',
177
+ choices=['medibot', 'medilink', 'claims_status', 'deductible', 'download_emails', 'version'],
178
+ help='Command to execute'
179
+ )
180
+
181
+ parser.add_argument(
182
+ 'config_file',
183
+ nargs='?',
184
+ help='Configuration file path (for medibot command)'
185
+ )
186
+
187
+ # Parse arguments
188
+ if len(sys.argv) < 2:
189
+ parser.print_help()
190
+ return 1
191
+
192
+ args = parser.parse_args()
193
+
194
+ # Route to appropriate function based on command
195
+ try:
196
+ if args.command == 'medibot':
197
+ return run_medibot(args.config_file)
198
+ elif args.command == 'medilink':
199
+ return run_medilink()
200
+ elif args.command == 'claims_status':
201
+ return run_claims_status()
202
+ elif args.command == 'deductible':
203
+ return run_deductible()
204
+ elif args.command == 'download_emails':
205
+ return run_download_emails()
206
+ elif args.command == 'version':
207
+ return show_version()
208
+ else:
209
+ print("Unknown command: {}".format(args.command))
210
+ parser.print_help()
211
+ return 1
212
+
213
+ except KeyboardInterrupt:
214
+ print("\nOperation cancelled by user")
215
+ return 1
216
+ except Exception as e:
217
+ print("Unexpected error: {}".format(e))
218
+ return 1
219
+
220
+ if __name__ == '__main__':
221
+ exit_code = main()
222
+ sys.exit(exit_code)