Technical specifications for building an AI-powered medication price transparency platform
Mimi is an AI-powered medication cost guide that provides real-time price transparency across all payment options: insured prices, copay coupons, cash discount prices, and manufacturer direct-to-consumer pricing. The product empowers patients, providers, and pharmacists to make informed decisions about medication costs before reaching the pharmacy counter.
Natural language chat where users ask medication cost questions
Side-by-side display of all pricing options with clear recommendations
Explains copay coupons, cash discount cards, and pharmacy benefits
Progressively asks for insurance and location only when needed
"Mimi - your medication cost guide"
35-year-old with commercial insurance, recently prescribed Wegovy for weight management
42-year-old physician who wants to prescribe cost-effective medications
29-year-old pharmacist at busy retail pharmacy
B2B customer building care navigation app for payers and employers
React component handling conversational UI, message display, and user input
LLM-powered agent that interprets user queries, manages conversation flow, and determines which APIs to call
Fetches and normalizes data from multiple sources (RxUtility API, insurance APIs, manufacturer sites)
Logic to determine best price based on user's insurance status and location
Model Context Protocol server exposing Mimi's capabilities as tools for external chatbots
Track user queries, API performance, and product usage metrics
┌─────────────────────────────────────────────────────────────────┐
│ USER INTERFACE │
│ ┌──────────────────────┐ ┌──────────────────────┐ │
│ │ Chat Interface │ │ Price Comparison │ │
│ │ (React Component) │ │ Cards UI │ │
│ └──────────┬───────────┘ └───────────┬──────────┘ │
└─────────────┼──────────────────────────────┼─────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ MIMI AI ENGINE (Backend) │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ LLM Agent (Vercel AI SDK) │ │
│ │ - Query interpretation │ │
│ │ - Conversation management │ │
│ │ - Educational responses │ │
│ └────────────────┬───────────────────────────────────────┘ │
└───────────────────┼─────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ DATA AGGREGATION & PRICING LAYER │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ RxUtility │ │ Insurance │ │ Manufacturer │ │
│ │ API │ │ Pricing │ │ Coupons │ │
│ │ │ │ (RTPBC) │ │ (Scraper) │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ └──────────────────┼──────────────────┘ │
│ ▼ │
│ ┌──────────────────────────────┐ │
│ │ Price Comparison Engine │ │
│ │ - Normalize data │ │
│ │ - Calculate best price │ │
│ │ - Apply business logic │ │
│ └──────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ INTEGRATION LAYER │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ MCP SERVER │ │
│ │ Exposes Mimi capabilities as tools for integration │ │
│ └────────────────┬───────────────────────────────────────┘ │
└───────────────────┼─────────────────────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ External Health IT Systems │
│ - EHR chatbots │
│ - Care navigation apps │
│ - Telehealth platforms │
└───────────────────────────────┘Aggregated cash discount prices across all major pharmacy chains
https://api.rxutility.com/v1API Key (Header: X-API-Key)GET /cash-prices?drug=<drug_name>&zip=<zip_code>Returns cash prices at pharmacies near zip code
{
"drug": "Aripiprazole 5mg, 30 tablets",
"prices": [
{
"pharmacy": "Walmart",
"price": 15.71,
"distance": "2.3 miles"
},
{
"pharmacy": "Costco",
"price": 27.99,
"distance": "3.8 miles"
}
]
}Manufacturer copay coupon programs for brand-name medications
GET /copay-coupons?drug=<drug_name>Returns available copay coupon programs
{
"drug": "Abilify (Aripiprazole)",
"coupon": {
"available": true,
"activation_required": false,
"max_savings": "$5/month copay",
"eligibility": "Commercially insured patients only",
"url": "https://www.abilify.com/savings",
"card_details": {
"bin": "600426",
"pcn": "54",
"group": "4000011611"
}
}
}Real-time insured price lookup via pharmacy benefit integration
Direct pricing from manufacturer pharmacies (e.g., NovoCare for Wegovy)
As a patient, I want to ask "What's the cost of Wegovy?" in natural language
So that I can quickly get pricing without filling out forms
As a user, I want Mimi to explain pharmacy terms like "copay coupon"
So that I understand my options without needing healthcare expertise
// Chat message type
interface Message {
id: string
role: 'user' | 'assistant'
content: string
timestamp: Date
priceCards?: PriceCard[]
}
// Send message to Mimi AI
async function sendMessage(message: string) {
const response = await fetch('/api/chat', {
method: 'POST',
body: JSON.stringify({ message, conversationId })
})
return response.json()
}As a user, I want Mimi to ask for my insurance info only when needed
So that I don't have to provide unnecessary information upfront
As an uninsured patient, I want to skip insurance questions
So that I can quickly see cash prices without answering irrelevant questions
Decision Tree:
1. User asks about drug price
2. Check if we have insurance status
- NO → Ask "Do you have insurance?"
- YES → Ask "What is your insurance?"
- NO → Skip to zip code
3. Check if we have zip code
- NO → Ask "What's your zip code?"
- SKIP → Don't show cash prices
4. Show prices based on available data:
- Has insurance → Show insured + copay coupon + cash + DTC
- No insurance → Show cash + DTC only
- No zip code → Show insured + copay coupon + DTC onlyAs a patient, I want to see all pricing options side-by-side
So that I can easily compare and choose the most affordable option
As a user, I want the cheapest option clearly highlighted
So that I don't have to manually compare all prices
function determineBestPrice(prices, hasInsurance) {
if (!hasInsurance) {
// For uninsured: cheapest between cash and manufacturer DTC
return Math.min(prices.cash, prices.manufacturerDTC)
}
// For insured: cheapest between all 4 options
const allPrices = [
prices.insured,
prices.copayWithCoupon,
prices.cash,
prices.manufacturerDTC
]
return Math.min(...allPrices)
}As a confused patient, I want to ask "What is a copay coupon?"
So that I understand my options before making a decision
As a user, I want clear explanations of when to use insurance vs cash
So that I don't accidentally invalidate my insurance coverage
A: A copay coupon is a discount card from a drug manufacturer that lowers your out-of-pocket cost when you use your commercial insurance. You present both your insurance card AND the copay coupon to the pharmacy, and the manufacturer covers part of your copay. These are only for patients with commercial insurance, not government plans like Medicare or Medicaid.
A: Great question! A copay coupon is used WITH your commercial insurance to reduce your copay. A cash discount card means you DON'T use your insurance at all - you're paying cash instead. Sometimes the cash price is cheaper than your insurance copay, especially for generic medications. However, cash payments won't count toward your deductible.
A: Some drug manufacturers run their own pharmacies where you can buy medications directly from them, often at a set price. For example, NovoCare Pharmacy ships Wegovy directly to your home for a fixed monthly fee. This is another cash option (doesn't use insurance) but may be more convenient or affordable than retail pharmacies.
Note: Copay coupon NOT shown because user doesn't have insurance
The MCP (Model Context Protocol) server exposes Mimi's pricing capabilities as tools that external chatbots can integrate. This allows health IT companies to add medication pricing to their existing products without building the full Mimi UI.
┌─────────────────────────────────────────┐
│ Client's Existing Chatbot/AI Agent │
│ (e.g., Care Navigation App) │
└────────────────┬────────────────────────┘
│
│ MCP Protocol
▼
┌─────────────────────────────────────────┐
│ RxUtility MCP Server │
│ ┌────────────────────────────────┐ │
│ │ Tool: getMedicationPrices │ │
│ │ Tool: explainCopayProgram │ │
│ │ Tool: findNearbyPharmacies │ │
│ └────────────────────────────────┘ │
└────────────────┬────────────────────────┘
│
│ Internal API
▼
┌─────────────────────────────────────────┐
│ Mimi Core Pricing Engine │
│ (Same logic as full Mimi product) │
└─────────────────────────────────────────┘The MCP server acts as a bridge between external chatbots and Mimi's pricing engine. Clients subscribe to the MCP server and their AI agents can invoke pricing tools as needed.
Returns all available pricing options for a medication based on user context
{
"drugName": "string (required)",
"hasInsurance": "boolean (optional)",
"insuranceProvider": "string (optional)",
"zipCode": "string (optional)"
}{
"drug": "Wegovy 2.4mg pen",
"prices": {
"insured": {
"amount": 1072,
"provider": "Blue Cross Blue Shield",
"available": true
},
"copayCoupon": {
"amount": 25,
"activationRequired": true,
"url": "https://wegovy.com/savings",
"eligibility": "Commercially insured patients only",
"available": true
},
"cash": {
"amount": 1349,
"pharmacy": "Costco",
"distance": "3.2 miles",
"available": true
},
"manufacturerDTC": {
"amount": 699,
"provider": "NovoCare Pharmacy",
"url": "https://novocare.com/pharmacy",
"available": true
}
},
"bestPrice": {
"type": "copayCoupon",
"amount": 25
}
}Provides educational explanation of copay coupons and cash discount programs
{
"topic": "copayCoupon" | "cashDiscount" | "manufacturerDTC"
}{
"topic": "copayCoupon",
"explanation": "A copay coupon is a discount card from a drug manufacturer...",
"useCase": "For patients with commercial insurance",
"howToUse": "Present both your insurance card and copay coupon..."
}Returns list of pharmacies with cash prices for a specific medication
{
"drugName": "string (required)",
"zipCode": "string (required)",
"radius": "number (optional, default: 10 miles)"
}{
"drug": "Aripiprazole 5mg, 30 tablets",
"pharmacies": [
{
"name": "Walmart",
"price": 15.71,
"distance": 2.3,
"address": "123 Main St, Nashville, TN 37215"
},
{
"name": "Costco",
"price": 27.99,
"distance": 3.8,
"address": "456 Oak Ave, Nashville, TN 37215"
}
]
}Client receives API credentials and MCP server endpoint
Add RxUtility MCP tools to your AI agent's available tools
When user asks about medication costs, LLM invokes getMedicationPrices tool
Client's UI displays pricing data in their own design system
Across full Mimi product and MCP integrations
Health IT companies with active integrations
Users discover savings vs their default insurance copay
High satisfaction with price transparency and ease of use
Fast, responsive user experience
This PRD is a living document. If you have questions or suggestions for the IT lead or product team, please reach out.