Packs / healthcare-admin-public
claims-csv-validate
Pre-check a batch of claim lines for format errors (ICD-10, CPT, NPI check digit, dates, charges) before submission
Install
logicpacks pack use healthcare-admin-public/claims-csv-validateget_pack healthcare-admin-public/claims-csv-validateThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 1 in
outcome/checks.yaml - Code:
claims_check.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A per-line error list for a claims CSV: invalid ICD-10-CM code shape, CPT/HCPCS shape, NPI Luhn check digit, service date in the future or after the claim date, non-positive charge, missing fields.
Verified by: Synthetic batch: 1 clean line passes; each of 4 bad lines reports its specific error.
Steps
- Export the batch (synthetic for testing).
- Run
python3 code/claims_check.py batch.csv. - Fix the flagged lines in the billing system and re-export; this does not check payer-specific edits or code validity against the current code set.
Edge cases
- Code shape is checked, not whether the code exists in this year's code set; use the CMS files for that.
- Dates must be ISO YYYY-MM-DD.
Don'ts
- Never put real patient data in fixtures, prompts, logs or git; fixtures are synthetic.
- Don't change codes to pass the check; coding is a clinical/coder decision.