{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medbillanalyzer-com/json-schema/medbillanalyzer-com-finding-schema.json",
  "title": "Finding",
  "description": "One thing the two documents disagree about, or one thing worth asking.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medbillanalyzer-com-openapi.json#/components/schemas/Finding",
  "type": "object",
  "required": [
    "rule",
    "title",
    "tier",
    "confidence",
    "amount",
    "explanation",
    "ask_this",
    "directed_at",
    "cites"
  ],
  "properties": {
    "rule": {
      "type": "string",
      "description": "The deterministic rule that produced it, e.g. \"F07\"."
    },
    "title": {
      "type": "string"
    },
    "tier": {
      "type": "string",
      "enum": [
        "discrepancy",
        "worth_asking"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "amount": {
      "type": [
        "string",
        "null"
      ],
      "description": "Formatted, e.g. \"$200.00\", or null when the finding carries no amount. Never sum these."
    },
    "explanation": {
      "type": "string",
      "description": "Addressed to the patient."
    },
    "ask_this": {
      "type": "string",
      "description": "What to ask, addressed to the patient."
    },
    "directed_at": {
      "type": "string",
      "enum": [
        "provider",
        "plan"
      ]
    },
    "cites": {
      "type": [
        "string",
        "null"
      ],
      "description": "A statute label, only where it plainly applies."
    }
  }
}