Skip to content

Paryay/AI-Formulary-Inteligence-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Formulary Intelligence Platform

Intelligent formulary change detection and analysis system for healthcare organizations.

Python Streamlit License


🌐 Live Demo

πŸ”— Try it now β†’

Upload your own formulary files and see instant analysis. No installation required!

(Deploy your app first, then replace the URL above with your actual Streamlit URL)


⚑ Quick Start

Option 1: Interactive Web Demo (Easiest)

Visit the live demo above - upload files and analyze instantly!

Option 2: Run Locally

# Clone repository
git clone https://github.com/your-username/ai-formulary-intelligence.git
cd ai-formulary-intelligence

# Install dependencies
pip install -r requirements.txt

# Launch Streamlit app
streamlit run app.py

Open http://localhost:8501 in your browser.

Option 3: Command-Line Tools

# Analyze single carrier
python src/formulary_delta_processor.py february.csv \
    --carrier "CarrierName" \
    --keys RXCUI

# Batch process multiple carriers
python src/batch_processor.py data/

# Generate SQL for database loading
python src/generate_sql.py \
    --carrier UHC \
    --timestamp 20240215_103045 \
    --keys RXCUI

πŸ“Š Features

Interactive Web App

  • βœ… Upload and compare formulary files
  • βœ… Automatic change detection (added/deleted/modified)
  • βœ… Support for multiple file formats (pipe, CSV, TSV)
  • βœ… Real-time analysis (processes 500K+ records in seconds)
  • βœ… Export results as CSV
  • βœ… Download summary reports

Command-Line Tools

  • βœ… Batch processing for multiple carriers
  • βœ… Historical tracking and archiving
  • βœ… SQL script generation for database loads
  • βœ… Detailed change categorization
  • βœ… AI-powered insights (optional with Claude API)

Change Detection Types

  • Formulary additions and deletions
  • Tier changes (1β†’2, 2β†’3, etc.)
  • Prior Authorization (PA) updates
  • Step Therapy (ST) requirements
  • Quantity Limit (QL) modifications
  • Copay/coinsurance changes
  • Specialty designation updates

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Interactive Web Interface          β”‚
β”‚         (Streamlit App)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Analysis Engine (Python)           β”‚
β”‚  β€’ Multi-format parser                  β”‚
β”‚  β€’ Delta detection                      β”‚
β”‚  β€’ Change categorization                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Output & Integration Layer           β”‚
β”‚  β€’ CSV exports                          β”‚
β”‚  β€’ SQL generation                       β”‚
β”‚  β€’ Summary reports                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

ai-formulary-intelligence/
β”‚
β”œβ”€β”€ app.py                    # Streamlit web application
β”œβ”€β”€ requirements.txt          # Python dependencies
β”œβ”€β”€ README.md                 # This file
β”‚
β”œβ”€β”€ src/                      # Core analysis modules
β”‚   β”œβ”€β”€ ai_formulary_analyzer.py
β”‚   β”œβ”€β”€ formulary_delta_processor.py
β”‚   β”œβ”€β”€ claude_api_integration.py
β”‚   β”œβ”€β”€ batch_processor.py
β”‚   └── generate_sql.py
β”‚
β”œβ”€β”€ web/                      # Alternative web interface
β”‚   └── index.html
β”‚
β”œβ”€β”€ docs/                     # Documentation
β”‚   β”œβ”€β”€ DEPLOYMENT_GUIDE.md
β”‚   └── ARCHITECTURE.md
β”‚
└── examples/                 # Sample data
    └── sample_output/

🎯 Use Cases

Pharmacy Operations

  • Identify drugs requiring new prior authorization
  • Track quantity limit changes
  • Monitor formulary additions/deletions

Clinical Teams

  • Detect therapeutic substitutions
  • Review specialty designation changes
  • Assess patient impact of restrictions

Finance Teams

  • Calculate cost impact of tier changes
  • Estimate copay shift to members
  • Project administrative burden

IT/Data Teams

  • Generate SQL for incremental database updates
  • Export change data for downstream systems
  • Automate monthly processing workflows

πŸ’» Tech Stack

  • Python 3.8+ - Core language
  • Streamlit - Interactive web interface
  • Pandas - Data processing and analysis
  • Claude AI - Intelligent insights (optional)

πŸ“ˆ Performance

  • Processes 500,000+ records in ~30 seconds
  • Handles files up to 100MB+
  • Tested with CMS PUF formulary data (57MB files)
  • Efficient delta detection using set operations

πŸš€ Deployment

Deploy to Streamlit Cloud (Free)

  1. Push your code to GitHub
  2. Visit share.streamlit.io
  3. Connect your repository
  4. Click "Deploy"

Your app will be live at: https://your-app.streamlit.app

Full deployment guide β†’


πŸ“– Documentation


🀝 Contributing

Contributions welcome! Please open an issue or submit a pull request.


πŸ“„ License

MIT License - see LICENSE for details.


**

Built to solve real healthcare data challenges. Questions? Open an issue!

About

Built to eliminate 40+ hours of manual pharmacy work monthly. AI-powered solution for healthcare formulary management. Product case study included.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors