Skip to content

Deleted Invoices

The Deleted Invoices audit screen (/admin/deleted-invoices) preserves a read-only history of invoices that were removed from active billing. This supports financial controls, dispute resolution, and compliance without allowing silent data loss.

Permission module: deleted_invoices (view only — no create, edit, or delete)

Why deleted invoices exist

EaseLab separates cancellation from deletion:

ActionPatient-visibleAudit trail
Cancel invoiceMay show as cancelledActive invoice record with status
Delete invoiceRemoved from active listsCopied to deleted invoices log

Deletion requires elevated permission (invoices.delete or legacy invoices.delete).

mermaid
flowchart LR
    INV[Active invoice] --> DEL[Delete action]
    DEL --> AUD[Deleted invoices log]
    DEL --> REM[Removed from operational lists]
    AUD --> RPT[Audit / investigation]

Deletion is destructive

Deleted invoices cannot be restored from this screen. Recovery requires database restore to a point before deletion.

Audit record contents

Each deleted invoice entry typically includes:

FieldPurpose
Original invoice numberCross-reference
Patient name & IDIdentity context
Invoice date & amountFinancial magnitude
Tests / line summaryClinical context
Referral doctorCommission impact
Deleted at timestampWhen action occurred
Deleted by userStaff accountability
Deletion reasonOptional note from operator

Who can delete invoices

Grant deletion sparingly:

RoleRecommendation
Lab ownerinvoices.delete
Senior reception supervisorCase-by-case
Bench staffDeny
External accountantdeleted_invoices.view only

Combine with Quick Access review — quick.cancel_invoice is separate from hard delete.

Viewing the audit log

  1. Navigate to Admin → Deleted Invoices.
  2. Filter by date range, user, or patient.
  3. Open detail row for line items and metadata.
  4. Export if your deployment supports CSV (see Export & Filters).

No edit or purge actions are available — the log is append-only from normal UI flows.

Operational policies

Recommended lab policy:

mermaid
flowchart TD
    A[Delete request] --> B{Supervisor approval?}
    B -->|No| C[Use cancel instead]
    B -->|Yes| D[Document reason]
    D --> E[Perform delete]
    E --> F[Monthly audit review]
Policy elementGuidance
ApprovalSecond person for invoices over threshold
Reason codesDuplicate entry, wrong patient, test abort
Prefer cancelMaintains patient billing history
Monthly reviewFinance scans deleted invoices report

Reporting interactions

ReportImpact
Cash flowDeleted invoices removed from active totals
Financial summaryHistorical restatement may be needed after deletion
Patient dueBalances recalculated on delete
Referral summaryCommission may reverse depending on timing

Investigate before accusing

Staff may delete duplicate registrations during training. Check deleted by and date before escalation.

Read-only mode

When the lab is in read-only mode, deletion is blocked along with other mutations. The audit log remains viewable.

Compliance notes

RequirementHow EaseLab helps
AccountabilityUser ID on each deletion
Non-repudiationImmutable audit list
RecoveryPoint-in-time backup restore
Segregation of dutiesView without delete permissions

For legal hold scenarios, export audit entries before retention-driven backup expiry.

Ease Lab — Cloud Pathology Lab Management