Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

The Write-off Requests page at /pm/writeoff-requests displays a table of bad debt write-off requests for the current organization and allows users with the approve permission to review and approve or deny pending requests via a dialog.

Overview

The Write-off Requests page is wrapped in a PermissionGate on pm.writeoffs.view; users without this permission never see the page content. It fetches records from pm_bad_debt_writeoffs for the current organization, ordered by creation date descending. The table columns are: Patient (first 8 chars of patient_id), Amount (formatted currency), Aging Days, Reason (reason code with underscores replaced by spaces), Status, and Request Date. Users holding pm.writeoffs.approve additionally see an “Actions” column; a “Review” button appears on each row with pending status and opens the WriteoffApprovalDialog.

Who it’s for

Requires permission pm.writeoffs.view (PM_PERMISSIONS.WRITEOFFS_VIEW) to see the page content at all. Reviewing and approving or denying pending requests additionally requires pm.writeoffs.approve (PM_PERMISSIONS.WRITEOFFS_APPROVE).

Before you start

  • You must hold the pm.writeoffs.view permission.
  • Write-off requests must be submitted (via a separate workflow) before they appear in this queue.

Steps

1

Navigate to Write-off Requests

Go to /pm/writeoff-requests. The page loads and displays all write-off records for the organization. If you lack pm.writeoffs.view, the PermissionGate prevents the table from rendering.
2

Review the queue

The table shows each request with its patient identifier, amount, aging days, reason code, status badge, and request date.
3

Open the approval dialog

Requires pm.writeoffs.approve. Click the “Review” button on a row with status pending. The WriteoffApprovalDialog opens with the full write-off record.
4

Approve or deny the request

Within the dialog, approve or deny the request. Approving updates the status to approved and records approved_by, approval_date, and optional approval_notes. Denying updates the status to denied with the same fields.
5

Retry on error

If the list fails to load, a “Retry” button calls window.location.reload() to refresh the page.

Key concepts

The accounting action of removing an uncollectable balance from accounts receivable and classifying it as bad debt. Requires approval before being finalized.
The number of days a balance has been outstanding. The aging_days field is stored on the write-off record at the time the request is submitted.
pending (outline badge), approved (default badge), denied (destructive badge). Display labels come from the WRITEOFF_STATUS_LABELS map imported from the types module.
When no records exist, an EmptyState component with title “No pending write-off requests” and description “Write-off requests will appear here when submitted.” is shown.
If the query fails, an inline destructive message “Unable to load write-off requests. Please try again.” is shown with a “Retry” button.

Practice Management

Overview of the Practice Management core.

Governance & parity

Documentation coverage and governance.
This page documents shipped product behavior. It is not medical, legal, or billing advice. Verify against your organization’s policies and applicable regulations before using it for clinical, compliance, or billing decisions. Protected health information (PHI) shown in the product is governed by your tenant’s access controls and is never exposed in this documentation.
  • src/routes/pm.tsx
  • src/cores/pm/pages/WriteoffRequestsPage.tsx
  • src/cores/pm/hooks/useWriteoffs45.ts
  • src/platform/permissions/constants.ts