coding_format_validation backend tool (see coding-format-validation.md); this page describes the rules it applies. Call the tool after the verifier step.
Agent Format-Validation Instructions
Validate generated charge output after the LLM steps and before optional write-back.Inputs
Required:charges: Array of charges withcpt_code,diagnosis_codes, andmodifiers.
Validation Behavior
The agent should check:- CPT/HCPCS format: five digits, four digits plus one uppercase letter, or one uppercase letter plus four digits.
- ICD-10 format: broad ICD-10 code pattern.
- Modifier length: warns on unexpected modifier length.
Output Shape
Agent Instruction Guidance
Ifvalid=false, do not write back to the EHR without human review.