{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ellkay/json-schema/ellkay-lkcloud-connect-contracts-patient-balance-next-search-claims-paged-response-schema.json",
  "title": "LKCloudConnect.Contracts.PatientBalance.NextSearchClaimsPagedResponse",
  "description": "Response for paged claims search",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ellkay-lkpatientbalance-api-openapi.yml#/components/schemas/LKCloudConnect.Contracts.PatientBalance.NextSearchClaimsPagedResponse",
  "type": "object",
  "properties": {
    "claims": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimData"
      },
      "description": "Claims returned for query"
    },
    "nextToken": {
      "type": "string",
      "description": "The token needed for the next API call"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "LKCloudConnect.Contracts.PatientBalance.ClaimBillingProvider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the provider."
        },
        "taxIdentificationNumber": {
          "type": "string",
          "description": "Tax identification number of the provider."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimData": {
      "type": "object",
      "properties": {
        "claimId": {
          "type": "string",
          "description": "Unique identifier of the claim."
        },
        "patient": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimPatient"
            }
          ],
          "description": "Patient details associated with the claim."
        },
        "encounterId": {
          "type": "string",
          "description": "Identifier of the encounter related to the claim."
        },
        "ticketNumber": {
          "type": "string",
          "description": "Ticket number assigned to the claim."
        },
        "claimReferenceNumber": {
          "type": "string",
          "description": "Reference number used to track the claim."
        },
        "guarantor": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimGuarantor"
            }
          ],
          "description": "Guarantor details responsible for the claim."
        },
        "billType": {
          "type": "string",
          "description": "Type of bill associated with the claim."
        },
        "totalAmount": {
          "type": "number",
          "description": "Total amount of the claim.",
          "format": "double"
        },
        "claimBilledDate": {
          "type": "string",
          "description": "Date when the claim was billed. (DateTimeOffset) e.g. 2019-01-01T00:00:00.112+00:00",
          "format": "date-time"
        },
        "claimTransmittedDate": {
          "type": "string",
          "description": "Date when the claim was transmitted. (DateTimeOffset) e.g. 2019-01-01T00:00:00.112+00:00",
          "format": "date-time"
        },
        "claimDenialDate": {
          "type": "string",
          "description": "Date when the claim was denied. (DateTimeOffset) e.g. 2019-01-01T00:00:00.112+00:00",
          "format": "date-time"
        },
        "claimDenialLevel": {
          "type": "string",
          "description": "Level of denial for the claim."
        },
        "dateTimeRecorded": {
          "type": "string",
          "description": "Date and time when the claim was recorded. (DateTimeOffset) e.g. 2019-01-01T00:00:00.112+00:00",
          "format": "date-time"
        },
        "serviceDate": {
          "type": "string",
          "description": "Service date for the claim. (DateTimeOffset) e.g. 2019-01-01T00:00:00.112+00:00",
          "format": "date-time"
        },
        "claimStatus": {
          "type": "string",
          "description": "Current status of the claim."
        },
        "claimType": {
          "type": "string",
          "description": "Type of claim (Professional, Institutional, Dental)."
        },
        "facilityId": {
          "type": "string",
          "description": "Identifier for the facility associated with the claim."
        },
        "filingMethod": {
          "type": "string",
          "description": "Filing method used (Electronic or Paper)."
        },
        "locationId": {
          "type": "string",
          "description": "Identifier for the location associated with the claim."
        },
        "placeOfServiceCode": {
          "type": "string",
          "description": "Place of service code for the claim."
        },
        "revenueCode": {
          "type": "string",
          "description": "Revenue code associated with the claim."
        },
        "billingProvider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimBillingProvider"
            }
          ],
          "description": "Billing provider details."
        },
        "renderingProvider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimRenderingProvider"
            }
          ],
          "description": "Rendering provider details."
        },
        "insurances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimInsurance"
          },
          "description": "List of insurance details associated with the claim."
        },
        "custom": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "Custom system-specific data for special cases."
        },
        "diagnoses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimDiagnoses"
          },
          "description": "List of diagnosis codes relevant to the claim."
        },
        "procedures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.ClaimProcedures"
          },
          "description": "List of procedure codes relevant to the claim."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimDiagnoses": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "Human-readable description of the diagnosis."
        },
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.PatientBalance.DiagnosesCoding"
          },
          "description": "Code system details for the diagnosis."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimGuarantor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the guarantor"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimInsurance": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Insurance code."
        },
        "payerId": {
          "type": "string",
          "description": "Payer identifier for the insurance."
        },
        "priority": {
          "type": "string",
          "description": "Priority of the insurance (e.g., 1 for primary)."
        },
        "name": {
          "type": "string",
          "description": "Name of the insurance provider."
        },
        "policyNumber": {
          "type": "string",
          "description": "Policy number of the insurance."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimPatient": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the patient"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimProcedures": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Human-readable description of the procedures."
        },
        "units": {
          "type": "number",
          "description": "Quantity of services performed for the procedure.",
          "format": "double"
        },
        "modifiers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Procedure modifiers that provide additional context."
        },
        "icD10": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Linked diagnosis codes (ICD‑10) that establish medical necessity for the procedure."
        },
        "typeOfService": {
          "type": "string",
          "description": "Service category for the procedure."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.ClaimRenderingProvider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the provider."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.PatientBalance.DiagnosesCoding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "description": "Identifier of the code system."
        },
        "code": {
          "type": "string",
          "description": "Identifier of the code."
        },
        "display": {
          "type": "string",
          "description": "Display-friendly text for the code."
        }
      },
      "additionalProperties": false
    }
  }
}