@kenyaemr/esm-patient-clinical-view-app 5.4.2-pre.2203 → 5.4.2-pre.2223
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 +26 -489
- package/dist/144.js +2 -0
- package/dist/144.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/317.js +1 -0
- package/dist/317.js.map +1 -0
- package/dist/{807.js → 335.js} +1 -1
- package/dist/349.js +2 -0
- package/dist/349.js.map +1 -0
- package/dist/359.js +2 -0
- package/dist/359.js.LICENSE.txt +29 -0
- package/dist/359.js.map +1 -0
- package/dist/41.js +2 -0
- package/dist/41.js.map +1 -0
- package/dist/474.js +2 -0
- package/dist/474.js.map +1 -0
- package/dist/479.js +2 -0
- package/dist/479.js.LICENSE.txt +9 -0
- package/dist/479.js.map +1 -0
- package/dist/537.js +1 -0
- package/dist/537.js.map +1 -0
- package/dist/{319.js → 55.js} +1 -1
- package/dist/60.js +1 -0
- package/dist/60.js.map +1 -0
- package/dist/746.js +2 -0
- package/dist/{164.js.LICENSE.txt → 746.js.LICENSE.txt} +0 -10
- package/dist/746.js.map +1 -0
- package/dist/907.js +1 -0
- package/dist/907.js.map +1 -0
- package/dist/913.js +2 -0
- package/dist/{591.js.map → 913.js.map} +1 -1
- package/dist/{757.js → 99.js} +1 -1
- package/dist/kenyaemr-esm-patient-clinical-view-app.js +1 -1
- package/dist/kenyaemr-esm-patient-clinical-view-app.js.buildmanifest.json +219 -117
- package/dist/kenyaemr-esm-patient-clinical-view-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +4 -1
- package/src/autosuggest/autosuggest.component.tsx +3 -3
- package/src/autosuggest/autosuggest.scss +1 -1
- package/src/autosuggest/patient-search-info.component.tsx +1 -1
- package/src/case-management/encounters/case-encounter-header.scss +1 -1
- package/src/case-management/encounters/case-encounter-overview.component.tsx +11 -8
- package/src/case-management/header/case-management-header.scss +1 -1
- package/src/case-management/metrics/case-management-header.scss +1 -1
- package/src/case-management/table/case-management-list.scss +1 -1
- package/src/case-management/tabs/case-management-tabs.component.tsx +2 -2
- package/src/case-management/tabs/case-management-tabs.scss +1 -1
- package/src/case-management/workspace/case-management.scss +1 -1
- package/src/case-management/workspace/patient-info.scss +1 -1
- package/src/clinical-encounter/clinical-enc.component.tsx +4 -4
- package/src/clinical-encounter/dashboard/in-patient.scss +1 -1
- package/src/clinical-encounter/summary/in-patient-medical-summary/in-patient-medical-summary.component.tsx +1 -1
- package/src/clinical-encounter/summary/maternal-summary/maternal-summary.component.tsx +4 -4
- package/src/clinical-encounter/summary/neonatal summary/neonatal-summary.component.tsx +4 -4
- package/src/clinical-encounter/summary/out-patient-summary/out-patient-summary.scss +1 -1
- package/src/clinical-encounter/summary/out-patient-summary/patient-medical-history.component.tsx +2 -2
- package/src/clinical-encounter/summary/out-patient-summary/patient-social-history.component.tsx +5 -5
- package/src/clinical-encounter/summary/surgical summary/surgical-summary.component.tsx +4 -5
- package/src/contact-list/contact-actions.component.tsx +4 -5
- package/src/contact-list/contact-list-concept-map.ts +1 -0
- package/src/contact-list/contact-list.component.tsx +2 -2
- package/src/contact-list/contact-list.scss +1 -1
- package/src/contact-list/contact-list.workspace.tsx +28 -13
- package/src/contact-list/contact-tracing-history.component.tsx +3 -3
- package/src/contact-list/forms/contact-list-update.workspace.tsx +22 -267
- package/src/deceased-panel/mortuary-summary/mortuary-summary.component.tsx +2 -10
- package/src/deceased-panel/mortuary-summary/mortuary-summary.scss +1 -1
- package/src/deceased-panel/panels/autopsy.component.tsx +11 -4
- package/src/declarations.d.ts +0 -13
- package/src/family-partner-history/family-history.component.tsx +2 -2
- package/src/family-partner-history/family-history.scss +1 -1
- package/src/family-partner-history/family-relationship.scss +1 -1
- package/src/family-partner-history/family-relationship.workspace.tsx +27 -12
- package/src/hooks/useContacts.ts +1 -0
- package/src/in-patient/in-patient-table/in-patient-table.component.tsx +4 -4
- package/src/in-patient/in-patient.component.tsx +3 -8
- package/src/maternal-and-child-health/maternal-health-component.scss +4 -3
- package/src/maternal-and-child-health/partography/labour-delivery.scss +7 -5
- package/src/maternal-and-child-health/partography/partograph-chart.scss +1 -1
- package/src/maternal-and-child-health/partography/partograph.component.tsx +5 -11
- package/src/peer-calendar/forms/peer-form.workspace.tsx +11 -11
- package/src/peer-calendar/header/reporting-period-input.component.tsx +3 -1
- package/src/peer-calendar/metrics/peer-calendar-metrics.component.tsx +2 -3
- package/src/peer-calendar/table/generic-data-table.scss +1 -1
- package/src/peer-calendar/table/generic-data-table.tsx +2 -1
- package/src/peer-calendar/table/peer-calendar-table-filter.component.tsx +6 -3
- package/src/relationships/forms/baseline-info-form-section.component.tsx +46 -31
- package/src/relationships/forms/form.scss +1 -1
- package/src/relationships/forms/patient-search-create-form.tsx +25 -20
- package/src/relationships/modals/birthdate-calculator.modal.tsx +3 -2
- package/src/relationships/relationship.resources.ts +18 -2
- package/src/relationships/tabs/relationships-tabs-component.tsx +2 -2
- package/src/relationships/tabs/relationships-tabs.scss +1 -1
- package/src/root.scss +1 -2
- package/src/specialized-clinics/generic-nav-links/generic-dashboard.component.tsx +3 -3
- package/src/specialized-clinics/hiv-care-and-treatment-services/defaulter-tracing/defaulter-tracing.component.tsx +5 -5
- package/src/specialized-clinics/hiv-care-and-treatment-services/defaulter-tracing/defaulter-tracing.test.tsx +2 -8
- package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/hiv-testing-component.scss +4 -3
- package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/hiv-testing-services.component.tsx +3 -8
- package/src/ui/data-table/o-table.component.tsx +2 -2
- package/src/ui/data-table/o-table.scss +1 -1
- package/src/ui/encounter-list/encounter-list.scss +5 -3
- package/translations/en.json +1 -0
- package/dist/130.js +0 -2
- package/dist/130.js.LICENSE.txt +0 -7
- package/dist/130.js.map +0 -1
- package/dist/164.js +0 -2
- package/dist/164.js.map +0 -1
- package/dist/316.js +0 -2
- package/dist/316.js.map +0 -1
- package/dist/40.js +0 -1
- package/dist/40.js.map +0 -1
- package/dist/574.js +0 -1
- package/dist/589.js +0 -1
- package/dist/589.js.map +0 -1
- package/dist/591.js +0 -2
- package/dist/685.js +0 -2
- package/dist/685.js.map +0 -1
- package/dist/700.js +0 -2
- package/dist/700.js.map +0 -1
- package/dist/784.js +0 -2
- package/dist/784.js.map +0 -1
- /package/dist/{316.js.LICENSE.txt → 144.js.LICENSE.txt} +0 -0
- /package/dist/{700.js.LICENSE.txt → 349.js.LICENSE.txt} +0 -0
- /package/dist/{784.js.LICENSE.txt → 41.js.LICENSE.txt} +0 -0
- /package/dist/{685.js.LICENSE.txt → 474.js.LICENSE.txt} +0 -0
- /package/dist/{591.js.LICENSE.txt → 913.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { CardHeader, EmptyState
|
|
2
|
+
import { CardHeader, EmptyState } from '@openmrs/esm-patient-common-lib';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import capitalize from 'lodash/capitalize';
|
|
5
5
|
import { ErrorState, launchWorkspace, showModal, showSnackbar, useConfig } from '@openmrs/esm-framework';
|
|
@@ -42,7 +42,7 @@ const GenericDashboard: React.FC<GenericDashboardProps> = ({ patientUuid }) => {
|
|
|
42
42
|
const clinicalFormTitle = capitalize(clinic.replace('-', ' '));
|
|
43
43
|
|
|
44
44
|
const handleWorkspaceForm = () => {
|
|
45
|
-
|
|
45
|
+
launchWorkspace('patient-form-entry-workspace', {
|
|
46
46
|
workspaceTitle: clinicalFormTitle.replace('clinic', 'form'),
|
|
47
47
|
mutateForm: mutate,
|
|
48
48
|
formInfo: {
|
|
@@ -53,7 +53,7 @@ const GenericDashboard: React.FC<GenericDashboardProps> = ({ patientUuid }) => {
|
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
const handleWorkspaceEditForm = (encounterUuid: string = '') => {
|
|
56
|
-
|
|
56
|
+
launchWorkspace('patient-form-entry-workspace', {
|
|
57
57
|
workspaceTitle: clinicalFormTitle.replace('clinic', 'form'),
|
|
58
58
|
mutateForm: mutate,
|
|
59
59
|
formInfo: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { formatDate, parseDate, useConfig } from '@openmrs/esm-framework';
|
|
3
|
+
import { formatDate, launchWorkspace, parseDate, useConfig } from '@openmrs/esm-framework';
|
|
4
4
|
import {
|
|
5
5
|
Contacted_UUID,
|
|
6
6
|
MissedAppointmentDate_UUID,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
TracingType_UUID,
|
|
10
10
|
} from '../../../utils/constants';
|
|
11
11
|
import { getObsFromEncounter } from '../../../ui/encounter-list/encounter-list-utils';
|
|
12
|
-
import { CardHeader, EmptyState, ErrorState
|
|
12
|
+
import { CardHeader, EmptyState, ErrorState } from '@openmrs/esm-patient-common-lib';
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
DataTable,
|
|
@@ -42,7 +42,7 @@ const DefaulterTracing: React.FC<PatientTracingProps> = ({ patientUuid }) => {
|
|
|
42
42
|
defaulterTracingEncounterUuid,
|
|
43
43
|
);
|
|
44
44
|
const handleOpenOrEditDefaulterTracingForm = (encounterUUID = '') => {
|
|
45
|
-
|
|
45
|
+
launchWorkspace('patient-form-entry-workspace', {
|
|
46
46
|
workspaceTitle: 'Defaulter Tracing',
|
|
47
47
|
mutateForm: () => mutate(),
|
|
48
48
|
formInfo: {
|
|
@@ -130,7 +130,7 @@ const DefaulterTracing: React.FC<PatientTracingProps> = ({ patientUuid }) => {
|
|
|
130
130
|
rows={tableRows}
|
|
131
131
|
headers={tableHeader}
|
|
132
132
|
render={({ rows, headers, getHeaderProps, getRowProps, getTableProps, getTableContainerProps }) => (
|
|
133
|
-
<TableContainer
|
|
133
|
+
<TableContainer {...getTableContainerProps()}>
|
|
134
134
|
<Table size="sm" {...getTableProps()} aria-label={t('defaulterTracing', 'Defaulter tracing')}>
|
|
135
135
|
<TableHead>
|
|
136
136
|
<TableRow>
|
|
@@ -157,7 +157,7 @@ const DefaulterTracing: React.FC<PatientTracingProps> = ({ patientUuid }) => {
|
|
|
157
157
|
<TableCell key={cell.id}>{cell.value}</TableCell>
|
|
158
158
|
))}
|
|
159
159
|
<TableCell className="cds--table-column-menu">
|
|
160
|
-
<OverflowMenu aria-label="overflow-menu" flipped=
|
|
160
|
+
<OverflowMenu aria-label="overflow-menu" flipped={false}>
|
|
161
161
|
<OverflowMenuItem
|
|
162
162
|
onClick={() => handleOpenOrEditDefaulterTracingForm(encounters[index]?.uuid)}
|
|
163
163
|
itemText={t('edit', 'Edit')}
|
|
@@ -2,23 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import { screen, render } from '@testing-library/react';
|
|
3
3
|
import DefaulterTracing from './defaulter-tracing.component';
|
|
4
4
|
import { usePatientTracing } from '../../../hooks/usePatientTracing';
|
|
5
|
-
import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
|
|
6
5
|
import useEvent from '@testing-library/user-event';
|
|
7
6
|
import * as mock from '@openmrs/esm-framework/mock';
|
|
8
7
|
|
|
9
8
|
const usePatientTracingMock = usePatientTracing as jest.MockedFunction<typeof usePatientTracing>;
|
|
10
|
-
const
|
|
9
|
+
const launchWorkspaceMock = mock.launchWorkspace as jest.MockedFunction<typeof mock.launchWorkspace>;
|
|
11
10
|
|
|
12
11
|
jest.mock('../../../hooks/usePatientTracing', () => ({
|
|
13
12
|
defaulterTracingEncounterUuid: 'some-uuid',
|
|
14
13
|
usePatientTracing: jest.fn(),
|
|
15
14
|
}));
|
|
16
15
|
|
|
17
|
-
jest.mock('@openmrs/esm-patient-common-lib', () => ({
|
|
18
|
-
...jest.requireActual('@openmrs/esm-patient-common-lib'),
|
|
19
|
-
launchPatientWorkspace: jest.fn(),
|
|
20
|
-
}));
|
|
21
|
-
|
|
22
16
|
jest.spyOn(mock, 'useConfig').mockReturnValue({
|
|
23
17
|
formsList: {
|
|
24
18
|
defaulterTracingFormUuid: 'defaulterTracingFormUuid',
|
|
@@ -38,7 +32,7 @@ describe('DefaulterTracing', () => {
|
|
|
38
32
|
render(<DefaulterTracing patientUuid="patientUuid" />);
|
|
39
33
|
const recordDefaulterTracing = screen.getByRole('button', { name: /Record Defaulter Tracing/i });
|
|
40
34
|
await user.click(recordDefaulterTracing);
|
|
41
|
-
expect(
|
|
35
|
+
expect(launchWorkspaceMock).toBeCalledWith('patient-form-entry-workspace', {
|
|
42
36
|
formInfo: {
|
|
43
37
|
encounterUuid: '',
|
|
44
38
|
formUuid: 'defaulterTracingFormUuid',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@use '@carbon/styles/scss/spacing';
|
|
2
|
-
@
|
|
2
|
+
@use '~@openmrs/esm-styleguide/src/vars' as *;
|
|
3
|
+
@use '@carbon/colors';
|
|
3
4
|
|
|
4
5
|
.widgetContainer {
|
|
5
|
-
background-color:
|
|
6
|
+
background-color: colors.$white;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
.widgetHeaderContainer {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
.widgetCard {
|
|
55
|
-
background-color:
|
|
56
|
+
background-color: colors.$white;
|
|
56
57
|
border: 1px solid $ui-03;
|
|
57
58
|
position: relative;
|
|
58
59
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentSwitcher, Switch, SwitchEventHandlersParams } from '@carbon/react';
|
|
3
3
|
import styles from '../../hiv-testing-component.scss';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import HivScreeningEncounters from './tabs/hiv-screening.component';
|
|
@@ -10,20 +10,15 @@ interface OverviewListProps {
|
|
|
10
10
|
patientUuid: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type SwitcherItem = {
|
|
14
|
-
index: number;
|
|
15
|
-
name?: string;
|
|
16
|
-
text?: string;
|
|
17
|
-
};
|
|
18
13
|
const HivTestingEncountersList: React.FC<OverviewListProps> = ({ patientUuid }) => {
|
|
19
14
|
const { t } = useTranslation();
|
|
20
|
-
const [switchItem, setSwitcherItem] = useState<
|
|
15
|
+
const [switchItem, setSwitcherItem] = useState<SwitchEventHandlersParams>({ index: 0 });
|
|
21
16
|
|
|
22
17
|
return (
|
|
23
18
|
<div className={styles.widgetCard}>
|
|
24
19
|
<CardHeader title={t('htsClinicalView', 'HTS Clinical View')}>
|
|
25
20
|
<div className={styles.contextSwitcherContainer}>
|
|
26
|
-
<ContentSwitcher selectedIndex={switchItem?.index} onChange={setSwitcherItem}>
|
|
21
|
+
<ContentSwitcher size="md" selectedIndex={switchItem?.index} onChange={setSwitcherItem}>
|
|
27
22
|
<Switch name={'screening'} text="Screening" />
|
|
28
23
|
<Switch name={'hivTesting'} text="Testing" />
|
|
29
24
|
</ContentSwitcher>
|
|
@@ -36,9 +36,9 @@ export const OTable: React.FC<TableProps> = ({ tableHeaders, tableRows, formConc
|
|
|
36
36
|
className={`${styles.productiveHeading01} ${styles.text02}`}
|
|
37
37
|
{...getHeaderProps({
|
|
38
38
|
header,
|
|
39
|
-
isSortable:
|
|
39
|
+
isSortable: true,
|
|
40
40
|
})}>
|
|
41
|
-
{header.header
|
|
41
|
+
{header.header}
|
|
42
42
|
</TableHeader>
|
|
43
43
|
))}
|
|
44
44
|
</TableRow>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../root.scss';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@use '@carbon/styles/scss/spacing';
|
|
2
2
|
@use '@carbon/styles/scss/type';
|
|
3
|
-
@
|
|
3
|
+
@use '@carbon/colors';
|
|
4
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
|
+
@use '../../root.scss';
|
|
4
6
|
|
|
5
7
|
.widgetContainer {
|
|
6
|
-
background-color:
|
|
8
|
+
background-color: colors.$white;
|
|
7
9
|
margin-bottom: 1rem;
|
|
8
10
|
padding: 1rem 0.625rem;
|
|
9
11
|
}
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
.newServiceEnrolmentBtn > button {
|
|
32
|
-
background-color:
|
|
34
|
+
background-color: colors.$white;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.widgetContainer :global(.cds--data-table) thead th button span {
|
package/translations/en.json
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"feedingOrders": "Feeding Orders",
|
|
90
90
|
"fetalHeartRate": "Fetal Heart Rate",
|
|
91
91
|
"filterByForm": "Filter by form",
|
|
92
|
+
"filterByStatue": "Filter by status",
|
|
92
93
|
"filterByStatus": "Filter by status",
|
|
93
94
|
"finalDiagnosis": "Final Diagnosis",
|
|
94
95
|
"finalDischargeDiagnosis": "Final Discharge Diagnosis",
|