@palladium-ethiopia/esm-reports-app 5.4.2-pre.220 → 5.4.2-pre.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/README.md +74 -0
- package/dist/routes.json +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# esm-reports-app
|
|
2
|
+
|
|
3
|
+
An O3 single-page application that brings the EthiopiaEMR reporting suite into the OpenMRS 3 shell. It provides a left-navigation report browser organised by category, a dynamic parameter form for each report, on-screen tabular results, and one-click downloads of available report designs (e.g. Excel templates).
|
|
4
|
+
|
|
5
|
+
## Routes
|
|
6
|
+
|
|
7
|
+
| Path | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `/openmrs/spa/reports` | Root — shows the info landing page until a report is selected |
|
|
10
|
+
| `/openmrs/spa/reports/:reportUuid` | Report runner for the selected report UUID |
|
|
11
|
+
|
|
12
|
+
## Backend dependencies
|
|
13
|
+
|
|
14
|
+
| Module | Minimum version | Purpose |
|
|
15
|
+
|--------|-----------------|---------|
|
|
16
|
+
| `ethiopiaemrreports` | `>= 1.0.0` | Serves the grouped report list and report details via legacy fragment actions |
|
|
17
|
+
| `reporting` | `>= 1.27.0` | Core OpenMRS Reporting module — evaluates report definitions |
|
|
18
|
+
| `reportingrest` | `>= 1.15.0` | REST API used to run reports and stream result datasets |
|
|
19
|
+
|
|
20
|
+
The app communicates with two distinct API layers. The grouped report list and per-report details (including parameter definitions and available rendering designs) come from legacy servlet-container fragment actions exposed by `ethiopiaemrreports` (`/ethiopiaemrreports/report/reportUtils/...`). Actual report evaluation and result retrieval use the standard `reportingrest` REST API. Both paths must be proxied through the O3 gateway.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
### Left-navigation report browser
|
|
25
|
+
Reports returned by the backend are grouped into categories (e.g. Common, Cohort Analysis, EHR Reports) and rendered in the O3 left nav. Selecting a report navigates to its runner page.
|
|
26
|
+
|
|
27
|
+
### Dynamic parameter form
|
|
28
|
+
Each report declares zero or more parameters with a name, display label, and Java type. The runner renders the appropriate Carbon input for each parameter — a `DatePicker` for any `java.util.Date`-typed parameter, and a `TextInput` for everything else. The Run and Download buttons are disabled until all parameters are filled.
|
|
29
|
+
|
|
30
|
+
### On-screen results table
|
|
31
|
+
After a report runs, each result dataset is displayed in a scrollable Carbon `DataTable`. Column order is controlled by the `columnOrderByUuid` config (see below) so that tables match the source paper layout rather than the alphabetical order that the REST API returns.
|
|
32
|
+
|
|
33
|
+
### Report design downloads
|
|
34
|
+
If a report has one or more rendering designs (e.g. an Excel template), a Download button is shown for each. Downloads are generated server-side and streamed to the browser; an `AbortController` cancels any in-flight download when the user navigates away.
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
Configuration is managed through the O3 config system (`@openmrs/esm-framework`). The schema is defined in `src/config-schema.ts`.
|
|
39
|
+
|
|
40
|
+
| Key | Type | Default | Description |
|
|
41
|
+
|-----|------|---------|-------------|
|
|
42
|
+
| `columnOrderByUuid` | `Object` | See schema | Map of report UUID → ordered column name array. Columns are rendered in this order; columns present in the data but not listed are appended at the end. |
|
|
43
|
+
| `hiddenDatasets` | `Array<string>` | `["immRegisterExcel"]` | Dataset names that feed an Excel template only and should not appear in the on-screen table. |
|
|
44
|
+
|
|
45
|
+
Example configuration override:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"@palladium-ethiopia/esm-reports-app": {
|
|
50
|
+
"columnOrderByUuid": {
|
|
51
|
+
"your-report-uuid-here": ["Column A", "Column B", "Column C"]
|
|
52
|
+
},
|
|
53
|
+
"hiddenDatasets": ["excelOnlyDataset"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Install dependencies from the monorepo root
|
|
62
|
+
yarn install
|
|
63
|
+
|
|
64
|
+
# Start a dev server for this app only
|
|
65
|
+
yarn start --sources 'packages/esm-reports-app'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The dev server proxies API calls to the backend configured in `.env` (copy `example.env` to get started).
|
|
69
|
+
|
|
70
|
+
## Tests
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
yarn test --filter @palladium-ethiopia/esm-reports-app
|
|
74
|
+
```
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"ethiopiaemrreports":">=1.0.0","reporting":">=1.27.0","reportingrest":">=1.15.0"},"pages":[{"component":"root","route":"reports"}],"extensions":[],"version":"5.4.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"ethiopiaemrreports":">=1.0.0","reporting":">=1.27.0","reportingrest":">=1.15.0"},"pages":[{"component":"root","route":"reports"}],"extensions":[],"version":"5.4.2-pre.239"}
|