Healthcare & Life Sciences · Python SDK

Stop an automated denial no physician has reviewed

Your prior authorization agent can approve quickly. Denials need more care. Wrap the determination in the Python SDK, send the clinical facts it relied on, and the health plan’s rules decide whether it goes out, goes to utilization management, or stops.

Approvals and denials need different rules

The simulator shows why. The rule lets a well-supported approval through and stops a denial that skipped physician review. Write a rule for each direction instead of one threshold for both.

Clinical facts, without the member

The rule reads criteria and flags. It doesn’t need the member’s name, so keep identity out of the facts.

FactWhat it holds
requested_serviceFor example mri_lumbar_spine, biologic_infusion, cardiac_catheterization, or physical_therapy_course.
urgencyroutine or urgent.
diagnosis_criteria_metTrue when the diagnosis meets the plan’s criteria.
conservative_therapy_documentedTrue when earlier treatment is on file.
ordering_specialty_matchTrue when the ordering provider’s specialty fits the service.
medical_necessity_scoreYour model’s score for this request.
physician_review_completedTrue when a physician has reviewed the case.

Python: one call for both directions

vp is one client from Veriproof.from_env(), and reviews is the runtime from await vp.reviews(...).

Python · veriproof-sdk

from veriproof_sdk import GovernReviewOptions

async def send_determination(vp, reviews, request, determination):
    result = await vp.govern(
        "prior_auth.determine",
        {"requestId": request.id, "determination": determination.outcome},
        lambda context: um_system.record(context.input),
        facts={
            "requested_service": request.service_code,
            "urgency": request.urgency,
            "diagnosis_criteria_met": criteria.diagnosis_met,
            "conservative_therapy_documented": criteria.therapy_documented,
            "ordering_specialty_match": criteria.specialty_match,
            "medical_necessity_score": criteria.necessity_score,
            "physician_review_completed": determination.physician_reviewed,
        },
        review=GovernReviewOptions(
            profile="prior-auth-review",
            proposed_action_summary="Send this determination to the provider.",
        ),
    )
    if result.completed:
        return result.value
    if result.review is not None:
        await reviews.save(result.review)
    return None

result.completed is true only for released results. A denial the rule blocks never reaches um_system.record, so it can’t go out by accident.

Why Python here: Clinical review models and payer data pipelines are usually Python, so the check can sit in the same service that scores the request.

Approvals, reviews, and stopped denials

All three come from the prior authorization simulator. Run prior authorization simulator

ResultWhenWhat your code seesWho picks it up
AllowedA well-documented MRI request that meets the criteria.The approval is recorded and sent. The record shows the facts and the rule version.The Business Owner sees turnaround. Auditors read the record inside an engagement.
Sent to a personAn urgent request where the ordering specialty doesn’t match.The determination waits for a person. Your code saves the checkpoint.A utilization management reviewer, in the VeriProof Inbox, by email, or in Slack or Microsoft Teams, with reminders and escalation.
StoppedThe agent proposes a denial, and no physician has reviewed the case.The denial is blocked, so it’s never sent. The request stays open for a physician.The Governance Engineer sees which rule stopped it.

When the plan’s rules change

Developer fix request

A rule that checks the reviewing physician’s specialty needs a field your agent may not send. The Developer gets a fix request naming it, and compliance is asked to check again once it arrives.

Changing the rule

Tightening how urgent requests are handled can run in Shadow first, recording what it would have decided. An administrator or compliance officer signs off before an engineer’s version enforces in production.

See how the six role portals hand off work

More for your build

Run a denial through the simulator

Try the case with no physician review and watch the rule stop it. Then open the record and find `physician_review_completed`.