@kenyaemr/esm-active-visits-app 7.0.3-pre.89 → 8.0.1-pre.95
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 +22 -16
- package/dist/106.js +1 -0
- package/dist/106.js.map +1 -0
- package/dist/130.js +1 -1
- package/dist/130.js.map +1 -1
- package/dist/271.js +1 -1
- package/dist/319.js +1 -1
- package/dist/460.js +1 -1
- package/dist/574.js +1 -1
- package/dist/6.js +1 -0
- package/dist/6.js.map +1 -0
- package/dist/644.js +1 -1
- package/dist/725.js +1 -0
- package/dist/725.js.map +1 -0
- package/dist/757.js +1 -1
- package/dist/788.js +1 -1
- package/dist/807.js +1 -1
- package/dist/833.js +1 -1
- package/dist/966.js +2 -0
- package/dist/966.js.map +1 -0
- package/dist/967.js +1 -0
- package/dist/967.js.map +1 -0
- package/dist/kenyaemr-esm-active-visits-app.js +1 -1
- package/dist/kenyaemr-esm-active-visits-app.js.buildmanifest.json +127 -54
- package/dist/kenyaemr-esm-active-visits-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 +2 -2
- package/src/active-visits-widget/active-visits.scss +20 -20
- package/src/active-visits-widget/active-visits.test.tsx +101 -32
- package/src/config-schema.ts +10 -10
- package/src/home-page-tiles/active-visits-metric-tile/active-visits-tile.component.tsx +23 -0
- package/src/home-page-tiles/active-visits-metric-tile/active-visits.resource.ts +28 -0
- package/src/home-page-tiles/homepage-tiles.scss +39 -0
- package/src/home-page-tiles/total-visits-metric-tile/total-visits-tile.component.tsx +23 -0
- package/src/home-page-tiles/total-visits-metric-tile/total-visits.resource.ts +21 -0
- package/src/index.ts +11 -1
- package/src/routes.json +10 -0
- package/src/types/index.ts +2 -0
- package/src/visits-summary/visit-detail-overview.scss +61 -38
- package/src/visits-summary/visit-detail.test.tsx +48 -52
- package/src/visits-summary/visit.resource.ts +2 -2
- package/src/visits-summary/visits-components/encounter-observations.test.tsx +2 -1
- package/translations/am.json +3 -1
- package/translations/ar.json +2 -0
- package/translations/en.json +2 -0
- package/translations/es.json +3 -1
- package/translations/fr.json +3 -1
- package/translations/he.json +2 -0
- package/translations/km.json +2 -0
- package/translations/zh.json +2 -0
- package/translations/zh_CN.json +2 -0
- package/dist/835.js +0 -1
- package/dist/835.js.map +0 -1
- package/dist/875.js +0 -2
- package/dist/875.js.map +0 -1
- package/src/root.scss +0 -30
- /package/dist/{875.js.LICENSE.txt → 966.js.LICENSE.txt} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
4
|
-
@import '../root.scss';
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
5
4
|
|
|
6
5
|
.container {
|
|
7
6
|
display: flex;
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
.encounterHeading {
|
|
14
13
|
text-align: left;
|
|
15
14
|
width: 100%;
|
|
16
|
-
margin: 0
|
|
15
|
+
margin: 0 layout.$spacing-05 1.3125rem;
|
|
17
16
|
color: $ui-05;
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -23,13 +22,13 @@
|
|
|
23
22
|
justify-content: space-between;
|
|
24
23
|
|
|
25
24
|
.bodyLong01 {
|
|
26
|
-
margin:
|
|
25
|
+
margin: layout.$spacing-02 0;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.medicationContainer {
|
|
31
30
|
background-color: $ui-01;
|
|
32
|
-
padding:
|
|
31
|
+
padding: layout.$spacing-05;
|
|
33
32
|
width: 100% !important;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
.metadata {
|
|
41
40
|
@include type.type-style('label-01');
|
|
42
41
|
color: $text-02;
|
|
43
|
-
margin:
|
|
42
|
+
margin: layout.$spacing-03 0 layout.$spacing-05;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
.visitsDetailWidgetContainer {
|
|
@@ -52,14 +51,14 @@
|
|
|
52
51
|
.visitsDetailHeaderContainer {
|
|
53
52
|
display: flex;
|
|
54
53
|
justify-content: space-between;
|
|
55
|
-
padding:
|
|
54
|
+
padding: layout.$spacing-04 0 layout.$spacing-04 layout.$spacing-05;
|
|
56
55
|
background-color: $ui-background;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
.visitsDetailHeaderContainer > h4:after {
|
|
60
59
|
content: '';
|
|
61
60
|
display: block;
|
|
62
|
-
width:
|
|
61
|
+
width: layout.$spacing-07;
|
|
63
62
|
padding-top: 0.188rem;
|
|
64
63
|
border-bottom: 0.375rem solid $brand-teal-01;
|
|
65
64
|
}
|
|
@@ -85,14 +84,14 @@
|
|
|
85
84
|
.visitEmptyState {
|
|
86
85
|
text-align: center;
|
|
87
86
|
background-color: white;
|
|
88
|
-
padding:
|
|
87
|
+
padding: layout.$spacing-07;
|
|
89
88
|
border: 1px solid $ui-03;
|
|
90
89
|
width: 100%;
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
.encounterEmptyState {
|
|
94
93
|
text-align: center;
|
|
95
|
-
margin: 0
|
|
94
|
+
margin: 0 layout.$spacing-05 layout.$spacing-05 layout.$spacing-05;
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
.expandedRow > td {
|
|
@@ -106,8 +105,8 @@
|
|
|
106
105
|
.observation {
|
|
107
106
|
display: grid;
|
|
108
107
|
grid-template-columns: max-content auto;
|
|
109
|
-
grid-gap:
|
|
110
|
-
margin:
|
|
108
|
+
grid-gap: layout.$spacing-03;
|
|
109
|
+
margin: layout.$spacing-03 0;
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
.observation > span {
|
|
@@ -118,8 +117,8 @@
|
|
|
118
117
|
background-color: $ui-background;
|
|
119
118
|
display: grid;
|
|
120
119
|
grid-template-columns: max-content auto;
|
|
121
|
-
padding:
|
|
122
|
-
margin: 0
|
|
120
|
+
padding: layout.$spacing-05 0;
|
|
121
|
+
margin: 0 layout.$spacing-05;
|
|
123
122
|
|
|
124
123
|
:global(.cds--tabs) {
|
|
125
124
|
max-height: 7rem;
|
|
@@ -131,7 +130,7 @@
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
.verticalTabs {
|
|
134
|
-
margin:
|
|
133
|
+
margin: layout.$spacing-05 0;
|
|
135
134
|
scroll-behavior: smooth;
|
|
136
135
|
|
|
137
136
|
> ul {
|
|
@@ -139,7 +138,7 @@
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
:global(.cds--tabs--scrollable .cds--tabs--scrollable__nav-item + .cds--tabs--scrollable__nav-item) {
|
|
142
|
-
margin-left:
|
|
141
|
+
margin-left: 0;
|
|
143
142
|
}
|
|
144
143
|
|
|
145
144
|
:global(.cds--tabs--scrollable .cds--tabs--scrollable__nav-link) {
|
|
@@ -151,7 +150,7 @@
|
|
|
151
150
|
.tab {
|
|
152
151
|
outline: 0;
|
|
153
152
|
outline-offset: 0;
|
|
154
|
-
min-height:
|
|
153
|
+
min-height: layout.$spacing-07;
|
|
155
154
|
|
|
156
155
|
&:active,
|
|
157
156
|
&:focus {
|
|
@@ -162,13 +161,13 @@
|
|
|
162
161
|
border-left: 3px solid var(--brand-03);
|
|
163
162
|
border-bottom: none;
|
|
164
163
|
font-weight: 600;
|
|
165
|
-
margin-left:
|
|
164
|
+
margin-left: 0 !important;
|
|
166
165
|
}
|
|
167
166
|
|
|
168
167
|
&[aria-selected='false'] {
|
|
169
168
|
border-bottom: none;
|
|
170
169
|
border-left: 2px solid $ui-03;
|
|
171
|
-
margin-left:
|
|
170
|
+
margin-left: 0 !important;
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
173
|
|
|
@@ -186,8 +185,8 @@
|
|
|
186
185
|
|
|
187
186
|
.medicationBlock {
|
|
188
187
|
background-color: $ui-01;
|
|
189
|
-
padding: 0.625rem 6.75rem
|
|
190
|
-
margin-top:
|
|
188
|
+
padding: 0.625rem 6.75rem layout.$spacing-04 1.063rem;
|
|
189
|
+
margin-top: layout.$spacing-06;
|
|
191
190
|
width: 100% !important;
|
|
192
191
|
}
|
|
193
192
|
|
|
@@ -204,13 +203,13 @@
|
|
|
204
203
|
.diagnosesList {
|
|
205
204
|
display: flex;
|
|
206
205
|
flex-flow: row wrap;
|
|
207
|
-
padding-bottom:
|
|
208
|
-
margin: 0
|
|
206
|
+
padding-bottom: layout.$spacing-03;
|
|
207
|
+
margin: 0 layout.$spacing-05;
|
|
209
208
|
border-bottom: 1px solid $ui-03;
|
|
210
209
|
}
|
|
211
210
|
|
|
212
211
|
.actions {
|
|
213
|
-
margin: 0
|
|
212
|
+
margin: 0 layout.$spacing-05;
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
.contentSwitcher {
|
|
@@ -220,17 +219,17 @@
|
|
|
220
219
|
}
|
|
221
220
|
|
|
222
221
|
:global(.cds--content-switcher__label) {
|
|
223
|
-
height:
|
|
222
|
+
height: layout.$spacing-05;
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
.notesContainer {
|
|
228
|
-
margin-bottom:
|
|
227
|
+
margin-bottom: layout.$spacing-07;
|
|
229
228
|
}
|
|
230
229
|
|
|
231
230
|
.noteText {
|
|
232
231
|
background-color: $ui-01;
|
|
233
|
-
padding:
|
|
232
|
+
padding: layout.$spacing-05;
|
|
234
233
|
width: 100% !important;
|
|
235
234
|
white-space: pre-wrap;
|
|
236
235
|
}
|
|
@@ -239,7 +238,7 @@
|
|
|
239
238
|
.tabletHeading {
|
|
240
239
|
text-align: left;
|
|
241
240
|
text-transform: capitalize;
|
|
242
|
-
margin-bottom:
|
|
241
|
+
margin-bottom: layout.$spacing-05;
|
|
243
242
|
|
|
244
243
|
h4 {
|
|
245
244
|
@include type.type-style('heading-compact-02');
|
|
@@ -248,7 +247,7 @@
|
|
|
248
247
|
&:after {
|
|
249
248
|
content: '';
|
|
250
249
|
display: block;
|
|
251
|
-
width:
|
|
250
|
+
width: layout.$spacing-07;
|
|
252
251
|
padding-top: 3px;
|
|
253
252
|
border-bottom: 0.375rem solid;
|
|
254
253
|
@include brand-03(border-bottom-color);
|
|
@@ -263,8 +262,8 @@
|
|
|
263
262
|
.emptyStateContent {
|
|
264
263
|
@include type.type-style('heading-compact-01');
|
|
265
264
|
color: $text-02;
|
|
266
|
-
margin-top:
|
|
267
|
-
margin-bottom:
|
|
265
|
+
margin-top: layout.$spacing-05;
|
|
266
|
+
margin-bottom: layout.$spacing-03;
|
|
268
267
|
}
|
|
269
268
|
|
|
270
269
|
.emptyStateContainer {
|
|
@@ -276,10 +275,34 @@
|
|
|
276
275
|
padding-bottom: 0;
|
|
277
276
|
}
|
|
278
277
|
|
|
278
|
+
.productiveHeading02 {
|
|
279
|
+
@include type.type-style('heading-compact-02');
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.bodyLong01 {
|
|
283
|
+
@include type.type-style('body-01');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.caption01 {
|
|
287
|
+
@include type.type-style('legal-01');
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.bodyShort02 {
|
|
291
|
+
@include type.type-style('body-compact-02');
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.text02 {
|
|
295
|
+
color: $text-02;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.text01 {
|
|
299
|
+
color: $ui-05;
|
|
300
|
+
}
|
|
301
|
+
|
|
279
302
|
// Overriding styles for RTL support
|
|
280
303
|
html[dir='rtl'] {
|
|
281
304
|
.visitsDetailHeaderContainer {
|
|
282
|
-
padding:
|
|
305
|
+
padding: layout.$spacing-04 layout.$spacing-05 layout.$spacing-04 0;
|
|
283
306
|
h4 {
|
|
284
307
|
text-align: right;
|
|
285
308
|
}
|
|
@@ -288,8 +311,8 @@ html[dir='rtl'] {
|
|
|
288
311
|
& :first-child {
|
|
289
312
|
border-bottom-left-radius: unset;
|
|
290
313
|
border-top-left-radius: unset;
|
|
291
|
-
border-bottom-right-radius:
|
|
292
|
-
border-top-right-radius:
|
|
314
|
+
border-bottom-right-radius: layout.$spacing-02;
|
|
315
|
+
border-top-right-radius: layout.$spacing-02;
|
|
293
316
|
}
|
|
294
317
|
& :first-child[aria-selected='false'] {
|
|
295
318
|
border-left: unset;
|
|
@@ -298,8 +321,8 @@ html[dir='rtl'] {
|
|
|
298
321
|
& :last-child {
|
|
299
322
|
border-bottom-right-radius: unset;
|
|
300
323
|
border-top-right-radius: unset;
|
|
301
|
-
border-bottom-left-radius:
|
|
302
|
-
border-top-left-radius:
|
|
324
|
+
border-bottom-left-radius: layout.$spacing-02;
|
|
325
|
+
border-top-left-radius: layout.$spacing-02;
|
|
303
326
|
}
|
|
304
327
|
& :last-child[aria-selected='false'] {
|
|
305
328
|
border-right: unset;
|
|
@@ -1,55 +1,59 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useVisit } from './visit.resource';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
5
4
|
import { formatDate } from '@openmrs/esm-framework';
|
|
5
|
+
import { useVisit } from './visit.resource';
|
|
6
|
+
import VisitDetailComponent from './visit-detail.component';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const defaultProps = {
|
|
9
|
+
patientUuid: '691eed12-c0f1-11e2-94be-8c13b969e334',
|
|
10
|
+
visitUuid: '497b8b17-54ec-4726-87ec-3c4da8cdcaeb',
|
|
11
|
+
};
|
|
12
|
+
const mockUseVisit = jest.mocked(useVisit);
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
const visitUuid = '497b8b17-54ec-4726-87ec-3c4da8cdcaeb';
|
|
13
|
-
const patientUuid = '691eed12-c0f1-11e2-94be-8c13b969e334';
|
|
14
|
+
jest.mock('./visit.resource');
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
describe('VisitDetail', () => {
|
|
17
|
+
it('renders a loading spinner when data is loading', () => {
|
|
18
|
+
mockUseVisit.mockReturnValueOnce({
|
|
17
19
|
visit: null,
|
|
20
|
+
error: undefined,
|
|
18
21
|
isLoading: true,
|
|
22
|
+
isValidating: false,
|
|
19
23
|
});
|
|
20
24
|
|
|
21
|
-
render(<VisitDetailComponent
|
|
25
|
+
render(<VisitDetailComponent {...defaultProps} />);
|
|
22
26
|
|
|
23
27
|
expect(screen.getByRole('progressbar')).toBeInTheDocument();
|
|
24
28
|
});
|
|
25
29
|
|
|
26
|
-
it('
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
it('renders a visit detail overview when data is available', () => {
|
|
31
|
+
const mockVisitDate = new Date();
|
|
32
|
+
mockUseVisit.mockReturnValueOnce({
|
|
29
33
|
visit: {
|
|
30
|
-
uuid: visitUuid,
|
|
31
|
-
visitType: { display: 'Some Visit Type' },
|
|
32
|
-
startDatetime: visitDate,
|
|
33
34
|
encounters: [],
|
|
35
|
+
startDatetime: mockVisitDate.toISOString(),
|
|
36
|
+
uuid: defaultProps.visitUuid,
|
|
37
|
+
visitType: { display: 'Some Visit Type', uuid: 'some-visit-type-uuid' },
|
|
34
38
|
},
|
|
39
|
+
error: undefined,
|
|
35
40
|
isLoading: false,
|
|
41
|
+
isValidating: false,
|
|
36
42
|
});
|
|
37
43
|
|
|
38
|
-
render(<VisitDetailComponent
|
|
44
|
+
render(<VisitDetailComponent {...defaultProps} />);
|
|
39
45
|
|
|
40
46
|
expect(screen.getByText(/Some Visit Type/)).toBeInTheDocument();
|
|
41
|
-
expect(screen.getByText(formatDate(
|
|
42
|
-
|
|
47
|
+
expect(screen.getByText(formatDate(mockVisitDate), { collapseWhitespace: false })).toBeInTheDocument();
|
|
43
48
|
expect(screen.getByText('All Encounters')).toBeInTheDocument();
|
|
44
49
|
expect(screen.getByText('Visit Summary')).toBeInTheDocument();
|
|
45
50
|
});
|
|
46
51
|
|
|
47
|
-
it('
|
|
48
|
-
|
|
52
|
+
it('render the Encounter Lists view when the "All Encounters" tab is clicked', async () => {
|
|
53
|
+
const user = userEvent.setup();
|
|
54
|
+
|
|
55
|
+
mockUseVisit.mockReturnValue({
|
|
49
56
|
visit: {
|
|
50
|
-
uuid: visitUuid,
|
|
51
|
-
visitType: { display: 'Some Visit Type' },
|
|
52
|
-
startDatetime: '2023-07-30T12:34:56Z',
|
|
53
57
|
encounters: [
|
|
54
58
|
{
|
|
55
59
|
uuid: 'encounter-1',
|
|
@@ -59,25 +63,26 @@ describe('VisitDetailComponent', () => {
|
|
|
59
63
|
obs: [],
|
|
60
64
|
},
|
|
61
65
|
],
|
|
66
|
+
startDatetime: '2023-07-30T12:34:56Z',
|
|
67
|
+
visitType: { display: 'Some Visit Type', uuid: 'some-visit-type-uuid' },
|
|
68
|
+
uuid: defaultProps.visitUuid,
|
|
62
69
|
},
|
|
70
|
+
error: undefined,
|
|
63
71
|
isLoading: false,
|
|
72
|
+
isValidating: false,
|
|
64
73
|
});
|
|
65
74
|
|
|
66
|
-
render(<VisitDetailComponent
|
|
67
|
-
|
|
68
|
-
act(() => {
|
|
69
|
-
screen.getByText('All Encounters').click();
|
|
70
|
-
});
|
|
75
|
+
render(<VisitDetailComponent {...defaultProps} />);
|
|
71
76
|
|
|
77
|
+
await user.click(screen.getByText('All Encounters'));
|
|
72
78
|
expect(screen.getByTestId('encountersTable')).toBeInTheDocument();
|
|
73
79
|
});
|
|
74
80
|
|
|
75
|
-
it('
|
|
76
|
-
|
|
81
|
+
it('renders the Visit Summaries view when the "Visit Summary" tab is clicked', async () => {
|
|
82
|
+
const user = userEvent.setup();
|
|
83
|
+
|
|
84
|
+
mockUseVisit.mockReturnValue({
|
|
77
85
|
visit: {
|
|
78
|
-
uuid: visitUuid,
|
|
79
|
-
visitType: { display: 'Some Visit Type' },
|
|
80
|
-
startDatetime: '2023-07-30T12:34:56Z',
|
|
81
86
|
encounters: [
|
|
82
87
|
{
|
|
83
88
|
uuid: 'encounter-1',
|
|
@@ -96,27 +101,18 @@ describe('VisitDetailComponent', () => {
|
|
|
96
101
|
orders: [],
|
|
97
102
|
},
|
|
98
103
|
],
|
|
104
|
+
startDatetime: '2023-07-30T12:34:56Z',
|
|
105
|
+
visitType: { display: 'Some Visit Type', uuid: 'some-visit-type-uuid' },
|
|
106
|
+
uuid: defaultProps.visitUuid,
|
|
99
107
|
},
|
|
108
|
+
error: undefined,
|
|
100
109
|
isLoading: false,
|
|
110
|
+
isValidating: false,
|
|
101
111
|
});
|
|
102
112
|
|
|
103
|
-
render(<VisitDetailComponent
|
|
104
|
-
|
|
105
|
-
act(() => {
|
|
106
|
-
screen.getByText('Visit Summary').click();
|
|
107
|
-
});
|
|
113
|
+
render(<VisitDetailComponent {...defaultProps} />);
|
|
108
114
|
|
|
115
|
+
await user.click(screen.getByText('Visit Summary'));
|
|
109
116
|
expect(screen.getByRole('tablist', { name: 'Visit summary tabs' })).toBeInTheDocument();
|
|
110
117
|
});
|
|
111
|
-
|
|
112
|
-
it('should render loading indicator when data is loading', () => {
|
|
113
|
-
mockedUseVisit.mockReturnValue({
|
|
114
|
-
visit: null,
|
|
115
|
-
isLoading: false,
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
render(<VisitDetailComponent visitUuid={visitUuid} patientUuid={patientUuid} />);
|
|
119
|
-
|
|
120
|
-
expect(screen.queryByRole('button', { name: 'All Encounters' })).toBeNull();
|
|
121
|
-
});
|
|
122
118
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openmrsFetch, restBaseUrl, type OpenmrsResource, type Visit } from '@openmrs/esm-framework';
|
|
2
1
|
import useSWR from 'swr';
|
|
2
|
+
import { openmrsFetch, restBaseUrl, type OpenmrsResource, type Visit } from '@openmrs/esm-framework';
|
|
3
3
|
|
|
4
4
|
export interface Encounter {
|
|
5
5
|
uuid: string;
|
|
@@ -158,7 +158,7 @@ export function useVisit(visitUuid: string) {
|
|
|
158
158
|
|
|
159
159
|
return {
|
|
160
160
|
visit: data ? data.data : null,
|
|
161
|
-
|
|
161
|
+
error,
|
|
162
162
|
isLoading,
|
|
163
163
|
isValidating,
|
|
164
164
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { type Observation } from '../visit.resource';
|
|
3
4
|
import EncounterObservations from './encounter-observations.component';
|
|
4
5
|
|
|
5
6
|
describe('EncounterObservations', () => {
|
|
@@ -21,7 +22,7 @@ describe('EncounterObservations', () => {
|
|
|
21
22
|
{ display: 'Temperature: 98.6°F' },
|
|
22
23
|
{ display: 'Blood Pressure: 120/80 mmHg' },
|
|
23
24
|
{ display: 'Heart Rate: 72 bpm' },
|
|
24
|
-
]
|
|
25
|
+
] as Array<Observation>;
|
|
25
26
|
render(<EncounterObservations observations={observations} />);
|
|
26
27
|
|
|
27
28
|
expect(screen.getByText('Temperature:')).toBeInTheDocument();
|
package/translations/am.json
CHANGED
|
@@ -17,18 +17,20 @@
|
|
|
17
17
|
"noDiagnosesFound": "No diagnoses found",
|
|
18
18
|
"noEncountersFound": "No encounters found",
|
|
19
19
|
"noMedicationsFound": "No medications found",
|
|
20
|
-
"noNotesToShowForPatient": "
|
|
20
|
+
"noNotesToShowForPatient": "No hay notas para mostrar de este paciente",
|
|
21
21
|
"noObservationsFound": "No observations found",
|
|
22
22
|
"notes": "Notes",
|
|
23
23
|
"noVisitsToDisplay": "No visits to display",
|
|
24
24
|
"orderDurationAndUnit": "for {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "Indefinite duration",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "Provider",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "Refills",
|
|
29
30
|
"tests": "Tests",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "There is no information to display here",
|
|
31
32
|
"time": "Time",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "Visit Time",
|
|
33
35
|
"visitSummary": "Visit Summary",
|
|
34
36
|
"visitType": "Visit Type"
|
package/translations/ar.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "لا زيارات للعرض",
|
|
24
24
|
"orderDurationAndUnit": "لمدة {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "مدة غير محددة",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "مقدم الخدمة",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "إعادة التعبئة",
|
|
29
30
|
"tests": "الاختبارات",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "لا توجد معلومات لعرضها هنا",
|
|
31
32
|
"time": "الوقت",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "وقت الزيارة",
|
|
33
35
|
"visitSummary": "ملخص الزيارة",
|
|
34
36
|
"visitType": "نوع الزيارة"
|
package/translations/en.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "No visits to display",
|
|
24
24
|
"orderDurationAndUnit": "for {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "Indefinite duration",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "Provider",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "Refills",
|
|
29
30
|
"tests": "Tests",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "There is no information to display here",
|
|
31
32
|
"time": "Time",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "Visit Time",
|
|
33
35
|
"visitSummary": "Visit Summary",
|
|
34
36
|
"visitType": "Visit Type"
|
package/translations/es.json
CHANGED
|
@@ -21,14 +21,16 @@
|
|
|
21
21
|
"noObservationsFound": "No se encontraron observaciones",
|
|
22
22
|
"notes": "Notas",
|
|
23
23
|
"noVisitsToDisplay": "No hay visitas para mostrar",
|
|
24
|
-
"orderDurationAndUnit": "para {
|
|
24
|
+
"orderDurationAndUnit": "para {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "Duración indefinida",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "Proveedor",
|
|
27
28
|
"quantity": "Cantidad",
|
|
28
29
|
"refills": "Recargas",
|
|
29
30
|
"tests": "Pruebas",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "No hay información para mostrar aquí",
|
|
31
32
|
"time": "Tiempo",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "Tiempo de Visita",
|
|
33
35
|
"visitSummary": "Resumen de Visita",
|
|
34
36
|
"visitType": "Tipo de Visita"
|
package/translations/fr.json
CHANGED
|
@@ -17,18 +17,20 @@
|
|
|
17
17
|
"noDiagnosesFound": "Aucun diagnostic",
|
|
18
18
|
"noEncountersFound": "Aucune visite trouvée",
|
|
19
19
|
"noMedicationsFound": "Aucun médicament trouvé",
|
|
20
|
-
"noNotesToShowForPatient": "
|
|
20
|
+
"noNotesToShowForPatient": "Il n'y a pas de notes à afficher pour ce patient",
|
|
21
21
|
"noObservationsFound": "Aucune observation trouvée",
|
|
22
22
|
"notes": "Informations complémentaires",
|
|
23
23
|
"noVisitsToDisplay": "No visits to display",
|
|
24
24
|
"orderDurationAndUnit": "Pour {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "Durée illimitée",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "Fournisseur",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "Recharges",
|
|
29
30
|
"tests": "Tests",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "Il n'y pas d'information à présenter ici",
|
|
31
32
|
"time": "Heure",
|
|
33
|
+
"totalVisits": "Consultation total du jour",
|
|
32
34
|
"visitStartTime": "Heure de la consultation",
|
|
33
35
|
"visitSummary": "Compte rendu de la consultation",
|
|
34
36
|
"visitType": "Type de consultation"
|
package/translations/he.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "אין ביקורים להצגה",
|
|
24
24
|
"orderDurationAndUnit": "למשך {{duration}} {{durationUnit}}",
|
|
25
25
|
"orderIndefiniteDuration": "למשך זמן בלתי מוגבל",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "ספק",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "תערובות",
|
|
29
30
|
"tests": "בדיקות",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "אין מידע להצגה כאן",
|
|
31
32
|
"time": "זמן",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "שעת התחלת הביקור",
|
|
33
35
|
"visitSummary": "סיכום הביקור",
|
|
34
36
|
"visitType": "סוג הביקור"
|
package/translations/km.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "No visits to display",
|
|
24
24
|
"orderDurationAndUnit": "សម្រាប់ {រយៈពេល} {ឯកតារយៈពេល}",
|
|
25
25
|
"orderIndefiniteDuration": "រយៈពេលមិនកំណត់",
|
|
26
|
+
"patients": "Patients",
|
|
26
27
|
"provider": "អ្នកផ្តល់សេវា",
|
|
27
28
|
"quantity": "Quantity",
|
|
28
29
|
"refills": "ការបំពេញបន្ថែម",
|
|
29
30
|
"tests": "ការធ្វើតេស្ត",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "មិនមានព័ត៌មានដើម្បីបង្ហាញនៅទីនេះទេ",
|
|
31
32
|
"time": "ម៉ោងពេល",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "ម៉ោងពេលពិនិត្យជំងឺ",
|
|
33
35
|
"visitSummary": "សេចក្តីសង្ខេបពីការពិនិត្យជំងឺ",
|
|
34
36
|
"visitType": "ប្រភេទនៃជំងឺពិនិត្យ"
|
package/translations/zh.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "没有就诊可显示",
|
|
24
24
|
"orderDurationAndUnit": "持续 {{duration}} {{durationUnit}}。",
|
|
25
25
|
"orderIndefiniteDuration": "无限期",
|
|
26
|
+
"patients": "患者",
|
|
26
27
|
"provider": "提供者",
|
|
27
28
|
"quantity": "数量",
|
|
28
29
|
"refills": "补充处方",
|
|
29
30
|
"tests": "检验",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "这里没有可显示的信息",
|
|
31
32
|
"time": "时间",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "就诊时间",
|
|
33
35
|
"visitSummary": "就诊总结",
|
|
34
36
|
"visitType": "就诊类型"
|
package/translations/zh_CN.json
CHANGED
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
"noVisitsToDisplay": "没有就诊可显示",
|
|
24
24
|
"orderDurationAndUnit": "持续 {{duration}} {{durationUnit}}。",
|
|
25
25
|
"orderIndefiniteDuration": "无限期",
|
|
26
|
+
"patients": "患者",
|
|
26
27
|
"provider": "提供者",
|
|
27
28
|
"quantity": "数量",
|
|
28
29
|
"refills": "补充处方",
|
|
29
30
|
"tests": "检验",
|
|
30
31
|
"thereIsNoInformationToDisplayHere": "这里没有可显示的信息",
|
|
31
32
|
"time": "时间",
|
|
33
|
+
"totalVisits": "Total Visits Today",
|
|
32
34
|
"visitStartTime": "就诊时间",
|
|
33
35
|
"visitSummary": "就诊总结",
|
|
34
36
|
"visitType": "就诊类型"
|