@echo off
setlocal EnableExtensions
cd /d "%~dp0"
:menu
cls
echo ================================================================
echo  PhUCKIT Real-World Test RC16B
echo ================================================================
echo.
echo  1. Start PhUCKIT
echo  2. Start Clinical Research Workbench
echo  3. Open Clinical Reasoning Database
echo  4. Run Full Diagnostics
echo  5. Repair runtimes and shortcuts
echo  6. Open Clinical Reasoning Database folder
echo  7. Open logs
echo  8. Manage runtime truth bundles
echo  9. Read setup guide
echo  0. Exit
echo.
choice /c 1234567890 /n /m "Choose: "
if errorlevel 10 exit /b 0
if errorlevel 9 start "" "%CD%\Docs\WINDOWS_SETUP_AND_TEST_GUIDE.html" & goto menu
if errorlevel 8 call "%CD%\MANAGE_TRUTH_BUNDLES.cmd" & goto menu
if errorlevel 7 if not exist "%CD%\Logs" mkdir "%CD%\Logs" & start "" "%CD%\Logs" & goto menu
if errorlevel 6 start "" "%CD%\ClinicalReasoningDatabase" & goto menu
if errorlevel 5 call "%CD%\Installer\INSTALL_OR_REPAIR.cmd" & pause & goto menu
if errorlevel 4 call "%CD%\Tests\RUN_DIAGNOSTICS.cmd" & pause & goto menu
if errorlevel 3 call "%CD%\OPEN_CLINICAL_REASONING_DATABASE.cmd" & goto menu
if errorlevel 2 call "%CD%\START_RESEARCH_WORKBENCH.cmd" & goto menu
if errorlevel 1 call "%CD%\START_PHUCKIT.cmd" & pause & goto menu
