@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.
Files changed (129) hide show
  1. package/.turbo/turbo-build.log +26 -489
  2. package/dist/144.js +2 -0
  3. package/dist/144.js.map +1 -0
  4. package/dist/300.js +1 -0
  5. package/dist/317.js +1 -0
  6. package/dist/317.js.map +1 -0
  7. package/dist/{807.js → 335.js} +1 -1
  8. package/dist/349.js +2 -0
  9. package/dist/349.js.map +1 -0
  10. package/dist/359.js +2 -0
  11. package/dist/359.js.LICENSE.txt +29 -0
  12. package/dist/359.js.map +1 -0
  13. package/dist/41.js +2 -0
  14. package/dist/41.js.map +1 -0
  15. package/dist/474.js +2 -0
  16. package/dist/474.js.map +1 -0
  17. package/dist/479.js +2 -0
  18. package/dist/479.js.LICENSE.txt +9 -0
  19. package/dist/479.js.map +1 -0
  20. package/dist/537.js +1 -0
  21. package/dist/537.js.map +1 -0
  22. package/dist/{319.js → 55.js} +1 -1
  23. package/dist/60.js +1 -0
  24. package/dist/60.js.map +1 -0
  25. package/dist/746.js +2 -0
  26. package/dist/{164.js.LICENSE.txt → 746.js.LICENSE.txt} +0 -10
  27. package/dist/746.js.map +1 -0
  28. package/dist/907.js +1 -0
  29. package/dist/907.js.map +1 -0
  30. package/dist/913.js +2 -0
  31. package/dist/{591.js.map → 913.js.map} +1 -1
  32. package/dist/{757.js → 99.js} +1 -1
  33. package/dist/kenyaemr-esm-patient-clinical-view-app.js +1 -1
  34. package/dist/kenyaemr-esm-patient-clinical-view-app.js.buildmanifest.json +219 -117
  35. package/dist/kenyaemr-esm-patient-clinical-view-app.js.map +1 -1
  36. package/dist/main.js +1 -1
  37. package/dist/main.js.map +1 -1
  38. package/dist/routes.json +1 -1
  39. package/package.json +4 -1
  40. package/src/autosuggest/autosuggest.component.tsx +3 -3
  41. package/src/autosuggest/autosuggest.scss +1 -1
  42. package/src/autosuggest/patient-search-info.component.tsx +1 -1
  43. package/src/case-management/encounters/case-encounter-header.scss +1 -1
  44. package/src/case-management/encounters/case-encounter-overview.component.tsx +11 -8
  45. package/src/case-management/header/case-management-header.scss +1 -1
  46. package/src/case-management/metrics/case-management-header.scss +1 -1
  47. package/src/case-management/table/case-management-list.scss +1 -1
  48. package/src/case-management/tabs/case-management-tabs.component.tsx +2 -2
  49. package/src/case-management/tabs/case-management-tabs.scss +1 -1
  50. package/src/case-management/workspace/case-management.scss +1 -1
  51. package/src/case-management/workspace/patient-info.scss +1 -1
  52. package/src/clinical-encounter/clinical-enc.component.tsx +4 -4
  53. package/src/clinical-encounter/dashboard/in-patient.scss +1 -1
  54. package/src/clinical-encounter/summary/in-patient-medical-summary/in-patient-medical-summary.component.tsx +1 -1
  55. package/src/clinical-encounter/summary/maternal-summary/maternal-summary.component.tsx +4 -4
  56. package/src/clinical-encounter/summary/neonatal summary/neonatal-summary.component.tsx +4 -4
  57. package/src/clinical-encounter/summary/out-patient-summary/out-patient-summary.scss +1 -1
  58. package/src/clinical-encounter/summary/out-patient-summary/patient-medical-history.component.tsx +2 -2
  59. package/src/clinical-encounter/summary/out-patient-summary/patient-social-history.component.tsx +5 -5
  60. package/src/clinical-encounter/summary/surgical summary/surgical-summary.component.tsx +4 -5
  61. package/src/contact-list/contact-actions.component.tsx +4 -5
  62. package/src/contact-list/contact-list-concept-map.ts +1 -0
  63. package/src/contact-list/contact-list.component.tsx +2 -2
  64. package/src/contact-list/contact-list.scss +1 -1
  65. package/src/contact-list/contact-list.workspace.tsx +28 -13
  66. package/src/contact-list/contact-tracing-history.component.tsx +3 -3
  67. package/src/contact-list/forms/contact-list-update.workspace.tsx +22 -267
  68. package/src/deceased-panel/mortuary-summary/mortuary-summary.component.tsx +2 -10
  69. package/src/deceased-panel/mortuary-summary/mortuary-summary.scss +1 -1
  70. package/src/deceased-panel/panels/autopsy.component.tsx +11 -4
  71. package/src/declarations.d.ts +0 -13
  72. package/src/family-partner-history/family-history.component.tsx +2 -2
  73. package/src/family-partner-history/family-history.scss +1 -1
  74. package/src/family-partner-history/family-relationship.scss +1 -1
  75. package/src/family-partner-history/family-relationship.workspace.tsx +27 -12
  76. package/src/hooks/useContacts.ts +1 -0
  77. package/src/in-patient/in-patient-table/in-patient-table.component.tsx +4 -4
  78. package/src/in-patient/in-patient.component.tsx +3 -8
  79. package/src/maternal-and-child-health/maternal-health-component.scss +4 -3
  80. package/src/maternal-and-child-health/partography/labour-delivery.scss +7 -5
  81. package/src/maternal-and-child-health/partography/partograph-chart.scss +1 -1
  82. package/src/maternal-and-child-health/partography/partograph.component.tsx +5 -11
  83. package/src/peer-calendar/forms/peer-form.workspace.tsx +11 -11
  84. package/src/peer-calendar/header/reporting-period-input.component.tsx +3 -1
  85. package/src/peer-calendar/metrics/peer-calendar-metrics.component.tsx +2 -3
  86. package/src/peer-calendar/table/generic-data-table.scss +1 -1
  87. package/src/peer-calendar/table/generic-data-table.tsx +2 -1
  88. package/src/peer-calendar/table/peer-calendar-table-filter.component.tsx +6 -3
  89. package/src/relationships/forms/baseline-info-form-section.component.tsx +46 -31
  90. package/src/relationships/forms/form.scss +1 -1
  91. package/src/relationships/forms/patient-search-create-form.tsx +25 -20
  92. package/src/relationships/modals/birthdate-calculator.modal.tsx +3 -2
  93. package/src/relationships/relationship.resources.ts +18 -2
  94. package/src/relationships/tabs/relationships-tabs-component.tsx +2 -2
  95. package/src/relationships/tabs/relationships-tabs.scss +1 -1
  96. package/src/root.scss +1 -2
  97. package/src/specialized-clinics/generic-nav-links/generic-dashboard.component.tsx +3 -3
  98. package/src/specialized-clinics/hiv-care-and-treatment-services/defaulter-tracing/defaulter-tracing.component.tsx +5 -5
  99. package/src/specialized-clinics/hiv-care-and-treatment-services/defaulter-tracing/defaulter-tracing.test.tsx +2 -8
  100. package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/hiv-testing-component.scss +4 -3
  101. package/src/specialized-clinics/hiv-care-and-treatment-services/hiv-testing-services/views/hiv-testing/hiv-testing-services.component.tsx +3 -8
  102. package/src/ui/data-table/o-table.component.tsx +2 -2
  103. package/src/ui/data-table/o-table.scss +1 -1
  104. package/src/ui/encounter-list/encounter-list.scss +5 -3
  105. package/translations/en.json +1 -0
  106. package/dist/130.js +0 -2
  107. package/dist/130.js.LICENSE.txt +0 -7
  108. package/dist/130.js.map +0 -1
  109. package/dist/164.js +0 -2
  110. package/dist/164.js.map +0 -1
  111. package/dist/316.js +0 -2
  112. package/dist/316.js.map +0 -1
  113. package/dist/40.js +0 -1
  114. package/dist/40.js.map +0 -1
  115. package/dist/574.js +0 -1
  116. package/dist/589.js +0 -1
  117. package/dist/589.js.map +0 -1
  118. package/dist/591.js +0 -2
  119. package/dist/685.js +0 -2
  120. package/dist/685.js.map +0 -1
  121. package/dist/700.js +0 -2
  122. package/dist/700.js.map +0 -1
  123. package/dist/784.js +0 -2
  124. package/dist/784.js.map +0 -1
  125. /package/dist/{316.js.LICENSE.txt → 144.js.LICENSE.txt} +0 -0
  126. /package/dist/{700.js.LICENSE.txt → 349.js.LICENSE.txt} +0 -0
  127. /package/dist/{784.js.LICENSE.txt → 41.js.LICENSE.txt} +0 -0
  128. /package/dist/{685.js.LICENSE.txt → 474.js.LICENSE.txt} +0 -0
  129. /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, launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
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
- launchPatientWorkspace('patient-form-entry-workspace', {
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
- launchPatientWorkspace('patient-form-entry-workspace', {
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, launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
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
- launchPatientWorkspace('patient-form-entry-workspace', {
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 size="sm" {...getTableContainerProps()}>
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="false">
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 launchPatientWorkspaceMock = launchPatientWorkspace as jest.MockedFunction<typeof launchPatientWorkspace>;
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(launchPatientWorkspaceMock).toBeCalledWith('patient-form-entry-workspace', {
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
- @import '~@openmrs/esm-styleguide/src/vars';
2
+ @use '~@openmrs/esm-styleguide/src/vars' as *;
3
+ @use '@carbon/colors';
3
4
 
4
5
  .widgetContainer {
5
- background-color: $ui-background;
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: $ui-background;
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 { Tabs, Tab, TabList, TabPanels, TabPanel, ContentSwitcher, Switch, SwitcherItem } from '@carbon/react';
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<SwitcherItem>({ index: 0 });
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: header.isSortable,
39
+ isSortable: true,
40
40
  })}>
41
- {header.header?.content ?? header.header}
41
+ {header.header}
42
42
  </TableHeader>
43
43
  ))}
44
44
  </TableRow>
@@ -1 +1 @@
1
- @import '../../root.scss';
1
+ @use '../../root.scss';
@@ -1,9 +1,11 @@
1
1
  @use '@carbon/styles/scss/spacing';
2
2
  @use '@carbon/styles/scss/type';
3
- @import '../../root.scss';
3
+ @use '@carbon/colors';
4
+ @use '@openmrs/esm-styleguide/src/vars' as *;
5
+ @use '../../root.scss';
4
6
 
5
7
  .widgetContainer {
6
- background-color: $ui-background;
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: $ui-background;
34
+ background-color: colors.$white;
33
35
  }
34
36
 
35
37
  .widgetContainer :global(.cds--data-table) thead th button span {
@@ -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",