RxMemberSim generates realistic synthetic pharmacy data for testing PBM systems, claims adjudication, and drug utilization review...
Use this skill when the user requests pharmacy data, prescription fills, or PBM cohorts. Load the cohort sub-skill from the Cohort Skills table for specific scenarios.
Triggers: prescriptions, pharmacy claims, medication fills, DUR alerts, drug interactions, formulary/tier cohorts, NCPDP output, pharmacy prior authorization, step therapy
Capabilities: pharmacy members (BIN/PCN/Group), prescription fills with NDC codes, claim adjudication and pricing, DUR alerts, formulary/tier management, manufacturer copay programs, NCPDP D.0 output
| System | Use | Example |
|---|---|---|
| NDC | Drug product identifier (11-digit) | 00071015523 |
| RxNorm | Standard drug concept (ingredient, dose form) | RxCUI 83367 |
| GPI | Generic Product Identifier (drug class hierarchy) | 39400010100310 |
| NCPDP | Pharmacy identifier and transaction standard | D.0 format |
| NPI | Provider/pharmacy identifier | 1234567890 |
| ICD-10-CM | Diagnosis code (required for PA submissions) | E11.9 |
| HCPCS | Medical pharmacy / buy-and-bill drugs | J0135 |
Request: "Generate a pharmacy claim for atorvastatin"
{
"claim": {
"claim_id": "RX20250115000001",
"transaction_code": "B1",
"service_date": "2025-01-15",
"ndc": "00071015523",
"drug_name": "Atorvastatin 20mg",
"quantity": 30,
"days_supply": 30,
"pharmacy_npi": "1234567890"
},
"response": {
"status": "paid",
"ingredient_cost": 12.50,
"dispensing_fee": 2.00,
"copay": 10.00,
"plan_paid": 4.50
}
}
Request: "Generate a pharmacy claim that triggers a drug interaction alert"
Claude loads dur-alerts.md and produces a claim with appropriate DUR response.
Load the appropriate cohort based on user request:
| Cohort | Trigger Phrases | File |
|---|---|---|
| Retail Pharmacy | prescription, fill, refill, copay, retail | retail-pharmacy.md |
| Specialty Pharmacy | specialty drug, biologics, limited distribution | specialty-pharmacy.md |
| DUR Alerts | drug interaction, DUR, therapeutic dup, early refill | dur-alerts.md |
| Formulary Management | formulary, tier, coverage, preferred | formulary-management.md |
| Rx Enrollment | rx enrollment, pharmacy member, BIN PCN, rx coverage | rx-enrollment.md |
| Rx Prior Auth | rx prior auth, pharmacy PA, step therapy, formulary exception | rx-prior-auth.md |
| Rx Accumulators | rx accumulator, pharmacy deductible, rx OOP, TrOOP, Part D phase | rx-accumulator.md |
| Manufacturer Programs | copay card, PAP, patient assistance, copay assistance, hub program | manufacturer-programs.md |
| Parameter | Type | Default | Description |
|---|---|---|---|
| fill_type | string | new | new, refill |
| drug_type | string | generic | generic, brand, specialty |
| pharmacy_type | string | retail | retail, mail_order, specialty |
| claim_status | string | paid | paid, rejected, reversed |
| dur_outcome | string | none | none, warning, reject |
Pharmacy member/cardholder information:
Pharmacy benefit plan configuration:
Pharmacy benefit accumulators:
Written prescription details:
NCPDP-style claim transaction:
Adjudication response:
Pharmacy PA request and decision:
Drug utilization review alert:
Drug coverage information:
Manufacturer copay programs:
See ../../references/data-models.md for complete schemas.
| Code | Description | Use Case |
|---|---|---|
| B1 | Billing | New claim submission |
| B2 | Reversal | Cancel previous claim |
| B3 | Rebill | Correct and resubmit |
| E1 | Eligibility | Check coverage |
| P1 | Prior Auth Request | Submit PA |
| P2 | Prior Auth Inquiry | Check PA status |
| P4 | Prior Auth Cancel | Cancel PA request |
| Code | Description | Resolution |
|---|---|---|
| 70 | Product/Service Not Covered | Check formulary, PA |
| 75 | Prior Authorization Required | Submit PA request |
| 76 | Plan Limitations Exceeded | Check quantity limits |
| 79 | Refill Too Soon | Wait or override |
| 80 | Prescriber Not Found | Verify NPI |
| 83 | Duplicate Paid Claim | Check claim history |
| 88 | DUR Reject | Clinical review needed |
| Code | Type | Description |
|---|---|---|
| DD | Drug-Drug | Interaction between medications |
| TD | Therapeutic Duplication | Same drug class |
| ER | Early Refill | Before 80% supply used |
| HD | High Dose | Exceeds recommended dose |
| LD | Low Dose | Below therapeutic dose |
| DA | Drug-Age | Age precaution |
| DG | Drug-Gender | Gender precaution |
| DC | Drug-Disease | Contraindication |
| Format | Request | Use Case |
|---|---|---|
| JSON | default | API testing |
| NCPDP D.0 | "as NCPDP", "pharmacy claim format" | Real-time claims |
| CSV | "as CSV" | Analytics |
See ../../formats/ncpdp-d0.md for transformation.
Request: "Generate a paid pharmacy claim for lisinopril"
{
"claim": {
"claim_id": "RX20250115000001",
"transaction_code": "B1",
"service_date": "2025-01-15",
"bin": "610014", "pcn": "RXGROUP", "group_number": "CORP001",
"cardholder_id": "001234001",
"ndc": "00093505601",
"drug_name": "Lisinopril 10mg Tablet",
"quantity_dispensed": 30,
"days_supply": 30,
"pharmacy_npi": "9876543210",
"prescriber_npi": "1234567890",
"ingredient_cost_submitted": 8.50,
"dispensing_fee_submitted": 2.00
},
"response": {
"status": "paid",
"ingredient_cost_paid": 8.50,
"dispensing_fee_paid": 1.75,
"patient_pay_amount": 10.00,
"copay_amount": 10.00,
"authorization_number": "AUTH20250115001"
}
}
Request: "Generate a rejected claim for Eliquis requiring prior auth"
{
"claim": {
"claim_id": "RX20250115000002",
"transaction_code": "B1",
"service_date": "2025-01-15",
"ndc": "00003089421",
"drug_name": "Eliquis 5mg Tablet",
"quantity_dispensed": 60,
"days_supply": 30
},
"response": {
"status": "rejected",
"reject_code": "75",
"reject_message": "Prior Authorization Required",
"additional_message": "Submit PA with diagnosis and documentation of AFib or VTE",
"help_desk_phone": "1-800-555-0123"
}
}
Request: "Generate a claim with early refill DUR alert"
{
"claim": {
"claim_id": "RX20250115000003",
"ndc": "00071015523",
"drug_name": "Atorvastatin 20mg",
"service_date": "2025-01-15",
"quantity_dispensed": 30,
"days_supply": 30
},
"response": {
"status": "paid",
"dur_response": {
"alert_count": 1,
"alerts": [
{
"type": "ER",
"description": "Early Refill",
"severity": "warning",
"message": "Refill 8 days early (73% of supply used)",
"previous_fill_date": "2024-12-27",
"days_supply_previous": 30,
"percent_used": 73,
"professional_service_code": "M0",
"result_of_service_code": "1A"
}
]
},
"patient_pay_amount": 10.00
}
}
Request: "Generate a specialty pharmacy claim with manufacturer copay card"
{
"claim": {
"claim_id": "RX20250115000004",
"ndc": "00074433906",
"drug_name": "Humira 40mg/0.4mL Pen",
"quantity_dispensed": 2,
"days_supply": 28,
"pharmacy_type": "specialty"
},
"response": {
"status": "paid",
"ingredient_cost_paid": 6500.00,
"dispensing_fee_paid": 0.00,
"patient_pay_amount": 500.00,
"coinsurance_amount": 500.00,
"tier": 5
},
"copay_assistance": {
"program_name": "Humira Complete",
"program_bin": "004682",
"copay_card_applied": true,
"assistance_amount": 495.00,
"final_patient_pay": 5.00,
"annual_max_benefit": 16000.00,
"remaining_benefit": 15505.00
}
}
RxMemberSim pharmacy claims correspond to PatientSim medication orders:
| RxMemberSim Skill | PatientSim Cohorts | Integration |
|---|---|---|
| retail-pharmacy.md | Chronic disease meds, discharge Rx | Fill date +0-3 days from order/discharge |
| specialty-pharmacy.md | Oncology, biologics | Limited distribution, PA often required |
| dur-alerts.md | Multi-drug regimens | DDI based on patient's med list |
| rx-prior-auth.md | High-cost drugs | Clinical criteria from PatientSim |
PatientSim Cohort Links: diabetes-management, heart-failure, chronic-kidney-disease, behavioral-health, oncology
Integration Pattern: Generate medication orders in PatientSim, then model fills in RxMemberSim. Match NDCs, apply fill timing (retail: same day; specialty: +1-7 days), and PA rules.
Pharmacy and medical benefits coordinate:
| RxMemberSim Skill | MemberSim Skill | Integration |
|---|---|---|
| formulary-management.md | plan-benefits.md | Coordinated benefit design |
| rx-accumulator.md | accumulator-tracking.md | Combined deductible/OOP |
| rx-prior-auth.md | prior-authorization.md | Pharmacy vs. medical PA |
| rx-enrollment.md | enrollment-eligibility.md | Synchronized coverage |
Integration Pattern: For integrated medical+Rx plans, pharmacy costs count toward combined OOP maximum. Ensure coverage dates and accumulator totals are synchronized.
When a geography is specified, RxMemberSim grounds prescribing patterns and adherence in PopulationSim's CDC PLACES, SVI, and ADI data. See populationsim-integration.md for the generation pattern and SDOH impact tables.
NetworkSim provides pharmacy entities and benefit structures for prescription claims:
| RxMemberSim Need | NetworkSim Skill | Generated Entity |
|---|---|---|
| Dispensing pharmacy | pharmacy-for-rx.md | Pharmacy with NCPDP, NPI |
| Formulary context | formulary-for-rx.md | Tier, PA requirements |
| Pharmacy benefit | synthetic-pharmacy-benefit.md | Benefit design |
| Specialty pharmacy | specialty-pharmacy.md | Limited distribution, hub model |
Integration Pattern: Generate claims in RxMemberSim first, then use NetworkSim to add pharmacy entities with NCPDP IDs and formulary context.
RxMemberSim integrates with the Generative Framework for specification-driven generation at scale.
"Generate 200 pharmacy members from the Medicare diabetic profile" — samples demographics, assigns Rx coverage, links to formulary/network."Add diabetic first-year journey with fills" — generates Rx, refills, DUR alerts, and accumulator impacts (TrOOP for Part D).