MediCafe
Project description
MediCafe
Comprehensive Healthcare Data Processing and Claims Management System
MediCafe is a production-ready healthcare automation suite designed to streamline medical practice administrative workflows. The system automates data processing, claims submission, payer communication, and revenue cycle management tasks for healthcare providers.
๐ฏ Overview
MediCafe consists of two integrated components:
- MediBot: Automated document processing, data validation, and Medisoft data entry automation
- MediLink: Claims submission, payer API integration, EDI processing (837P, 835, 999, 277CA), and eligibility verification
Key Capabilities
- Claims Management: Generate and submit 837P claims with COB (Coordination of Benefits) support
- Payer API Integration: Direct integration with UnitedHealthcare (UHCAPI), OptumAI, Availity, and PNT Data
- Eligibility & Status: Real-time eligibility verification, claim status checking, and deductible inquiry
- ERA Processing: Automated 835 remittance processing and reconciliation
- Data Processing: CSV parsing, validation, crosswalk mapping, and fixed-width file handling
- Performance Optimized: 70-85% faster processing through algorithmic improvements and caching
๐ Installation
Standard Installation
pip install medicafe
Virtual Environment (Recommended)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install medicafe
Development Installation
git clone https://github.com/katanada2/MediCafe.git
cd MediCafe
pip install -e .
๐ Quick Start
Command-Line Interface
MediCafe provides a unified command-line entry point:
# Show available commands
medicafe --help
# Or using Python module syntax
python -m MediCafe --help
Available Commands
medicafe medibot [config_file]- Run MediBot data entry automationmedicafe medilink- Run MediLink claims processing interfacemedicafe claims_status- Check UnitedHealthcare claim statusmedicafe deductible- Check UnitedHealthcare deductible informationmedicafe download_emails- Download payer emails via Gmail (future work)medicafe send_error_report- Generate and email support bundlemedicafe version- Display version information
Example Workflows
Process and submit claims:
medicafe medilink
Check claim status for recent submissions:
medicafe claims_status
Verify patient deductibles:
medicafe deductible
๐ง Configuration
MediCafe uses JSON-based configuration files located in the json/ directory:
config.json- Main system configuration (API endpoints, credentials, file paths)crosswalk.json- Data mapping tables (payer IDs, diagnosis codes, procedure codes)medisoftconfig.json- Medisoft-specific settings
See docs/MEDICAFE_MASTER_GUIDE.md for detailed configuration instructions.
๐ API Integrations
Supported Payer APIs
- UnitedHealthcare (UHCAPI): Eligibility, claim status, deductible inquiry
- OptumAI: Real Claims Inquiry (GraphQL), eligibility verification
- Availity: Claims submission, ERA processing, acknowledgments
- PNT Data: Claims routing and processing
Supported EDI Transactions
- 837P: Professional claims submission
- 835: Electronic Remittance Advice (ERA)
- 999: Implementation Acknowledgment
- 277CA: Claim Status Response
- 270/271: Eligibility Inquiry/Response
๐ Documentation
Comprehensive documentation is available in the docs/ directory:
- Master System Guide - Complete system documentation
- API Architecture Guide - API client implementation details
- COB/Medicare Integration Guide - Coordination of Benefits implementation
- Deductibles Workflow Guide - Deductible checking workflow
- OPTUM Integration Roadmap - OptumAI integration details
- Testing Guide - Test suite documentation
See docs/README.md for the complete documentation index.
๐ ๏ธ Future Work
Gmail Pipeline (Planned)
Automated email ingestion from payer communications is planned for future releases. The infrastructure exists in cloud/orchestrator/ but is not yet integrated into the main workflow.
See cloud/orchestrator/FRESH_SETUP_GUIDE.md for planned setup instructions.
โก Performance
Recent optimizations have significantly improved system performance:
- 70-85% faster overall processing time
- 80-95% reduction in API calls through intelligent caching
- Eliminated O(nยฒ) complexity in data processing operations
- Optimized memory management for constrained environments
See docs/PERFORMANCE_OPTIMIZATION_SOLUTION.md for technical details.
๐ Security & Compliance
- HIPAA Compliance: No protected health information (PHI) in logs
- Secure Credential Management: OAuth 2.0 token-based authentication
- Error Reporting: Automated support bundle generation with PHI exclusion
- Audit Logging: Comprehensive logging for compliance and troubleshooting
๐ป System Requirements
Runtime Requirements (End Users)
- Python: 3.4.4+ (tested on legacy Windows XP environments)
- OS: Windows XP+ or Linux
- Memory: Optimized for constrained environments (~200 patients, ~100 parameters per patient)
Development/Build Requirements
- Python: 3.11+ (required for
build_package.pyand development tools) - Note: The build script requires Python 3.11+, but the built package targets Python 3.4.4+ for runtime compatibility
Modern Environments
MediCafe also runs on modern Python 3.5+ and Windows 10/11 systems. The codebase maintains backward compatibility while supporting newer Python features where available.
๐๏ธ Architecture
MediCafe/
โโโ MediBot/ # Data processing and automation
โ โโโ MediBot.py # Main entry point
โ โโโ MediBot_UI.py # User interface
โ โโโ MediBot_*.py # Processing modules
โโโ MediLink/ # Claims and API integration
โ โโโ MediLink_main.py # Main entry point
โ โโโ MediLink_UI.py # User interface
โ โโโ MediLink_*.py # Claims modules
โโโ MediCafe/ # Core utilities package
โ โโโ api_core.py # Unified API client
โ โโโ graphql_utils.py # GraphQL operations
โ โโโ core_utils.py # Shared utilities
โ โโโ MediLink_ConfigLoader.py # Configuration management
โโโ json/ # Configuration files
โโโ cloud/orchestrator/ # Gmail pipeline orchestration (future work)
โโโ tools/ # Utility scripts
โโโ docs/ # Comprehensive documentation
๐ Troubleshooting
Common Issues
- Import Errors: Ensure the project root is in
PYTHONPATHor usepython -m MediCafe - API Authentication: Verify credentials in
json/config.json - File Path Issues: Check
CSV_FILE_PATHand other path configurations - Python 3.4 Compatibility: Some features require Python 3.4.4+ syntax
Error Reporting
Generate a support bundle for troubleshooting:
medicafe send_error_report
This creates a comprehensive diagnostic package (excluding PHI) for support.
๐ Recent Improvements
2024-2025 Updates
- โ Cache Optimization (Nov 2025): Invalid code validation, date parsing consistency, +10-15% cache hit rate
- โ API Client Consolidation: Unified API client architecture
- โ Performance Optimizations: 70-85% faster processing
- โ Enhanced Error Handling: Detailed logging and user guidance
- โ COB Library Integration: Medicare secondary billing support
- โ OptumAI Integration: Real Claims Inquiry implementation
- โ Documentation Consolidation: Streamlined documentation structure
See docs/MEDICAFE_MASTER_GUIDE.md for complete changelog and docs/fixes/CACHE_FIXES_IMPLEMENTATION.md for cache optimization details.
๐ค Contributing
This is community-supported software. Contributions are welcome:
- Open an issue for bugs or feature requests
- Include Python version, OS, and exact command/error details
- Follow existing code style and Python 3.4.4 compatibility guidelines
๐ License
MIT License. See LICENSE file for details.
๐ค Author
Daniel Vidaud
Email: daniel@personalizedtransformation.com
๐ Links
- Source Code: GitHub Repository
- Issue Tracker: GitHub Issues
- Documentation: See
docs/README.mdfor complete documentation index
Note: MediCafe is designed for healthcare administrative workflows. Ensure proper HIPAA compliance and security measures are in place for production deployments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file medicafe-0.251227.0.tar.gz.
File metadata
- Download URL: medicafe-0.251227.0.tar.gz
- Upload date:
- Size: 554.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8c718600b5379a2daa1580895e467c5fa7ff3147d82437ff4f5307e1284b710
|
|
| MD5 |
61cdfdd0a87a9d52fe03b49ffcad8888
|
|
| BLAKE2b-256 |
1b367c46f7c8aaa7bbca5b1245e60cd9f3342676701e09fd6de6b13d17baa519
|
File details
Details for the file medicafe-0.251227.0-py3-none-any.whl.
File metadata
- Download URL: medicafe-0.251227.0-py3-none-any.whl
- Upload date:
- Size: 602.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
312f80406ecbc8d8a2f76562e167908b6a9bd8737e64d7642323bacd8643fa38
|
|
| MD5 |
7b8c1b5f92b355c9a019e71f926d82cb
|
|
| BLAKE2b-256 |
828b2fc5f79c7e56094cc3287d0ac77efea972ad53a1bfe73d48bc9d82694a51
|