{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-inquire-response-schema.json",
  "title": "InquireResponse",
  "description": "FHIR Bundle with ClaimResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-inquiry-api-openapi.yml#/components/schemas/InquireResponse",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string"
    },
    "entry": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResponseEntry"
      }
    }
  },
  "$defs": {
    "Adjudication": {
      "type": "object",
      "properties": {
        "category": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "reason": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "extension": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Extension"
          }
        }
      }
    },
    "ClaimResponse": {
      "type": "object",
      "description": "FHIR ClaimResponse",
      "properties": {
        "resourceType": {
          "type": "string"
        },
        "meta": {
          "$ref": "#/$defs/Meta"
        },
        "identifier": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Identifier"
          }
        },
        "status": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/CodeableConcept"
        },
        "use": {
          "type": "string"
        },
        "created": {
          "type": "string"
        },
        "patient": {
          "$ref": "#/$defs/Reference"
        },
        "insurer": {
          "$ref": "#/$defs/Reference"
        },
        "requestor": {
          "$ref": "#/$defs/Reference"
        },
        "outcome": {
          "type": "string"
        },
        "disposition": {
          "type": "string"
        },
        "preAuthPeriod": {
          "$ref": "#/$defs/Period"
        },
        "item": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ResponseItem"
          }
        }
      }
    },
    "CodeableConcept": {
      "type": "object",
      "description": "FHIR CodeableConcept",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Coding"
          }
        }
      }
    },
    "Coding": {
      "type": "object",
      "description": "Coding structure for answers",
      "properties": {
        "code": {
          "type": "string"
        },
        "display": {
          "type": "string"
        }
      }
    },
    "Extension": {
      "type": "object",
      "description": "FHIR extension with Reference",
      "properties": {
        "url": {
          "type": "string"
        },
        "valueReference": {
          "$ref": "#/$defs/Reference"
        }
      }
    },
    "Identifier": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "Meta": {
      "type": "object",
      "description": "FHIR metadata",
      "properties": {
        "profile": {
          "type": "array",
          "description": "FHIR profile URLs",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Period": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        }
      }
    },
    "Reference": {
      "type": "object",
      "description": "FHIR Reference",
      "properties": {
        "reference": {
          "type": "string"
        }
      }
    },
    "ResponseEntry": {
      "type": "object",
      "properties": {
        "resource": {
          "$ref": "#/$defs/ClaimResponse"
        },
        "search": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string"
            }
          }
        }
      }
    },
    "ResponseItem": {
      "type": "object",
      "properties": {
        "itemSequence": {
          "type": "integer"
        },
        "extension": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Extension"
          }
        },
        "adjudication": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Adjudication"
          }
        }
      }
    }
  }
}