medicafe 0.250820.1__tar.gz → 0.250820.3__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.
Files changed (79) hide show
  1. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot.bat +1 -1
  2. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/__init__.py +1 -1
  3. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/update_medicafe.py +77 -11
  4. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/__init__.py +1 -1
  5. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/__init__.py +1 -1
  6. {medicafe-0.250820.1 → medicafe-0.250820.3}/PKG-INFO +2 -1
  7. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/PKG-INFO +2 -1
  8. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/requires.txt +3 -1
  9. {medicafe-0.250820.1 → medicafe-0.250820.3}/setup.py +8 -4
  10. {medicafe-0.250820.1 → medicafe-0.250820.3}/LICENSE +0 -0
  11. {medicafe-0.250820.1 → medicafe-0.250820.3}/MANIFEST.in +0 -0
  12. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot.py +0 -0
  13. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Charges.py +0 -0
  14. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Crosswalk_Library.py +0 -0
  15. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Crosswalk_Utils.py +0 -0
  16. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Post.py +0 -0
  17. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Preprocessor.py +0 -0
  18. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_Preprocessor_lib.py +0 -0
  19. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_UI.py +0 -0
  20. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_dataformat_library.py +0 -0
  21. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_docx_decoder.py +0 -0
  22. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/MediBot_smart_import.py +0 -0
  23. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/get_medicafe_version.py +0 -0
  24. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediBot/update_json.py +0 -0
  25. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/MediLink_ConfigLoader.py +0 -0
  26. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/__main__.py +0 -0
  27. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/api_core.py +0 -0
  28. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/api_core_backup.py +0 -0
  29. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/api_factory.py +0 -0
  30. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/api_utils.py +0 -0
  31. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/core_utils.py +0 -0
  32. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/graphql_utils.py +0 -0
  33. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/logging_config.py +0 -0
  34. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/logging_demo.py +0 -0
  35. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/migration_helpers.py +0 -0
  36. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/smart_import.py +0 -0
  37. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediCafe/submission_index.py +0 -0
  38. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/InsuranceTypeService.py +0 -0
  39. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_837p_cob_library.py +0 -0
  40. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_837p_encoder.py +0 -0
  41. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_837p_encoder_library.py +0 -0
  42. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_837p_utilities.py +0 -0
  43. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_API_Generator.py +0 -0
  44. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Azure.py +0 -0
  45. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_ClaimStatus.py +0 -0
  46. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_DataMgmt.py +0 -0
  47. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Decoder.py +0 -0
  48. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Deductible.py +0 -0
  49. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Deductible_Validator.py +0 -0
  50. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Display_Utils.py +0 -0
  51. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Down.py +0 -0
  52. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Gmail.py +0 -0
  53. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Mailer.py +0 -0
  54. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Parser.py +0 -0
  55. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_PatientProcessor.py +0 -0
  56. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Scan.py +0 -0
  57. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Scheduler.py +0 -0
  58. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_UI.py +0 -0
  59. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_Up.py +0 -0
  60. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_insurance_utils.py +0 -0
  61. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_main.py +0 -0
  62. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/MediLink_smart_import.py +0 -0
  63. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/Soumit_api.py +0 -0
  64. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/gmail_http_utils.py +0 -0
  65. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/gmail_oauth_utils.py +0 -0
  66. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/insurance_type_integration_test.py +0 -0
  67. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/openssl.cnf +0 -0
  68. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/test.py +0 -0
  69. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/test_cob_library.py +0 -0
  70. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/test_timing.py +0 -0
  71. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/test_validation.py +0 -0
  72. {medicafe-0.250820.1 → medicafe-0.250820.3}/MediLink/webapp.html +0 -0
  73. {medicafe-0.250820.1 → medicafe-0.250820.3}/README.md +0 -0
  74. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/SOURCES.txt +0 -0
  75. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/dependency_links.txt +0 -0
  76. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/entry_points.txt +0 -0
  77. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/not-zip-safe +0 -0
  78. {medicafe-0.250820.1 → medicafe-0.250820.3}/medicafe.egg-info/top_level.txt +0 -0
  79. {medicafe-0.250820.1 → medicafe-0.250820.3}/setup.cfg +0 -0
@@ -677,7 +677,7 @@ goto main_menu
677
677
  :: Process CSV Files moved to external script
678
678
  :process_csvs
679
679
  call "%~dp0process_csvs.bat"
680
- goto :eof
680
+ goto troubleshooting_menu
681
681
 
682
682
  REM [removed legacy :clear_cache block in favor of :clear_cache_menu]
683
683
 
@@ -19,7 +19,7 @@ Smart Import Integration:
19
19
  medibot_main = get_components('medibot_main')
20
20
  """
21
21
 
22
- __version__ = "0.250820.1"
22
+ __version__ = "0.250820.3"
23
23
  __author__ = "Daniel Vidaud"
24
24
  __email__ = "daniel@personalizedtransformation.com"
25
25
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
  # update_medicafe.py
3
- # Script Version: 2.0.1 (clean 3-try updater)
3
+ # Script Version: 2.0.2 (clean 3-try updater)
4
4
  # Target environment: Windows XP SP3 + Python 3.4.4 (ASCII-only)
5
5
 
6
6
  import sys, os, time, subprocess, platform
@@ -17,7 +17,7 @@ except Exception:
17
17
 
18
18
 
19
19
  SCRIPT_NAME = "update_medicafe.py"
20
- SCRIPT_VERSION = "2.0.0"
20
+ SCRIPT_VERSION = "2.0.2"
21
21
  PACKAGE_NAME = "medicafe"
22
22
 
23
23
 
@@ -81,6 +81,22 @@ def get_installed_version(package):
81
81
 
82
82
  def get_latest_version(package, retries):
83
83
  if not requests:
84
+ # Fallback: try pip index if requests missing (first run)
85
+ try:
86
+ proc = subprocess.Popen([sys.executable, '-m', 'pip', 'index', 'versions', package],
87
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
88
+ out, err = proc.communicate()
89
+ if proc.returncode == 0:
90
+ # Parse a line like: Available versions: 1.2.3, 1.2.2, ... (take first)
91
+ for line in out.decode(errors='ignore').splitlines():
92
+ if 'Available versions:' in line:
93
+ parts = line.split(':', 1)
94
+ if len(parts) == 2:
95
+ versions = [v.strip() for v in parts[1].split(',') if v.strip()]
96
+ if versions:
97
+ return versions[0]
98
+ except Exception:
99
+ pass
84
100
  return None
85
101
 
86
102
  headers = {
@@ -118,11 +134,18 @@ def get_latest_version(package, retries):
118
134
 
119
135
 
120
136
  def check_internet_connection():
121
- if not requests:
122
- return False
137
+ # Prefer requests when available
138
+ if requests:
139
+ try:
140
+ requests.get("http://www.google.com", timeout=5)
141
+ return True
142
+ except Exception:
143
+ pass
144
+ # Fallback: use ping as a lightweight reachability check (XP compatible)
123
145
  try:
124
- requests.get("http://www.google.com", timeout=5)
125
- return True
146
+ proc = subprocess.Popen(['ping', '-n', '1', 'pypi.org'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
147
+ out, err = proc.communicate()
148
+ return proc.returncode == 0
126
149
  except Exception:
127
150
  return False
128
151
 
@@ -139,6 +162,8 @@ def verify_post_install(package, expected_version):
139
162
  for attempt in range(1, 6): # Increased to 5 attempts
140
163
  installed = get_installed_version(package)
141
164
  if installed:
165
+ if expected_version is None:
166
+ return True, installed
142
167
  # Re-fetch latest once to avoid stale latest
143
168
  latest_again = get_latest_version(package, retries=1) or expected_version
144
169
  if compare_versions(installed, latest_again) >= 0:
@@ -148,6 +173,8 @@ def verify_post_install(package, expected_version):
148
173
  time.sleep(2) # Increased to 2 seconds for better propagation on slow systems
149
174
  # Final re-fetch for robustness
150
175
  installed = get_installed_version(package)
176
+ if expected_version is None and installed:
177
+ return True, installed
151
178
  latest_again = get_latest_version(package, retries=1) or expected_version
152
179
  if installed and compare_versions(installed, latest_again) >= 0:
153
180
  return True, installed
@@ -155,6 +182,7 @@ def verify_post_install(package, expected_version):
155
182
 
156
183
 
157
184
  def upgrade_package(package):
185
+ # Try with [binary] first; if pip doesn't recognize it, fall back to plain package
158
186
  strategies = [
159
187
  ['install', '--upgrade', package + '[binary]', '--no-cache-dir', '--disable-pip-version-check'],
160
188
  ['install', '--upgrade', '--force-reinstall', package + '[binary]', '--no-cache-dir', '--disable-pip-version-check'],
@@ -163,8 +191,7 @@ def upgrade_package(package):
163
191
 
164
192
  latest_before = get_latest_version(package, retries=2)
165
193
  if not latest_before:
166
- print_status('ERROR', 'Unable to determine latest version from PyPI')
167
- return False
194
+ print_status('WARNING', 'Unable to determine latest version from PyPI; proceeding with blind install')
168
195
 
169
196
  for idx, parts in enumerate(strategies):
170
197
  attempt = idx + 1
@@ -184,11 +211,48 @@ def upgrade_package(package):
184
211
  # Show error output concisely
185
212
  if err:
186
213
  print(err.strip())
214
+ # Detect extras error and fall back to non-binary package
215
+ if 'Invalid requirement' in err or 'extras' in err or '[binary]' in err:
216
+ print_status('INFO', 'Falling back to installing without [binary] extra')
217
+ fb_cmd = [sys.executable, '-m', 'pip', 'install', '--upgrade', package, '--no-cache-dir', '--disable-pip-version-check']
218
+ code2, out2, err2 = run_pip_install(fb_cmd)
219
+ if code2 == 0:
220
+ ok, installed = verify_post_install(package, latest_before)
221
+ if ok:
222
+ print_status('SUCCESS', 'Installed without [binary]: {}'.format(installed))
223
+ return True
224
+ if err2:
225
+ print(err2.strip())
187
226
  print_status('WARNING', 'pip returned non-zero exit code ({})'.format(code))
188
227
 
189
228
  return False
190
229
 
191
230
 
231
+ def _is_importable(module_name, submodule_name):
232
+ try:
233
+ code = 'import ' + module_name + '\nfrom ' + module_name + ' import ' + submodule_name
234
+ proc = subprocess.Popen([sys.executable, '-c', code], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
235
+ out, err = proc.communicate()
236
+ return proc.returncode == 0
237
+ except Exception:
238
+ return False
239
+
240
+
241
+ def ensure_lxml_available():
242
+ if _is_importable('lxml', 'etree'):
243
+ return True
244
+ print_section('lxml check')
245
+ print_status('INFO', 'lxml not importable; installing pinned version')
246
+ code, out, err = run_pip_install([sys.executable, '-m', 'pip', 'install', '--upgrade', 'lxml==4.2.0', '--no-cache-dir', '--disable-pip-version-check'])
247
+ if code == 0 and _is_importable('lxml', 'etree'):
248
+ print_status('SUCCESS', 'lxml is now available')
249
+ return True
250
+ if err:
251
+ print(err.strip())
252
+ print_status('ERROR', 'Failed to ensure lxml is available')
253
+ return False
254
+
255
+
192
256
  # ---------- Main ----------
193
257
  def main():
194
258
  print_banner("MediCafe Updater ({} v{})".format(SCRIPT_NAME, SCRIPT_VERSION))
@@ -209,9 +273,9 @@ def main():
209
273
 
210
274
  latest = get_latest_version(PACKAGE_NAME, retries=3)
211
275
  if not latest:
212
- print_status('ERROR', 'Could not fetch latest version information from PyPI')
213
- sys.exit(1)
214
- print_status('INFO', 'Latest {} on PyPI: {}'.format(PACKAGE_NAME, latest))
276
+ print_status('WARNING', 'Could not fetch latest version information from PyPI; attempting upgrade anyway')
277
+ else:
278
+ print_status('INFO', 'Latest {} on PyPI: {}'.format(PACKAGE_NAME, latest))
215
279
 
216
280
  if current and compare_versions(latest, current) <= 0:
217
281
  print_section('Status')
@@ -226,6 +290,8 @@ def main():
226
290
  final_version = get_installed_version(PACKAGE_NAME)
227
291
  if success:
228
292
  print_status('SUCCESS', 'Update completed. {} is now at {}'.format(PACKAGE_NAME, final_version or '(unknown)'))
293
+ # Ensure critical binary dependency exists for first-run stability
294
+ ensure_lxml_available()
229
295
  print_status('INFO', 'This updater script: v{}'.format(SCRIPT_VERSION))
230
296
  sys.exit(0)
231
297
  else:
@@ -27,7 +27,7 @@ Smart Import System:
27
27
  api_suite = get_api_access()
28
28
  """
29
29
 
30
- __version__ = "0.250820.1"
30
+ __version__ = "0.250820.3"
31
31
  __author__ = "Daniel Vidaud"
32
32
  __email__ = "daniel@personalizedtransformation.com"
33
33
 
@@ -22,7 +22,7 @@ Smart Import Integration:
22
22
  datamgmt = get_components('medilink_datamgmt')
23
23
  """
24
24
 
25
- __version__ = "0.250820.1"
25
+ __version__ = "0.250820.3"
26
26
  __author__ = "Daniel Vidaud"
27
27
  __email__ = "daniel@personalizedtransformation.com"
28
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250820.1
3
+ Version: 0.250820.3
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2/MediCafe
6
6
  Author: Daniel Vidaud
@@ -15,6 +15,7 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.4, <3.5
17
17
  Description-Content-Type: text/markdown
18
+ Provides-Extra: binary
18
19
  License-File: LICENSE
19
20
 
20
21
  # MediCafe
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250820.1
3
+ Version: 0.250820.3
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2/MediCafe
6
6
  Author: Daniel Vidaud
@@ -15,6 +15,7 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.4, <3.5
17
17
  Description-Content-Type: text/markdown
18
+ Provides-Extra: binary
18
19
  License-File: LICENSE
19
20
 
20
21
  # MediCafe
@@ -12,7 +12,9 @@ numpy==1.11.3
12
12
  pandas==0.20.0
13
13
  lxml==4.2.0
14
14
 
15
- [:platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"]
15
+ [binary]
16
+
17
+ [binary:platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5"]
16
18
  numpy==1.11.3
17
19
  pandas==0.20.0
18
20
  lxml==4.2.0
@@ -54,7 +54,7 @@ if long_description_text is None:
54
54
 
55
55
  setup(
56
56
  name='medicafe',
57
- version="0.250820.1",
57
+ version="0.250820.3",
58
58
  description='MediCafe',
59
59
  long_description=long_description_text,
60
60
  long_description_content_type='text/markdown',
@@ -84,18 +84,22 @@ setup(
84
84
  'requests==2.21.0',
85
85
  'argparse==1.4.0',
86
86
  'numpy==1.11.3; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"',
87
- 'numpy==1.11.3; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"',
88
87
  'pandas==0.20.0; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"',
89
- 'pandas==0.20.0; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"',
90
88
  'tqdm==4.14.0',
91
89
  'lxml==4.2.0; platform_python_implementation != "CPython" or sys_platform != "win32" or python_version > "3.5"',
92
- 'lxml==4.2.0; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5" and extra == "binary"',
93
90
  'python-docx==0.8.11',
94
91
  'PyYAML==5.2',
95
92
  'chardet==3.0.4',
96
93
  'cffi==1.8.2', # msal needs this and then pip install will fail because 1.15.X won't work on XP.
97
94
  'msal==1.26.0'
98
95
  ],
96
+ extras_require={
97
+ 'binary': [
98
+ 'numpy==1.11.3; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5"',
99
+ 'pandas==0.20.0; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5"',
100
+ 'lxml==4.2.0; platform_python_implementation == "CPython" and sys_platform == "win32" and python_version <= "3.5"',
101
+ ]
102
+ },
99
103
  entry_points={
100
104
  'console_scripts': [
101
105
  'medicafe=MediCafe.__main__:main',
File without changes
File without changes
File without changes
File without changes