You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(docs) Rewrite README and fix swapped policyNumber/insuranceScheme UUIDs
Rewrites the README with accurate configuration documentation, including
a complete config example, visit attribute type reference table, bill
creation prerequisites, and demo content alignment tables showing which
default UUIDs are and aren't seeded. Also fixes `policyNumber` and
`insuranceScheme` default UUIDs in the config schema which were swapped
relative to the demo content's visit attribute type definitions.
The OpenMRS Billing Module is designed to streamline the financial operations within healthcare settings by facilitating the management of patient billing, payments, and service pricing. This module integrates seamlessly with the OpenMRS platform, allowing healthcare providers to generate bills, track payments, and manage various billable services. It is an essential tool for ensuring transparency and accuracy in financial transactions within healthcare facilities, contributing to efficient service delivery.
6
-
7
-
The **Billing ESM** is a microfrontend for OpenMRS 3.x designed to manage healthcare billing workflows. It allows users to:
5
+
A frontend module for O3 that manages healthcare billing workflows. It allows users to:
8
6
9
7
- Generate and manage bills
10
8
- Capture payments and insurance details
11
9
- Configure billable services and categories
12
10
- Integrate with visits and patient dashboards
13
11
14
-
Dependency: Note that this frontend module depends on the backend module called "Billing Module": <https://github.com/openmrs/openmrs-module-billing>
12
+
This frontend module depends on the backend [Billing Module](https://github.com/openmrs/openmrs-module-billing). It also uses core OpenMRS REST APIs for visit attributes (to track payment status on visits) and concept lookups (to resolve service types and patient categories).
@@ -20,7 +18,7 @@ For more information, please see the
20
18
21
19
Check out the developer documentation [in the OpenMRS Wiki](https://openmrs.atlassian.net/wiki/x/IABBHg).
22
20
23
-
This monorepo uses [yarn](https://yarnpkg.com).
21
+
This repo uses [yarn](https://yarnpkg.com).
24
22
25
23
To install the dependencies, run:
26
24
@@ -37,47 +35,34 @@ yarn start
37
35
Once the dev server launches, log in and select a location. You will get redirected to the home page. Once there:
38
36
39
37
- Navigate to the Billing dashboard on the left panel to view the billing history. Additional billing functionality exists in the Patient Chart. You'll also find the Billable Services dashboard in the System Administration page.
40
-
- For more information on how to navigate and use the billing module, please refer to this [documentation](https://www.notion.so/ucsf-ighs/Billing-User-Manual-7f0427617e714b7db14432312cbb7cad)
41
38
42
39
## Running tests
43
40
44
-
To run tests for all packages, run:
41
+
To run tests, run:
45
42
46
43
```bash
47
-
yarn turbo run test
44
+
yarn test
48
45
```
49
46
50
47
To run tests in `watch` mode, run:
51
48
52
49
```bash
53
-
yarn turbo run test:watch
54
-
```
55
-
56
-
To run a specific test file, run:
57
-
58
-
```bash
59
-
yarn turbo run test -- visit-notes-form
50
+
yarn test:watch
60
51
```
61
52
62
-
The above command will only run tests in the file or files that match the provided string.
63
-
64
-
You can also run the matching tests from above in watch mode by running:
53
+
To run a specific test file, pass a pattern:
65
54
66
55
```bash
67
-
yarn turbo run test:watch -- visit-notes-form
56
+
yarn test -- billing-dashboard
68
57
```
69
58
70
59
To generate a `coverage` report, run:
71
60
72
61
```bash
73
-
yarn turbo run coverage
62
+
yarn coverage
74
63
```
75
64
76
-
By default, `turbo` will cache test runs. This means that re-running tests wihout changing any of the related files will return the cached logs from the last run. To bypass the cache, run tests with the `force` flag, as follows:
77
-
78
-
```bash
79
-
yarn turbo run test --force
80
-
```
65
+
This repo also includes a `yarn verify` script that runs linting, type checking, and tests via Turbo.
81
66
82
67
To run end-to-end tests, run:
83
68
@@ -87,40 +72,94 @@ yarn test-e2e
87
72
88
73
Read the [e2e testing guide](https://openmrs.atlassian.net/wiki/x/Z8CEAQ) to learn more about End-to-End tests in this project.
89
74
90
-
### Updating Playwright
91
-
92
-
The Playwright version in the [Bamboo e2e Dockerfile](e2e/support/bamboo/playwright.Dockerfile#L2) and the `package.json` file must match. If you update the Playwright version in one place, you must update it in the other.
93
-
94
-
## ⚙️ Configuration
75
+
## Configuration
95
76
96
77
You can customize billing behavior using OpenMRS frontend config overrides.
📌 Ensure all UUIDs used here exist in your OpenMRS instance.
122
-
🧩 Configuration can be managed via your MF shell app or import-map-deployer
123
-
```
115
+
All UUIDs must reference resources that exist in your OpenMRS instance. See `src/config-schema.ts` for defaults and detailed descriptions of each property. Configuration can be managed via the app shell or import-map-deployer.
116
+
117
+
#### Visit attribute types
118
+
119
+
The `patientCategory` config keys map to visit attribute types that store billing information on each visit. The following must exist in your backend:
120
+
121
+
| Config key | Purpose | Default UUID |
122
+
| --- | --- | --- |
123
+
|`paymentDetails`| Whether the patient is paying or non-paying |`fbc0702d-b4c9-4968-be63-af8ad3ad6239`|
|`formPayloadPending`| Whether a billing form submission is pending |`919b51c9-8e2e-468f-8354-181bf3e55786`|
129
+
130
+
#### Bill creation prerequisites
131
+
132
+
Creating a bill requires a valid cash point and cashier (provider) UUID. The backend's `BillResource.save()` will attempt to load these from the cashier's active timesheet if the `billing.timesheetRequired` global property is set. Otherwise, the values from `postBilledItems.cashPoint` and `postBilledItems.cashier` in the frontend config are used. If neither is available, bill creation will fail.
133
+
134
+
### Demo content alignment
135
+
136
+
If you are using the [demo content package](https://github.com/openmrs/openmrs-content-referenceapplication-demo), the following backend seeds are relevant (paths relative to that repo):
|`patientCategory.paymentDetails`|`fbc0702d...`| "Patient Type" visit attribute type |
149
+
|`patientCategory.paymentMethods`|`8553afa0...`| "Payment Method" visit attribute type |
150
+
|`patientCategory.policyNumber`|`aac48226...`| "Insurance Policy Number" visit attribute type |
151
+
|`patientCategory.insuranceScheme`|`3a988e33...`| "Insurance Scheme" visit attribute type |
152
+
|`postBilledItems.cashPoint`|`54065383...`| "OPD Cash Point" cash point |
153
+
154
+
The following defaults are **not seeded** by the demo content and must be created manually or overridden:
155
+
156
+
| Config key | Default UUID | What's needed |
157
+
| --- | --- | --- |
158
+
|`patientCategory.patientCategory`|`3b9dfac8...`| A visit attribute type for patient category classification |
159
+
|`patientCategory.formPayloadPending`|`919b51c9...`| A visit attribute type for pending form status |
160
+
|`postBilledItems.cashier`|`f9badd80...`| A provider UUID for the default cashier |
161
+
|`waiverPaymentModeUuid`|`eb6173cb...`| A payment mode for bill waivers |
162
+
|`serviceTypes.billableService`|`21b8cf43...`| A concept set whose members define billable service types |
124
163
125
164
## Troubleshooting
126
165
@@ -143,20 +182,18 @@ git checkout package.json
143
182
yarn
144
183
```
145
184
185
+
Please see the [Implementer Documentation](https://wiki.openmrs.org/pages/viewpage.action?pageId=224527013) for more information about configuring modules.
186
+
146
187
## Design Patterns
147
188
148
189
For documentation about our design patterns, please visit our [design system](https://zeroheight.com/23a080e38/p/880723--introduction) documentation website.
149
190
150
-
## Configuration
151
-
152
-
Please see the [Implementer Documentation](https://wiki.openmrs.org/pages/viewpage.action?pageId=224527013) for information about configuring modules.
153
-
154
191
## Deployment
155
192
156
-
See [Creating a Distribution](https://openmrs.atlassian.net/wiki/x/IABBHg) for information about adding microfrontends to a distribution.
193
+
See [Creating a Distribution](https://openmrs.atlassian.net/wiki/x/IABBHg) for information about adding frontend modules to a distribution.
157
194
158
195
## Contributing
159
196
160
197
For more information on how to get started, please refer to [OpenMRS Frontend Developer Documentation](https://openmrs.atlassian.net/wiki/x/94ABCQ).
161
198
162
-
Detailed documentation on Billing Module can be found [in the OpenMRS Wiki](https://openmrs.atlassian.net/wiki/x/0w2bAQ)
199
+
Detailed documentation on the Billing Module can be found [in the OpenMRS Wiki](https://openmrs.atlassian.net/wiki/x/0w2bAQ).
0 commit comments