medicafe 0.250820.3__tar.gz → 0.250820.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.
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MANIFEST.in +1 -1
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot.bat +5 -1
- medicafe-0.250820.5/MediBot/MediBot_debug.bat +217 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/__init__.py +1 -1
- medicafe-0.250820.5/MediBot/clear_cache.bat +56 -0
- medicafe-0.250820.5/MediBot/crash_diagnostic.bat +325 -0
- medicafe-0.250820.5/MediBot/f_drive_diagnostic.bat +175 -0
- medicafe-0.250820.5/MediBot/full_debug_suite.bat +71 -0
- medicafe-0.250820.5/MediBot/process_csvs.bat +98 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/update_medicafe.py +107 -5
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/__init__.py +1 -1
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/__init__.py +1 -1
- {medicafe-0.250820.3 → medicafe-0.250820.5}/PKG-INFO +1 -1
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/PKG-INFO +1 -1
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/SOURCES.txt +6 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/setup.py +2 -2
- {medicafe-0.250820.3 → medicafe-0.250820.5}/LICENSE +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Charges.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Crosswalk_Library.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Crosswalk_Utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Post.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Preprocessor.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_Preprocessor_lib.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_UI.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_dataformat_library.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_docx_decoder.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/MediBot_smart_import.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/get_medicafe_version.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediBot/update_json.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/MediLink_ConfigLoader.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/__main__.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/api_core.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/api_core_backup.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/api_factory.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/api_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/core_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/graphql_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/logging_config.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/logging_demo.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/migration_helpers.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/smart_import.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediCafe/submission_index.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/InsuranceTypeService.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_837p_cob_library.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_837p_encoder.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_837p_encoder_library.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_837p_utilities.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_API_Generator.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Azure.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_ClaimStatus.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_DataMgmt.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Decoder.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Deductible.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Deductible_Validator.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Display_Utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Down.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Gmail.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Mailer.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Parser.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_PatientProcessor.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Scan.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Scheduler.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_UI.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_Up.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_insurance_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_main.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/MediLink_smart_import.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/Soumit_api.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/gmail_http_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/gmail_oauth_utils.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/insurance_type_integration_test.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/openssl.cnf +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/test.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/test_cob_library.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/test_timing.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/test_validation.py +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/MediLink/webapp.html +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/README.md +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/dependency_links.txt +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/entry_points.txt +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/not-zip-safe +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/requires.txt +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/medicafe.egg-info/top_level.txt +0 -0
- {medicafe-0.250820.3 → medicafe-0.250820.5}/setup.cfg +0 -0
@@ -676,7 +676,11 @@ goto main_menu
|
|
676
676
|
|
677
677
|
:: Process CSV Files moved to external script
|
678
678
|
:process_csvs
|
679
|
+
echo Processing CSV files...
|
679
680
|
call "%~dp0process_csvs.bat"
|
681
|
+
echo.
|
682
|
+
echo Press any key to return to Troubleshooting menu...
|
683
|
+
pause >nul
|
680
684
|
goto troubleshooting_menu
|
681
685
|
|
682
686
|
REM [removed legacy :clear_cache block in favor of :clear_cache_menu]
|
@@ -728,7 +732,7 @@ echo 4. Forced MediCafe version rollback
|
|
728
732
|
echo 5. Process CSV Files
|
729
733
|
echo 6. Back to Main Menu
|
730
734
|
echo.
|
731
|
-
set /p tchoice=Enter your choice:
|
735
|
+
set /p tchoice=Enter your choice:
|
732
736
|
if "%tchoice%"=="1" goto open_latest_log
|
733
737
|
if "%tchoice%"=="2" goto clear_cache_menu
|
734
738
|
if "%tchoice%"=="3" goto toggle_perf_logging
|
@@ -0,0 +1,217 @@
|
|
1
|
+
@echo off
|
2
|
+
setlocal enabledelayedexpansion
|
3
|
+
|
4
|
+
echo [DEBUG] ========================================
|
5
|
+
echo [DEBUG] MediBot Debug Version Starting
|
6
|
+
echo [DEBUG] ========================================
|
7
|
+
echo [DEBUG] Current directory: %CD%
|
8
|
+
echo [DEBUG] Current time: %TIME%
|
9
|
+
echo [DEBUG] Current date: %DATE%
|
10
|
+
echo [DEBUG] Press Enter to continue...
|
11
|
+
call :maybe_pause
|
12
|
+
|
13
|
+
echo [DEBUG] Step 1: Basic environment check
|
14
|
+
echo [DEBUG] Checking if we can access basic commands...
|
15
|
+
dir >nul 2>&1
|
16
|
+
if errorlevel 1 (
|
17
|
+
echo [ERROR] Basic dir command failed
|
18
|
+
pause
|
19
|
+
exit /b 1
|
20
|
+
) else (
|
21
|
+
echo [DEBUG] Basic dir command works
|
22
|
+
)
|
23
|
+
|
24
|
+
echo [DEBUG] Press Enter to continue...
|
25
|
+
call :maybe_pause
|
26
|
+
|
27
|
+
echo [DEBUG] Step 2: Python check
|
28
|
+
echo [DEBUG] Checking Python installation...
|
29
|
+
python --version >nul 2>&1
|
30
|
+
if errorlevel 1 (
|
31
|
+
echo [ERROR] Python not found or not in PATH
|
32
|
+
echo [DEBUG] Current PATH: %PATH%
|
33
|
+
echo [DEBUG] Press Enter to exit...
|
34
|
+
pause >nul
|
35
|
+
exit /b 1
|
36
|
+
) else (
|
37
|
+
echo [DEBUG] Python found successfully
|
38
|
+
python --version
|
39
|
+
)
|
40
|
+
|
41
|
+
echo [DEBUG] Press Enter to continue...
|
42
|
+
call :maybe_pause
|
43
|
+
|
44
|
+
echo [DEBUG] Step 3: Directory structure check
|
45
|
+
echo [DEBUG] Checking current directory contents...
|
46
|
+
dir /b
|
47
|
+
echo [DEBUG] Press Enter to continue...
|
48
|
+
call :maybe_pause
|
49
|
+
|
50
|
+
echo [DEBUG] Step 4: MediBot directory check
|
51
|
+
if exist "MediBot" (
|
52
|
+
echo [DEBUG] MediBot directory exists
|
53
|
+
echo [DEBUG] MediBot directory contents:
|
54
|
+
dir /b MediBot
|
55
|
+
) else (
|
56
|
+
echo [WARNING] MediBot directory not found
|
57
|
+
)
|
58
|
+
|
59
|
+
echo [DEBUG] Press Enter to continue...
|
60
|
+
call :maybe_pause
|
61
|
+
|
62
|
+
echo [DEBUG] Step 5: F: drive check
|
63
|
+
if exist "F:\" (
|
64
|
+
echo [DEBUG] F: drive exists
|
65
|
+
if exist "F:\Medibot" (
|
66
|
+
echo [DEBUG] F:\Medibot directory exists
|
67
|
+
echo [DEBUG] F:\Medibot contents:
|
68
|
+
dir /b "F:\Medibot" 2>nul || echo [ERROR] Cannot list F:\Medibot contents
|
69
|
+
) else (
|
70
|
+
echo [DEBUG] F:\Medibot directory does not exist
|
71
|
+
)
|
72
|
+
) else (
|
73
|
+
echo [DEBUG] F: drive does not exist
|
74
|
+
)
|
75
|
+
|
76
|
+
echo [DEBUG] Press Enter to continue...
|
77
|
+
call :maybe_pause
|
78
|
+
|
79
|
+
echo [DEBUG] Step 6: Python package check
|
80
|
+
echo [DEBUG] Checking MediCafe package...
|
81
|
+
python -c "import pkg_resources; print('MediCafe=='+pkg_resources.get_distribution('medicafe').version)" 2>nul
|
82
|
+
if errorlevel 1 (
|
83
|
+
echo [ERROR] MediCafe package not found or error accessing
|
84
|
+
) else (
|
85
|
+
echo [DEBUG] MediCafe package found
|
86
|
+
)
|
87
|
+
|
88
|
+
echo [DEBUG] Press Enter to continue...
|
89
|
+
pause >nul
|
90
|
+
|
91
|
+
echo [DEBUG] Step 7: Internet connectivity check
|
92
|
+
echo [DEBUG] Testing internet connectivity...
|
93
|
+
ping -n 1 google.com >nul 2>&1
|
94
|
+
if errorlevel 1 (
|
95
|
+
echo [WARNING] No internet connection detected
|
96
|
+
) else (
|
97
|
+
echo [DEBUG] Internet connection detected
|
98
|
+
)
|
99
|
+
|
100
|
+
echo [DEBUG] Press Enter to continue...
|
101
|
+
pause >nul
|
102
|
+
|
103
|
+
echo [DEBUG] Step 8: Configuration file check
|
104
|
+
set "config_file=MediBot\json\config.json"
|
105
|
+
echo [DEBUG] Checking for config file: %config_file%
|
106
|
+
if exist "%config_file%" (
|
107
|
+
echo [DEBUG] Config file exists
|
108
|
+
) else (
|
109
|
+
echo [WARNING] Config file not found
|
110
|
+
)
|
111
|
+
|
112
|
+
echo [DEBUG] Press Enter to continue...
|
113
|
+
pause >nul
|
114
|
+
|
115
|
+
echo [DEBUG] Step 9: Update script check
|
116
|
+
set "upgrade_medicafe_local=MediBot\update_medicafe.py"
|
117
|
+
set "upgrade_medicafe_legacy=F:\Medibot\update_medicafe.py"
|
118
|
+
|
119
|
+
echo [DEBUG] Checking for update scripts...
|
120
|
+
echo [DEBUG] Local path: %upgrade_medicafe_local%
|
121
|
+
echo [DEBUG] Legacy path: %upgrade_medicafe_legacy%
|
122
|
+
|
123
|
+
if exist "%upgrade_medicafe_local%" (
|
124
|
+
echo [DEBUG] Local update script found
|
125
|
+
) else (
|
126
|
+
echo [DEBUG] Local update script not found
|
127
|
+
)
|
128
|
+
|
129
|
+
if exist "%upgrade_medicafe_legacy%" (
|
130
|
+
echo [DEBUG] Legacy update script found
|
131
|
+
) else (
|
132
|
+
echo [DEBUG] Legacy update script not found
|
133
|
+
)
|
134
|
+
|
135
|
+
echo [DEBUG] Press Enter to continue...
|
136
|
+
pause >nul
|
137
|
+
|
138
|
+
if defined NON_INTERACTIVE goto skip_simple_menu_test
|
139
|
+
echo [DEBUG] Step 10: Simple menu test
|
140
|
+
echo [DEBUG] Testing menu functionality...
|
141
|
+
echo.
|
142
|
+
echo [DEBUG] Simple Menu Test
|
143
|
+
echo [DEBUG] 1. Test option 1
|
144
|
+
echo [DEBUG] 2. Test option 2
|
145
|
+
echo [DEBUG] 3. Exit
|
146
|
+
echo.
|
147
|
+
set /p test_choice="Enter test choice (1-3): "
|
148
|
+
|
149
|
+
if "!test_choice!"=="1" (
|
150
|
+
echo [DEBUG] Test option 1 selected
|
151
|
+
) else if "!test_choice!"=="2" (
|
152
|
+
echo [DEBUG] Test option 2 selected
|
153
|
+
) else if "!test_choice!"=="3" (
|
154
|
+
echo [DEBUG] Test exit selected
|
155
|
+
goto debug_exit
|
156
|
+
) else (
|
157
|
+
echo [DEBUG] Invalid choice: !test_choice!
|
158
|
+
)
|
159
|
+
|
160
|
+
echo [DEBUG] Press Enter to continue...
|
161
|
+
call :maybe_pause
|
162
|
+
|
163
|
+
:skip_simple_menu_test
|
164
|
+
echo [DEBUG] Step 11: Python module import test
|
165
|
+
echo [DEBUG] Testing Python module imports...
|
166
|
+
python -c "import sys; print('Python version:', sys.version)" 2>nul
|
167
|
+
if errorlevel 1 (
|
168
|
+
echo [ERROR] Python import test failed
|
169
|
+
) else (
|
170
|
+
echo [DEBUG] Python import test passed
|
171
|
+
)
|
172
|
+
|
173
|
+
echo [DEBUG] Press Enter to continue...
|
174
|
+
call :maybe_pause
|
175
|
+
|
176
|
+
echo [DEBUG] Step 12: MediCafe module test
|
177
|
+
echo [DEBUG] Testing MediCafe module import...
|
178
|
+
python -c "import MediCafe; print('MediCafe module imported successfully')" 2>nul
|
179
|
+
if errorlevel 1 (
|
180
|
+
echo [ERROR] MediCafe module import failed
|
181
|
+
) else (
|
182
|
+
echo [DEBUG] MediCafe module import passed
|
183
|
+
)
|
184
|
+
|
185
|
+
echo [DEBUG] Press Enter to continue...
|
186
|
+
call :maybe_pause
|
187
|
+
|
188
|
+
echo [DEBUG] Step 13: Final test - command execution
|
189
|
+
echo [DEBUG] Testing command execution...
|
190
|
+
echo [DEBUG] This will test if we can execute a simple command
|
191
|
+
echo [DEBUG] Command: echo Hello World
|
192
|
+
echo Hello World
|
193
|
+
if errorlevel 1 (
|
194
|
+
echo [ERROR] Command execution failed
|
195
|
+
) else (
|
196
|
+
echo [DEBUG] Command execution successful
|
197
|
+
)
|
198
|
+
|
199
|
+
echo [DEBUG] Press Enter to continue...
|
200
|
+
pause >nul
|
201
|
+
|
202
|
+
echo [DEBUG] ========================================
|
203
|
+
echo [DEBUG] All debug tests completed successfully
|
204
|
+
echo [DEBUG] ========================================
|
205
|
+
echo [DEBUG] Press Enter to exit...
|
206
|
+
call :maybe_pause
|
207
|
+
|
208
|
+
:debug_exit
|
209
|
+
echo [DEBUG] Exiting debug version
|
210
|
+
echo [DEBUG] Press Enter to exit...
|
211
|
+
call :maybe_pause
|
212
|
+
exit /b 0
|
213
|
+
|
214
|
+
:maybe_pause
|
215
|
+
if defined NON_INTERACTIVE goto :eof
|
216
|
+
pause >nul
|
217
|
+
goto :eof
|
@@ -0,0 +1,56 @@
|
|
1
|
+
@echo off
|
2
|
+
setlocal enabledelayedexpansion
|
3
|
+
|
4
|
+
:: Determine script and workspace directories
|
5
|
+
set "script_dir=%~dp0"
|
6
|
+
set "workspace_root=%script_dir%.."
|
7
|
+
|
8
|
+
:: Paths for deep clear helper script
|
9
|
+
set "upgrade_medicafe_local=%script_dir%update_medicafe.py"
|
10
|
+
set "upgrade_medicafe_legacy=F:\Medibot\update_medicafe.py"
|
11
|
+
|
12
|
+
:: Mode selection from first argument
|
13
|
+
set "mode=%~1"
|
14
|
+
if /i "%mode%"=="--quick" goto quick_clear
|
15
|
+
if /i "%mode%"=="--deep" goto deep_clear
|
16
|
+
|
17
|
+
:: Default behavior (backwards compatible): deep clear
|
18
|
+
goto deep_clear
|
19
|
+
|
20
|
+
:quick_clear
|
21
|
+
echo Quick clearing Python cache...
|
22
|
+
cd /d "%workspace_root%"
|
23
|
+
python -Bc "import compileall; compileall.compile_dir('.', force=True)" 2>nul
|
24
|
+
for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" 2>nul
|
25
|
+
echo [OK] Quick cache clear complete.
|
26
|
+
exit /b 0
|
27
|
+
|
28
|
+
:deep_clear
|
29
|
+
echo Deep cache clear (via update_medicafe.py)...
|
30
|
+
echo Workspace root: %workspace_root%
|
31
|
+
echo.
|
32
|
+
|
33
|
+
:: F: drive diagnostics (brief)
|
34
|
+
if exist "F:\" (
|
35
|
+
if exist "F:\Medibot" (
|
36
|
+
dir "F:\Medibot\update_medicafe.py" >nul 2>&1 && echo [OK] F:\Medibot\update_medicafe.py exists || echo [WARN] F:\Medibot\update_medicafe.py missing
|
37
|
+
) else (
|
38
|
+
echo [WARN] F:\Medibot directory does not exist
|
39
|
+
)
|
40
|
+
) else (
|
41
|
+
echo [WARN] F: drive is not accessible
|
42
|
+
)
|
43
|
+
|
44
|
+
:: Prefer F: updater first (ensures using shared, unlocked copy), then local
|
45
|
+
if exist "%upgrade_medicafe_legacy%" (
|
46
|
+
echo Using F: update_medicafe.py for deep clear
|
47
|
+
python "%upgrade_medicafe_legacy%" --clear-cache "%workspace_root%"
|
48
|
+
exit /b %ERRORLEVEL%
|
49
|
+
) else if exist "%~dp0update_medicafe.py" (
|
50
|
+
echo Using local update_medicafe.py for deep clear
|
51
|
+
python "%~dp0update_medicafe.py" --clear-cache "%workspace_root%"
|
52
|
+
exit /b %ERRORLEVEL%
|
53
|
+
) else (
|
54
|
+
echo ERROR: update_medicafe.py not found (F: or local)
|
55
|
+
exit /b 1
|
56
|
+
)
|
@@ -0,0 +1,325 @@
|
|
1
|
+
@echo off
|
2
|
+
setlocal enabledelayedexpansion
|
3
|
+
|
4
|
+
echo ========================================
|
5
|
+
echo MediBot Crash Diagnostic Tool
|
6
|
+
echo ========================================
|
7
|
+
echo.
|
8
|
+
echo This tool will help identify where MediBot.bat is crashing
|
9
|
+
echo on the XP production machine.
|
10
|
+
echo.
|
11
|
+
echo Press Enter to start diagnostics...
|
12
|
+
call :maybe_pause
|
13
|
+
|
14
|
+
:: Test 1: Basic batch functionality
|
15
|
+
echo.
|
16
|
+
echo ========================================
|
17
|
+
echo Test 1: Basic Batch Functionality
|
18
|
+
echo ========================================
|
19
|
+
echo Testing basic batch commands...
|
20
|
+
echo Current directory: %CD%
|
21
|
+
echo Current time: %TIME%
|
22
|
+
echo Current date: %DATE%
|
23
|
+
echo.
|
24
|
+
echo Testing variable expansion...
|
25
|
+
set "test_var=Hello World"
|
26
|
+
echo Test variable: %test_var%
|
27
|
+
echo Delayed expansion test: !test_var!
|
28
|
+
echo.
|
29
|
+
echo Test 1 PASSED - Basic batch functionality works
|
30
|
+
echo Press Enter to continue...
|
31
|
+
call :maybe_pause
|
32
|
+
|
33
|
+
:: Test 2: Python installation
|
34
|
+
echo.
|
35
|
+
echo ========================================
|
36
|
+
echo Test 2: Python Installation
|
37
|
+
echo ========================================
|
38
|
+
echo Testing Python installation...
|
39
|
+
python --version >nul 2>&1
|
40
|
+
if errorlevel 1 (
|
41
|
+
echo ERROR: Python not found or not in PATH
|
42
|
+
echo Current PATH: %PATH%
|
43
|
+
echo.
|
44
|
+
echo Test 2 FAILED - Python not available
|
45
|
+
echo Press Enter to continue anyway...
|
46
|
+
call :maybe_pause
|
47
|
+
) else (
|
48
|
+
echo Python found successfully
|
49
|
+
python --version
|
50
|
+
echo.
|
51
|
+
echo Test 2 PASSED - Python installation OK
|
52
|
+
echo Press Enter to continue...
|
53
|
+
call :maybe_pause
|
54
|
+
)
|
55
|
+
|
56
|
+
:: Test 3: Directory structure
|
57
|
+
echo.
|
58
|
+
echo ========================================
|
59
|
+
echo Test 3: Directory Structure
|
60
|
+
echo ========================================
|
61
|
+
echo Testing directory structure...
|
62
|
+
echo Current directory contents:
|
63
|
+
dir /b
|
64
|
+
echo.
|
65
|
+
echo Testing MediBot directory:
|
66
|
+
if exist "MediBot" (
|
67
|
+
echo MediBot directory exists
|
68
|
+
echo MediBot contents:
|
69
|
+
dir /b MediBot
|
70
|
+
) else (
|
71
|
+
echo WARNING: MediBot directory not found
|
72
|
+
)
|
73
|
+
echo.
|
74
|
+
echo Test 3 PASSED - Directory structure checked
|
75
|
+
echo Press Enter to continue...
|
76
|
+
call :maybe_pause
|
77
|
+
|
78
|
+
:: Test 4: F: drive access
|
79
|
+
echo.
|
80
|
+
echo ========================================
|
81
|
+
echo Test 4: F: Drive Access
|
82
|
+
echo ========================================
|
83
|
+
echo Testing F: drive access...
|
84
|
+
if exist "F:\" (
|
85
|
+
echo F: drive exists
|
86
|
+
if exist "F:\Medibot" (
|
87
|
+
echo F:\Medibot directory exists
|
88
|
+
echo F:\Medibot contents:
|
89
|
+
dir /b "F:\Medibot" 2>nul || echo Cannot list F:\Medibot contents
|
90
|
+
) else (
|
91
|
+
echo F:\Medibot directory does not exist
|
92
|
+
)
|
93
|
+
) else (
|
94
|
+
echo F: drive does not exist
|
95
|
+
)
|
96
|
+
echo.
|
97
|
+
echo Test 4 PASSED - F: drive access checked
|
98
|
+
echo Press Enter to continue...
|
99
|
+
call :maybe_pause
|
100
|
+
|
101
|
+
:: Test 5: Python package access
|
102
|
+
echo.
|
103
|
+
echo ========================================
|
104
|
+
echo Test 5: Python Package Access
|
105
|
+
echo ========================================
|
106
|
+
echo Testing Python package access...
|
107
|
+
echo Testing pkg_resources import...
|
108
|
+
python -c "import pkg_resources" 2>nul
|
109
|
+
if errorlevel 1 (
|
110
|
+
echo ERROR: pkg_resources not available
|
111
|
+
) else (
|
112
|
+
echo pkg_resources import successful
|
113
|
+
)
|
114
|
+
|
115
|
+
echo Testing MediCafe package...
|
116
|
+
python -c "import pkg_resources; print('MediCafe=='+pkg_resources.get_distribution('medicafe').version)" 2>nul
|
117
|
+
if errorlevel 1 (
|
118
|
+
echo ERROR: MediCafe package not found or error accessing
|
119
|
+
) else (
|
120
|
+
echo MediCafe package found
|
121
|
+
)
|
122
|
+
echo.
|
123
|
+
echo Test 5 PASSED - Python package access checked
|
124
|
+
echo Press Enter to continue...
|
125
|
+
call :maybe_pause
|
126
|
+
|
127
|
+
:: Test 6: Internet connectivity
|
128
|
+
echo.
|
129
|
+
echo ========================================
|
130
|
+
echo Test 6: Internet Connectivity
|
131
|
+
echo ========================================
|
132
|
+
echo Testing internet connectivity...
|
133
|
+
ping -n 1 google.com >nul 2>&1
|
134
|
+
if errorlevel 1 (
|
135
|
+
echo WARNING: No internet connection detected
|
136
|
+
) else (
|
137
|
+
echo Internet connection detected
|
138
|
+
)
|
139
|
+
echo.
|
140
|
+
echo Test 6 PASSED - Internet connectivity checked
|
141
|
+
echo Press Enter to continue...
|
142
|
+
call :maybe_pause
|
143
|
+
|
144
|
+
:: Test 7: Configuration file
|
145
|
+
echo.
|
146
|
+
echo ========================================
|
147
|
+
echo Test 7: Configuration File
|
148
|
+
echo ========================================
|
149
|
+
echo Testing configuration file access...
|
150
|
+
set "config_file=MediBot\json\config.json"
|
151
|
+
echo Checking for config file: %config_file%
|
152
|
+
if exist "%config_file%" (
|
153
|
+
echo Config file exists
|
154
|
+
) else (
|
155
|
+
echo WARNING: Config file not found
|
156
|
+
)
|
157
|
+
echo.
|
158
|
+
echo Test 7 PASSED - Configuration file checked
|
159
|
+
echo Press Enter to continue...
|
160
|
+
call :maybe_pause
|
161
|
+
|
162
|
+
:: Test 8: Update script files
|
163
|
+
echo.
|
164
|
+
echo ========================================
|
165
|
+
echo Test 8: Update Script Files
|
166
|
+
echo ========================================
|
167
|
+
echo Testing update script files...
|
168
|
+
set "upgrade_medicafe_local=MediBot\update_medicafe.py"
|
169
|
+
set "upgrade_medicafe_legacy=F:\Medibot\update_medicafe.py"
|
170
|
+
|
171
|
+
echo Checking local update script: %upgrade_medicafe_local%
|
172
|
+
if exist "%upgrade_medicafe_local%" (
|
173
|
+
echo Local update script found
|
174
|
+
) else (
|
175
|
+
echo Local update script not found
|
176
|
+
)
|
177
|
+
|
178
|
+
echo Checking legacy update script: %upgrade_medicafe_legacy%
|
179
|
+
if exist "%upgrade_medicafe_legacy%" (
|
180
|
+
echo Legacy update script found
|
181
|
+
) else (
|
182
|
+
echo Legacy update script not found
|
183
|
+
)
|
184
|
+
echo.
|
185
|
+
echo Test 8 PASSED - Update script files checked
|
186
|
+
echo Press Enter to continue...
|
187
|
+
call :maybe_pause
|
188
|
+
|
189
|
+
:: Test 9: Python module imports
|
190
|
+
echo.
|
191
|
+
echo ========================================
|
192
|
+
echo Test 9: Python Module Imports
|
193
|
+
echo ========================================
|
194
|
+
echo Testing Python module imports...
|
195
|
+
echo Testing sys module...
|
196
|
+
python -c "import sys; print('Python version:', sys.version)" 2>nul
|
197
|
+
if errorlevel 1 (
|
198
|
+
echo ERROR: sys module import failed
|
199
|
+
) else (
|
200
|
+
echo sys module import successful
|
201
|
+
)
|
202
|
+
|
203
|
+
echo Testing MediCafe module...
|
204
|
+
python -c "import MediCafe" 2>nul
|
205
|
+
if errorlevel 1 (
|
206
|
+
echo ERROR: MediCafe module import failed
|
207
|
+
) else (
|
208
|
+
echo MediCafe module import successful
|
209
|
+
)
|
210
|
+
echo.
|
211
|
+
echo Test 9 PASSED - Python module imports checked
|
212
|
+
echo Press Enter to continue...
|
213
|
+
call :maybe_pause
|
214
|
+
|
215
|
+
:: Test 10: Command execution
|
216
|
+
echo.
|
217
|
+
echo ========================================
|
218
|
+
echo Test 10: Command Execution
|
219
|
+
echo ========================================
|
220
|
+
echo Testing command execution...
|
221
|
+
echo Testing simple command...
|
222
|
+
echo Hello World
|
223
|
+
if errorlevel 1 (
|
224
|
+
echo ERROR: Simple command execution failed
|
225
|
+
) else (
|
226
|
+
echo Simple command execution successful
|
227
|
+
)
|
228
|
+
|
229
|
+
echo Testing Python command execution...
|
230
|
+
python -c "print('Python command execution test')" 2>nul
|
231
|
+
if errorlevel 1 (
|
232
|
+
echo ERROR: Python command execution failed
|
233
|
+
) else (
|
234
|
+
echo Python command execution successful
|
235
|
+
)
|
236
|
+
echo.
|
237
|
+
echo Test 10 PASSED - Command execution checked
|
238
|
+
echo Press Enter to continue...
|
239
|
+
call :maybe_pause
|
240
|
+
|
241
|
+
:: Test 11: File operations
|
242
|
+
echo.
|
243
|
+
echo ========================================
|
244
|
+
echo Test 11: File Operations
|
245
|
+
echo ========================================
|
246
|
+
echo Testing file operations...
|
247
|
+
echo Creating test file...
|
248
|
+
echo Test content > test_file.txt
|
249
|
+
if exist "test_file.txt" (
|
250
|
+
echo Test file created successfully
|
251
|
+
echo Test file contents:
|
252
|
+
type test_file.txt
|
253
|
+
echo Deleting test file...
|
254
|
+
del test_file.txt
|
255
|
+
if not exist "test_file.txt" (
|
256
|
+
echo Test file deleted successfully
|
257
|
+
) else (
|
258
|
+
echo ERROR: Could not delete test file
|
259
|
+
)
|
260
|
+
) else (
|
261
|
+
echo ERROR: Could not create test file
|
262
|
+
)
|
263
|
+
echo.
|
264
|
+
echo Test 11 PASSED - File operations checked
|
265
|
+
echo Press Enter to continue...
|
266
|
+
pause >nul
|
267
|
+
|
268
|
+
:: Test 12: Menu functionality
|
269
|
+
if not defined NON_INTERACTIVE (
|
270
|
+
echo.
|
271
|
+
echo ========================================
|
272
|
+
echo Test 12: Menu Functionality
|
273
|
+
echo ========================================
|
274
|
+
echo Testing menu functionality...
|
275
|
+
echo.
|
276
|
+
echo Test Menu:
|
277
|
+
echo 1. Option 1
|
278
|
+
echo 2. Option 2
|
279
|
+
echo 3. Exit
|
280
|
+
echo.
|
281
|
+
set /p menu_choice="Enter choice (1-3): "
|
282
|
+
if "!menu_choice!"=="1" (
|
283
|
+
echo Option 1 selected
|
284
|
+
) else if "!menu_choice!"=="2" (
|
285
|
+
echo Option 2 selected
|
286
|
+
) else if "!menu_choice!"=="3" (
|
287
|
+
echo Exit selected
|
288
|
+
) else (
|
289
|
+
echo Invalid choice: !menu_choice!
|
290
|
+
)
|
291
|
+
echo.
|
292
|
+
echo Test 12 PASSED - Menu functionality checked
|
293
|
+
echo Press Enter to continue...
|
294
|
+
call :maybe_pause
|
295
|
+
)
|
296
|
+
|
297
|
+
:: Final summary
|
298
|
+
echo.
|
299
|
+
echo ========================================
|
300
|
+
echo DIAGNOSTIC SUMMARY
|
301
|
+
echo ========================================
|
302
|
+
echo.
|
303
|
+
echo All diagnostic tests completed.
|
304
|
+
echo.
|
305
|
+
echo If the batch file is still crashing, the issue is likely:
|
306
|
+
echo 1. A specific command or operation not tested here
|
307
|
+
echo 2. A timing issue or race condition
|
308
|
+
echo 3. A specific file or path that doesn't exist
|
309
|
+
echo 4. A Python module dependency issue
|
310
|
+
echo 5. A Windows XP compatibility issue
|
311
|
+
echo.
|
312
|
+
echo Recommendations:
|
313
|
+
echo 1. Run the debug version (MediBot_debug.bat) to see exactly where it fails
|
314
|
+
echo 2. Check Windows Event Viewer for any error messages
|
315
|
+
echo 3. Try running the batch file from a command prompt to see error output
|
316
|
+
echo 4. Check if any antivirus software is blocking the execution
|
317
|
+
echo.
|
318
|
+
echo Press Enter to exit...
|
319
|
+
call :maybe_pause
|
320
|
+
exit /b 0
|
321
|
+
|
322
|
+
:maybe_pause
|
323
|
+
if defined NON_INTERACTIVE goto :eof
|
324
|
+
pause >nul
|
325
|
+
goto :eof
|