@openmrs/esm-patient-immunizations-app 11.3.1-patch.9310 → 11.3.1-pre.10001

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.
@@ -1,42 +1,39 @@
1
- Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
2
- npx update-browserslist-db@latest
3
- Why you should do it regularly: https://github.com/browserslist/update-db#readme
4
- assets by path *.js 3.58 MiB
5
- assets by chunk 2.67 MiB (id hint: vendors)
6
- assets by status 2.4 MiB [big]
7
- asset 1268.js 1.99 MiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
8
- asset 795.js 414 KiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
1
+ assets by path *.js 3.73 MiB
2
+ assets by chunk 2.77 MiB (id hint: vendors)
3
+ assets by status 2.5 MiB [big]
4
+ asset 2300.js 2.1 MiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
5
+ asset 795.js 415 KiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
9
6
  + 8 assets
10
- + 52 assets
11
- assets by path *.json 32 KiB
12
- asset openmrs-esm-patient-immunizations-app.js.buildmanifest.json 30.9 KiB [emitted]
7
+ + 55 assets
8
+ assets by path *.json 33.3 KiB
9
+ asset openmrs-esm-patient-immunizations-app.js.buildmanifest.json 32.2 KiB [emitted]
13
10
  asset routes.json 1.09 KiB [emitted] [from: src/routes.json] [copied]
14
- orphan modules 9.8 MiB [orphan] 3071 modules
11
+ orphan modules 9.86 MiB [orphan] 3091 modules
15
12
  runtime modules 44.2 KiB 28 modules
16
- built modules 8.21 MiB (javascript) 420 bytes (share-init) 420 bytes (consume-shared) [built]
17
- modules by path ../../node_modules/ 7.71 MiB 596 modules
18
- modules by path ./ 269 KiB
19
- modules by path ./translations/ 66.4 KiB 40 modules
20
- modules by path ./src/ 202 KiB 13 modules
13
+ built modules 8.43 MiB (javascript) 420 bytes (share-init) 420 bytes (consume-shared) [built]
14
+ modules by path ../../node_modules/ 7.88 MiB 603 modules
15
+ modules by path ./ 274 KiB
16
+ optional modules 71.1 KiB [optional] 42 modules
17
+ javascript modules 203 KiB 14 modules
21
18
  provide-module modules 420 bytes 10 modules
22
19
  consume-shared-module modules 420 bytes 10 modules
23
- modules by path ../esm-patient-common-lib/src/ 240 KiB
24
- ../esm-patient-common-lib/src/index.ts + 47 modules 111 KiB [built] [code generated]
20
+ modules by path ../esm-patient-common-lib/src/ 286 KiB
21
+ ../esm-patient-common-lib/src/index.ts + 52 modules 119 KiB [built] [code generated]
25
22
  ../../node_modules/@openmrs/webpack-config/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!../esm-patient-common-lib/src/cards/card-header.scss 31.5 KiB [built] [code generated]
26
- + 3 modules
23
+ + 4 modules
27
24
  container entry 42 bytes [built] [code generated]
28
25
 
29
26
  WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
30
27
  This can impact web performance.
31
28
  Assets:
32
- main.js (508 KiB)
33
- 1268.js (1.99 MiB)
34
- 795.js (414 KiB)
29
+ main.js (509 KiB)
30
+ 2300.js (2.1 MiB)
31
+ 795.js (415 KiB)
35
32
 
36
33
  WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
37
34
  Entrypoints:
38
- main (508 KiB)
35
+ main (509 KiB)
39
36
  main.js
40
37
  
41
38
 
42
- webpack 5.99.9 compiled with 2 warnings in 136534 ms
39
+ webpack 5.99.9 compiled with 2 warnings in 136911 ms
package/README.md CHANGED
@@ -1,4 +1,173 @@
1
1
  # esm-patient-immunizations-app
2
2
 
3
- The immunizations widget. It provides a tabular overview of the immunizations recorded for a patient as well as a form for recording new immunizations.
3
+ The immunizations widget provides a visual, intuitive system for clinicians to record immunizations, track vaccination schedules, and monitor a patient's vaccination status.
4
4
 
5
+ ## Usage
6
+
7
+ This module is a patient chart widget that can be added to any patient chart dashboard. It provides two main views:
8
+
9
+ 1. **Immunization Summary**: A detailed, collapsible table that groups immunizations by vaccine type. It provides an overview of the patient's vaccination history with expandable rows for more detail.
10
+ From this view, users can add new immunizations or edit/delete existing doses, which launches the immunization workspace form.
11
+
12
+ 2. **Immunization History**: A separate card that provides a simple, chronological list of all immunizations the patient has received.
13
+ This card, in conjunction with the summary view, helps clinicians track whether a patient's next scheduled dose is upcoming or overdue.
14
+
15
+ ## Key Features
16
+
17
+ ### Enhanced Immunization Form
18
+
19
+ - **Comprehensive Data Entry**: A workspace form allows for recording new vaccinations with fields for:
20
+ - Vaccination Date
21
+ - Immunization (Vaccine Name)
22
+ - Dose Number
23
+ - Manufacturer
24
+ - Lot Number
25
+ - Expiration Date
26
+ - Next Dose Date
27
+ - Free-text Notes
28
+ - **Smart Validation**: Includes checks for future dates and ensures the vaccination date is on or after the patient's birth date.
29
+ - **Loading & Error States**: Provides clear user feedback during form submission and validation.
30
+
31
+ ### Detailed Summary & History
32
+
33
+ - **Grouped Summary Table**: Displays a consolidated list of all vaccine types the patient has received. Each entry shows the vaccine name and details of the most recent dose.
34
+ - **Expandable Details**: Users can expand each vaccine entry to see a detailed history for that specific vaccine, including dose number, dates, lot number, manufacturer, notes, and actions.
35
+ - **Chronological History Card**: A separate view shows all immunization events sorted by date.
36
+
37
+ ### Next Dose Tracking
38
+
39
+ - **Visual Indicators**: The system uses visual cues to highlight the status of upcoming vaccinations:
40
+ - 🔴 **Red flag**: Indicates an overdue or currently due vaccination.
41
+ - 🟢 **Green flag**: Indicates an upcoming vaccination.
42
+ - **Scheduling Logic**: The `Next Dose Date` field helps clinicians plan future appointments and prevents scheduling errors (e.g., setting a next dose date before the current vaccination date).
43
+
44
+ ### Full Record Management
45
+
46
+ - **Edit Functionality**: Allows modification of existing immunization records. The form is pre-populated with existing data, and the vaccine name is locked to maintain data integrity.
47
+ - **Delete Functionality**: Individual immunization doses can be safely deleted after a confirmation prompt.
48
+ - **User Feedback**: Toast notifications confirm the success or failure of create, update, and delete operations.
49
+
50
+ ## Configuration
51
+
52
+ ### Available Widgets
53
+
54
+ This module registers several extensions that create the complete immunization feature. Here is a breakdown of the key widgets and how they are used:
55
+
56
+ 1. **Immunizations Dashboard Link (`immunization-summary-dashboard`)**: Adds the "Immunizations" link to the patient chart's side navigation menu and automatically creates a dedicated dashboard page for immunization widgets.
57
+
58
+ 2. **Immunization Summary Table (`immunization-details-widget`)**: The main collapsible table that groups immunizations by vaccine type. Automatically placed on the Immunizations Dashboard.
59
+
60
+ 3. **Immunization History Card (`immunization-detailed-history-card`)**: A chronological list of all immunizations. Automatically placed on the Immunizations Dashboard.
61
+
62
+ 4. **Immunization Overview Widget (`immunization-overview-widget`)**: This is a small, summary card intended for placement on other dashboards, like the main patient summary. It is **not assigned to a dashboard slot by default**.
63
+
64
+ To add the overview widget to the patient summary dashboard, add the following to your `extensions.json` configuration:
65
+
66
+ ```json
67
+ {
68
+ "name": "immunization-overview-widget",
69
+ "slot": "patient-chart-summary-dashboard-slot",
70
+ "order": 8
71
+ }
72
+ ```
73
+
74
+ ### Frontend Configuration
75
+
76
+ Configure the widget by setting values in your implementation's configuration file (typically `config.json` or via the System Administration module). The following parameters are available:
77
+
78
+ ---
79
+
80
+ ### Configurable Parameters Summary
81
+
82
+ | Parameter | Type | Description | Default |
83
+ | ---------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------- |
84
+ | **`immunizationConceptSet`** | `string` | A UUID or concept mapping (e.g., `"CIEL:984"`) that resolves to a **concept set** containing all available vaccine concepts. | `"CIEL:984"` |
85
+ | **`sequenceDefinitions`** | `array` | Defines the **dose and booster schedules** for each vaccine. Each entry represents one vaccine and its sequence definitions. | See example below |
86
+
87
+ ---
88
+
89
+ ### Example Configuration
90
+
91
+ ```json
92
+ {
93
+ "immunizationConceptSet": "CIEL:984",
94
+ "sequenceDefinitions": [
95
+ {
96
+ "vaccineConceptUuid": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
97
+ "sequences": [
98
+ { "sequenceLabel": "Dose-1", "sequenceNumber": 1 },
99
+ { "sequenceLabel": "Dose-2", "sequenceNumber": 2 },
100
+ { "sequenceLabel": "Dose-3", "sequenceNumber": 3 },
101
+ { "sequenceLabel": "Dose-4", "sequenceNumber": 4 },
102
+ { "sequenceLabel": "Booster-1", "sequenceNumber": 11 },
103
+ { "sequenceLabel": "Booster-2", "sequenceNumber": 12 }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ ```
109
+
110
+ **Note**: Replace `vaccineConceptUuid` with your actual vaccine concept UUIDs.
111
+
112
+ ---
113
+
114
+ ### Configuration Notes
115
+
116
+ - **Dose numbering convention**:
117
+ - `1–9` → Primary doses
118
+ - `11–19` → Booster doses
119
+ - If `sequenceDefinitions` is not provided, vaccines are treated as single-dose vaccines without predefined schedules.
120
+ - `sequenceLabel` values are used as translation keys in the UI for localization.
121
+ - You can add multiple vaccine definitions to represent your national or local immunization program.
122
+
123
+ ## Backend Setup Requirements
124
+
125
+ The immunizations feature requires backend configuration in the OpenMRS [FHIR2 module](https://github.com/openmrs/openmrs-module-fhir2).
126
+
127
+ ### Required Global Properties
128
+
129
+ - `fhir2.immunizationsEncounterTypeUuid` - UUID of the encounter type for immunization encounters
130
+ - `fhir2.administeringEncounterRoleUuid` - UUID of the encounter role for the administering provider
131
+
132
+ ### Required Concept Mappings
133
+
134
+ The following CIEL concepts must be mapped:
135
+
136
+ | CIEL Code | Concept Name | Required |
137
+ |-----------|--------------|----------|
138
+ | CIEL:1421 | Immunization grouping concept | ✅ Required |
139
+ | CIEL:984 | Vaccine | ✅ Required |
140
+ | CIEL:1410 | Vaccination date | ✅ Required |
141
+ | CIEL:1418 | Dose number | ✅ Required |
142
+ | CIEL:1419 | Manufacturer | ✅ Required |
143
+ | CIEL:1420 | Lot number | ✅ Required |
144
+ | CIEL:165907 | Expiration date | ✅ Required |
145
+ | CIEL:161011 | Free text comment | ⚠️ Optional |
146
+ | CIEL:170000 | Date next dose | ⚠️ Optional |
147
+
148
+ ## Implementation Checklist
149
+
150
+ ### Backend Setup (Required)
151
+
152
+ - [ ] Configure global property `fhir2.immunizationsEncounterTypeUuid` with encounter type UUID
153
+ - [ ] Configure global property `fhir2.administeringEncounterRoleUuid` with encounter role UUID
154
+ - [ ] Verify all required CIEL concept mappings exist (CIEL:1421, CIEL:984, CIEL:1410, CIEL:1418, CIEL:1419, CIEL:1420, CIEL:165907)
155
+ - [ ] Verify optional CIEL concept mappings if using notes or next dose date features (CIEL:161011, CIEL:170000)
156
+
157
+ ### Frontend Setup (Required)
158
+
159
+ - [ ] Configure `immunizationConceptSet` to point to your implementation's concept set for vaccines.
160
+ - [ ] Configure `sequenceDefinitions` for all vaccines that have a multi-dose or booster schedule.
161
+ - [ ] Set user permissions for recording and managing immunizations.
162
+
163
+ ### Optional Customizations
164
+
165
+ - [ ] Add or modify `sequenceDefinitions` to match local or national immunization programs.
166
+ - [ ] Add translations for custom `sequenceLabel` values if supporting multiple languages.
167
+
168
+ ## Key Files for Customization
169
+
170
+ - **`src/config-schema.ts`**: Main configuration for vaccine concept sets and dose schedules.
171
+ - **`src/immunizations/immunizations-detailed-summary.component.tsx`**: The main component for the immunization summary view.
172
+ - **`src/immunizations/immunization-history-dashboard.component.tsx`**: The component for the chronological history view.
173
+ - **`src/immunizations/immunizations-form.workspace.tsx`**: The workspace form for adding and editing immunizations.