Skip to main content

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 automation
  • medicafe medilink - Run MediLink claims processing interface
  • medicafe claims_status - Check UnitedHealthcare claim status
  • medicafe deductible - Check UnitedHealthcare deductible information
  • medicafe download_emails - Download payer emails via Gmail (future work)
  • medicafe send_error_report - Generate and email support bundle
  • medicafe 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:

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.py and 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

  1. Import Errors: Ensure the project root is in PYTHONPATH or use python -m MediCafe
  2. API Authentication: Verify credentials in json/config.json
  3. File Path Issues: Check CSV_FILE_PATH and other path configurations
  4. 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:

  1. Open an issue for bugs or feature requests
  2. Include Python version, OS, and exact command/error details
  3. 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


Note: MediCafe is designed for healthcare administrative workflows. Ensure proper HIPAA compliance and security measures are in place for production deployments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

medicafe-0.251227.0.tar.gz (554.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

medicafe-0.251227.0-py3-none-any.whl (602.0 kB view details)

Uploaded Python 3

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

Hashes for medicafe-0.251227.0.tar.gz
Algorithm Hash digest
SHA256 d8c718600b5379a2daa1580895e467c5fa7ff3147d82437ff4f5307e1284b710
MD5 61cdfdd0a87a9d52fe03b49ffcad8888
BLAKE2b-256 1b367c46f7c8aaa7bbca5b1245e60cd9f3342676701e09fd6de6b13d17baa519

See more details on using hashes here.

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

Hashes for medicafe-0.251227.0-py3-none-any.whl
Algorithm Hash digest
SHA256 312f80406ecbc8d8a2f76562e167908b6a9bd8737e64d7642323bacd8643fa38
MD5 7b8c1b5f92b355c9a019e71f926d82cb
BLAKE2b-256 828b2fc5f79c7e56094cc3287d0ac77efea972ad53a1bfe73d48bc9d82694a51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page