@kenyaemr/esm-service-queues-app 7.0.3-pre.88 → 7.0.3-pre.94
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 +18 -17
- package/dist/130.js +1 -1
- package/dist/130.js.map +1 -1
- package/dist/199.js +1 -1
- package/dist/236.js +1 -0
- package/dist/236.js.map +1 -0
- package/dist/265.js +1 -0
- package/dist/265.js.map +1 -0
- package/dist/271.js +1 -1
- package/dist/282.js +1 -0
- package/dist/282.js.map +1 -0
- package/dist/319.js +1 -1
- package/dist/366.js +1 -0
- package/dist/366.js.map +1 -0
- package/dist/392.js +1 -0
- package/dist/392.js.map +1 -0
- package/dist/460.js +1 -1
- package/dist/484.js +2 -0
- package/dist/484.js.map +1 -0
- package/dist/574.js +1 -1
- package/dist/6.js +1 -1
- package/dist/604.js +1 -0
- package/dist/604.js.map +1 -0
- package/dist/644.js +1 -1
- package/dist/670.js +1 -0
- package/dist/670.js.map +1 -0
- package/dist/727.js +1 -0
- package/dist/727.js.map +1 -0
- package/dist/752.js +1 -1
- package/dist/757.js +1 -1
- package/dist/760.js +1 -0
- package/dist/760.js.map +1 -0
- package/dist/788.js +1 -1
- package/dist/800.js +1 -1
- package/dist/807.js +1 -1
- package/dist/818.js +1 -0
- package/dist/818.js.map +1 -0
- package/dist/828.js +1 -1
- package/dist/833.js +1 -1
- package/dist/911.js +1 -0
- package/dist/911.js.map +1 -0
- package/dist/kenyaemr-esm-service-queues-app.js +1 -1
- package/dist/kenyaemr-esm-service-queues-app.js.buildmanifest.json +160 -160
- package/dist/kenyaemr-esm-service-queues-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 +1 -1
- package/src/active-visits/active-visits-table.resource.ts +1 -1
- package/src/active-visits/change-status-dialog.scss +11 -11
- package/src/active-visits/change-status-dialog.test.tsx +36 -31
- package/src/add-patient-toqueue/add-patient-toqueue-dialog.scss +10 -10
- package/src/add-provider-queue-room/add-provider-queue-room.component.tsx +4 -4
- package/src/add-provider-queue-room/add-provider-queue-room.resource.ts +2 -2
- package/src/add-provider-queue-room/add-provider-queue-room.scss +6 -6
- package/src/add-provider-queue-room/add-provider-queue-room.test.tsx +44 -38
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.component.tsx +1 -1
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.scss +2 -3
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.test.tsx +15 -15
- package/src/config-schema.ts +84 -84
- package/src/current-visit/current-visit-summary.component.tsx +1 -1
- package/src/current-visit/current-visit-summary.test.tsx +12 -11
- package/src/current-visit/current-visit.resource.ts +1 -1
- package/src/current-visit/current-visit.scss +4 -4
- package/src/current-visit/hooks/useVitalsConceptMetadata.tsx +1 -1
- package/src/current-visit/visit-details/triage-note.scss +11 -11
- package/src/helpers/helpers.test.ts +24 -0
- package/src/helpers/helpers.ts +41 -14
- package/src/home.test.tsx +10 -12
- package/src/hooks/useQueueService.ts +16 -10
- package/src/past-visit/past-visit-details/past-visit-summary.scss +8 -8
- package/src/past-visit/past-visit.component.tsx +1 -1
- package/src/past-visit/past-visit.resource.ts +1 -1
- package/src/past-visit/past-visit.scss +17 -17
- package/src/past-visit/past-visit.test.tsx +8 -13
- package/src/patient-info/appointment-details.scss +7 -7
- package/src/patient-info/appointment-details.test.tsx +11 -6
- package/src/patient-info/appointments.resource.ts +1 -1
- package/src/patient-info/patient-info.scss +9 -9
- package/src/patient-info/patient-info.test.tsx +3 -14
- package/src/patient-queue-header/patient-queue-header.component.tsx +4 -1
- package/src/patient-queue-header/patient-queue-header.scss +11 -11
- package/src/patient-queue-metrics/clinic-metrics.component.tsx +1 -1
- package/src/patient-queue-metrics/clinic-metrics.resource.ts +2 -2
- package/src/patient-queue-metrics/clinic-metrics.scss +4 -4
- package/src/patient-queue-metrics/clinic-metrics.test.tsx +40 -45
- package/src/patient-queue-metrics/metrics-card.scss +11 -11
- package/src/patient-queue-metrics/metrics-header.scss +2 -2
- package/src/patient-search/advanced-search.scss +27 -27
- package/src/patient-search/advanced-search.test.tsx +6 -9
- package/src/patient-search/basic-search.scss +14 -14
- package/src/patient-search/basic-search.test.tsx +2 -7
- package/src/patient-search/hooks/useDefaultLocation.ts +1 -1
- package/src/patient-search/hooks/useQueueLocations.tsx +1 -0
- package/src/patient-search/hooks/useScheduledVisits.ts +1 -1
- package/src/patient-search/patient-scheduled-visits.component.tsx +4 -4
- package/src/patient-search/patient-scheduled-visits.scss +17 -17
- package/src/patient-search/patient-scheduled-visits.test.tsx +18 -23
- package/src/patient-search/patient-search.scss +7 -7
- package/src/patient-search/patient-search.workspace.tsx +4 -4
- package/src/patient-search/search-results.scss +11 -11
- package/src/patient-search/search-results.test.tsx +2 -10
- package/src/patient-search/visit-form/visit-form.scss +12 -13
- package/src/patient-search/visit-form/visit-type-selector.component.tsx +9 -11
- package/src/patient-search/visit-form/visit-type-selector.scss +13 -13
- package/src/patient-search/visit-form/visit-type-selector.test.tsx +4 -3
- package/src/patient-search/visit-form-queue-fields/visit-form-queue-fields.scss +1 -3
- package/src/patient-search/visit-form-queue-fields/visit-form-queue-fields.test.tsx +15 -9
- package/src/queue-entry-table-components/edit-entry.scss +1 -1
- package/src/queue-entry-table-components/queue-priority.scss +3 -4
- package/src/queue-entry-table-components/transition-entry.scss +1 -1
- package/src/queue-patient-linelists/queue-linelist-base-table.scss +16 -17
- package/src/queue-patient-linelists/queue-linelist-base-table.test.tsx +7 -8
- package/src/queue-patient-linelists/queue-linelist-filter.scss +13 -13
- package/src/queue-patient-linelists/queue-linelist-filter.test.tsx +9 -6
- package/src/queue-patient-linelists/queue-linelist.resource.ts +4 -4
- package/src/queue-patient-linelists/scheduled-appointments-table.test.tsx +10 -7
- package/src/queue-rooms/queue-room-form.scss +13 -13
- package/src/queue-rooms/queue-room-form.test.tsx +10 -8
- package/src/queue-screen/queue-screen.scss +6 -4
- package/src/queue-screen/queue-screen.test.tsx +6 -6
- package/src/queue-services/queue-service-form.scss +13 -13
- package/src/queue-services/queue-service-form.test.tsx +15 -8
- package/src/queue-table/cells/queue-table-action-cell.component.tsx +2 -2
- package/src/queue-table/cells/queue-table-coming-from-cell.component.tsx +1 -1
- package/src/queue-table/default-queue-table.component.tsx +63 -61
- package/src/queue-table/default-queue-table.test.tsx +61 -61
- package/src/queue-table/queue-entry-actions/queue-entry-actions-modal.scss +36 -0
- package/src/queue-table/queue-entry-actions/queue-entry-actions.modal.tsx +30 -10
- package/src/queue-table/queue-entry-actions/queue-entry-actions.test.tsx +34 -103
- package/src/queue-table/queue-entry-actions/queue-entry-confirm-action.test.tsx +42 -25
- package/src/queue-table/queue-entry-actions/queue-entry-undo-actions.test.tsx +19 -14
- package/src/queue-table/queue-table-by-status-skeleton.component.tsx +1 -5
- package/src/queue-table/queue-table-expanded-row.component.tsx +1 -2
- package/src/queue-table/queue-table-metrics-card.scss +7 -7
- package/src/queue-table/queue-table-metrics.scss +3 -3
- package/src/queue-table/queue-table.component.tsx +8 -11
- package/src/queue-table/queue-table.scss +32 -26
- package/src/queue-table/queue-table.test.tsx +46 -21
- package/src/remove-queue-entry-dialog/remove-queue-entry.resource.ts +1 -1
- package/src/remove-queue-entry-dialog/remove-queue-entry.scss +2 -2
- package/src/remove-queue-entry-dialog/remove-queue-entry.test.tsx +13 -12
- package/src/side-menu/side-menu.test.tsx +0 -1
- package/src/transition-queue-entry/transition-queue-entry-dialog.component.tsx +1 -1
- package/src/transition-queue-entry/transition-queue-entry-dialog.scss +5 -5
- package/src/transition-queue-entry/transition-queue-entry-dialog.test.tsx +33 -44
- package/src/views/queue-tables-for-all-statuses.component.tsx +14 -14
- package/src/visits-missing-inqueue/visits-missing-inqueue.component.tsx +1 -1
- package/src/visits-missing-inqueue/visits-missing-inqueue.resource.ts +1 -1
- package/src/visits-missing-inqueue/visits-missing-inqueue.scss +17 -14
- package/translations/am.json +4 -2
- package/translations/ar.json +4 -2
- package/translations/en.json +1 -0
- package/translations/es.json +4 -2
- package/translations/fr.json +39 -37
- package/translations/he.json +4 -2
- package/translations/km.json +4 -2
- package/translations/zh.json +4 -2
- package/translations/zh_CN.json +4 -2
- package/dist/276.js +0 -1
- package/dist/276.js.map +0 -1
- package/dist/384.js +0 -2
- package/dist/384.js.map +0 -1
- package/dist/401.js +0 -1
- package/dist/401.js.map +0 -1
- package/dist/430.js +0 -1
- package/dist/430.js.map +0 -1
- package/dist/60.js +0 -1
- package/dist/60.js.map +0 -1
- package/dist/600.js +0 -1
- package/dist/600.js.map +0 -1
- package/dist/647.js +0 -1
- package/dist/647.js.map +0 -1
- package/dist/650.js +0 -1
- package/dist/650.js.map +0 -1
- package/dist/669.js +0 -1
- package/dist/669.js.map +0 -1
- package/dist/764.js +0 -1
- package/dist/764.js.map +0 -1
- package/dist/877.js +0 -1
- package/dist/877.js.map +0 -1
- package/dist/917.js +0 -1
- package/dist/917.js.map +0 -1
- package/src/queue-table/queue-entry-actions/queue-entry-actons-modal.scss +0 -36
- package/src/root.scss +0 -15
- /package/dist/{384.js.LICENSE.txt → 484.js.LICENSE.txt} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
6
|
flex-grow: 1;
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
.tileContainer {
|
|
18
18
|
border: 0.0625rem solid $ui-03;
|
|
19
19
|
height: 7.875rem;
|
|
20
|
-
padding:
|
|
21
|
-
margin:
|
|
20
|
+
padding: layout.$spacing-05;
|
|
21
|
+
margin: layout.$spacing-03 layout.$spacing-03;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.tileHeader {
|
|
25
25
|
display: flex;
|
|
26
26
|
justify-content: space-between;
|
|
27
27
|
align-items: baseline;
|
|
28
|
-
margin-bottom:
|
|
28
|
+
margin-bottom: layout.$spacing-03;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.headerLabel {
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
|
|
46
46
|
.headerLabelContainer {
|
|
47
47
|
display: flex;
|
|
48
|
-
height:
|
|
48
|
+
height: layout.$spacing-07;
|
|
49
49
|
|
|
50
50
|
:global(.cds--dropdown__wrapper--inline) {
|
|
51
51
|
gap: 0;
|
|
52
|
-
margin-top: -
|
|
52
|
+
margin-top: -(layout.$spacing-04);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
:global(.cds--list-box__menu-icon) {
|
|
56
|
-
height:
|
|
56
|
+
height: layout.$spacing-05;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
color: $interactive-01;
|
|
65
65
|
|
|
66
66
|
svg {
|
|
67
|
-
margin-left:
|
|
67
|
+
margin-left: layout.$spacing-03;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
html[dir='rtl'] {
|
|
73
73
|
.link {
|
|
74
74
|
svg {
|
|
75
|
-
margin-right:
|
|
75
|
+
margin-right: layout.$spacing-03;
|
|
76
76
|
margin-left: unset;
|
|
77
77
|
transform: scale(-1, 1);
|
|
78
78
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '@carbon/layout';
|
|
2
2
|
@use '@carbon/type';
|
|
3
|
-
@
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.metricsContainer {
|
|
6
6
|
display: flex;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
.actionBtn {
|
|
20
20
|
display: flex;
|
|
21
|
-
column-gap:
|
|
21
|
+
column-gap: layout.$spacing-03;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.comboBtn {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.form {
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
justify-content: space-between;
|
|
9
|
-
height: calc(100vh -
|
|
9
|
+
height: calc(100vh - layout.$spacing-11);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.grid {
|
|
13
|
-
margin: 0
|
|
14
|
-
padding:
|
|
13
|
+
margin: 0 layout.$spacing-05;
|
|
14
|
+
padding: 0;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.row {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:global(.cds--col) {
|
|
21
21
|
:global(.cds--form-item) {
|
|
22
22
|
&:not(:first-of-type):not(:last-of-type) {
|
|
23
|
-
margin:
|
|
23
|
+
margin: layout.$spacing-05 0;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
:global(.cds--date-picker.cds--date-picker--single .cds--date-picker__input) {
|
|
32
|
-
width:
|
|
32
|
+
width: layout.$spacing-13;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.heading {
|
|
38
38
|
@include type.type-style('heading-compact-02');
|
|
39
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: layout.$spacing-03;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.spacer {
|
|
43
|
-
margin-top:
|
|
43
|
+
margin-top: layout.$spacing-07;
|
|
44
44
|
display: inline-block;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
align-items: center;
|
|
49
49
|
display: flex;
|
|
50
50
|
justify-content: flex-start;
|
|
51
|
-
margin:
|
|
51
|
+
margin: layout.$spacing-03 0;
|
|
52
52
|
padding: 0;
|
|
53
53
|
@include type.type-style('body-compact-01');
|
|
54
54
|
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
|
|
58
58
|
svg {
|
|
59
59
|
order: 1;
|
|
60
|
-
margin-right:
|
|
61
|
-
margin-left:
|
|
60
|
+
margin-right: layout.$spacing-03;
|
|
61
|
+
margin-left: 0 !important;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
span {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.advancePatientSearchContainer {
|
|
71
|
-
margin: 0
|
|
71
|
+
margin: 0 layout.$spacing-05;
|
|
72
72
|
|
|
73
73
|
& .backButton {
|
|
74
74
|
margin: 0;
|
|
@@ -82,18 +82,18 @@
|
|
|
82
82
|
.label01 {
|
|
83
83
|
@include type.type-style('label-01');
|
|
84
84
|
color: $text-02;
|
|
85
|
-
margin:
|
|
85
|
+
margin: layout.$spacing-03 0;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.formTextInput {
|
|
89
|
-
margin-bottom:
|
|
89
|
+
margin-bottom: layout.$spacing-04;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.contentSwitcherContainer {
|
|
93
93
|
display: flex;
|
|
94
94
|
align-items: center;
|
|
95
|
-
height:
|
|
96
|
-
margin-bottom:
|
|
95
|
+
height: layout.$spacing-09;
|
|
96
|
+
margin-bottom: layout.$spacing-05;
|
|
97
97
|
|
|
98
98
|
& > span {
|
|
99
99
|
@include type.type-style('heading-compact-01');
|
|
@@ -104,21 +104,21 @@
|
|
|
104
104
|
.formTitle {
|
|
105
105
|
font-weight: bold;
|
|
106
106
|
@include type.type-style('heading-compact-02');
|
|
107
|
-
margin-bottom:
|
|
107
|
+
margin-bottom: layout.$spacing-02;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.fieldRangeSwitcher {
|
|
111
111
|
width: 8rem;
|
|
112
|
-
margin: 0
|
|
112
|
+
margin: 0 layout.$spacing-03 0;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.genderSwitcher {
|
|
116
116
|
width: 18rem;
|
|
117
|
-
margin:
|
|
117
|
+
margin: layout.$spacing-02 0 layout.$spacing-05;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.button {
|
|
121
|
-
height:
|
|
121
|
+
height: layout.$spacing-10;
|
|
122
122
|
display: flex;
|
|
123
123
|
align-content: flex-start;
|
|
124
124
|
align-items: baseline;
|
|
@@ -126,26 +126,26 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.tablet {
|
|
129
|
-
padding:
|
|
129
|
+
padding: layout.$spacing-06 layout.$spacing-05;
|
|
130
130
|
background-color: $ui-02;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.desktop {
|
|
134
|
-
padding:
|
|
135
|
-
margin-top:
|
|
134
|
+
padding: 0;
|
|
135
|
+
margin-top: layout.$spacing-05;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/* Desktop */
|
|
139
139
|
:global(.omrs-breakpoint-gt-tablet) {
|
|
140
140
|
.form {
|
|
141
|
-
height: calc(100vh -
|
|
141
|
+
height: calc(100vh - layout.$spacing-11);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/* Tablet */
|
|
146
146
|
:global(.omrs-breakpoint-lt-desktop) {
|
|
147
147
|
.form {
|
|
148
|
-
height: calc(100vh -
|
|
148
|
+
height: calc(100vh - layout.$spacing-09);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -2,14 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import AdvancedSearch from './advanced-search.component';
|
|
4
4
|
|
|
5
|
-
describe('AdvancedSearch
|
|
6
|
-
test('renders the advanced patient search in an overlay', () => {
|
|
7
|
-
|
|
5
|
+
describe('AdvancedSearch', () => {
|
|
6
|
+
test('renders the advanced patient search in an overlay', async () => {
|
|
7
|
+
render(<AdvancedSearch toggleSearchType={jest.fn()} />);
|
|
8
8
|
|
|
9
9
|
expect(screen.getByRole('button', { name: /back to simple search/i })).toBeInTheDocument();
|
|
10
10
|
expect(screen.getByRole('button', { name: /cancel/i })).toBeInTheDocument();
|
|
11
11
|
expect(screen.getByRole('button', { name: /^search$/i })).toBeInTheDocument();
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
await screen.findAllByText(/any/i);
|
|
14
|
+
|
|
13
15
|
expect(screen.getByRole('tab', { name: /^male$/i })).toBeInTheDocument();
|
|
14
16
|
expect(screen.getByRole('tab', { name: /^female$/i })).toBeInTheDocument();
|
|
15
17
|
expect(screen.getByRole('heading', { name: /name/i })).toBeInTheDocument();
|
|
@@ -22,8 +24,3 @@ describe('AdvancedSearch: ', () => {
|
|
|
22
24
|
expect(screen.getByRole('textbox', { name: /post code/i })).toBeInTheDocument();
|
|
23
25
|
});
|
|
24
26
|
});
|
|
25
|
-
|
|
26
|
-
function renderAdvancedSearch() {
|
|
27
|
-
const toggleSearchType = jest.fn();
|
|
28
|
-
render(<AdvancedSearch toggleSearchType={toggleSearchType} />);
|
|
29
|
-
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.searchboxContainer {
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
|
-
margin-bottom:
|
|
8
|
+
margin-bottom: layout.$spacing-05;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.searchboxLayer {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
.tileContainer {
|
|
16
16
|
:global(.omrs-breakpoint-gt-tablet) & {
|
|
17
|
-
margin: 0
|
|
17
|
+
margin: 0 layout.$spacing-06 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
:global(.omrs-breakpoint-lt-desktop) & {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
flex-flow: column wrap;
|
|
29
29
|
align-items: center;
|
|
30
30
|
justify-content: center;
|
|
31
|
-
padding:
|
|
31
|
+
padding: layout.$spacing-07 0 layout.$spacing-06;
|
|
32
32
|
text-align: center;
|
|
33
33
|
border: 1px solid $ui-03;
|
|
34
34
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
.secondaryText {
|
|
45
45
|
width: 12rem;
|
|
46
|
-
margin-top:
|
|
46
|
+
margin-top: layout.$spacing-02;
|
|
47
47
|
@include type.type-style('body-01');
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@include type.type-style('heading-03');
|
|
53
53
|
color: $text-02;
|
|
54
54
|
width: 12rem;
|
|
55
|
-
margin:
|
|
55
|
+
margin: layout.$spacing-09 auto;
|
|
56
56
|
overflow: hidden;
|
|
57
57
|
text-align: center;
|
|
58
58
|
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
&::before {
|
|
71
|
-
right:
|
|
71
|
+
right: layout.$spacing-05;
|
|
72
72
|
margin-left: -50%;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
&::after {
|
|
76
|
-
left:
|
|
76
|
+
left: layout.$spacing-05;
|
|
77
77
|
margin-right: -50%;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
@include type.type-style('label-01');
|
|
114
114
|
color: $text-02;
|
|
115
115
|
border-bottom: 0.063rem solid $ui-03;
|
|
116
|
-
padding:
|
|
116
|
+
padding: layout.$spacing-03 0;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
.emptyResultText {
|
|
120
120
|
@include type.type-style('heading-compact-01');
|
|
121
121
|
color: $text-02;
|
|
122
|
-
margin-top:
|
|
122
|
+
margin-top: layout.$spacing-05;
|
|
123
123
|
margin-bottom: 0.313rem;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
|
|
131
131
|
.emptySearchResultsTile {
|
|
132
132
|
text-align: center;
|
|
133
|
-
margin-top:
|
|
134
|
-
padding:
|
|
133
|
+
margin-top: layout.$spacing-05;
|
|
134
|
+
padding: layout.$spacing-09 0;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
:global(.omrs-breakpoint-gt-tablet) .emptySearchResultsTile {
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import BasicSearch from './basic-search.component';
|
|
4
4
|
|
|
5
|
-
describe('BasicSearch
|
|
5
|
+
describe('BasicSearch', () => {
|
|
6
6
|
test('renders the basic patient search in an overlay', () => {
|
|
7
|
-
|
|
7
|
+
render(<BasicSearch toggleSearchType={jest.fn()} />);
|
|
8
8
|
|
|
9
9
|
const searchbox = screen.getByRole('searchbox', { name: /search for a patient/i });
|
|
10
10
|
const searchButton = screen.getByRole('button', { name: /^search$/i });
|
|
@@ -16,8 +16,3 @@ describe('BasicSearch: ', () => {
|
|
|
16
16
|
expect(screen.getByText(/type the patient's name or unique id number/i)).toBeInTheDocument();
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
function renderBasicSearch() {
|
|
21
|
-
const toggleSearchType = jest.fn();
|
|
22
|
-
render(<BasicSearch toggleSearchType={toggleSearchType} />);
|
|
23
|
-
}
|
|
@@ -8,6 +8,7 @@ interface FHIRResponse {
|
|
|
8
8
|
type: string;
|
|
9
9
|
resourceType: string;
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
export function useQueueLocations() {
|
|
12
13
|
const apiUrl = `${fhirBaseUrl}/Location?_summary=data&_tag=queue location`;
|
|
13
14
|
const { data, error, isLoading } = useSWRImmutable<{ data: FHIRResponse }>(apiUrl, openmrsFetch);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import head from 'lodash-es/head';
|
|
4
|
+
import { first } from 'rxjs/operators';
|
|
2
5
|
import { useTranslation } from 'react-i18next';
|
|
3
6
|
import {
|
|
4
7
|
Button,
|
|
@@ -27,16 +30,13 @@ import {
|
|
|
27
30
|
useVisitTypes,
|
|
28
31
|
} from '@openmrs/esm-framework';
|
|
29
32
|
import { type Appointment, SearchTypes } from '../types';
|
|
30
|
-
import styles from './patient-scheduled-visits.scss';
|
|
31
33
|
import { postQueueEntry } from './visit-form/queue.resource';
|
|
32
|
-
import { first } from 'rxjs/operators';
|
|
33
34
|
import { convertTime12to24 } from '../helpers/time-helpers';
|
|
34
|
-
import dayjs from 'dayjs';
|
|
35
|
-
import head from 'lodash-es/head';
|
|
36
35
|
import { useQueueLocations } from './hooks/useQueueLocations';
|
|
37
36
|
import { useQueues } from '../hooks/useQueues';
|
|
38
37
|
import { useMutateQueueEntries } from '../hooks/useQueueEntries';
|
|
39
38
|
import { type ConfigObject } from '../config-schema';
|
|
39
|
+
import styles from './patient-scheduled-visits.scss';
|
|
40
40
|
|
|
41
41
|
enum visitType {
|
|
42
42
|
RECENT = 'Recent',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
6
|
background-color: $ui-background;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.visitTile {
|
|
18
|
-
margin:
|
|
18
|
+
margin: layout.$spacing-05 0;
|
|
19
19
|
|
|
20
20
|
&:global(.cds--tile--is-selected:focus) {
|
|
21
21
|
background-color: $color-blue-10;
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.recentlyScheduledVisitsContainer {
|
|
40
|
-
margin-top:
|
|
41
|
-
margin-bottom:
|
|
40
|
+
margin-top: layout.$spacing-06;
|
|
41
|
+
margin-bottom: layout.$spacing-10;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.row {
|
|
45
|
-
margin: 0
|
|
45
|
+
margin: 0 layout.$spacing-05 layout.$spacing-05 layout.$spacing-05;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.backButton {
|
|
49
49
|
align-items: center;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: flex-start;
|
|
52
|
-
margin:
|
|
52
|
+
margin: layout.$spacing-03 0;
|
|
53
53
|
padding: 0;
|
|
54
54
|
@include type.type-style('body-compact-01');
|
|
55
55
|
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
|
|
59
59
|
svg {
|
|
60
60
|
order: 1;
|
|
61
|
-
margin-right:
|
|
62
|
-
margin-left:
|
|
61
|
+
margin-right: layout.$spacing-03;
|
|
62
|
+
margin-left: 0 !important;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
span {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.button {
|
|
87
|
-
height:
|
|
87
|
+
height: layout.$spacing-10;
|
|
88
88
|
display: flex;
|
|
89
89
|
align-content: flex-start;
|
|
90
90
|
align-items: baseline;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
.text-divider {
|
|
95
95
|
display: flex;
|
|
96
96
|
align-items: center;
|
|
97
|
-
margin:
|
|
97
|
+
margin: layout.$spacing-08 25%;
|
|
98
98
|
@include type.type-style('heading-03');
|
|
99
99
|
color: $text-02;
|
|
100
100
|
}
|
|
@@ -108,24 +108,24 @@
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.text-divider::before {
|
|
111
|
-
margin-right:
|
|
111
|
+
margin-right: layout.$spacing-05;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.text-divider::after {
|
|
115
|
-
margin-left:
|
|
115
|
+
margin-left: layout.$spacing-05;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.buttonContainer {
|
|
119
119
|
display: flex;
|
|
120
120
|
align-items: center;
|
|
121
121
|
justify-content: center;
|
|
122
|
-
margin-bottom:
|
|
122
|
+
margin-bottom: layout.$spacing-03;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.prioritySwitcher {
|
|
126
|
-
margin:
|
|
126
|
+
margin: layout.$spacing-03 0 layout.$spacing-03;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.emptyAppointment {
|
|
130
|
-
margin:
|
|
130
|
+
margin: layout.$spacing-05;
|
|
131
131
|
}
|
|
@@ -1,44 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { screen } from '@testing-library/react';
|
|
3
|
+
import { getDefaultsFromConfigSchema, useConfig, useLocations, useSession } from '@openmrs/esm-framework';
|
|
3
4
|
import { renderWithSwr } from 'tools';
|
|
5
|
+
import { type ConfigObject, configSchema } from '../config-schema';
|
|
4
6
|
import { mockLocations, mockPatient, mockPatientsVisits, mockSession } from '__mocks__';
|
|
5
|
-
import { type ConfigObject, useConfig } from '@openmrs/esm-framework';
|
|
6
7
|
import PatientScheduledVisits from './patient-scheduled-visits.component';
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
+
const mockUseConfig = jest.mocked(useConfig<ConfigObject>);
|
|
9
10
|
const mockToggleSearchType = jest.fn();
|
|
11
|
+
const mockUseLocations = useLocations as jest.Mock;
|
|
12
|
+
const mockUseSession = jest.mocked(useSession);
|
|
10
13
|
|
|
11
|
-
const
|
|
14
|
+
const defaultProps = {
|
|
12
15
|
appointments: { recentVisits: mockPatientsVisits.recentVisits, futureVisits: [] },
|
|
13
|
-
toggleSearchType: mockToggleSearchType,
|
|
14
|
-
patientUuid: mockPatient.uuid,
|
|
15
16
|
closePanel: () => false,
|
|
17
|
+
closeWorkspace: jest.fn(),
|
|
18
|
+
patientUuid: mockPatient.uuid,
|
|
19
|
+
toggleSearchType: mockToggleSearchType,
|
|
16
20
|
};
|
|
17
21
|
|
|
18
|
-
jest.mock('@openmrs/esm-framework', () => {
|
|
19
|
-
const originalModule = jest.requireActual('@openmrs/esm-framework');
|
|
20
|
-
return {
|
|
21
|
-
...originalModule,
|
|
22
|
-
openmrsFetch: jest.fn(),
|
|
23
|
-
useLocations: jest.fn().mockImplementation(() => mockLocations.data),
|
|
24
|
-
useSession: jest.fn().mockImplementation(() => mockSession.data),
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
22
|
describe('ScheduledVisits', () => {
|
|
28
|
-
beforeEach(() =>
|
|
29
|
-
|
|
23
|
+
beforeEach(() => {
|
|
24
|
+
mockUseConfig.mockReturnValue({
|
|
25
|
+
...getDefaultsFromConfigSchema(configSchema),
|
|
30
26
|
concepts: {},
|
|
31
|
-
} as ConfigObject)
|
|
32
|
-
|
|
27
|
+
} as ConfigObject);
|
|
28
|
+
mockUseLocations.mockReturnValue(mockLocations.data.results);
|
|
29
|
+
mockUseSession.mockReturnValue(mockSession.data);
|
|
30
|
+
});
|
|
31
|
+
|
|
33
32
|
it('should display recent and future scheduled visits', async () => {
|
|
34
|
-
|
|
33
|
+
renderWithSwr(<PatientScheduledVisits {...defaultProps} />);
|
|
35
34
|
|
|
36
35
|
expect(screen.getByText(/Cardiology Consultation 1/i)).toBeInTheDocument();
|
|
37
36
|
expect(screen.getByText(/08-Aug-2022, 02:56 PM · 10 Engineer VCT/i)).toBeInTheDocument();
|
|
38
37
|
expect(screen.getByText(/No appointments found/i)).toBeInTheDocument();
|
|
39
38
|
});
|
|
40
39
|
});
|
|
41
|
-
|
|
42
|
-
function renderPatientScheduledVisits() {
|
|
43
|
-
renderWithSwr(<PatientScheduledVisits {...testProps} />);
|
|
44
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
3
|
-
@
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
4
4
|
|
|
5
5
|
.patientSearchContainer {
|
|
6
6
|
height: 100%;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.patientPhoto {
|
|
25
|
-
margin:
|
|
25
|
+
margin: layout.$spacing-05;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.backButton {
|
|
29
29
|
align-items: center;
|
|
30
30
|
display: flex;
|
|
31
31
|
justify-content: flex-start;
|
|
32
|
-
margin:
|
|
32
|
+
margin: layout.$spacing-03 0;
|
|
33
33
|
padding: 0;
|
|
34
34
|
@include type.type-style('body-compact-01');
|
|
35
35
|
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
|
|
39
39
|
svg {
|
|
40
40
|
order: 1;
|
|
41
|
-
margin-right:
|
|
42
|
-
margin-left:
|
|
41
|
+
margin-right: layout.$spacing-03;
|
|
42
|
+
margin-left: 0 !important;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
span {
|
|
@@ -43,7 +43,7 @@ const PatientSearch: React.FC<PatientSearchProps> = ({
|
|
|
43
43
|
const { activeVisit } = useVisit(selectedPatientUuid);
|
|
44
44
|
const [searchType, setSearchType] = useState<SearchTypes>(SearchTypes.SCHEDULED_VISITS);
|
|
45
45
|
const [showContactDetails, setContactDetails] = useState(false);
|
|
46
|
-
const { appointments, isLoading,
|
|
46
|
+
const { appointments, isLoading, error } = useScheduledVisits(selectedPatientUuid);
|
|
47
47
|
|
|
48
48
|
const hasAppointments = !(isNil(appointments?.futureVisits) && isNil(appointments?.recentVisits));
|
|
49
49
|
|
|
@@ -109,11 +109,11 @@ const PatientSearch: React.FC<PatientSearchProps> = ({
|
|
|
109
109
|
<ExistingVisitFormComponent visit={activeVisit} closeWorkspace={closeWorkspace} />
|
|
110
110
|
) : (
|
|
111
111
|
<>
|
|
112
|
-
{
|
|
113
|
-
<ErrorState headerTitle={t('errorFetchingAppointments', 'Error fetching appointments')} error={
|
|
112
|
+
{error ? (
|
|
113
|
+
<ErrorState headerTitle={t('errorFetchingAppointments', 'Error fetching appointments')} error={error} />
|
|
114
114
|
) : null}
|
|
115
115
|
|
|
116
|
-
{isLoading && !
|
|
116
|
+
{isLoading && !error ? (
|
|
117
117
|
<DataTableSkeleton role="progressbar" />
|
|
118
118
|
) : searchType === SearchTypes.SCHEDULED_VISITS && hasAppointments ? (
|
|
119
119
|
<PatientScheduledVisits
|