---
name: openai-prior-auth-packet-builder
description: "Build a concise prior authorization packet from local case files and payer policy docs."
license: "MIT"
metadata:
  decimalai-skill-id: "4e5a0b2a-ae9f-4c90-bac3-dbda9add3b29"
  decimalai-version-id: "4bd2e59b-2d85-49c5-8be1-6df76cea8644"
  decimalai-version: "1"
  decimalai-body-sha256: "0f43a45a040ac762e27027f5ab5b4d7308d06a4b1ecff0a5816723f7bb77de03"
  decimalai-name: "openai/prior-auth-packet-builder"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "legal"
  decimalai-source: "https://app.decimal.ai/s/openai-prior-auth-packet-builder@1/SKILL.md"
---
# Prior Auth Packet Builder

Use this skill when a case requires prior authorization review, referral validation, imaging review, or payer-specific policy checks.

## Workflow

1. Inspect `case/scenario.json` and `case/transcript.txt`.
2. Search `policies/` for payer, prior auth, referral, imaging, and PPO guidance:
   - Run the preferred search and fallback as one shell command:
     `rg -n -i 'prior authorization|prior-auth|imaging|referral|billing|PPO|Blue Cross' policies ||
     grep -RniE 'prior authorization|prior-auth|imaging|referral|billing|PPO|Blue Cross' policies`.
   - An `rg` launcher or bootstrap failure is not evidence that there are no policy matches.
3. Read only the most relevant policy files.
4. Create `output/policy_findings.md` with these exact headings:
   - `## Case summary`
   - `## Matched policy files`
   - `## Prior authorization`
   - `## Referral`
   - `## Missing information`
   Cite each matched policy by its filename.
5. Create `output/human_review_checklist.md` with:
   - what a human reviewer should verify
   - what to tell the patient
   - what queue should own the case
6. Call `finalize_policy_packet` only after both artifacts exist.

## Rules

- Use targeted searches over broad file reads.
- Use the targeted `grep -RniE` fallback only when `rg` cannot complete the search.
- Only cite policy files you actually inspected.
- Keep outputs concise and operational.
- The workflow is complete only when `finalize_policy_packet` succeeds.
- If referral status is pending and prior auth is unclear, recommend human review.
