@clinicemr/esm-patient-payment-manager-app
v1.5.0
Published
Role-aware payment manager for OpenMRS CLINICEMR distro: tabbed cashier workspace (register new patient + pending provider payment requests), searchable Billing/Cashier-API service picker, corporate/private payer selection, printable receipts & invoices,
Readme
ESM Patient Payment Manager App
Role-aware payment manager for the OpenMRS CLINICEMR distro. Built on top of the
OpenMRS billing/cashier module (/ws/rest/v1/cashier/*).
Features
- Unified order/item search with prices — a single debounced search
(
OrderSearch) spanning billable services/items, drugs (RESTdrugresource) and lab tests (configured orderable concept sets). Each result shows its resolved price and is selectable on the consultation payment gate and the quick-bill modal. Categories are controlled byorderSearchCategories, and lab tests requirelabOrderableConceptsto be configured. - Consultation payment gate before registration — Cashier / Receptionist /
Organisation Nurse roles must record a consultation payment before they can
register a patient. The
payment-manager-lockdownguard redirects them topayment-manager/consultationif they hitpatient-registrationwithout a recorded payment. The fee is settled against the new patient automatically in the post-registration step. - Provider lockdown — Doctors, Pharmacists and Laboratory roles are blocked
from
patient-registrationand allpayment-manager/*pages. - Pending payments queue — Cashiers see all
PENDINGbills atpayment-manager/pendingand settle them with the Receive Payment modal. - Order-basket payment requests — when a clinician adds a drug/lab order,
the
order-payment-panel(inorder-basket-slot) shows the matched price and a "Send for payment" button that creates a PENDING bill for the cashier queue. The order is intended to be completed after the patient pays.
Roles
Configured via cashierRoleNames and providerRoleNames (see config-schema.ts).
Defaults: cashier roles = Organizational: Nurse, Cashier, Receptionist;
provider roles = Doctor / Pharmacist / Laboratory variants.
Distro wiring
This app registers the post-registration page route and expects the
registration app's submitButton link to be
${openmrsSpaBase}/post-registration/${patientUuid}.
Important:
@clinicemr/esm-post-registration-redirect-appalso registers thepost-registrationroute. Do not enable both in the same distro — this app supersedes the redirect app. Remove the redirect app fromspa-assemble-config.json(or exclude it) when enabling the payment manager.
Example config-core_demo.json block:
"@clinicemr/esm-patient-payment-manager-app": {
"cashierRoleNames": ["Organizational: Nurse", "Cashier", "Receptionist"],
"providerRoleNames": ["Doctor", "Pharmacist", "Laboratory"],
"consultationBillableServiceUuid": "<uuid-of-consultation-service>",
"cashPointUuid": "<uuid-of-cash-point>",
"defaultCurrency": "UGX"
}Build
NODE_OPTIONS="--max-old-space-size=3072" ../../node_modules/.bin/webpack --mode production