@kenyaemr/esm-patient-clinical-view-app 5.4.2-pre.2351 → 5.4.2-pre.2356

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 (61) hide show
  1. package/.turbo/turbo-build.log +11 -11
  2. package/dist/162.js +1 -1
  3. package/dist/197.js +1 -1
  4. package/dist/294.js +1 -1
  5. package/dist/296.js +1 -1
  6. package/dist/296.js.map +1 -1
  7. package/dist/300.js +1 -1
  8. package/dist/714.js +1 -0
  9. package/dist/714.js.map +1 -0
  10. package/dist/721.js +1 -0
  11. package/dist/721.js.map +1 -0
  12. package/dist/740.js +2 -0
  13. package/dist/740.js.map +1 -0
  14. package/dist/kenyaemr-esm-patient-clinical-view-app.js +1 -1
  15. package/dist/kenyaemr-esm-patient-clinical-view-app.js.buildmanifest.json +92 -92
  16. package/dist/kenyaemr-esm-patient-clinical-view-app.js.map +1 -1
  17. package/dist/main.js +1 -1
  18. package/dist/main.js.map +1 -1
  19. package/dist/routes.json +1 -1
  20. package/package.json +2 -2
  21. package/src/clinical-encounter/clinical-encounter-dashboard-meta.tsx +1 -4
  22. package/src/clinical-encounter/dashboard/clinical-encounter-dashboard.component.tsx +69 -72
  23. package/src/contact-list/contact-dashboard.component.tsx +29 -0
  24. package/src/dashboard/createDashboardLink.tsx +24 -0
  25. package/src/dashboard/dashboard.component.tsx +56 -0
  26. package/src/{dashboard.meta.tsx → dashboard/dashboard.meta.tsx} +12 -52
  27. package/src/dashboard/dashboard.scss +13 -0
  28. package/src/in-patient/in-patient.meta.tsx +1 -1
  29. package/src/index.ts +50 -91
  30. package/src/maternal-and-child-health/labour-delivery.component.tsx +0 -1
  31. package/src/maternal-and-child-health/maternal-and-child.component.tsx +43 -0
  32. package/src/maternal-and-child-health/mch-dashboard.meta.tsx +5 -34
  33. package/src/maternal-and-child-health/partography/labour-delivery.scss +8 -9
  34. package/src/root.scss +2 -66
  35. package/src/routes.json +64 -143
  36. package/src/special-clinics/special-clinic.component.tsx +53 -0
  37. package/src/special-clinics/special-clinics.scss +23 -0
  38. package/src/specialized-clinics/generic-nav-links/generic-dashboard.component.tsx +14 -27
  39. package/src/specialized-clinics/generic-nav-links/useEncounters.tsx +3 -3
  40. package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-care-and-treatment-dashboard.meta.tsx +6 -21
  41. package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-care-and-treatment.component.tsx +38 -0
  42. package/src/ui/encounter-list/encounter-list.component.tsx +3 -12
  43. package/src/ui/encounter-list/encounter-list.scss +5 -6
  44. package/translations/am.json +6 -2
  45. package/translations/en.json +6 -2
  46. package/translations/sw.json +6 -2
  47. package/dist/292.js +0 -1
  48. package/dist/292.js.map +0 -1
  49. package/dist/349.js +0 -2
  50. package/dist/349.js.map +0 -1
  51. package/dist/60.js +0 -1
  52. package/dist/60.js.map +0 -1
  53. package/src/clinical-view-group/clinical-view-section.component.tsx +0 -33
  54. package/src/clinical-view-group/clinical-view-section.scss +0 -15
  55. package/src/clinical-view-group/createDashboardGroup.tsx +0 -61
  56. package/src/clinical-view-group/dashboard-group.component.tsx +0 -35
  57. package/src/clinical-view-group/dashboard-group.scss +0 -21
  58. package/src/left-panel-link.component.tsx +0 -41
  59. package/src/specialized-clinics/special-clinic-dashboard.meta.tsx +0 -5
  60. /package/dist/{349.js.LICENSE.txt → 740.js.LICENSE.txt} +0 -0
  61. /package/src/{clinical-view-group/clinical-view-group.resource.ts → dashboard/useDashboard.tsx} +0 -0
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[],"extensions":[{"name":"clinical-view-section","component":"clinicalViewPatientDashboard","slot":"patient-chart-dashboard-slot"},{"name":"family-history","slot":"patient-chart-family-history-slot","component":"familyHistory","order":0,"online":true,"offline":false},{"name":"relationships-link","component":"relationshipsLink","slot":"patient-chart-dashboard-slot","order":14,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-relationships-slot","path":"relationships","layoutMode":"anchored"}},{"name":"relationships","slot":"patient-chart-relationships-slot","component":"relationships","order":0,"online":true,"offline":false},{"name":"contact-list-form","component":"contactListForm"},{"name":"maternal-and-child-health-dashboard-group-link","slot":"clinical-view-section","component":"maternalAndChildHealthSideNavGroup"},{"name":"antenatal-care-dashboard-link","component":"antenatalCareLink","slot":"maternal-and-child-health-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-antenatal-care-dashboard-slot","path":"antenatal-care-dashboard","layoutMode":"anchored"}},{"name":"antenatal-care-dashboard","slot":"patient-chart-antenatal-care-dashboard-slot","component":"antenatalCare"},{"name":"postnatal-care-dashboard-link","component":"postnatalCareLink","slot":"maternal-and-child-health-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-postnatal-care-dashboard-slot","path":"postnatal-care-dashboard","layoutMode":"anchored"}},{"name":"postnatal-care-dashboard","slot":"patient-chart-postnatal-care-dashboard-slot","component":"postnatalCare"},{"name":"labour-and-delivery-dashboard-link","component":"labourAndDeliveryLink","slot":"maternal-and-child-health-slot","meta":{"fullWidth":true,"slot":"patient-chart-labour-and-delivery-dashboard-slot","path":"labour-and-delivery-dashboard","layoutMode":"anchored"}},{"name":"labour-and-delivery-dashboard","slot":"patient-chart-labour-and-delivery-dashboard-slot","component":"labourAndDelivery","meta":{"fullWidth":true}},{"name":"hiv-care-and-treatment-dashboard-group-link","slot":"special-clinics-slot","component":"hivCareAndTreatMentSideNavGroup"},{"name":"genericNavLinks","slot":"special-clinics-slot","component":"genericNavLinks","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-special-clinic-dashboard-slot","path":"special-clinics-dashboard","layoutMode":"anchored"}},{"name":"patient-chart-special-clinic-dashboard-slot","slot":"patient-chart-special-clinic-dashboard-slot","component":"genericDashboard"},{"name":"hts-dashboard-link","component":"htsDashboardLink","slot":"hiv-care-and-treatment-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hts-dashboard-slot","path":"hts-dashboard","layoutMode":"anchored"}},{"name":"hts-clinical-view","slot":"patient-chart-hts-dashboard-slot","component":"htsClinicalView","order":2,"online":true,"offline":false},{"name":"defaulter-tracing-dashboard-link","component":"defaulterTracingLink","slot":"hiv-care-and-treatment-slot","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-defaulter-tracing-dashboard-slot","path":"defaulter-tracing-dashboard","layoutMode":"anchored"}},{"name":"defaulter-tracing-dashboard","slot":"patient-chart-defaulter-tracing-dashboard-slot","component":"defaulterTracing","order":3,"online":true,"offline":false},{"name":"special-clinics-dashboard-group-link","slot":"clinical-view-section","component":"specialClinicsSideNavGroup"},{"name":"clinical-encounter-link","component":"inPatientClinicalEncounterLink","slot":"clinical-view-section","order":40,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-clinical-encounter-slot","path":"clinical-encounter","layoutMode":"anchored"}},{"name":"clinical-encounter","slot":"patient-chart-clinical-encounter-slot","component":"inPatientClinicalEncounter","order":0,"online":true,"offline":false},{"component":"caseManagementDashboardLink","name":"case-management-dashboard-link","meta":{"name":"case-management","title":"Case Management","slot":"case-management-dashboard-slot","path":"/case-management"}},{"name":"in-patient-dashboard-link","component":"inPatientChartLink","slot":"patient-chart-dashboard-slot","order":7,"meta":{"slot":"patient-chart-in-patient-dashboard-slot","path":"in-patient","layoutMode":"anchored","columns":1,"columnSpan":1}},{"name":"in-patient-dashboard","slot":"patient-chart-in-patient-dashboard-slot","component":"inPatientChartDashboard","meta":{"fullWidth":false}},{"name":"wrap-component-view","slot":"case-management-dashboard-slot","component":"wrapComponent","order":2,"online":true,"offline":false},{"name":"case-encounter-link","component":"caseEncounterDashboardLink","slot":"patient-chart-dashboard-slot","order":14,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-case-encounter-slot","path":"case-management-encounters","layoutMode":"anchored"}},{"name":"case-encounter-table","slot":"patient-chart-case-encounter-slot","component":"caseEncounterTable","order":0,"online":true,"offline":false},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"name":"peer-calendar","slot":"peer-calendar-dashboard-slot","component":"peerCalendar","order":0,"online":true,"offline":false},{"name":"deceased-panel-dashboard-link","component":"deceasedPanelDashboardLink","slot":"patient-chart-dashboard-slot","order":15,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-deceased-panel-slot","path":"deceased-panel","layoutMode":"anchored"}},{"name":"deceased-details-tabs","slot":"patient-chart-deceased-panel-slot","component":"deceasedDetailsTabs","order":0,"online":true,"offline":false},{"name":"parto-graph-chart","slot":"patient-chart-labour-and-delivery-dashboard-slot","component":"partograph","meta":{"fullWidth":true}}],"modals":[{"name":"birth-date-calculator","component":"birthDateCalculator"},{"name":"relationship-delete-confirm-dialog","component":"relationshipDeleteConfirmialog"},{"name":"end-relationship-dialog","component":"endRelationshipModal"}],"workspaces":[{"name":"case-management-form","component":"caseManagementForm","title":"Case Management Form","type":"form"},{"name":"family-relationship-form","component":"familyRelationshipForm","title":"Family Relationship Form","type":"form"},{"name":"peers-form","component":"peersForm","title":"Add New Peer","type":"form"},{"name":"kenyaemr-cusom-form-entry-workspace","component":"peerCalendarFormEntry","title":"KVP Peer Educator Outreach Calendar","type":"form","width":"extra-wide","canMaximize":true,"canHide":true},{"name":"contact-list-update-form","component":"contactListUpdateForm","title":"Contact List Update Form","type":"form"},{"name":"other-relationship-form","component":"otherRelationshipsForm","title":"Other Relationships Form","type":"form"},{"name":"end-relationship-form","component":"endRelationshipWorkspace","title":"Discontinue relationship form","type":"form"}],"version":"5.4.2-pre.2351"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"kenyaemr":"^19.0.0"},"pages":[],"extensions":[{"name":"hiv-care-and-treatment-dashboard-link","slot":"patient-chart-dashboard-slot","component":"hivCareAndTreatmentLink","meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","path":"hiv-care-and-treatment-dashboard","layoutMode":"anchored"}},{"name":"hiv-care-and-treatment-dashboard","slot":"patient-chart-hiv-care-and-treatment-dashboard-slot","component":"hivCareAndTreatment","order":0,"online":true,"offline":false},{"name":"relationship-dashboard-link","slot":"patient-chart-dashboard-slot","component":"relationshipsLink","order":24,"online":true,"offline":false,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-relationship-slot","path":"relationships","layoutMode":"anchored"}},{"name":"relationship-dashboard","slot":"patient-chart-relationship-slot","component":"relationships","order":0,"online":true,"offline":false},{"name":"clinical-encounter-dashboard-link","component":"clinicalEncounterLink","slot":"patient-chart-dashboard-slot","order":25,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-clinical-encounter-slot","path":"clinical-encounter","layoutMode":"anchored"}},{"name":"clinical-encounter-dashboard","slot":"patient-chart-clinical-encounter-slot","component":"clinicalEncounter","order":0,"online":true,"offline":false},{"name":"maternal-and-child-health-dashboard-link","component":"maternalAndChildHealthDashboardLink","slot":"patient-chart-dashboard-slot","order":26,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-maternal-and-child-health-slot","path":"maternal-and-child-health","layoutMode":"anchored"}},{"name":"maternal-and-child-health-dashboard","slot":"patient-chart-maternal-and-child-health-slot","component":"maternalAndChildHealthDashboard","order":0,"online":true,"offline":false},{"name":"contact-list-dashboard-link","component":"contactListLink","slot":"patient-chart-dashboard-slot","order":27,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-contact-list-slot","path":"contact-list","layoutMode":"anchored"}},{"name":"contact-list-dashboard","slot":"patient-chart-contact-list-slot","component":"contactList","order":0,"online":true,"offline":false},{"component":"caseManagementDashboardLink","name":"case-management-dashboard-link","meta":{"name":"case-management","title":"Case Management","slot":"case-management-dashboard-slot","path":"/case-management"}},{"name":"in-patient-dashboard-link","component":"inPatientChartLink","slot":"patient-chart-dashboard-slot","order":7,"meta":{"slot":"patient-chart-in-patient-dashboard-slot","path":"in-patient","layoutMode":"anchored","columns":1,"columnSpan":1}},{"name":"in-patient-dashboard","slot":"patient-chart-in-patient-dashboard-slot","component":"inPatientChartDashboard","meta":{"fullWidth":false}},{"name":"wrap-component-view","slot":"case-management-dashboard-slot","component":"wrapComponent","order":2,"online":true,"offline":false},{"name":"case-encounter-link","component":"caseEncounterDashboardLink","slot":"patient-chart-dashboard-slot","order":14,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-case-encounter-slot","path":"case-management-encounters","layoutMode":"anchored"}},{"name":"case-encounter-table","slot":"patient-chart-case-encounter-slot","component":"caseEncounterTable","order":0,"online":true,"offline":false},{"component":"peerCalendarDashboardLink","name":"peer-calendar-dashboard-link","slot":"homepage-dashboard-slot","meta":{"name":"peer-calendar","title":"Peer Calendar","slot":"peer-calendar-dashboard-slot","path":"peer-management"}},{"name":"peer-calendar","slot":"peer-calendar-dashboard-slot","component":"peerCalendar","order":0,"online":true,"offline":false},{"name":"special-clinics-dashboard-link","component":"specialClinicsDashboardLink","slot":"patient-chart-dashboard-slot","order":15,"meta":{"columns":1,"columnSpan":1,"slot":"patient-chart-special-clinics-slot","path":"special-clinics","layoutMode":"anchored"}},{"name":"special-clinics-dashboard","slot":"patient-chart-special-clinics-slot","component":"specialClinicsDashboard","order":0,"online":true,"offline":false}],"modals":[{"name":"birth-date-calculator","component":"birthDateCalculator"},{"name":"relationship-delete-confirm-dialog","component":"relationshipDeleteConfirmialog"},{"name":"end-relationship-dialog","component":"endRelationshipModal"}],"workspaces":[{"name":"contact-list-form","component":"contactListForm","title":"Contact List Form","type":"form"},{"name":"case-management-form","component":"caseManagementForm","title":"Case Management Form","type":"form"},{"name":"family-relationship-form","component":"familyRelationshipForm","title":"Family Relationship Form","type":"form"},{"name":"peers-form","component":"peersForm","title":"Add New Peer","type":"form"},{"name":"kenyaemr-cusom-form-entry-workspace","component":"peerCalendarFormEntry","title":"KVP Peer Educator Outreach Calendar","type":"form","width":"extra-wide","canMaximize":true,"canHide":true},{"name":"contact-list-update-form","component":"contactListUpdateForm","title":"Contact List Update Form","type":"form"},{"name":"other-relationship-form","component":"otherRelationshipsForm","title":"Other Relationships Form","type":"form"},{"name":"end-relationship-form","component":"endRelationshipWorkspace","title":"Discontinue relationship form","type":"form"}],"version":"5.4.2-pre.2356"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenyaemr/esm-patient-clinical-view-app",
3
- "version": "5.4.2-pre.2351",
3
+ "version": "5.4.2-pre.2356",
4
4
  "description": "Patient clinical view microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/kenyaemr-esm-patient-clinical-view-app.js",
6
6
  "main": "src/index.ts",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@carbon/react": "1.x",
46
- "@openmrs/esm-framework": "6.x",
46
+ "@openmrs/esm-framework": "7.x",
47
47
  "react": "^18.1.0",
48
48
  "react-i18next": "11.x",
49
49
  "react-router-dom": "6.x"
@@ -1,9 +1,6 @@
1
1
  export const inPatientClinicalEncounterDashboardMeta = {
2
2
  slot: 'patient-chart-clinical-encounter-slot',
3
- columns: 1,
4
3
  title: 'Clinical Encounter',
5
4
  path: 'clinical-encounter',
6
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
7
- config: {},
8
- icon: '',
5
+ icon: 'omrs-icon-movement',
9
6
  };
@@ -71,64 +71,39 @@ const ClinicalEncounterDashboard: React.FC<ClinicalEncounterDashboardProps> = ({
71
71
  ],
72
72
  );
73
73
  return (
74
- <div>
75
- <Layer>
76
- <Tile>
77
- <div className={styles.desktopHeading}>
78
- <h4>{t('clinicalEncounter', 'Clinical encounter')}</h4>
79
- </div>
80
- </Tile>
81
- </Layer>
82
- <Layer style={{ backgroundColor: 'white', padding: '0 1rem' }}>
83
- <Tabs>
84
- <TabList contained activation="manual" aria-label="List of tabs">
85
- <Tab renderIcon={Friendship}>{t('socialHistory', 'Social History')}</Tab>
86
- <Tab renderIcon={ReminderMedical}>{t('medicalHistory', 'Medical History')}</Tab>
87
- {isInPatient && <Tab renderIcon={CloudMonitoring}>{t('encounterDetails', 'Encounter details')}</Tab>}
88
- {isInPatient && <Tab renderIcon={Activity}>{t('surgicalSummary', 'Surgical Summary')}</Tab>}
89
- {isInPatient && <Tab renderIcon={UserMultiple}>{t('neonatalSummary', 'Neonatal Summary')}</Tab>}
90
- {isInPatient && <Tab renderIcon={UserFollow}>{t('maternalSummary', 'Maternal Summary')}</Tab>}
91
- {isInPatient && <Tab renderIcon={Dashboard}>{t('inPatientSummary', 'In-Patient Summary')}</Tab>}
92
- </TabList>
93
- <TabPanels>
94
- <TabPanel>
95
- {
96
- <OutPatientSocialHistory
97
- patientUuid={patientUuid}
98
- encounters={encounters}
99
- isLoading={isLoading}
100
- error={error}
101
- mutate={mutate}
102
- isValidating={isValidating}
103
- />
104
- }
105
- </TabPanel>
106
- <TabPanel>
107
- {
108
- <OutPatientMedicalHistory
109
- patientUuid={patientUuid}
110
- encounters={encounters}
111
- isLoading={isLoading}
112
- error={error}
113
- mutate={mutate}
114
- isValidating={isValidating}
115
- />
116
- }
117
- </TabPanel>
118
- <TabPanel>
119
- {
120
- <ClinicalEncounter
121
- patientUuid={patientUuid}
122
- encounters={encounters}
123
- isLoading={isLoading}
124
- error={error}
125
- mutate={mutate}
126
- isValidating={isValidating}
127
- />
128
- }
129
- </TabPanel>
130
- <TabPanel>
131
- <SurgicalSummary
74
+ <Layer>
75
+ <Tile>
76
+ <div className={styles.desktopHeading}>
77
+ <h4>{t('clinicalEncounter', 'Clinical encounter')}</h4>
78
+ </div>
79
+ </Tile>
80
+
81
+ <Tabs>
82
+ <TabList contained activation="manual" aria-label="List of tabs">
83
+ <Tab renderIcon={Friendship}>{t('socialHistory', 'Social History')}</Tab>
84
+ <Tab renderIcon={ReminderMedical}>{t('medicalHistory', 'Medical History')}</Tab>
85
+ {isInPatient && <Tab renderIcon={CloudMonitoring}>{t('encounterDetails', 'Encounter details')}</Tab>}
86
+ {isInPatient && <Tab renderIcon={Activity}>{t('surgicalSummary', 'Surgical Summary')}</Tab>}
87
+ {isInPatient && <Tab renderIcon={UserMultiple}>{t('neonatalSummary', 'Neonatal Summary')}</Tab>}
88
+ {isInPatient && <Tab renderIcon={UserFollow}>{t('maternalSummary', 'Maternal Summary')}</Tab>}
89
+ {isInPatient && <Tab renderIcon={Dashboard}>{t('inPatientSummary', 'In-Patient Summary')}</Tab>}
90
+ </TabList>
91
+ <TabPanels>
92
+ <TabPanel>
93
+ {
94
+ <OutPatientSocialHistory
95
+ patientUuid={patientUuid}
96
+ encounters={encounters}
97
+ isLoading={isLoading}
98
+ error={error}
99
+ mutate={mutate}
100
+ isValidating={isValidating}
101
+ />
102
+ }
103
+ </TabPanel>
104
+ <TabPanel>
105
+ {
106
+ <OutPatientMedicalHistory
132
107
  patientUuid={patientUuid}
133
108
  encounters={encounters}
134
109
  isLoading={isLoading}
@@ -136,15 +111,11 @@ const ClinicalEncounterDashboard: React.FC<ClinicalEncounterDashboardProps> = ({
136
111
  mutate={mutate}
137
112
  isValidating={isValidating}
138
113
  />
139
- </TabPanel>
140
- <TabPanel>
141
- <NeonatalSummary patientUuid={patientUuid} />
142
- </TabPanel>
143
- <TabPanel>
144
- <MaternalSummary patientUuid={patientUuid} />
145
- </TabPanel>
146
- <TabPanel>
147
- <InPatientSummary
114
+ }
115
+ </TabPanel>
116
+ <TabPanel>
117
+ {
118
+ <ClinicalEncounter
148
119
  patientUuid={patientUuid}
149
120
  encounters={encounters}
150
121
  isLoading={isLoading}
@@ -152,11 +123,37 @@ const ClinicalEncounterDashboard: React.FC<ClinicalEncounterDashboardProps> = ({
152
123
  mutate={mutate}
153
124
  isValidating={isValidating}
154
125
  />
155
- </TabPanel>
156
- </TabPanels>
157
- </Tabs>
158
- </Layer>
159
- </div>
126
+ }
127
+ </TabPanel>
128
+ <TabPanel>
129
+ <SurgicalSummary
130
+ patientUuid={patientUuid}
131
+ encounters={encounters}
132
+ isLoading={isLoading}
133
+ error={error}
134
+ mutate={mutate}
135
+ isValidating={isValidating}
136
+ />
137
+ </TabPanel>
138
+ <TabPanel>
139
+ <NeonatalSummary patientUuid={patientUuid} />
140
+ </TabPanel>
141
+ <TabPanel>
142
+ <MaternalSummary patientUuid={patientUuid} />
143
+ </TabPanel>
144
+ <TabPanel>
145
+ <InPatientSummary
146
+ patientUuid={patientUuid}
147
+ encounters={encounters}
148
+ isLoading={isLoading}
149
+ error={error}
150
+ mutate={mutate}
151
+ isValidating={isValidating}
152
+ />
153
+ </TabPanel>
154
+ </TabPanels>
155
+ </Tabs>
156
+ </Layer>
160
157
  );
161
158
  };
162
159
  export default ClinicalEncounterDashboard;
@@ -0,0 +1,29 @@
1
+ import { Layer, Tabs, TabList, Tab, TabPanels, TabPanel, Checkbox, Button, TextInput } from '@carbon/react';
2
+ import React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import ContactList from './contact-list.component';
5
+ import PeerCalendar from '../peer-calendar/peer-calendar.component';
6
+
7
+ type ContactDashboardProps = {
8
+ patientUuid: string;
9
+ };
10
+
11
+ const ContactDashboard: React.FC<ContactDashboardProps> = ({ patientUuid }) => {
12
+ const { t } = useTranslation();
13
+ return (
14
+ <Layer>
15
+ <Tabs>
16
+ <TabList contained>
17
+ <Tab>{t('contactList', 'Contact List')}</Tab>
18
+ </TabList>
19
+ <TabPanels>
20
+ <TabPanel>
21
+ <ContactList patientUuid={patientUuid} />
22
+ </TabPanel>
23
+ </TabPanels>
24
+ </Tabs>
25
+ </Layer>
26
+ );
27
+ };
28
+
29
+ export default ContactDashboard;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { BrowserRouter } from 'react-router-dom';
3
+ import { type DashboardLinkConfig } from '@openmrs/esm-patient-common-lib';
4
+ import { DashboardExtension } from './dashboard.component';
5
+
6
+ type CustomDashboardLinkConfig = DashboardLinkConfig & {
7
+ showWhenExpression?: string;
8
+ };
9
+
10
+ export const createDashboardLink = (db: CustomDashboardLinkConfig) => {
11
+ return ({ basePath }: { basePath: string }) => {
12
+ return (
13
+ <BrowserRouter>
14
+ <DashboardExtension
15
+ basePath={basePath}
16
+ title={db.title}
17
+ path={db.path}
18
+ icon={db.icon}
19
+ showWhenExpression={db.showWhenExpression}
20
+ />
21
+ </BrowserRouter>
22
+ );
23
+ };
24
+ };
@@ -0,0 +1,56 @@
1
+ import React, { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import last from 'lodash-es/last';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { useLocation } from 'react-router-dom';
6
+ import { ConfigurableLink, MaybeIcon, evaluateAsBoolean } from '@openmrs/esm-framework';
7
+ import styles from './dashboard.scss';
8
+ import { getPatientFromStore } from '@openmrs/esm-patient-common-lib';
9
+ import { usePatientEnrollment } from './useDashboard';
10
+ import { InlineLoading } from '@carbon/react';
11
+
12
+ export interface DashboardExtensionProps {
13
+ path: string;
14
+ title: string;
15
+ basePath: string;
16
+ icon: string;
17
+ showWhenExpression?: string;
18
+ }
19
+
20
+ export const DashboardExtension = ({ path, title, basePath, icon, showWhenExpression }: DashboardExtensionProps) => {
21
+ const { t } = useTranslation();
22
+ const location = useLocation();
23
+ const patient = getPatientFromStore();
24
+ const { activePatientEnrollment, patientEnrollments, isLoading } = usePatientEnrollment(patient?.id);
25
+
26
+ const show = evaluateAsBoolean(showWhenExpression, {
27
+ activePatientEnrollment,
28
+ patientEnrollments,
29
+ patient,
30
+ });
31
+
32
+ const navLink = useMemo(() => decodeURIComponent(last(location.pathname) ?? ''), [location.pathname]);
33
+
34
+ if (!show) {
35
+ return null;
36
+ }
37
+
38
+ return (
39
+ <div key={path}>
40
+ <ConfigurableLink
41
+ className={classNames('cds--side-nav__link', { 'active-left-nav-link': path === navLink })}
42
+ to={`${basePath}/${encodeURIComponent(path)}`}>
43
+ <span className={styles.menu}>
44
+ {isLoading ? (
45
+ <InlineLoading description={t('loading', 'Loading...')} />
46
+ ) : (
47
+ <>
48
+ <MaybeIcon icon={icon} className={styles.icon} size={16} />
49
+ <span>{t(title)}</span>
50
+ </>
51
+ )}
52
+ </span>
53
+ </ConfigurableLink>
54
+ </div>
55
+ );
56
+ };
@@ -1,27 +1,3 @@
1
- export const ClinicalDashboardGroup = {
2
- title: 'Clinical Views',
3
- slotName: 'patient-clinical-view-slot',
4
- isExpanded: true,
5
- };
6
-
7
- export const mchDashboardMeta = {
8
- slot: 'patient-chart-mch-dashboard-slot',
9
- columns: 1,
10
- title: 'MCH',
11
- path: 'mch-dashboard',
12
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
13
- config: {},
14
- };
15
-
16
- export const defaulterTracingDashboardMeta = {
17
- slot: 'patient-chart-defaulter-tracing-dashboard-slot',
18
- columns: 1,
19
- title: 'Defaulter Tracing',
20
- path: 'defaulter-tracing-dashboard',
21
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
22
- icon: '',
23
- config: {},
24
- };
25
1
  export const inPatientDashboardMeta = {
26
2
  slot: 'patient-chart-in-patient-dashboard-slot',
27
3
  columns: 1,
@@ -32,34 +8,22 @@ export const inPatientDashboardMeta = {
32
8
  config: {},
33
9
  };
34
10
 
35
- export const htsDashboardMeta = {
36
- slot: 'patient-chart-hts-dashboard-slot',
37
- columns: 1,
38
- title: 'HTS',
39
- path: 'hts-dashboard',
40
- icon: '',
41
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
42
- config: {},
43
- };
44
-
45
11
  export const familyHistoryDashboardMeta = {
46
12
  slot: 'patient-chart-family-history-slot',
47
13
  columns: 1,
48
14
  title: 'Family History',
49
15
  path: 'family-history',
50
- icon: '',
16
+ icon: 'omrs-icon-pedestrian-family',
51
17
  moduleName: '@kenyaemr/esm-patient-clinical-view-app',
52
18
  config: {},
53
19
  };
54
20
 
55
21
  export const contactListDashboardMeta = {
56
- slot: 'patient-chart-relationships-slot',
22
+ slot: 'patient-chart-contact-list-slot',
57
23
  columns: 1,
58
- title: 'Contact List',
24
+ title: 'Contact Listing',
59
25
  path: 'contact-list',
60
- icon: '',
61
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
62
- config: {},
26
+ icon: 'omrs-icon-information',
63
27
  };
64
28
 
65
29
  export const otherRelationshipsDashboardMeta = {
@@ -77,9 +41,7 @@ export const relationshipsDashboardMeta = {
77
41
  columns: 1,
78
42
  title: 'Relationships',
79
43
  path: 'relationships',
80
- icon: '',
81
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
82
- config: {},
44
+ icon: 'omrs-icon-group',
83
45
  };
84
46
 
85
47
  export const labourDeliveryDashboardMeta = {
@@ -107,9 +69,7 @@ export const peerCalendarDashboardMeta = {
107
69
  title: 'Peer Calendar',
108
70
  path: 'peer-calendar',
109
71
  columns: 1,
110
- moduleName: '@kenyaemr/esm-patient-clinical-view-app',
111
- config: {},
112
- icon: '',
72
+ icon: 'omrs-icon-calendar-heat-map',
113
73
  };
114
74
  export const caseEncounterDashboardMeta = {
115
75
  slot: 'patient-chart-relationships-slot',
@@ -118,15 +78,15 @@ export const caseEncounterDashboardMeta = {
118
78
  path: 'case-management-encounters',
119
79
  moduleName: '@kenyaemr/esm-patient-clinical-view-app',
120
80
  config: {},
121
- icon: '',
81
+ icon: 'omrs-icon-events',
122
82
  };
123
83
 
124
- export const morgueDeceasedDetailsDashboardMeta = {
125
- slot: 'patient-chart-deceased-panel-slot',
84
+ export const specialClinicsDashboardMeta = {
85
+ slot: 'patient-chart-special-clinics-slot',
126
86
  columns: 1,
127
- title: 'Deceased Panel',
128
- path: 'deceased-panel',
87
+ title: 'Special Clinics',
88
+ path: 'special-clinics',
129
89
  moduleName: '@kenyaemr/esm-patient-clinical-view-app',
130
90
  config: {},
131
- icon: '',
91
+ icon: 'omrs-icon-location',
132
92
  };
@@ -0,0 +1,13 @@
1
+ @use '@carbon/colors';
2
+ @use '@carbon/layout';
3
+
4
+ .menu {
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ }
9
+
10
+ .icon {
11
+ margin-right: layout.$spacing-06;
12
+ fill: colors.$gray-70;
13
+ }
@@ -6,5 +6,5 @@ export const inPatientMeta = {
6
6
  name: 'In Patient',
7
7
  columns: 1,
8
8
  config: {},
9
- icon: '',
9
+ icon: 'omrs-icon-hospital-bed',
10
10
  };