# Medical Brain AI Assistant - User Guide ## 📋 Table of Contents - [Getting Started](#getting-started) - [Interface Overview](#interface-overview) - [Working with Files](#working-with-files) - [Processing Data](#processing-data) - [Troubleshooting](#troubleshooting) ## 🚀 Getting Started 1. Open the application in your web browser (default local machine: http://localhost:7860) 2. The interface consists of three main tabs: - Prompt Settings - Data Processing - Batch Processing ## 💻 Interface Overview ### 📝 Prompt Settings Tab This tab allows you to customize how the AI processes messages: - **Normal Prompt**: Configure how the AI analyzes regular Medical Brain messages - **Stay Tuned Prompt**: Configure processing for "stay tuned" type messages - **Update Button**: Save your prompt changes - **Status**: Shows if your changes were successful ### 🔍 Data Processing Tab Main workspace for analyzing individual messages: 1. **File Upload Section**: - Upload your JSON file - View file information - See patient summary - Review chat history 2. **Processing Section**: - Enter Medical Brain message number - Select AI provider (OpenAI/Anthropic/Azure) - View processing results ### ⚡ Batch Processing Tab For processing multiple messages at once: - Select multiple AI providers - Process entire file - Download results as CSV ## 📁 Working with Files ### Supported File Format The application accepts JSON files with the following structure: { "Messages": [...], "Ims": { "highlights": [...] } } ### File Processing Steps 1. Upload your JSON file 2. Wait for initial processing 3. Review the chat history 4. Note the numbers of Medical Brain messages ## 🔄 Processing Data ### Single Message Processing 1. Find the Medical Brain message number in chat history 2. Enter this number in the "Row Number" field 3. Select your preferred AI provider 4. Click "Process Row" 5. Review the results ### Batch Processing 1. Select one or more AI providers 2. Click "Start Batch Processing" 3. Wait for processing to complete 4. Download the CSV file with results ## ❗ Troubleshooting ### Common Issues 1. **File Upload Errors** - Ensure your JSON file has the correct format - Check file size (max 100MB) 2. **Processing Errors** - Verify API keys are correctly set - Check internet connection - Ensure message numbers are valid 3. **Result Display Issues** - Refresh the page - Try processing the message again - Check browser console for errors ### Error Messages - "⚠️ Please upload a file first" - Solution: Upload a JSON file before processing - "⚠️ Row X is not a Medical Brain message" - Solution: Enter a valid Medical Brain message number from chat history - "❌ Processing error" - Solution: Check API keys and internet connection ## 📞 Support If you encounter issues not covered in this guide: 1. Check the application logs in the `logs/` directory 2. Create an issue in the GitHub repository 3. Include error messages and steps to reproduce the problem