{"id":28555114,"url":"https://github.com/armanjscript/medical-test-report-analyzer","last_synced_at":"2026-05-05T14:32:43.817Z","repository":{"id":297003109,"uuid":"995322120","full_name":"armanjscript/Medical-Test-Report-Analyzer","owner":"armanjscript","description":"a powerful Python application designed to make medical test reports accessible to everyone. By uploading an image of a medical test report (e.g., blood tests, X-rays), users receive a clear, concise interpretation of their health status, including any abnormal results and actionable recommendations.","archived":false,"fork":false,"pushed_at":"2025-06-03T10:00:50.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-03T20:57:41.078Z","etag":null,"topics":["langchain","langchain-ollama","medical-report-analysis","medical-tests","ollama","pytesseract","pytesseract-ocr","python","qwen2-5","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armanjscript.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-03T09:57:47.000Z","updated_at":"2025-06-03T10:33:17.000Z","dependencies_parsed_at":"2025-06-08T02:48:32.156Z","dependency_job_id":null,"html_url":"https://github.com/armanjscript/Medical-Test-Report-Analyzer","commit_stats":null,"previous_names":["armanjscript/medical-test-report-analyzer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/armanjscript/Medical-Test-Report-Analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FMedical-Test-Report-Analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FMedical-Test-Report-Analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FMedical-Test-Report-Analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FMedical-Test-Report-Analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armanjscript","download_url":"https://codeload.github.com/armanjscript/Medical-Test-Report-Analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FMedical-Test-Report-Analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["langchain","langchain-ollama","medical-report-analysis","medical-tests","ollama","pytesseract","pytesseract-ocr","python","qwen2-5","streamlit"],"created_at":"2025-06-10T05:35:04.452Z","updated_at":"2026-05-05T14:32:43.810Z","avatar_url":"https://github.com/armanjscript.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Medical Test Report Analyzer\n\n## Description\n\nWelcome to the **Medical Test Report Analyzer**, a powerful Python application designed to make medical test reports accessible to everyone. By uploading an image of a medical test report (e.g., blood tests, X-rays), users receive a clear, concise interpretation of their health status, including any abnormal results and actionable recommendations. This tool combines **Optical Character Recognition (OCR)** with advanced AI to extract and analyze text, presenting results in an intuitive [Streamlit](https://streamlit.io/) web interface. Whether you're a non-medical user seeking clarity or a developer exploring AI in healthcare, this project offers a practical and innovative solution.\n\n## Why Use This Project?\n\n- **Simplify Medical Reports**: Get easy-to-understand explanations without medical expertise.\n- **AI-Driven Insights**: Leverage advanced language models for accurate health interpretations.\n- **User-Friendly Interface**: Upload images and view results effortlessly via Streamlit.\n- **Developer-Friendly**: Open-source with clear setup instructions for contributions.\n- **Privacy-Focused**: Runs locally with Ollama, ensuring data stays on your device.\n\n## Features\n\n- **Text Extraction**: Uses [Pytesseract](https://github.com/tesseract-ocr/tesseract) for accurate OCR to extract text from image-based reports.\n- **AI-Powered Analysis**: Employs [Ollama](https://ollama.com/) with the \"qwen2.5:latest\" model to generate user-friendly health summaries.\n- **Intuitive Interface**: Built with Streamlit, offering seamless image uploads and result displays.\n- **Structured Workflow**: Utilizes [LangGraph](https://langchain-ai.github.io/langgraph/) to manage the process from upload to interpretation.\n- **Robust Error Handling**: Includes logging and checks for issues like failed OCR or AI processing.\n- **Structured Output**: Provides a health status summary, abnormal results, and recommendations.\n\n## Installation\n\nFollow these steps to set up the Medical Test Report Analyzer:\n\n1. **Install Python 3.8 or Higher**:\n   - Download from [Python.org](https://www.python.org/downloads/).\n   - Verify installation:\n     ```bash\n     python --version\n     ```\n\n2. **Install Required Libraries**:\n   - Install dependencies using pip:\n     ```bash\n     pip install streamlit pillow langgraph langchain-core langchain-ollama pytesseract\n     ```\n\n3. **Install Tesseract OCR**:\n   - **Windows**: Download from [Tesseract GitHub](https://github.com/UB-Mannheim/tesseract/wiki) and add to your system PATH.\n   - **Linux/Mac**: Install via package manager:\n     ```bash\n     # Ubuntu/Debian\n     sudo apt-get install tesseract-ocr\n     # macOS (with Homebrew)\n     brew install tesseract\n     ```\n\n4. **Set up Ollama**:\n   - Install from [Ollama.com](https://ollama.com/).\n   - Pull the required model:\n     ```bash\n     ollama pull qwen2.5\n     ```\n   - Start Ollama:\n     ```bash\n     ollama serve\n     ```\n\n5. **Clone the Repository**:\n   - ```bash\n     git clone https://github.com/armanjscript/Medical-Test-Report-Analyzer.git\n     ```\n\n6. **Navigate to the Project Directory**:\n   - ```bash\n     cd Medical-Test-Report-Analyzer\n     ```\n\n7. **Run the Application**:\n   - ```bash\n     streamlit run main.py\n     ```\n\n**Note**: Ensure sufficient computational resources (e.g., 16GB RAM, CPU/GPU) for running the AI model. An internet connection is required for initial setup.\n\n## Usage\n\n1. **Launch the Application**:\n   - Run `streamlit run main.py` to open the app in your default web browser.\n\n2. **Upload an Image**:\n   - Click the \"Upload Image\" button and select a medical test report image (PNG, JPG, JPEG).\n\n3. **View Results**:\n   - The app displays:\n     - Extracted text from the image.\n     - An AI-generated interpretation, including:\n       - Health status summary.\n       - Abnormal results (if any).\n       - Recommendations for next steps.\n\n**Example**:\n- Upload a blood test image with \"Hemoglobin: 12.5 g/dL, WBC: 7.2 x10^9/L\".\n- The app extracts the text and provides: \"Your hemoglobin is normal, but your WBC count is slightly elevated. Consult a doctor for further evaluation.\"\n\n## Technologies Used\n\n| Technology       | Role                                                                 |\n|------------------|----------------------------------------------------------------------|\n| **Python**       | Primary programming language.                                        |\n| **Streamlit**    | Creates the interactive web interface.                               |\n| **PIL (Pillow)** | Handles image processing and uploads.                                |\n| **LangGraph**    | Manages the workflow from upload to analysis.                         |\n| **LangChain**    | Integrates with the language model and structures prompts.            |\n| **OllamaLLM**    | Runs the \"qwen2.5:latest\" model for medical interpretations.          |\n| **Pytesseract**  | Performs OCR to extract text from images.                             |\n| **Logging**      | Tracks operations and aids debugging.                                |\n| **Regular Expressions** | Cleans and processes extracted text.                           |\n\n## Contributing\n\nContributions are encouraged! To contribute:\n- Fork the repository on [GitHub](https://github.com).\n- Create a new branch for your changes.\n- Submit a pull request with a clear description.\n- For bug reports or feature requests, open an issue.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or feedback, open an issue on [GitHub](https://github.com/armanjscript) or [armannew73@gmail.com].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanjscript%2Fmedical-test-report-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanjscript%2Fmedical-test-report-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanjscript%2Fmedical-test-report-analyzer/lists"}