@kenyaemr/esm-icu-app 5.4.5-pre.1142

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.
Files changed (268) hide show
  1. package/.turbo/turbo-build.log +6 -0
  2. package/dist/1072.js +1 -0
  3. package/dist/1072.js.map +1 -0
  4. package/dist/1148.js +1 -0
  5. package/dist/1148.js.map +1 -0
  6. package/dist/1156.js +1 -0
  7. package/dist/1156.js.map +1 -0
  8. package/dist/1278.js +1 -0
  9. package/dist/1278.js.map +1 -0
  10. package/dist/1442.js +1 -0
  11. package/dist/1442.js.map +1 -0
  12. package/dist/1466.js +1 -0
  13. package/dist/1466.js.map +1 -0
  14. package/dist/15.js +1 -0
  15. package/dist/15.js.map +1 -0
  16. package/dist/1568.js +1 -0
  17. package/dist/1568.js.map +1 -0
  18. package/dist/1620.js +1 -0
  19. package/dist/1620.js.map +1 -0
  20. package/dist/1668.js +1 -0
  21. package/dist/1668.js.map +1 -0
  22. package/dist/1789.js +1 -0
  23. package/dist/1789.js.map +1 -0
  24. package/dist/1831.js +1 -0
  25. package/dist/1831.js.map +1 -0
  26. package/dist/1844.js +1 -0
  27. package/dist/1844.js.map +1 -0
  28. package/dist/1946.js +1 -0
  29. package/dist/1946.js.map +1 -0
  30. package/dist/2007.js +1 -0
  31. package/dist/2007.js.map +1 -0
  32. package/dist/2115.js +1 -0
  33. package/dist/2115.js.map +1 -0
  34. package/dist/2152.js +1 -0
  35. package/dist/2152.js.map +1 -0
  36. package/dist/2202.js +1 -0
  37. package/dist/2202.js.map +1 -0
  38. package/dist/2231.js +1 -0
  39. package/dist/2231.js.map +1 -0
  40. package/dist/2394.js +1 -0
  41. package/dist/2394.js.map +1 -0
  42. package/dist/2507.js +1 -0
  43. package/dist/2507.js.map +1 -0
  44. package/dist/2516.js +1 -0
  45. package/dist/2516.js.map +1 -0
  46. package/dist/2534.js +1 -0
  47. package/dist/2534.js.map +1 -0
  48. package/dist/2537.js +1 -0
  49. package/dist/2537.js.map +1 -0
  50. package/dist/2556.js +1 -0
  51. package/dist/2556.js.map +1 -0
  52. package/dist/2648.js +1 -0
  53. package/dist/2648.js.map +1 -0
  54. package/dist/2795.js +1 -0
  55. package/dist/2795.js.map +1 -0
  56. package/dist/2842.js +1 -0
  57. package/dist/2842.js.map +1 -0
  58. package/dist/2916.js +1 -0
  59. package/dist/2916.js.map +1 -0
  60. package/dist/2924.js +1 -0
  61. package/dist/2924.js.map +1 -0
  62. package/dist/2947.js +1 -0
  63. package/dist/2947.js.map +1 -0
  64. package/dist/3032.js +1 -0
  65. package/dist/3032.js.map +1 -0
  66. package/dist/3137.js +1 -0
  67. package/dist/3137.js.map +1 -0
  68. package/dist/3285.js +1 -0
  69. package/dist/3285.js.map +1 -0
  70. package/dist/3335.js +1 -0
  71. package/dist/3335.js.map +1 -0
  72. package/dist/3378.js +1 -0
  73. package/dist/3378.js.map +1 -0
  74. package/dist/3381.js +1 -0
  75. package/dist/3381.js.map +1 -0
  76. package/dist/3504.js +1 -0
  77. package/dist/3504.js.map +1 -0
  78. package/dist/356.js +1 -0
  79. package/dist/356.js.map +1 -0
  80. package/dist/3569.js +1 -0
  81. package/dist/3569.js.map +1 -0
  82. package/dist/3723.js +1 -0
  83. package/dist/3723.js.map +1 -0
  84. package/dist/3745.js +1 -0
  85. package/dist/3745.js.map +1 -0
  86. package/dist/3747.js +1 -0
  87. package/dist/3747.js.map +1 -0
  88. package/dist/3802.js +1 -0
  89. package/dist/3802.js.map +1 -0
  90. package/dist/3813.js +1 -0
  91. package/dist/3813.js.map +1 -0
  92. package/dist/393.js +6 -0
  93. package/dist/393.js.map +1 -0
  94. package/dist/3953.js +1 -0
  95. package/dist/3953.js.map +1 -0
  96. package/dist/3989.js +1 -0
  97. package/dist/3989.js.map +1 -0
  98. package/dist/4178.js +1 -0
  99. package/dist/4178.js.map +1 -0
  100. package/dist/4487.js +11 -0
  101. package/dist/4487.js.map +1 -0
  102. package/dist/4588.js +1 -0
  103. package/dist/4588.js.map +1 -0
  104. package/dist/4612.js +1 -0
  105. package/dist/4612.js.map +1 -0
  106. package/dist/4637.js +1 -0
  107. package/dist/4637.js.map +1 -0
  108. package/dist/466.js +1 -0
  109. package/dist/466.js.map +1 -0
  110. package/dist/4817.js +1 -0
  111. package/dist/4817.js.map +1 -0
  112. package/dist/4818.js +1 -0
  113. package/dist/4818.js.map +1 -0
  114. package/dist/500.js +1 -0
  115. package/dist/500.js.map +1 -0
  116. package/dist/5086.js +1 -0
  117. package/dist/5086.js.map +1 -0
  118. package/dist/5117.js +1 -0
  119. package/dist/5117.js.map +1 -0
  120. package/dist/5361.js +1 -0
  121. package/dist/5361.js.map +1 -0
  122. package/dist/5366.js +1 -0
  123. package/dist/5366.js.map +1 -0
  124. package/dist/5598.js +1 -0
  125. package/dist/5598.js.map +1 -0
  126. package/dist/5676.js +1 -0
  127. package/dist/5676.js.map +1 -0
  128. package/dist/5731.js +5 -0
  129. package/dist/5731.js.map +1 -0
  130. package/dist/5792.js +1 -0
  131. package/dist/5792.js.map +1 -0
  132. package/dist/5825.js +1 -0
  133. package/dist/5825.js.map +1 -0
  134. package/dist/5932.js +1 -0
  135. package/dist/5932.js.map +1 -0
  136. package/dist/5941.js +1 -0
  137. package/dist/5941.js.map +1 -0
  138. package/dist/5967.js +1 -0
  139. package/dist/5967.js.map +1 -0
  140. package/dist/6104.js +1 -0
  141. package/dist/6104.js.map +1 -0
  142. package/dist/624.js +1 -0
  143. package/dist/624.js.map +1 -0
  144. package/dist/6259.js +1 -0
  145. package/dist/6259.js.map +1 -0
  146. package/dist/6288.js +1 -0
  147. package/dist/6288.js.map +1 -0
  148. package/dist/629.js +1 -0
  149. package/dist/629.js.map +1 -0
  150. package/dist/6337.js +1 -0
  151. package/dist/6337.js.map +1 -0
  152. package/dist/6427.js +1 -0
  153. package/dist/6427.js.map +1 -0
  154. package/dist/6478.js +7 -0
  155. package/dist/6478.js.map +1 -0
  156. package/dist/6508.js +1 -0
  157. package/dist/6508.js.map +1 -0
  158. package/dist/6567.js +1 -0
  159. package/dist/6567.js.map +1 -0
  160. package/dist/6634.js +1 -0
  161. package/dist/6634.js.map +1 -0
  162. package/dist/689.js +1 -0
  163. package/dist/689.js.map +1 -0
  164. package/dist/7022.js +1 -0
  165. package/dist/7022.js.map +1 -0
  166. package/dist/7085.js +1 -0
  167. package/dist/7085.js.map +1 -0
  168. package/dist/7209.js +1 -0
  169. package/dist/7209.js.map +1 -0
  170. package/dist/7235.js +1 -0
  171. package/dist/7235.js.map +1 -0
  172. package/dist/7360.js +1 -0
  173. package/dist/7360.js.map +1 -0
  174. package/dist/7453.js +1 -0
  175. package/dist/7453.js.map +1 -0
  176. package/dist/7454.js +1 -0
  177. package/dist/7454.js.map +1 -0
  178. package/dist/7478.js +1 -0
  179. package/dist/7478.js.map +1 -0
  180. package/dist/7782.js +1 -0
  181. package/dist/7782.js.map +1 -0
  182. package/dist/7887.js +1 -0
  183. package/dist/7887.js.map +1 -0
  184. package/dist/8028.js +1 -0
  185. package/dist/8028.js.map +1 -0
  186. package/dist/8196.js +1 -0
  187. package/dist/8196.js.map +1 -0
  188. package/dist/820.js +1 -0
  189. package/dist/820.js.map +1 -0
  190. package/dist/8458.js +1 -0
  191. package/dist/8458.js.map +1 -0
  192. package/dist/8472.js +1 -0
  193. package/dist/8472.js.map +1 -0
  194. package/dist/8607.js +1 -0
  195. package/dist/8607.js.map +1 -0
  196. package/dist/8762.js +1 -0
  197. package/dist/8762.js.map +1 -0
  198. package/dist/8924.js +1 -0
  199. package/dist/8924.js.map +1 -0
  200. package/dist/8990.js +1 -0
  201. package/dist/8990.js.map +1 -0
  202. package/dist/9060.js +1 -0
  203. package/dist/9060.js.map +1 -0
  204. package/dist/9061.js +1 -0
  205. package/dist/9061.js.map +1 -0
  206. package/dist/9087.js +1 -0
  207. package/dist/9087.js.map +1 -0
  208. package/dist/9425.js +1 -0
  209. package/dist/9520.js +1 -0
  210. package/dist/9520.js.map +1 -0
  211. package/dist/9547.js +1 -0
  212. package/dist/9547.js.map +1 -0
  213. package/dist/9612.js +1 -0
  214. package/dist/9612.js.map +1 -0
  215. package/dist/9771.js +1 -0
  216. package/dist/9771.js.map +1 -0
  217. package/dist/9774.js +1 -0
  218. package/dist/9774.js.map +1 -0
  219. package/dist/9806.js +1 -0
  220. package/dist/9806.js.map +1 -0
  221. package/dist/992.js +1 -0
  222. package/dist/992.js.map +1 -0
  223. package/dist/997.js +1 -0
  224. package/dist/997.js.map +1 -0
  225. package/dist/kenyaemr-esm-icu-app.js +3 -0
  226. package/dist/kenyaemr-esm-icu-app.js.buildmanifest.json +3063 -0
  227. package/dist/kenyaemr-esm-icu-app.js.map +1 -0
  228. package/dist/main.js +3 -0
  229. package/dist/main.js.map +1 -0
  230. package/dist/routes.json +1 -0
  231. package/package.json +49 -0
  232. package/rspack.config.js +1 -0
  233. package/src/components/bed-board/icu-bed-board.component.tsx +173 -0
  234. package/src/components/bed-board/icu-bed-board.scss +228 -0
  235. package/src/components/header/header.component.tsx +25 -0
  236. package/src/components/header/header.scss +24 -0
  237. package/src/components/patient-table/icu-patient-table.component.tsx +232 -0
  238. package/src/components/patient-table/icu-patient-table.scss +91 -0
  239. package/src/components/side-menu/left-panel.component.tsx +23 -0
  240. package/src/components/side-menu/left-panel.scss +7 -0
  241. package/src/components/summary/icu-summary-tiles.component.tsx +154 -0
  242. package/src/components/summary/icu-summary-tiles.scss +116 -0
  243. package/src/config-schema.ts +33 -0
  244. package/src/context/icu-census.context.tsx +68 -0
  245. package/src/dashboard-link.component.tsx +41 -0
  246. package/src/dashboard-link.scss +6 -0
  247. package/src/declarations.d.ts +2 -0
  248. package/src/icu-dashboard.component.tsx +28 -0
  249. package/src/icu-dashboard.scss +401 -0
  250. package/src/icu-embedded-dashboard.component.tsx +15 -0
  251. package/src/index.ts +59 -0
  252. package/src/left-panel-link.component.tsx +44 -0
  253. package/src/left-panel-link.scss +11 -0
  254. package/src/resources/icu-admission.resource.ts +546 -0
  255. package/src/root.component.tsx +29 -0
  256. package/src/root.scss +11 -0
  257. package/src/routes.json +38 -0
  258. package/src/types/icu-bed.types.ts +91 -0
  259. package/src/types/icu-census-patient.types.ts +24 -0
  260. package/src/types/icu-patient.types.ts +37 -0
  261. package/src/utils/icu-census.helpers.ts +31 -0
  262. package/src/utils/icu-day-label.ts +11 -0
  263. package/translations/am.json +48 -0
  264. package/translations/en.json +48 -0
  265. package/translations/fr.json +48 -0
  266. package/translations/sw.json +48 -0
  267. package/tsconfig.json +5 -0
  268. package/webpack.config.js +1 -0
@@ -0,0 +1,401 @@
1
+ @use '@carbon/colors';
2
+ @use '@carbon/layout';
3
+ @use '@carbon/type';
4
+
5
+ .dashboard {
6
+ background: colors.$gray-10;
7
+ min-height: 100%;
8
+ padding: layout.$spacing-05 layout.$spacing-06 layout.$spacing-07;
9
+ }
10
+
11
+ .banner {
12
+ margin-bottom: layout.$spacing-05;
13
+ max-width: 48rem;
14
+ }
15
+
16
+ .patientMeta {
17
+ margin-bottom: layout.$spacing-05;
18
+
19
+ h3 {
20
+ margin: 0 0 layout.$spacing-02;
21
+ }
22
+
23
+ p {
24
+ color: var(--cds-text-secondary);
25
+ margin: 0;
26
+ }
27
+ }
28
+
29
+ .demoHint {
30
+ color: var(--cds-text-helper);
31
+ font-size: 0.8125rem;
32
+ margin-top: layout.$spacing-02 !important;
33
+ }
34
+
35
+ .chartSections {
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: layout.$spacing-06;
39
+ }
40
+
41
+ .chartTabs {
42
+ background: colors.$white;
43
+ border: 1px solid colors.$gray-20;
44
+ border-radius: layout.$spacing-04;
45
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
46
+ margin-bottom: layout.$spacing-05;
47
+ margin-top: 0;
48
+ overflow: hidden;
49
+ padding: 0 layout.$spacing-03 layout.$spacing-05;
50
+
51
+ :global(.cds--tab-content) {
52
+ padding-inline: 0;
53
+ padding-top: layout.$spacing-05;
54
+ }
55
+
56
+ /* Contained gray strip — active tab stands out as white */
57
+ :global(.cds--tab--list) {
58
+ background: colors.$gray-20;
59
+ border: 1px solid colors.$gray-40;
60
+ gap: 0;
61
+ }
62
+
63
+ :global(.cds--tabs__nav-item) {
64
+ background: colors.$gray-20 !important;
65
+ border-block-end: none !important;
66
+ }
67
+
68
+ :global(.cds--tabs__nav-link) {
69
+ background: colors.$gray-20 !important;
70
+ border: none !important;
71
+ border-inline-end: 1px solid colors.$gray-40 !important;
72
+ border-radius: 0 !important;
73
+ box-shadow: none !important;
74
+ color: colors.$gray-60 !important;
75
+ font-weight: 500;
76
+ height: 2.5rem;
77
+ max-inline-size: none !important;
78
+ min-height: 2.5rem !important;
79
+ padding-inline: layout.$spacing-05 !important;
80
+ }
81
+
82
+ :global(.cds--tabs__nav-item:last-child .cds--tabs__nav-link) {
83
+ border-inline-end: none !important;
84
+ }
85
+
86
+ :global(.cds--tabs__nav-item--selected),
87
+ :global(.cds--tabs__nav-item--selected:hover) {
88
+ background: colors.$white !important;
89
+ border-block-end: none !important;
90
+ }
91
+
92
+ :global(.cds--tabs__nav-item--selected .cds--tabs__nav-link),
93
+ :global(.cds--tabs__nav-item--selected:hover .cds--tabs__nav-link),
94
+ :global(.cds--tabs__nav-link[aria-selected='true']) {
95
+ background: colors.$white !important;
96
+ box-shadow: inset 0 3px 0 0 colors.$blue-60 !important;
97
+ color: colors.$gray-100 !important;
98
+ font-weight: 600;
99
+ }
100
+
101
+ :global(.cds--tabs__nav-link svg) {
102
+ fill: currentColor;
103
+ }
104
+
105
+ /* Tip sits under category tabs, above chart panels */
106
+ .tipBar {
107
+ border-radius: 0;
108
+ border-left: none;
109
+ border-right: none;
110
+ margin: 0 calc(-1 * #{layout.$spacing-03});
111
+ }
112
+ }
113
+
114
+ .chartTabPanel {
115
+ outline: none;
116
+ }
117
+
118
+ .startSystemBar {
119
+ display: flex;
120
+ justify-content: flex-end;
121
+ margin-bottom: layout.$spacing-03;
122
+ margin-top: layout.$spacing-02;
123
+ }
124
+
125
+ .patientToolbar {
126
+ align-items: center;
127
+ display: flex;
128
+ flex-direction: row;
129
+ flex-wrap: nowrap;
130
+ gap: layout.$spacing-04;
131
+ justify-content: space-between;
132
+ margin-bottom: layout.$spacing-04;
133
+ margin-top: layout.$spacing-02;
134
+
135
+ /* Tabs: left, Start ICU instance: right (only on ICU charts tab) */
136
+ > :first-child {
137
+ flex: 0 1 auto;
138
+ min-width: 0;
139
+ }
140
+ }
141
+
142
+ .patientToolbarActions {
143
+ flex-shrink: 0;
144
+ margin-left: auto;
145
+ }
146
+
147
+ /* Daily care tab only shows the toolbar and leaves Start ICU on the charts page */
148
+ .dailyCareToolbar {
149
+ border-bottom: 1px solid var(--cds-border-subtle);
150
+ margin-bottom: layout.$spacing-04;
151
+ padding-bottom: layout.$spacing-03;
152
+ }
153
+
154
+ .instanceNotice {
155
+ margin-bottom: layout.$spacing-05;
156
+ max-width: 40rem;
157
+ }
158
+
159
+ .dayPickerRow {
160
+ align-items: flex-start;
161
+ display: flex;
162
+ flex-direction: row;
163
+ flex-wrap: wrap;
164
+ gap: layout.$spacing-04;
165
+ justify-content: space-between;
166
+ margin-bottom: layout.$spacing-04;
167
+ }
168
+
169
+ /* Shared patient chart chrome (matches ICU patient mock) */
170
+ .patientChrome {
171
+ display: flex;
172
+ flex-direction: column;
173
+ gap: layout.$spacing-05;
174
+ }
175
+
176
+ .activeBanner {
177
+ align-items: center;
178
+ background: colors.$green-10;
179
+ border: 1px solid colors.$green-20;
180
+ border-radius: layout.$spacing-03;
181
+ display: flex;
182
+ flex-wrap: wrap;
183
+ gap: layout.$spacing-04;
184
+ justify-content: space-between;
185
+ padding: layout.$spacing-04 layout.$spacing-05;
186
+ }
187
+
188
+ .activeBannerLead {
189
+ align-items: center;
190
+ display: flex;
191
+ flex: 1 1 16rem;
192
+ gap: layout.$spacing-03;
193
+ min-width: 0;
194
+
195
+ strong {
196
+ color: colors.$gray-100;
197
+ font-weight: 700;
198
+ }
199
+
200
+ span {
201
+ @include type.type-style('body-compact-01');
202
+ color: colors.$gray-80;
203
+ }
204
+ }
205
+
206
+ .activeBannerIcon {
207
+ color: colors.$green-50;
208
+ flex-shrink: 0;
209
+ }
210
+
211
+ .activeBannerSep {
212
+ color: colors.$gray-50;
213
+ margin: 0 layout.$spacing-03;
214
+ }
215
+
216
+ .viewTimerBtn {
217
+ border-color: colors.$green-50 !important;
218
+ color: colors.$green-70 !important;
219
+ flex-shrink: 0;
220
+ }
221
+
222
+ .dayTools {
223
+ background: colors.$white;
224
+ border: 1px solid colors.$gray-20;
225
+ border-radius: layout.$spacing-04;
226
+ display: flex;
227
+ flex-direction: column;
228
+ gap: layout.$spacing-04;
229
+ padding: layout.$spacing-04 layout.$spacing-05;
230
+ }
231
+
232
+ .dayToolsFooter {
233
+ align-items: center;
234
+ border-top: 1px solid colors.$gray-10;
235
+ display: flex;
236
+ flex-wrap: wrap;
237
+ gap: layout.$spacing-04;
238
+ justify-content: space-between;
239
+ padding-top: layout.$spacing-04;
240
+ }
241
+
242
+ .chartTabLabel {
243
+ align-items: center;
244
+ display: inline-flex;
245
+ gap: layout.$spacing-02;
246
+ }
247
+
248
+ .tipBar {
249
+ @include type.type-style('body-compact-01');
250
+ align-items: center;
251
+ background: colors.$blue-10;
252
+ border: 1px solid colors.$blue-30;
253
+ border-radius: layout.$spacing-03;
254
+ color: colors.$gray-80;
255
+ display: flex;
256
+ gap: layout.$spacing-03;
257
+ margin-top: layout.$spacing-05;
258
+ padding: layout.$spacing-04 layout.$spacing-05;
259
+ }
260
+
261
+ .tipIcon {
262
+ color: colors.$blue-60;
263
+ flex-shrink: 0;
264
+ }
265
+
266
+ /* Print header: hidden on screen, visible on print. */
267
+ .printHeader {
268
+ display: none;
269
+ }
270
+
271
+ .printTitle {
272
+ @include type.type-style('heading-04');
273
+ margin: 0 0 layout.$spacing-03;
274
+ }
275
+
276
+ .printMeta {
277
+ display: flex;
278
+ flex-wrap: wrap;
279
+ gap: layout.$spacing-05;
280
+ margin-bottom: layout.$spacing-05;
281
+
282
+ span {
283
+ @include type.type-style('body-01');
284
+ }
285
+ }
286
+
287
+ /* Print-only view: global class name (used as className="icu-print-view" in sections). */
288
+ :global(.icu-print-view) {
289
+ display: none;
290
+ }
291
+
292
+ :global(.icu-print-section-title) {
293
+ @include type.type-style('heading-compact-02');
294
+ margin-bottom: layout.$spacing-03;
295
+ margin-top: layout.$spacing-05;
296
+ }
297
+
298
+ @media print {
299
+ @page {
300
+ margin: 1cm;
301
+ size: A4 landscape;
302
+ }
303
+
304
+ html,
305
+ body {
306
+ background: colors.$white !important;
307
+ color: colors.$black !important;
308
+ }
309
+
310
+ /* Hide Cursor UI / global chrome that is outside our package. */
311
+ :global(.cursor-root),
312
+ :global(.cursor-sidebar),
313
+ :global(.cursor-top-bar),
314
+ :global(.cursor-status-bar),
315
+ :global(.omrs-main),
316
+ :global(.omrs-header),
317
+ :global(.cds--side-nav),
318
+ :global(.cds--header),
319
+ :global(nav),
320
+ :global(aside) {
321
+ display: none !important;
322
+ }
323
+
324
+ /* Hide interactive elements in this view. */
325
+ .patientToolbar,
326
+ .dailyCareToolbar,
327
+ .instanceNotice,
328
+ .dayPickerRow,
329
+ .startSystemBar,
330
+ .patientToolbarActions,
331
+ :global(.icu-print-no-print) {
332
+ display: none !important;
333
+ }
334
+
335
+ /* Show the print header. */
336
+ .printHeader {
337
+ display: block !important;
338
+ }
339
+
340
+ /* Hide the interactive screen view; show the print-only view. */
341
+ :global(.icu-print-screen-view) {
342
+ display: none !important;
343
+ }
344
+
345
+ :global(.icu-print-view) {
346
+ display: block !important;
347
+ }
348
+
349
+ :global(.icu-print-section-title) {
350
+ @include type.type-style('heading-03');
351
+ margin-bottom: layout.$spacing-03;
352
+ }
353
+
354
+ .dashboard {
355
+ padding: 0 !important;
356
+ }
357
+
358
+ .chartSections {
359
+ gap: layout.$spacing-06;
360
+ }
361
+
362
+ /* Keep sections together where possible. */
363
+ .chartSections > section,
364
+ .chartSections > div {
365
+ page-break-inside: avoid;
366
+ }
367
+
368
+ /* Ensure flowsheets expand horizontally. */
369
+ :global(.icu-print-scroll) {
370
+ overflow: visible !important;
371
+ }
372
+
373
+ /* Shrink section typography slightly to fit more on a page. */
374
+ :global(.cds--btn),
375
+ :global(.cds--tabs),
376
+ :global(.cds--pagination) {
377
+ display: none !important;
378
+ }
379
+
380
+ /* Print URLs are normally not needed; keep links as text. */
381
+ a[href]::after {
382
+ content: none !important;
383
+ }
384
+
385
+ /* Ensure svg graph is crisp on paper. */
386
+ svg {
387
+ max-width: 100% !important;
388
+ }
389
+
390
+ /* Force white backgrounds behind tables and graphs. */
391
+ table,
392
+ div {
393
+ background: colors.$white !important;
394
+ }
395
+ }
396
+
397
+ @media print and (width: 8.5in) {
398
+ @page {
399
+ size: letter portrait;
400
+ }
401
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { BrowserRouter, Route, Routes } from 'react-router-dom';
3
+ import IcuDashboard from './icu-dashboard.component';
4
+
5
+ const spaBase = () => `${window.getOpenmrsSpaBase()}home/icu`;
6
+
7
+ const IcuEmbeddedDashboard: React.FC = () => (
8
+ <BrowserRouter basename={spaBase()}>
9
+ <Routes>
10
+ <Route path="/" element={<IcuDashboard embedded />} />
11
+ </Routes>
12
+ </BrowserRouter>
13
+ );
14
+
15
+ export default IcuEmbeddedDashboard;
package/src/index.ts ADDED
@@ -0,0 +1,59 @@
1
+ import { defineConfigSchema, getAsyncLifecycle, registerBreadcrumbs } from '@openmrs/esm-framework';
2
+ import { configSchema } from './config-schema';
3
+
4
+ const moduleName = '@kenyaemr/esm-icu-app';
5
+
6
+ const options = {
7
+ featureName: 'esm-icu-app',
8
+ moduleName,
9
+ };
10
+
11
+ export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
12
+
13
+ export function startupApp() {
14
+ const icuHomePath = `${window.spaBase}/home/icu`;
15
+ const icuPagePath = `${window.spaBase}/icu`;
16
+
17
+ defineConfigSchema(moduleName, configSchema);
18
+ registerBreadcrumbs([
19
+ {
20
+ title: 'icu',
21
+ path: icuHomePath,
22
+ parent: `${window.spaBase}/home`,
23
+ },
24
+ {
25
+ title: 'icu',
26
+ path: icuPagePath,
27
+ parent: `${window.spaBase}/home`,
28
+ },
29
+ ]);
30
+ }
31
+
32
+ export const root = getAsyncLifecycle(() => import('./root.component'), options);
33
+
34
+ export const icuEmbeddedDashboard = getAsyncLifecycle(() => import('./icu-embedded-dashboard.component'), options);
35
+
36
+ // t('icu', 'ICU')
37
+ export const icuHomeDashboardLink = getAsyncLifecycle(
38
+ () =>
39
+ import('./dashboard-link.component').then((m) => ({
40
+ default: m.createDashboardLink({
41
+ title: 'icu',
42
+ name: 'icu',
43
+ }),
44
+ })),
45
+ options,
46
+ );
47
+
48
+ // t('icuDashboard', 'ICU dashboard')
49
+ export const icuLeftPanelLink = getAsyncLifecycle(
50
+ () =>
51
+ import('./left-panel-link.component').then((m) => ({
52
+ default: m.createLeftPanelLink({
53
+ name: '',
54
+ title: 'icuDashboard',
55
+ icon: 'omrs-icon-chart-average',
56
+ }),
57
+ })),
58
+ options,
59
+ );
@@ -0,0 +1,44 @@
1
+ import React, { type ComponentType, useMemo } from 'react';
2
+ import { ConfigurableLink, MaybeIcon, type IconId } from '@openmrs/esm-framework';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { BrowserRouter, useLocation } from 'react-router-dom';
5
+
6
+ import styles from './left-panel-link.scss';
7
+
8
+ export interface LinkConfig {
9
+ name: string;
10
+ title: string;
11
+ icon?: IconId;
12
+ }
13
+
14
+ function LeftPanelLinkExtension({ config }: Readonly<{ config: LinkConfig }>) {
15
+ const { t } = useTranslation();
16
+ const location = useLocation();
17
+ const { name, title, icon } = config;
18
+ const icuPath = `${window.getOpenmrsSpaBase()}icu`;
19
+ const targetPath = name ? `${icuPath}/${name}` : icuPath;
20
+ const isActive = useMemo(() => {
21
+ if (location.pathname === targetPath) {
22
+ return true;
23
+ }
24
+ return location.pathname.startsWith(`${targetPath}/`);
25
+ }, [location.pathname, targetPath]);
26
+
27
+ return (
28
+ <ConfigurableLink to={targetPath} className={`cds--side-nav__link${isActive ? ' active-left-nav-link' : ''}`}>
29
+ <span className={styles.menu}>
30
+ <MaybeIcon icon={icon} className={styles.icon} size={16} />
31
+ <span>{t(title)}</span>
32
+ </span>
33
+ </ConfigurableLink>
34
+ );
35
+ }
36
+
37
+ export const createLeftPanelLink = (config: LinkConfig): ComponentType<unknown> =>
38
+ function IcuLeftPanelLink() {
39
+ return (
40
+ <BrowserRouter>
41
+ <LeftPanelLinkExtension config={config} />
42
+ </BrowserRouter>
43
+ );
44
+ };
@@ -0,0 +1,11 @@
1
+ @use '@carbon/layout';
2
+
3
+ .menu {
4
+ align-items: center;
5
+ display: flex;
6
+ gap: layout.$spacing-03;
7
+ }
8
+
9
+ .icon {
10
+ flex-shrink: 0;
11
+ }