{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/backworkhealth-com/json-schema/backworkhealth-com-agent-validate-claim-input-schema.json",
  "title": "AgentValidateClaimInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/backworkhealth-com-agent-tools-api-openapi.yml#/components/schemas/AgentValidateClaimInput",
  "type": "object",
  "properties": {
    "payer": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9 &'().,/-]+$"
    },
    "plan_type": {
      "type": "string",
      "enum": [
        "commercial",
        "medicare_advantage",
        "medicaid",
        "traditional_medicare",
        "exchange"
      ]
    },
    "line_of_business": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9 &'().,/-]+$"
    },
    "procedure_codes": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(?:\\d{5}|[A-Za-z]\\d{4})$"
      }
    },
    "diagnosis_codes": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z][0-9][A-Za-z0-9](?:\\.?[A-Za-z0-9]{0,4})?$"
      }
    },
    "modifiers": {
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{2}$"
      }
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$"
    },
    "date_of_service": {
      "type": "string"
    },
    "site_of_service": {
      "type": "string",
      "enum": [
        "office",
        "outpatient_hospital",
        "asc",
        "inpatient",
        "home",
        "telehealth"
      ]
    },
    "provider_specialty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9 &'().,/-]+$"
    },
    "age_category": {
      "type": "string",
      "enum": [
        "pediatric",
        "adult",
        "medicare_age"
      ]
    },
    "sex_when_policy_relevant": {
      "type": "string",
      "enum": [
        "female",
        "male",
        "other",
        "unknown"
      ]
    },
    "response_format": {
      "default": "concise",
      "description": "Use concise for normal agent reasoning; use detailed only when the agent needs IDs, source metadata, or audit evidence.",
      "type": "string",
      "enum": [
        "concise",
        "detailed"
      ]
    }
  },
  "required": [
    "procedure_codes"
  ],
  "additionalProperties": false
}