Minctrl Docs
Cookbook

Prior authorization

Turn a prior-auth request into an approval or a clean determination on the prior-auth vertical — a medical director signs every denial before it transmits.

Scenario. A prior-authorization request plus the clinical chart come in. When the request meets medical-necessity criteria cleanly (or is gold-carded), it auto-approves. Otherwise a medical director must review the chart and sign the adverse determination before it is transmitted to the provider.

Vertical: prior-auth · Parks at gate step-id: signoff (gate:medical-director-signoff).

1. Start the run

RUN=$(curl -s -X POST "$API/process-runs" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vertical": "prior-auth",
    "inputs": {
      "member_id": "M-10293",
      "procedure_code": "27447",
      "diagnosis": "M17.0",
      "risk": "fails criteria"
    }
  }')
RUN_ID=$(echo "$RUN" | jq -r .id)

The run pulls the chart, runs clinical and policy checks concurrently, and — when the request does not meet criteria cleanly — drafts an adverse determination and parks at the medical-director gate. risk is the routing input the resolver matches against the branch labels: "fails criteria" takes the medical-necessity path to the gate; a request that meets criteria auto-approves and never parks.

2. Read where it parked

curl -s "$API/process-runs/$RUN_ID" -H "Authorization: Bearer $TOKEN"

status is awaiting_human; the run parked at the signoff step.

3. Resume — the medical director signs

curl -s -X POST "$API/process-runs/$RUN_ID/resume" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "gate": "signoff",
    "decision": "denied"
  }'

decision is the director's call, recorded on the gate (resolver: "human"). A denied verdict also de-authorizes the downstream irreversible transmit — no adverse determination can be sent on the strength of a denial alone.

4. Outcome

After the director's verdict clears the gate, the run takes the rework path: it requests more clinical information (X12 275) and cycles back through intake and review while the case is incomplete. The engine bounds that loop with a step budget, so the API reports status: "max_steps" — and the irreversible transmit never auto-fires. A clean, criteria-meeting request never reaches the gate at all — it auto-approves and notifies electronically.

Governance note

The transmit step is reversible: false — sending a determination to a provider can't be un-sent — so it stays shadowed until a connector opts in. In a governed rollout the signoff gate collects the director's verdict first; only then is the irreversible transmit authorized.

On this page