Skip to content

Get Patient Balance ​

Returns the patient's total debt, payments, refunds, and outstanding balance grouped by currency. Use it after creating a collection to verify the updated current-account balance.

GET

/:tenantId/patients/:patientId/balance

Query Parameters ​

ParameterTypeDescription
filter[type]stringLimits the calculation to debt, income, or refund. Normally omit this to calculate the full balance.
filter[payment_method_id]integerLimits the calculation to a payment method.
filter[fulfilled_date][from]dateBeginning of the transaction date range.
filter[fulfilled_date][to]dateEnd of the transaction date range.
filter[has_undistributed_amount]booleanFilters records with an undistributed amount.

Response ​

HTTP 200 OK

json
{
  "data": [
    {
      "currency": "TRY",
      "total_tab": "2500.00",
      "total_paid": "1000.00",
      "total_refund": "0.00",
      "outstanding_balance": "1500.00",
      "base_amount": false
    },
    {
      "currency": "TRY",
      "total_tab": "2500.00",
      "total_paid": "1000.00",
      "total_refund": "0.00",
      "outstanding_balance": "1500.00",
      "base_amount": true
    }
  ]
}

base_amount: true identifies the row converted to the tenant's default currency. Financial values may be masked when the authenticated user does not have finance permissions.