@kenyaemr/esm-express-workflow-app 5.4.4-pre.340 → 5.4.4-pre.342
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 +3 -3
- package/dist/2024.js +1 -1
- package/dist/2024.js.map +1 -1
- package/dist/2386.js +1 -0
- package/dist/2386.js.map +1 -0
- package/dist/4670.js +1 -0
- package/dist/4670.js.map +1 -0
- package/dist/4682.js +1 -1
- package/dist/4682.js.map +1 -1
- package/dist/5563.js +1 -0
- package/dist/5563.js.map +1 -0
- package/dist/6075.js +1 -0
- package/dist/6075.js.map +1 -0
- package/dist/6456.js +1 -1
- package/dist/6720.js +1 -0
- package/dist/6720.js.map +1 -0
- package/dist/7607.js +1 -1
- package/dist/8566.js +1 -0
- package/dist/8566.js.map +1 -0
- package/dist/8727.js +1 -1
- package/dist/8799.js +1 -0
- package/dist/8799.js.map +1 -0
- package/dist/9161.js +1 -0
- package/dist/9161.js.map +1 -0
- package/dist/9182.js +1 -1
- package/dist/9343.js +1 -0
- package/dist/9343.js.map +1 -0
- package/dist/9535.js +1 -1
- package/dist/9535.js.map +1 -1
- package/dist/kenyaemr-esm-express-workflow-app.js +1 -1
- package/dist/kenyaemr-esm-express-workflow-app.js.buildmanifest.json +213 -118
- package/dist/kenyaemr-esm-express-workflow-app.js.map +1 -1
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/components/consultation/clinical-encounter/clinical-encounter.component.tsx +4 -20
- package/src/components/consultation/index.ts +1 -1
- package/src/components/consultation/tabs/index.ts +34 -0
- package/src/components/laboratory/index.ts +10 -1
- package/src/components/laboratory/lab-table.component.tsx +25 -12
- package/src/components/laboratory/laboratory-tabs.component.tsx +3 -17
- package/src/components/pharmacy/index.ts +1 -1
- package/src/components/pharmacy/pharmacy-tabs.component.tsx +4 -20
- package/src/components/pharmacy/tabs/index.ts +13 -0
- package/src/components/procedures/index.ts +15 -1
- package/src/components/procedures/procedures-table.component.tsx +26 -13
- package/src/components/procedures/procedures-tabs.component.tsx +3 -22
- package/src/components/radiology-and-imaging/index.ts +10 -1
- package/src/components/radiology-and-imaging/radiology-and-imaging-table.component.tsx +35 -14
- package/src/components/radiology-and-imaging/radiology-and-imaging.component.tsx +3 -19
- package/src/index.ts +0 -1
- package/src/routes.json +206 -5
- package/src/shared/patient-chart/patient-summary-dashboard/patient-summary-dashboard.component.tsx +5 -73
- package/src/shared/tabs/create-tab-extension.tsx +33 -0
- package/src/shared/tabs/extension-tabs.component.tsx +51 -33
- package/translations/am.json +5 -1
- package/translations/en.json +5 -1
- package/translations/fr.json +5 -1
- package/translations/sw.json +5 -1
- package/dist/2332.js +0 -1
- package/dist/2332.js.map +0 -1
- package/dist/4666.js +0 -1
- package/dist/4666.js.map +0 -1
- package/dist/644.js +0 -1
- package/dist/644.js.map +0 -1
- package/dist/655.js +0 -1
- package/dist/655.js.map +0 -1
- package/dist/70.js +0 -1
- package/dist/70.js.map +0 -1
- package/dist/9387.js +0 -1
- package/dist/9387.js.map +0 -1
- package/src/shared/orders/OrdersTabs.tsx +0 -76
- /package/src/shared/{patient-chart/patient-summary-dashboard → tabs}/patient-summary-dashboard.scss +0 -0
package/src/routes.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"slot": "appointments-dashboard-slot",
|
|
25
25
|
"title": "Appointments"
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
},
|
|
28
28
|
{
|
|
29
29
|
"name": "ewf-preauth-dashboard-link",
|
|
30
30
|
"component": "preauthDashboardLink",
|
|
@@ -38,10 +38,8 @@
|
|
|
38
38
|
"layoutMode": "anchored",
|
|
39
39
|
"hideDashboardTitle": true
|
|
40
40
|
}
|
|
41
|
-
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
|
-
|
|
45
43
|
"name": "ewf-preauth-dashboard",
|
|
46
44
|
"component": "preauthDashboard",
|
|
47
45
|
"slot": "ewf-patient-chart-preauth-dashboard-slot",
|
|
@@ -332,7 +330,7 @@
|
|
|
332
330
|
"online": true,
|
|
333
331
|
"offline": true
|
|
334
332
|
},
|
|
335
|
-
|
|
333
|
+
{
|
|
336
334
|
"name": "custom-stop-visit-overflow-menu-item",
|
|
337
335
|
"component": "customStopVisitOverflowMenuItem",
|
|
338
336
|
"online": true,
|
|
@@ -344,7 +342,7 @@
|
|
|
344
342
|
"online": true,
|
|
345
343
|
"offline": false,
|
|
346
344
|
"featureFlag": "procedureQueues",
|
|
347
|
-
"slot":"procedure-orders-dashboard-slot"
|
|
345
|
+
"slot": "procedure-orders-dashboard-slot"
|
|
348
346
|
},
|
|
349
347
|
{
|
|
350
348
|
"name": "procedure-form-extras",
|
|
@@ -353,6 +351,209 @@
|
|
|
353
351
|
"online": true,
|
|
354
352
|
"offline": false,
|
|
355
353
|
"featureFlag": "procedureQueues"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "ewf-patient-summary-tab",
|
|
357
|
+
"component": "patientSummary",
|
|
358
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
359
|
+
"meta": {
|
|
360
|
+
"title": "patientSummaryTab",
|
|
361
|
+
"slot": "ewf-patient-summary-slot"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "ewf-patient-vitals-tab",
|
|
366
|
+
"component": "patientVitals",
|
|
367
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
368
|
+
"meta": {
|
|
369
|
+
"title": "vitalsAndAnthropometric",
|
|
370
|
+
"slot": "ewf-vitals-slot"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "ewf-patient-care-panel-tab",
|
|
375
|
+
"component": "carePanel",
|
|
376
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
377
|
+
"meta": {
|
|
378
|
+
"title": "carePanel",
|
|
379
|
+
"slot": "ewf-care-panel-slot"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "ewf-patient-immunization-tab",
|
|
384
|
+
"component": "immunization",
|
|
385
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
386
|
+
"meta": {
|
|
387
|
+
"title": "immunizations",
|
|
388
|
+
"slot": "ewf-immunizations-slot"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "ewf-patient-relationships-tab",
|
|
393
|
+
"component": "relationships",
|
|
394
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
395
|
+
"meta": {
|
|
396
|
+
"title": "relationships",
|
|
397
|
+
"slot": "ewf-relationships-slot"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "ewf-patient-appointments-tab",
|
|
402
|
+
"component": "appointments",
|
|
403
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
404
|
+
"meta": {
|
|
405
|
+
"title": "appointments",
|
|
406
|
+
"slot": "ewf-appointments-slot"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "ewf-patient-attachments-tab",
|
|
411
|
+
"component": "attachments",
|
|
412
|
+
"slot": "ewf-patient-chart-patient-summary-tabs-extension-slot",
|
|
413
|
+
"meta": {
|
|
414
|
+
"title": "attachments",
|
|
415
|
+
"slot": "ewf-attachments-slot"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "ewf-patient-clinical-encounter-tab",
|
|
420
|
+
"component": "patientClinicalEncounter",
|
|
421
|
+
"slot": "clinical-encounter-tabs-slot",
|
|
422
|
+
"meta": {
|
|
423
|
+
"title": "clinicalEncounter",
|
|
424
|
+
"slot": "ewf-clinical-encounter-slot"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "ewf-patient-visits-tab",
|
|
429
|
+
"component": "patientVisits",
|
|
430
|
+
"slot": "clinical-encounter-tabs-slot",
|
|
431
|
+
"meta": {
|
|
432
|
+
"title": "visits",
|
|
433
|
+
"slot": "ewf-visits-slot"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "ewf-patient-special-clinics-tab",
|
|
438
|
+
"component": "specialClinics",
|
|
439
|
+
"slot": "clinical-encounter-tabs-slot",
|
|
440
|
+
"meta": {
|
|
441
|
+
"title": "specialClinics",
|
|
442
|
+
"slot": "ewf-special-clinics-slot"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "ewf-clinical-notes-tab",
|
|
447
|
+
"component": "clinicalNotes",
|
|
448
|
+
"meta": {
|
|
449
|
+
"title": "clinicalNotes",
|
|
450
|
+
"slot": "ewf-clinical-notes-slot"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "ewf-procedures-and-orders-tab",
|
|
455
|
+
"component": "proceduresAndOrders",
|
|
456
|
+
"meta": {
|
|
457
|
+
"title": "proceduresAndOrders",
|
|
458
|
+
"slot": "ewf-procedures-and-orders-slot"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "ewf-procedures-and-orders-results-tab",
|
|
463
|
+
"component": "proceduresAndOrdersResults",
|
|
464
|
+
"meta": {
|
|
465
|
+
"title": "resultsTab",
|
|
466
|
+
"slot": "ewf-procedures-and-orders-results-slot"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "ewf-pharmacy-orders-tab",
|
|
471
|
+
"component": "pharmacyOrdersTab",
|
|
472
|
+
"slot": "pharmacy-tabs-slot",
|
|
473
|
+
"meta": {
|
|
474
|
+
"title": "orders",
|
|
475
|
+
"slot": "ewf-orders-slot"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "ewf-pharmacy-active-medication-tab",
|
|
480
|
+
"component": "pharmacyActiveMedicationsTab",
|
|
481
|
+
"slot": "pharmacy-tabs-slot",
|
|
482
|
+
"meta": {
|
|
483
|
+
"title": "activeMedications",
|
|
484
|
+
"slot": "ewf-active-medications-slot"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "ewf-pharmacy-past-medication-tab",
|
|
489
|
+
"component": "pharmacyPastMedicationsTab",
|
|
490
|
+
"slot": "pharmacy-tabs-slot",
|
|
491
|
+
"meta": {
|
|
492
|
+
"title": "pastMedications",
|
|
493
|
+
"slot": "ewf-past-medications-slot"
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "ewf-patient-lab-orders-tab",
|
|
498
|
+
"component": "patientLaboratoryOrdersTab",
|
|
499
|
+
"slot": "patient-laboratory-tabs-slot",
|
|
500
|
+
"meta": {
|
|
501
|
+
"title": "orders"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "ewf-patient-lab-order-results-tab",
|
|
506
|
+
"component": "patientLaboratoryOrdersResults",
|
|
507
|
+
"slot": "patient-laboratory-tabs-slot",
|
|
508
|
+
"meta": {
|
|
509
|
+
"title": "results",
|
|
510
|
+
"slot": "ewf-laboratory-results-slot",
|
|
511
|
+
"basePath": "laboratory"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "ewf-patient-procedure-orders-tab",
|
|
516
|
+
"component": "patientProcedureOrdersTab",
|
|
517
|
+
"slot": "patient-procedure-tabs-slot",
|
|
518
|
+
"meta": {
|
|
519
|
+
"title": "orders"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "ewf-patient-procedure-order-results-tab",
|
|
524
|
+
"component": "patientProcedureOrdersResults",
|
|
525
|
+
"slot": "patient-procedure-tabs-slot",
|
|
526
|
+
"meta": {
|
|
527
|
+
"title": "results",
|
|
528
|
+
"slot": "ewf-procedures-results-slot",
|
|
529
|
+
"basePath": "procedures"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "ewf-patient-procedure-anaesthetic-tab",
|
|
534
|
+
"component": "patientProcedureAnaestheticTab",
|
|
535
|
+
"slot": "patient-procedure-tabs-slot",
|
|
536
|
+
"meta": {
|
|
537
|
+
"title": "anaesthetic"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "ewf-patient-imaging-orders-tab",
|
|
542
|
+
"component": "patientImagingOrdersTab",
|
|
543
|
+
"slot": "patient-imaging-tabs-slot",
|
|
544
|
+
"meta": {
|
|
545
|
+
"title": "orders"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "ewf-patient-imaging-order-results-tab",
|
|
550
|
+
"component": "patientImagingOrdersResults",
|
|
551
|
+
"slot": "patient-imaging-tabs-slot",
|
|
552
|
+
"meta": {
|
|
553
|
+
"title": "results",
|
|
554
|
+
"slot": "ewf-radiology-and-imaging-results-slot",
|
|
555
|
+
"basePath": "radiology-and-imaging"
|
|
556
|
+
}
|
|
356
557
|
}
|
|
357
558
|
],
|
|
358
559
|
"workspaces2": [
|
package/src/shared/patient-chart/patient-summary-dashboard/patient-summary-dashboard.component.tsx
CHANGED
|
@@ -1,80 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
Activity,
|
|
4
|
-
Attachment,
|
|
5
|
-
Calendar,
|
|
6
|
-
CloudMonitoring,
|
|
7
|
-
Dashboard,
|
|
8
|
-
IbmWatsonDiscovery,
|
|
9
|
-
Settings,
|
|
10
|
-
} from '@carbon/react/icons';
|
|
11
|
-
import React, { useMemo } from 'react';
|
|
12
|
-
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import ExtensionTabs, { ExtensionTabItem } from '../../tabs/extension-tabs.component';
|
|
14
|
-
import styles from './patient-summary-dashboard.scss';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ExtensionTabs from '../../tabs/extension-tabs.component';
|
|
15
3
|
|
|
16
4
|
type PatientSummaryDashboardProps = {
|
|
17
5
|
patientUuid: string;
|
|
18
|
-
patient: fhir.Patient;
|
|
19
6
|
};
|
|
20
|
-
|
|
21
|
-
const PatientSummaryDashboard: React.FC<PatientSummaryDashboardProps> = ({ patientUuid
|
|
22
|
-
|
|
23
|
-
const state = useMemo(() => ({ patientUuid, patient }), [patientUuid, patient]);
|
|
24
|
-
const items: Array<ExtensionTabItem> = [
|
|
25
|
-
{
|
|
26
|
-
label: t('patientSummary', 'Patient Summary'),
|
|
27
|
-
icon: Dashboard,
|
|
28
|
-
slotName: 'ewf-patient-summary-slot',
|
|
29
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: t('vitalsAndAnthropometric', 'Vitals & Anthropometric'),
|
|
33
|
-
icon: Activity,
|
|
34
|
-
slotName: 'ewf-vitals-slot',
|
|
35
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: t('carePanel', 'Care Panel'),
|
|
39
|
-
icon: CloudMonitoring,
|
|
40
|
-
slotName: 'ewf-care-panel-slot',
|
|
41
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: t('immunizations', 'Immunizations'),
|
|
45
|
-
icon: IbmWatsonDiscovery,
|
|
46
|
-
slotName: 'ewf-immunizations-slot',
|
|
47
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: t('relationships', 'Relationships'),
|
|
51
|
-
icon: Settings,
|
|
52
|
-
slotName: 'ewf-relationships-slot',
|
|
53
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: t('appointments', 'Appointments'),
|
|
57
|
-
icon: Calendar,
|
|
58
|
-
slotName: 'ewf-appointments-slot',
|
|
59
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: t('attachments', 'Attachments'),
|
|
63
|
-
icon: Attachment,
|
|
64
|
-
slotName: 'ewf-attachments-slot',
|
|
65
|
-
slotClassName: styles.ewfExtensionSlot,
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<Layer>
|
|
71
|
-
<Grid condensed>
|
|
72
|
-
<Column lg={16} md={8} sm={4}>
|
|
73
|
-
<ExtensionTabs items={items} state={state} />
|
|
74
|
-
</Column>
|
|
75
|
-
</Grid>
|
|
76
|
-
</Layer>
|
|
77
|
-
);
|
|
7
|
+
const PATIENT_CHART_PATIENT_SUMMARY_EXTENSION_SLOT = 'ewf-patient-chart-patient-summary-tabs-extension-slot';
|
|
8
|
+
const PatientSummaryDashboard: React.FC<PatientSummaryDashboardProps> = ({ patientUuid }) => {
|
|
9
|
+
return <ExtensionTabs extensionSlotName={PATIENT_CHART_PATIENT_SUMMARY_EXTENSION_SLOT} patientUuid={patientUuid} />;
|
|
78
10
|
};
|
|
79
11
|
|
|
80
12
|
export default PatientSummaryDashboard;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ExtensionSlot, FHIRResource } from '@openmrs/esm-framework';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './patient-summary-dashboard.scss';
|
|
4
|
+
export const createTabExtension = (extensionSlotName?: string) => {
|
|
5
|
+
return function TabExtension(props: any) {
|
|
6
|
+
return <TabWithExtensionSlot extensionSlotName={extensionSlotName} {...props} />;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const TabWithExtensionSlot: React.FC<{
|
|
11
|
+
extensionSlotName?: string;
|
|
12
|
+
patientUuid: string;
|
|
13
|
+
patient: FHIRResource;
|
|
14
|
+
_meta?: {
|
|
15
|
+
slot?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}> = ({ extensionSlotName, patientUuid, patient, _meta }) => {
|
|
19
|
+
if (!_meta?.slot && !extensionSlotName) {
|
|
20
|
+
console.warn(
|
|
21
|
+
'No slot provided for TabExtension. Please provide a slot in the route meta or as an argument to createTabExtension.',
|
|
22
|
+
);
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const { slot, ...others } = _meta || {};
|
|
26
|
+
return (
|
|
27
|
+
<ExtensionSlot
|
|
28
|
+
name={_meta?.slot ?? (extensionSlotName as string)}
|
|
29
|
+
state={{ patientUuid, patient, ...others }}
|
|
30
|
+
className={styles.ewfExtensionSlot}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -1,41 +1,59 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
label: React.ReactNode;
|
|
7
|
-
icon?: React.ComponentType<unknown>;
|
|
8
|
-
slotName: string;
|
|
9
|
-
slotClassName?: string;
|
|
10
|
-
};
|
|
1
|
+
import { Layer, Tab, TabList, TabPanel, TabPanels, Tabs, TabsSkeleton } from '@carbon/react';
|
|
2
|
+
import { ErrorState, Extension, translateFrom, usePatient } from '@openmrs/esm-framework';
|
|
3
|
+
import { ComponentContext, useExtensionSlot } from '@openmrs/esm-framework/src/internal';
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
11
6
|
|
|
12
7
|
type ExtensionTabsProps = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
contained?: boolean;
|
|
8
|
+
extensionSlotName: string;
|
|
9
|
+
patientUuid: string;
|
|
16
10
|
};
|
|
17
11
|
|
|
18
|
-
const ExtensionTabs: React.FC<ExtensionTabsProps> = ({
|
|
19
|
-
const
|
|
12
|
+
const ExtensionTabs: React.FC<ExtensionTabsProps> = ({ extensionSlotName, patientUuid }) => {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
const { patient, isLoading, error } = usePatient(patientUuid);
|
|
15
|
+
const state = useMemo(() => ({ patientUuid, patient }), [patientUuid, patient]);
|
|
16
|
+
|
|
17
|
+
const { extensions, extensionSlotModuleName } = useExtensionSlot(extensionSlotName, state);
|
|
18
|
+
if (isLoading) {
|
|
19
|
+
return <TabsSkeleton />;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (error) {
|
|
23
|
+
return <ErrorState headerTitle={t('consultation', 'Consultation')} error={error} />;
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
return (
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
<Layer>
|
|
28
|
+
<Tabs>
|
|
29
|
+
<TabList contained>
|
|
30
|
+
{extensions.map((ext) => (
|
|
31
|
+
<Tab key={ext.name}>{translateFrom(extensionSlotModuleName, ext.meta.title, ext.meta.title)}</Tab>
|
|
32
|
+
))}
|
|
33
|
+
</TabList>
|
|
34
|
+
<TabPanels
|
|
35
|
+
data-extension-slot-name={extensionSlotName}
|
|
36
|
+
data-extension-slot-module-name={extensionSlotModuleName}>
|
|
37
|
+
{extensions.map((ext) => (
|
|
38
|
+
<TabPanel key={ext.name}>
|
|
39
|
+
<ComponentContext.Provider
|
|
40
|
+
key={ext.id}
|
|
41
|
+
value={{
|
|
42
|
+
featureName: ext.meta.featureName,
|
|
43
|
+
moduleName: ext.moduleName,
|
|
44
|
+
extension: {
|
|
45
|
+
extensionId: ext.id,
|
|
46
|
+
extensionSlotName: extensionSlotName,
|
|
47
|
+
extensionSlotModuleName: ext.moduleName,
|
|
48
|
+
},
|
|
49
|
+
}}>
|
|
50
|
+
<Extension state={state} />
|
|
51
|
+
</ComponentContext.Provider>
|
|
52
|
+
</TabPanel>
|
|
53
|
+
))}
|
|
54
|
+
</TabPanels>
|
|
55
|
+
</Tabs>
|
|
56
|
+
</Layer>
|
|
39
57
|
);
|
|
40
58
|
};
|
|
41
59
|
|
package/translations/am.json
CHANGED
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"clientsPatientsAttendedTo": "Clients/Patients attended to",
|
|
77
77
|
"clientsPatientsWaiting": "Clients/Patients waiting",
|
|
78
78
|
"clinicalEncounter": "Clinical Encounter",
|
|
79
|
+
"clinicalEncounterTab": "የክሊኒካል ግኝት",
|
|
80
|
+
"clinicalNotes": "የክሊኒካል ማስታወሻዎች",
|
|
79
81
|
"comingFrom": "Coming from",
|
|
80
82
|
"completedProcedures": "Completed Procedures",
|
|
81
83
|
"concentrationRate": "Concentration rate",
|
|
@@ -271,7 +273,7 @@
|
|
|
271
273
|
"patientManagement": "የሕመምተኛ አስተዳደር",
|
|
272
274
|
"patientMissingUuid": "Patient is missing a UUID",
|
|
273
275
|
"patientsAwaiting": "የሚጠብቅ ሕመምተኛ",
|
|
274
|
-
"
|
|
276
|
+
"patientSummaryTab": "የታካሚ ማጠቃለያ",
|
|
275
277
|
"pendingMedicationOrders": "Pending Medication Orders",
|
|
276
278
|
"pharmacy": "Pharmacy",
|
|
277
279
|
"pharmacyOrdersDescription": "Active medication prescriptions awaiting pharmacist review and dispensing",
|
|
@@ -289,6 +291,7 @@
|
|
|
289
291
|
"priority": "Priority",
|
|
290
292
|
"priorityComment": "Priority Comment",
|
|
291
293
|
"procedures": "Procedures",
|
|
294
|
+
"proceduresAndOrders": "ሂደቶች እና ትዕዛዞች",
|
|
292
295
|
"proceduresAwaiting": "Procedures Awaiting",
|
|
293
296
|
"proceduresCompleted": "Procedures Completed",
|
|
294
297
|
"proceduresOrders": "Procedures Orders",
|
|
@@ -326,6 +329,7 @@
|
|
|
326
329
|
"results": "Results",
|
|
327
330
|
"resultsOfOperation": "Results of Operation",
|
|
328
331
|
"resultsOfOperationRequired": "Results of operation are required",
|
|
332
|
+
"resultsTab": "ውጤቶች",
|
|
329
333
|
"revisitPatientResults_one": "Revisit patient(s) ({{count}})",
|
|
330
334
|
"revisitPatientResults_other": "Revisit patient(s) ({{count}})",
|
|
331
335
|
"save": "Save",
|
package/translations/en.json
CHANGED
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"clientsPatientsAttendedTo": "Clients/Patients attended to",
|
|
77
77
|
"clientsPatientsWaiting": "Clients/Patients waiting",
|
|
78
78
|
"clinicalEncounter": "Clinical Encounter",
|
|
79
|
+
"clinicalEncounterTab": "Clinical Encounter",
|
|
80
|
+
"clinicalNotes": "Clinical Notes",
|
|
79
81
|
"comingFrom": "Coming from",
|
|
80
82
|
"completedProcedures": "Completed Procedures",
|
|
81
83
|
"concentrationRate": "Concentration rate",
|
|
@@ -271,7 +273,7 @@
|
|
|
271
273
|
"patientManagement": "Patient Management",
|
|
272
274
|
"patientMissingUuid": "Patient is missing a UUID",
|
|
273
275
|
"patientsAwaiting": "Patient awaiting",
|
|
274
|
-
"
|
|
276
|
+
"patientSummaryTab": "Patient Summary",
|
|
275
277
|
"pendingMedicationOrders": "Pending Medication Orders",
|
|
276
278
|
"pharmacy": "Pharmacy",
|
|
277
279
|
"pharmacyOrdersDescription": "Active medication prescriptions awaiting pharmacist review and dispensing",
|
|
@@ -289,6 +291,7 @@
|
|
|
289
291
|
"priority": "Priority",
|
|
290
292
|
"priorityComment": "Priority Comment",
|
|
291
293
|
"procedures": "Procedures",
|
|
294
|
+
"proceduresAndOrders": "Procedures & Orders",
|
|
292
295
|
"proceduresAwaiting": "Procedures Awaiting",
|
|
293
296
|
"proceduresCompleted": "Procedures Completed",
|
|
294
297
|
"proceduresOrders": "Procedures Orders",
|
|
@@ -326,6 +329,7 @@
|
|
|
326
329
|
"results": "Results",
|
|
327
330
|
"resultsOfOperation": "Results of Operation",
|
|
328
331
|
"resultsOfOperationRequired": "Results of operation are required",
|
|
332
|
+
"resultsTab": "Results",
|
|
329
333
|
"revisitPatientResults_one": "Revisit patient(s) ({{count}})",
|
|
330
334
|
"revisitPatientResults_other": "Revisit patient(s) ({{count}})",
|
|
331
335
|
"save": "Save",
|
package/translations/fr.json
CHANGED
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"clientsPatientsAttendedTo": "Clients/Patients pris en charge",
|
|
77
77
|
"clientsPatientsWaiting": "Clients/Patients en attente",
|
|
78
78
|
"clinicalEncounter": "Consultation clinique",
|
|
79
|
+
"clinicalEncounterTab": "Consultation clinique",
|
|
80
|
+
"clinicalNotes": "Notes cliniques",
|
|
79
81
|
"comingFrom": "Provenant de",
|
|
80
82
|
"completedProcedures": "Procédures terminées",
|
|
81
83
|
"concentrationRate": "Taux de concentration",
|
|
@@ -272,7 +274,7 @@
|
|
|
272
274
|
"patientManagement": "Prise en charge du patient",
|
|
273
275
|
"patientMissingUuid": "Le patient n’a pas d’UUID",
|
|
274
276
|
"patientsAwaiting": "Patients en attente",
|
|
275
|
-
"
|
|
277
|
+
"patientSummaryTab": "Résumé du patient",
|
|
276
278
|
"pendingMedicationOrders": "Prescriptions en attente",
|
|
277
279
|
"pharmacy": "Pharmacie",
|
|
278
280
|
"pharmacyOrdersDescription": "Prescriptions actives en attente de validation et de délivrance par la pharmacie",
|
|
@@ -290,6 +292,7 @@
|
|
|
290
292
|
"priority": "Priorité",
|
|
291
293
|
"priorityComment": "Commentaire de priorité",
|
|
292
294
|
"procedures": "Procédures",
|
|
295
|
+
"proceduresAndOrders": "Procédures et ordonnances",
|
|
293
296
|
"proceduresAwaiting": "Procédures en attente",
|
|
294
297
|
"proceduresCompleted": "Procédures terminées",
|
|
295
298
|
"proceduresOrders": "Ordres de procédures",
|
|
@@ -327,6 +330,7 @@
|
|
|
327
330
|
"results": "Résultats",
|
|
328
331
|
"resultsOfOperation": "Résultats de l’opération",
|
|
329
332
|
"resultsOfOperationRequired": "Les résultats de l’opération sont requis",
|
|
333
|
+
"resultsTab": "Résultats",
|
|
330
334
|
"revisitPatientResults_one": "Patient(s) en revisite ({{count}})",
|
|
331
335
|
"revisitPatientResults_many": "Patients en revisite ({{count}})",
|
|
332
336
|
"revisitPatientResults_other": "Patient(s) en revisite ({{count}})",
|
package/translations/sw.json
CHANGED
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"clientsPatientsAttendedTo": "Clients/Patients attended to",
|
|
77
77
|
"clientsPatientsWaiting": "Clients/Patients waiting",
|
|
78
78
|
"clinicalEncounter": "Clinical Encounter",
|
|
79
|
+
"clinicalEncounterTab": "Mkutano wa Kliniki",
|
|
80
|
+
"clinicalNotes": "Maelezo ya Kliniki",
|
|
79
81
|
"comingFrom": "Coming from",
|
|
80
82
|
"completedProcedures": "Completed Procedures",
|
|
81
83
|
"concentrationRate": "Concentration rate",
|
|
@@ -271,7 +273,7 @@
|
|
|
271
273
|
"patientManagement": "Patient Management",
|
|
272
274
|
"patientMissingUuid": "Patient is missing a UUID",
|
|
273
275
|
"patientsAwaiting": "Patient awaiting",
|
|
274
|
-
"
|
|
276
|
+
"patientSummaryTab": "Muhtasari wa Mgonjwa",
|
|
275
277
|
"pendingMedicationOrders": "Pending Medication Orders",
|
|
276
278
|
"pharmacy": "Pharmacy",
|
|
277
279
|
"pharmacyOrdersDescription": "Active medication prescriptions awaiting pharmacist review and dispensing",
|
|
@@ -289,6 +291,7 @@
|
|
|
289
291
|
"priority": "Priority",
|
|
290
292
|
"priorityComment": "Priority Comment",
|
|
291
293
|
"procedures": "Procedures",
|
|
294
|
+
"proceduresAndOrders": "Taratibu na Maagizo",
|
|
292
295
|
"proceduresAwaiting": "Procedures Awaiting",
|
|
293
296
|
"proceduresCompleted": "Procedures Completed",
|
|
294
297
|
"proceduresOrders": "Procedures Orders",
|
|
@@ -326,6 +329,7 @@
|
|
|
326
329
|
"results": "Results",
|
|
327
330
|
"resultsOfOperation": "Results of Operation",
|
|
328
331
|
"resultsOfOperationRequired": "Results of operation are required",
|
|
332
|
+
"resultsTab": "Matokeo",
|
|
329
333
|
"revisitPatientResults_one": "Revisit patient(s) ({{count}})",
|
|
330
334
|
"revisitPatientResults_other": "Revisit patient(s) ({{count}})",
|
|
331
335
|
"save": "Save",
|