How UniHealth Works
Our AI assistant combines 5 powerful capabilities to find your perfect Medicare plan. Real-time plan data, drug costs, and provider networks â all in one conversation.
From Question to Answer in Seconds
Our AI understands your question, activates the right capabilities, and delivers personalized answers.
You Ask
Type your Medicare question in plain English
AI Understands
Our AI identifies your needs and activates the right capabilities
Real Data
We query our Medicare database for current plan information
You Get Answers
Receive personalized recommendations with real costs
Powered by Official Government Sources
Every answer is backed by official documentation from CMS.gov, Medicare.gov, and SSA.gov â not random internet content.
What's in Our Knowledge Base
- âĸ Medicare rules & regulations
- âĸ Coverage decisions
- âĸ Enrollment procedures
- âĸ IRA drug pricing updates
- âĸ Medicare & You handbook
- âĸ Plan comparison guides
- âĸ Benefits explanations
- âĸ Educational materials
- âĸ Social Security Handbook
- âĸ Medicare eligibility rules
- âĸ Premium calculations
- âĸ Enrollment periods
Automatically refreshed monthly from official government sources
What We Check for Each Plan Type
Different plan types need different tools. Here's what our AI uses for each.
| Tool | đī¸Original | âMA | đPDP | đĄī¸Medigap | đώDVH |
|---|---|---|---|---|---|
1ī¸âŖ ELIGIBILITY & TIMING Can I enroll? When? Penalties? | |||||
Enrollment Periods IEP, AEP, OEP check | check_enrollment_period get_current_period() chat.py | check_enrollment_period get_current_period() chat.py | check_enrollment_period get_current_period() chat.py | â | â |
SEP Detection Special enrollment triggers | check_sep_eligibility detect_sep_triggers() chat.py | check_sep_eligibility detect_sep_triggers() chat.py | check_sep_eligibility detect_sep_triggers() chat.py | check_sep_eligibility detect_sep_triggers() chat.py | â |
Part B LEP Part B late penalty | partb_calculate_lep calc_partb_penalty() chat.py | partb_calculate_lep calc_partb_penalty() chat.py | â | â | â |
Part D LEP Part D late penalty | â | â | partd_calculate_lep facts.calculate_lep() facts.yaml | â | â |
2ī¸âŖ KNOWLEDGE What are my options? | |||||
Knowledge Search Medicare Q&A | medicare_search_knowledge rag_search() RAG DB | medicare_search_knowledge rag_search() RAG DB | medicare_search_knowledge rag_search() RAG DB | medicare_search_knowledge rag_search() RAG DB | medicare_search_knowledge rag_search() RAG DB |
3ī¸âŖ PLAN DISCOVERY What plans are available? | |||||
Plan Search Find plans in your ZIP | â | ma_search_plans get_plans_by_zip() Plans DB | pdp_search_plans get_pdp_plans() Plans DB | medigap_search_plansâ
csg_db.get_quotes() CSG API | dvh_search_plansâ
csg_dvh.get_quotes() CSG API |
Benefits Details Copays, deductibles, MOOP | â | ma_get_benefits get_plan_by_bid() Plans DB | pdp_get_benefits get_pdp_details() chat.py | medigap_get_benefits load medigap_plans.yaml YAML | dvh_get_benefits parse_plan_details() CSG API |
Plan Comparison Side-by-side compare | â | compare_plans compare_by_bids() chat.py | compare_plans compare_by_bids() chat.py | compare_plans compare_quotes() chat.py | compare_plans compare_quotes() chat.py |
4ī¸âŖ COVERAGE VALIDATION Will it work for me? | |||||
Provider Accepts Medicare Assignment status, opt-out | check_medicare_provider check_assignment_status() chat.py | â | â | check_medicare_provider check_assignment_status() chat.py | â |
Plan Network Check In-network vs out-of-network | â | ma_check_network check_provider_network() Plans DB | â | â | â |
Drug Cost Lookup Check medication costs | â | partd_check_drug get_drug_formulary() Plans DB | partd_check_drug get_drug_formulary() Plans DB | â | â |
Drug Restrictions PA, step therapy, QL | â | partd_check_drug calculate_optimal_drug_cost() db.py | partd_check_drug calculate_optimal_drug_cost() db.py | â | â |
Pharmacy Finder Preferred vs non-preferred | â | find_preferred_pharmacy get_pharmacy_network() chat.py | find_preferred_pharmacy get_pharmacy_network() chat.py | â | â |
5ī¸âŖ COST ANALYSIS What will it cost? | |||||
Total Cost Calculator Annual cost estimate | partab_get_costs facts.get_costs() facts.yaml | cost_estimate_total get_costs() + calc Plans DB | cost_estimate_total get_costs() + calc Plans DB | cost_estimate_total get_costs() + calc CSG + facts | cost_estimate_total get_costs() + calc CSG API |
IRMAA Calculator Income-based surcharges | get_irmaa facts.get_irmaa() facts.yaml | get_irmaa facts.get_irmaa() facts.yaml | get_irmaa facts.get_irmaa() facts.yaml | â | â |
6ī¸âŖ FINANCIAL ASSISTANCE Can I get help paying? | |||||
Extra Help / LIS Low income drug subsidy | â | check_lis_eligibility check_income_assets() chat.py | check_lis_eligibility check_income_assets() chat.py | â | â |
MSP Eligibility QMB, SLMB, QI programs | check_msp_eligibility check_state_msp() chat.py | â | â | â | â |
7ī¸âŖ SPECIAL SITUATIONS Edge cases & coordination | |||||
Medigap GI Rights Guaranteed issue check | â | â | â | medigap_check_gi check_gi_eligibility() rules.yaml | â |
SNP Eligibility D-SNP, C-SNP, I-SNP | â | check_snp_eligibility verify_snp_requirements() chat.py | â | â | â |
COB Rules Primary/secondary payer | check_cob_rules determine_payer_order() chat.py | check_cob_rules determine_payer_order() chat.py | check_cob_rules determine_payer_order() chat.py | check_cob_rules determine_payer_order() chat.py | â |
8ī¸âŖ ENROLLMENT Take action | |||||
Start Enrollment Begin signup process | â | enroll_save save_enrollment() Enrollment DB | enroll_save save_enrollment() Enrollment DB | enroll_save save_enrollment() Enrollment DB | enroll_save save_enrollment() Enrollment DB |
â Coverage Complete
Compliance Requirements Status
Medicare plan marketing requires compliance with CMS, HIPAA, state insurance, and consumer protection regulations.
TPMO Compliance
CMS Marketing
PECL (Pre-Enrollment)
State Insurance
HIPAA (Business Associate)
Privacy & Consumer
Accessibility
Policy Documents
Corporate Legal Structure
đ¨ Critical Gaps (Launch Blockers)
Technical Architecture
Under the hood: FastAPI backend, PostgreSQL on Sota, OpenRouter LLM, Sota Qwen3 embeddings, and 15 specialized tools.
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â FRONTEND (Next.js 14) â
â Vercel / localhost:3000 â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â /app/chat â ChatClient.tsx (real-time SSE streaming) â
â /app/how-it-works â Technical documentation â
â /app/api/chat â Proxy to backend â
â /components â PlanCard, DrugCost, ChatMessage, etc. â
ââââââââââââââââââââââââââââââââŦâââââââââââââââââââââââââââââââââââââââââââââââ
â POST /api/chat (SSE)
âŧ
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â BACKEND (FastAPI + Python) â
â On-Premises Infrastructure / localhost:8001 â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â chat.py âââââē Main endpoint, 15 tools, compliance injection â
â router.py âââē Question routing (TOOL vs RAG vs REDIRECT) â
â skills.py âââē Skill prompts (plan-finder, cost-calculator, etc.) â
â facts.py ââââē Single source of truth (accuracy_facts.yaml) â
â db.py âââââââē Database queries (plans, drugs, providers, RAG) â
ââââââââââââŦââââââââââââââââââââŦââââââââââââââââââââŦâââââââââââââââââââââââââââ
â â â
âŧ âŧ âŧ
ââââââââââââââââââââ ââââââââââââââââââââ ââââââââââââââââââââ ââââââââââââââââ
â Users DB â â Plans DB â â RAG DB â â OpenRouter â
â (Local PG) â â (Local PG) â â (pgvector) â â (GPT-4o) â
âââââââââââââââââââ⤠âââââââââââââââââââ⤠âââââââââââââââââââ⤠ââââââââââââââââ¤
â âĸ profiles â â âĸ 8,000+ plans â â âĸ 150K+ pages â â âĸ Chat â
â âĸ medications â â âĸ drug formulary â â âĸ CMS/Medicare â â âĸ Tools â
â âĸ doctors â â âĸ provider ntwk â â âĸ SSA handbook â â âĸ Embeddings â
ââââââââââââââââââââ ââââââââââââââââââââ ââââââââââââââââââââ ââââââââââââââââ
3 Isolated PostgreSQL Databases
PHI isolation, plan data separation, and vector search â each with dedicated connection pools.
Users DB
unihealth-users
Isolated PHI/PII storage with HIPAA-compliant access controls.
Plans DB
unihealth-systems
CMS plan data + CSG cached quotes for fast lookups.
RAG DB
pgvector
Vector embeddings for semantic Medicare Q&A search.
âī¸ Data Flow
Dagster ETL Orchestration
Running on On-Premises Infrastructure
18 automated pipelines process data from 47+ original sources monthly, keeping our Medicare database fresh and accurate.
MA2 Pipeline â Medicare Advantage Plans
Quarterly âĸ CMS Plan Benefit Package (PBP) Files
đĨ Data Sources & Steps
đ Output Tables
PDP Pipeline â Prescription Drug Plans
Monthly âĸ CMS Part D Files + Formulary Data
đĨ Data Sources
đ Output Tables
Provider Hybrid Pipeline â 7M+ NPIs
Monthly âĸ 16 Government Data Sources
đĨ Data Sources (16)
đ Output Tables
Provider Directory Pipeline â 160M+ NPI-BID Mappings
Monthly âĸ FHIR APIs + Carrier Directories
đ FHIR API Sources (Public)
đĨ Additional Carrier Sources (12)
đ Output Tables
Star Ratings Pipeline â Plan Quality Scores
Annual (October) âĸ CMS Quality Rating System
đĨ Data Sources
đ Output Tables
Enrollments Pipeline â Plan Membership Data
Monthly âĸ CMS Monthly Enrollment Files
đĨ Data Sources
đ Output Tables
RAG Pipeline â Medicare Knowledge Base
As Needed âĸ Official Government Sources
đĨ Data Sources (10 parallel scrapers)
đ Output Tables
Zipcode Pipeline â Geographic Mapping
Annual âĸ USPS + Census Bureau
đĨ Data Sources
đ Output Tables
HCPCS/CPT Pipeline â Medical Codes
Annual (January 15) âĸ NLM UMLS
đĨ Data Sources
đ Output Tables
Plan Provider Stats Pipeline â Network Analytics
After Provider Load âĸ Derived/Aggregated
đĨ Source Tables
đ Output Tables
Ready to Experience Smart Medicare Guidance?
Ask any question. Our AI will activate the right capabilities and give you answers in seconds.
Start ChattingâNo signup required âĸ Free to use