Skip to main content
The Prior Auth SDK is a high-level wrapper around the Simplex Prior Auth API. It resolves payer clinical question sets, fills fax PA forms, and transmits them — all without you having to know which line of business a patient’s BIN/PCN maps to.

Installation

pip install simplex

Quick Start

The minimal fax-PA workflow is two calls: resolve the canonical drug string, then pull the payer-specific clinical question set for that drug and diagnosis.

1. Search drugs

Resolve a free-text query (e.g. "wegovy 1mg") into the canonical Brand Strength Form string expected by drug_info.medication_strength on Fill Prior Authorization. The supported catalog currently covers Wegovy, Ozempic, Zepbound, and Mounjaro (all SKUs).
from simplex import SimplexClient

client = SimplexClient()

matches = client.search_drugs(query="wegovy 1mg")
for m in matches:
    print(m["full_name"])

2. Get clinical questions

Pass the pharmacy claim’s (bin, state, drug_name, icd_code) tuple to pin down the line of business and indication. pcn, group_id, and member_id are optional tiebreakers for shared-processor BINs (e.g. BIN 003858 / PCN A4 hosts both ESI Commercial and Humana Part D — the leading alpha prefix of member_id disambiguates). Each returned question carries a structured citation back to the underlying payer policy (URL, policy ID, section, verbatim quote), so you can show reviewers the source.
from simplex import SimplexClient, SimplexError

client = SimplexClient()

try:
    response = client.get_clinical_questions(
        bin="003858",
        state="CA",
        drug_name="wegovy",
        icd_code="E66.01",
        pcn="A4",
        member_id="4XS1234567",
    )

    print("matched:", response.get("matched"))
    print("coverage_status:", response.get("coverage_status"))
    print("lob_id:", response.get("lob_id"))

    routing = response.get("routing") or {}
    print(f"PBM: {routing.get('pbm_name')}")
    print(f"LOB: {routing.get('line_of_business')}")
    print(f"Plan/Group: {routing.get('plan_name_or_group')}")
    print(f"Confidence: {routing.get('confidence')}")

    for i, q in enumerate(response.get("questions") or [], 1):
        req = "required" if q.get("required") else "optional"
        print(f"{i}. [{q.get('input_type')}, {req}] {q.get('prompt')}")
        citation = q.get("citation")
        if citation:
            print(
                f"   ↳ {citation.get('policy_id')} "
                f{citation.get('section')} "
                f"({citation.get('effective_date')})"
            )
except SimplexError as e:
    print(f"Simplex error: {e}")

Next steps