@kenyaemr/esm-morgue-app 5.4.2-pre.2279 → 5.4.2-pre.2288
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 +19 -19
- package/dist/109.js +2 -0
- package/dist/109.js.map +1 -0
- package/dist/201.js +1 -0
- package/dist/201.js.map +1 -0
- package/dist/293.js +1 -0
- package/dist/293.js.map +1 -0
- package/dist/300.js +1 -1
- package/dist/347.js +1 -2
- package/dist/347.js.map +1 -1
- package/dist/373.js +2 -0
- package/dist/373.js.map +1 -0
- package/dist/38.js +1 -0
- package/dist/38.js.map +1 -0
- package/dist/389.js +1 -0
- package/dist/389.js.map +1 -0
- package/dist/398.js +1 -0
- package/dist/398.js.map +1 -0
- package/dist/4.js +2 -0
- package/dist/4.js.map +1 -0
- package/dist/410.js +1 -0
- package/dist/410.js.map +1 -0
- package/dist/420.js +2 -0
- package/dist/420.js.map +1 -0
- package/dist/467.js +1 -0
- package/dist/467.js.map +1 -0
- package/dist/632.js +1 -0
- package/dist/632.js.map +1 -0
- package/dist/798.js +1 -0
- package/dist/798.js.map +1 -0
- package/dist/811.js +1 -0
- package/dist/811.js.map +1 -0
- package/dist/824.js +1 -0
- package/dist/824.js.map +1 -0
- package/dist/827.js +1 -0
- package/dist/827.js.map +1 -0
- package/dist/842.js +2 -0
- package/dist/842.js.LICENSE.txt +5 -0
- package/dist/842.js.map +1 -0
- package/dist/918.js +1 -1
- package/dist/918.js.map +1 -1
- package/dist/kenyaemr-esm-morgue-app.js +1 -1
- package/dist/kenyaemr-esm-morgue-app.js.buildmanifest.json +218 -291
- package/dist/kenyaemr-esm-morgue-app.js.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.LICENSE.txt +15 -0
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/bed/bed.component.tsx +164 -0
- package/src/bed/bed.scss +192 -0
- package/src/bed/divider/divider.component.tsx +18 -0
- package/src/bed/empty-bed.component.tsx +47 -0
- package/src/bed-layout/admitted/admitted-bed-layout.component.tsx +189 -0
- package/src/bed-layout/awaiting/awaiting-bed-layout.component.tsx +86 -0
- package/src/bed-layout/bed-layout.resource.ts +72 -0
- package/src/bed-layout/bed-layout.scss +55 -0
- package/src/bed-layout/discharged/discharged-bed-layout.component.tsx +109 -0
- package/src/bed-layout/discharged/discharged-bed-layout.resource.ts +99 -0
- package/src/bed-linelist-view/admitted/admitted-bed-linelist-view.component.tsx +420 -0
- package/src/bed-linelist-view/awaiting/awaiting-bed-linelist-view.component.tsx +224 -0
- package/src/bed-linelist-view/bed-linelist-view.scss +5 -0
- package/src/bed-linelist-view/discharged/discharged-bed-line-view.component.tsx +256 -0
- package/src/config-schema.ts +41 -9
- package/src/constants.ts +57 -0
- package/src/deceased-patient-header/deceased-patient-header.component.tsx +31 -0
- package/src/deceased-patient-header/deceased-patient-header.scss +50 -0
- package/src/{component → deceased-patient-header}/deceasedInfo/deceased-info.component.tsx +1 -1
- package/src/deceased-patient-header/deceasedInfo/deceased-info.resource.ts +11 -0
- package/src/extension/actionButton.component.tsx +5 -59
- package/src/extension/deceasedInfoBanner.component.tsx +5 -9
- package/src/{hook/useAdmitPatient.ts → forms/admit-deceased-person-workspace/admit-deceased-person.resource.ts} +177 -46
- package/src/forms/admit-deceased-person-workspace/admit-deceased-person.scss +143 -0
- package/src/forms/admit-deceased-person-workspace/admit-deceased-person.workspace.tsx +648 -0
- package/src/{hook/usePersonAttributes.ts → forms/discharge-deceased-person-workspace/discharge-body.resource.ts} +1 -1
- package/src/forms/discharge-deceased-person-workspace/discharge-body.scss +56 -0
- package/src/forms/discharge-deceased-person-workspace/discharge-body.workspace.tsx +362 -0
- package/src/forms/dispose-deceased-person-workspace/dispose-deceased-person.resource.ts +18 -0
- package/src/{workspaces/patientAdditionalInfoForm.scss → forms/dispose-deceased-person-workspace/dispose-deceased-person.scss} +46 -66
- package/src/forms/dispose-deceased-person-workspace/dispose-deceased-person.workspace.tsx +401 -0
- package/src/forms/form-entry-workspace/form-entry-workspace.workspace.tsx +62 -0
- package/src/forms/swap-compartment-workspace/swap-unit.scss +144 -0
- package/src/forms/swap-compartment-workspace/swap-unit.workspace.tsx +280 -0
- package/src/header/header.component.tsx +41 -0
- package/src/header/header.scss +58 -0
- package/src/home/home.component.tsx +87 -0
- package/src/home/home.resource.ts +261 -0
- package/src/home/home.scss +5 -0
- package/src/index.ts +18 -12
- package/src/metrics/metrics-card.component.tsx +31 -0
- package/src/metrics/metrics-card.scss +51 -0
- package/src/root.component.tsx +7 -3
- package/src/routes.json +25 -1
- package/src/schemas/index.ts +66 -0
- package/src/summary/summary.component.tsx +42 -0
- package/src/summary/summary.scss +10 -0
- package/src/switcher/content-switcher.component.tsx +220 -0
- package/src/switcher/content-switcher.scss +30 -0
- package/src/types/index.ts +336 -359
- package/src/utils/utils.ts +20 -2
- package/src/view-details/main/main.component.tsx +34 -0
- package/src/view-details/main/main.scss +45 -0
- package/src/view-details/panels/attachement.component.tsx +21 -0
- package/src/view-details/panels/autopsy.component.tsx +215 -0
- package/src/view-details/panels/billing-history.component.tsx +13 -0
- package/src/view-details/panels/observations/observation.component.tsx +57 -0
- package/src/view-details/panels/observations/observation.scss +24 -0
- package/src/view-details/panels/panels.scss +46 -0
- package/src/view-details/view-details.component.tsx +65 -0
- package/src/view-details/view-details.resource.ts +65 -0
- package/src/view-details/views-details.scss +82 -0
- package/translations/en.json +67 -25
- package/tsconfig.json +1 -1
- package/dist/113.js +0 -1
- package/dist/113.js.map +0 -1
- package/dist/160.js +0 -1
- package/dist/160.js.map +0 -1
- package/dist/299.js +0 -1
- package/dist/299.js.map +0 -1
- package/dist/433.js +0 -2
- package/dist/433.js.map +0 -1
- package/dist/441.js +0 -1
- package/dist/441.js.map +0 -1
- package/dist/496.js +0 -1
- package/dist/496.js.map +0 -1
- package/dist/511.js +0 -1
- package/dist/511.js.map +0 -1
- package/dist/603.js +0 -1
- package/dist/603.js.map +0 -1
- package/dist/610.js +0 -1
- package/dist/610.js.map +0 -1
- package/dist/612.js +0 -1
- package/dist/612.js.map +0 -1
- package/dist/656.js +0 -2
- package/dist/656.js.map +0 -1
- package/dist/752.js +0 -1
- package/dist/752.js.map +0 -1
- package/dist/754.js +0 -1
- package/dist/754.js.map +0 -1
- package/dist/781.js +0 -1
- package/dist/781.js.map +0 -1
- package/dist/801.js +0 -2
- package/dist/801.js.map +0 -1
- package/dist/817.js +0 -1
- package/dist/817.js.map +0 -1
- package/dist/877.js +0 -1
- package/dist/877.js.map +0 -1
- package/dist/924.js +0 -1
- package/dist/924.js.map +0 -1
- package/src/autosuggest/autosuggest.component.tsx +0 -162
- package/src/autosuggest/autosuggest.scss +0 -61
- package/src/autosuggest/patient-search-info.component.tsx +0 -75
- package/src/autosuggest/patient-search-info.scss +0 -62
- package/src/autosuggest/search-empty-state.component.tsx +0 -21
- package/src/autosuggest/search-empty-state.scss +0 -18
- package/src/card/avail-compartment.compartment.tsx +0 -94
- package/src/card/compartment-view.compartment.tsx +0 -62
- package/src/card/compartment.scss +0 -128
- package/src/card/compartmentSharing.component.tsx +0 -21
- package/src/card/compartmentSharing.scss +0 -24
- package/src/card/empty-compartment.component.tsx +0 -28
- package/src/card/empty-compartment.scss +0 -61
- package/src/component/main.component.tsx +0 -17
- package/src/component/next-of-kin-details/nextOfKinDetails.component.tsx +0 -50
- package/src/component/next-of-kin-details/nextOfKinDetails.scss +0 -37
- package/src/header/admitted-queue-header.component.tsx +0 -30
- package/src/header/admitted-queue-header.scss +0 -32
- package/src/header/morgue-header.component.tsx +0 -38
- package/src/header/morgue-header.scss +0 -95
- package/src/header/morgue-illustration.component.tsx +0 -13
- package/src/hook/useDeceasedPatients.ts +0 -12
- package/src/hook/useDischargedPatient.ts +0 -55
- package/src/hook/useMorgue.resource.ts +0 -163
- package/src/hook/useMortuaryAdmissionLocation.ts +0 -64
- package/src/tables/admitted-queue.component.tsx +0 -54
- package/src/tables/admitted-queue.scss +0 -62
- package/src/tables/discharge-queue.component.tsx +0 -87
- package/src/tables/generic-table.component.tsx +0 -140
- package/src/tables/generic-table.scss +0 -37
- package/src/tabs/tabs.component.tsx +0 -82
- package/src/tabs/tabs.scss +0 -15
- package/src/workspaces/admit-body.scss +0 -46
- package/src/workspaces/admit-body.workspace.tsx +0 -79
- package/src/workspaces/discharge-body.scss +0 -67
- package/src/workspaces/discharge-body.workspace.tsx +0 -329
- package/src/workspaces/patientAdditionalInfoForm.workspace.tsx +0 -562
- package/src/workspaces/swap-unit.scss +0 -46
- package/src/workspaces/swap-unit.workspace.tsx +0 -168
- /package/dist/{347.js.LICENSE.txt → 109.js.LICENSE.txt} +0 -0
- /package/dist/{656.js.LICENSE.txt → 373.js.LICENSE.txt} +0 -0
- /package/dist/{801.js.LICENSE.txt → 4.js.LICENSE.txt} +0 -0
- /package/dist/{433.js.LICENSE.txt → 420.js.LICENSE.txt} +0 -0
- /package/src/{component → deceased-patient-header}/deceasedInfo/deceased-info.scss +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './compartment.scss';
|
|
3
|
-
import EmptyCompartment from './empty-compartment.component';
|
|
4
|
-
import AvailableCompartment from './avail-compartment.compartment';
|
|
5
|
-
import EmptyDeceasedSearch from '../empty-state/empty-morgue-admission.component';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useAdmissionLocation } from '../hook/useMortuaryAdmissionLocation';
|
|
8
|
-
import { InlineLoading } from '@carbon/react';
|
|
9
|
-
import CompartmentShareDivider from './compartmentSharing.component';
|
|
10
|
-
|
|
11
|
-
const CompartmentView: React.FC = () => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
const { admissionLocation, isLoading } = useAdmissionLocation();
|
|
14
|
-
|
|
15
|
-
if (isLoading) {
|
|
16
|
-
return (
|
|
17
|
-
<InlineLoading
|
|
18
|
-
status="active"
|
|
19
|
-
iconDescription="Loading"
|
|
20
|
-
description={t('pullingCompartment', 'Pulling compartments data...')}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return admissionLocation?.bedLayouts?.length > 0 ? (
|
|
26
|
-
<div className={styles.allPatientCardWrapper}>
|
|
27
|
-
{admissionLocation?.bedLayouts?.map((bed, index) => (
|
|
28
|
-
<div key={bed.bedUuid} className={styles.cardRow}>
|
|
29
|
-
{bed.status === 'OCCUPIED' ? (
|
|
30
|
-
<>
|
|
31
|
-
{bed.patients.length > 1 ? (
|
|
32
|
-
<div className={styles.verticalLayout}>
|
|
33
|
-
{bed.patients.map((patient, patientIndex) => (
|
|
34
|
-
<React.Fragment key={patient.uuid}>
|
|
35
|
-
<AvailableCompartment patientInfo={patient} bedNumber={bed?.bedNumber} />
|
|
36
|
-
{patientIndex < bed.patients.length - 1 && <CompartmentShareDivider />}
|
|
37
|
-
</React.Fragment>
|
|
38
|
-
))}
|
|
39
|
-
</div>
|
|
40
|
-
) : (
|
|
41
|
-
<div className={styles.horizontalLayout}>
|
|
42
|
-
<AvailableCompartment patientInfo={bed.patients[0]} bedNumber={bed?.bedNumber} />
|
|
43
|
-
</div>
|
|
44
|
-
)}
|
|
45
|
-
</>
|
|
46
|
-
) : (
|
|
47
|
-
<EmptyCompartment bedNumber={bed?.bedNumber} />
|
|
48
|
-
)}
|
|
49
|
-
</div>
|
|
50
|
-
))}
|
|
51
|
-
</div>
|
|
52
|
-
) : (
|
|
53
|
-
<div className={styles.emptyStateContainer}>
|
|
54
|
-
<EmptyDeceasedSearch
|
|
55
|
-
title={t('noResultNotFound', 'No result found')}
|
|
56
|
-
subTitle={t('adjustFilterOrSwitch', 'Try adjusting your search.')}
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default CompartmentView;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
|
|
5
|
-
.allPatientCardWrapper {
|
|
6
|
-
display: grid;
|
|
7
|
-
grid-template-columns: repeat(4, 1fr);
|
|
8
|
-
gap: layout.$spacing-01;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 0;
|
|
11
|
-
justify-items: center;
|
|
12
|
-
align-items: start;
|
|
13
|
-
|
|
14
|
-
:global(.omrs-breakpoint-lt-desktop) & {
|
|
15
|
-
grid-template-columns: repeat(2, 1fr);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.cardView {
|
|
20
|
-
width: 100%;
|
|
21
|
-
max-width: 380px;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
justify-content: flex-start;
|
|
25
|
-
align-items: center;
|
|
26
|
-
padding: layout.$spacing-04;
|
|
27
|
-
background-color: colors.$gray-20;
|
|
28
|
-
|
|
29
|
-
:global(.omrs-breakpoint-lt-desktop) & {
|
|
30
|
-
padding: layout.$spacing-03;
|
|
31
|
-
gap: layout.$spacing-02;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.cardRow {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: row;
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
align-items: center;
|
|
40
|
-
width: 100%;
|
|
41
|
-
margin-bottom: layout.$spacing-03;
|
|
42
|
-
|
|
43
|
-
&.centeredContent {
|
|
44
|
-
justify-content: center;
|
|
45
|
-
text-align: center;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.verticalLayout {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
width: 100%;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.horizontalLayout {
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: row;
|
|
58
|
-
width: 100%;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.cardLabelWrapper {
|
|
62
|
-
display: flex;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
align-items: center;
|
|
65
|
-
width: layout.$spacing-10;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.cardLabel {
|
|
69
|
-
font-size: layout.$spacing-05;
|
|
70
|
-
line-height: 1.29;
|
|
71
|
-
color: colors.$blue-60;
|
|
72
|
-
width: layout.$spacing-13;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.deceasedName,
|
|
76
|
-
.noCompartment {
|
|
77
|
-
font-size: type.type-scale(2);
|
|
78
|
-
font-weight: 600;
|
|
79
|
-
color: colors.$black;
|
|
80
|
-
margin-left: layout.$spacing-05;
|
|
81
|
-
width: 100%;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.deceasedReason,
|
|
85
|
-
.deceasedNoDays,
|
|
86
|
-
.noDays {
|
|
87
|
-
color: colors.$gray-90;
|
|
88
|
-
font-size: type.type-scale(2);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.viewDetailsLink {
|
|
92
|
-
margin: 0;
|
|
93
|
-
padding: 0;
|
|
94
|
-
color: colors.$gray-60;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.middot {
|
|
98
|
-
margin: 0 layout.$spacing-03;
|
|
99
|
-
font-weight: normal;
|
|
100
|
-
color: colors.$gray-60;
|
|
101
|
-
font-size: type.type-scale(2);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.age {
|
|
105
|
-
font-weight: normal;
|
|
106
|
-
color: colors.$gray-60;
|
|
107
|
-
font-size: type.type-scale(2);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.causeDisplay {
|
|
111
|
-
font-size: type.type-scale(2);
|
|
112
|
-
color: colors.$gray-60;
|
|
113
|
-
text-align: justify;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.emptyStateContainer {
|
|
117
|
-
display: flex;
|
|
118
|
-
justify-content: center;
|
|
119
|
-
align-items: center;
|
|
120
|
-
text-align: center;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.borderLine {
|
|
124
|
-
width: 100%;
|
|
125
|
-
height: 1px;
|
|
126
|
-
background-color: colors.$gray-30;
|
|
127
|
-
margin: layout.$spacing-03 0;
|
|
128
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SkeletonText, Tag } from '@carbon/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import styles from './compartmentSharing.scss';
|
|
5
|
-
|
|
6
|
-
interface CompartmentShareDividerProps {
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const CompartmentShareDivider: React.FC<CompartmentShareDividerProps> = ({ isLoading }) => {
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
-
return (
|
|
13
|
-
<div className={styles.compartmentDivider}>
|
|
14
|
-
<div className={styles.compartmentDividerLine}></div>
|
|
15
|
-
{isLoading ? <SkeletonText /> : <Tag>{t('sharing', 'Sharing')}</Tag>}
|
|
16
|
-
<div className={styles.compartmentDividerLine}></div>
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default CompartmentShareDivider;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
|
|
5
|
-
.compartmentDivider {
|
|
6
|
-
background-color: colors.$gray-80;
|
|
7
|
-
color: colors.$white;
|
|
8
|
-
padding: layout.$spacing-02;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
width: 95.4%;
|
|
13
|
-
|
|
14
|
-
:global(.omrs-breakpoint-lt-desktop) & {
|
|
15
|
-
padding: layout.$spacing-01;
|
|
16
|
-
width: 92%;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.compartmentDividerLine {
|
|
21
|
-
height: 1px;
|
|
22
|
-
background-color: colors.$white;
|
|
23
|
-
width: 30%;
|
|
24
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './empty-compartment.scss';
|
|
3
|
-
import { Button, Tile } from '@carbon/react';
|
|
4
|
-
import { Movement } from '@carbon/react/icons';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { launchWorkspace } from '@openmrs/esm-framework';
|
|
7
|
-
interface EmptyCompartmentProps {
|
|
8
|
-
bedNumber: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const EmptyCompartment: React.FC<EmptyCompartmentProps> = ({ bedNumber }) => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
const handleSearchAdmitWorkspace = () => {
|
|
14
|
-
launchWorkspace('admit-body-form');
|
|
15
|
-
};
|
|
16
|
-
return (
|
|
17
|
-
<div className={styles.cardView}>
|
|
18
|
-
<div className={`${styles.cardRow} ${styles.centeredContent}`}>
|
|
19
|
-
<div className={styles.cardLabelWrapper}>
|
|
20
|
-
<div className={styles.cardLabel}>{bedNumber}</div>
|
|
21
|
-
</div>
|
|
22
|
-
<span className={styles.noCompartment}>{t('empty', 'Empty')}</span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export default EmptyCompartment;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
|
|
5
|
-
.cardView {
|
|
6
|
-
width: 100%;
|
|
7
|
-
max-width: 380px;
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
justify-content: flex-start;
|
|
11
|
-
align-items: center;
|
|
12
|
-
padding: layout.$spacing-04;
|
|
13
|
-
background-color: colors.$gray-20;
|
|
14
|
-
|
|
15
|
-
:global(.omrs-breakpoint-lt-desktop) & {
|
|
16
|
-
padding: layout.$spacing-03;
|
|
17
|
-
gap: layout.$spacing-02;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.cardRow {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: row;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
align-items: center;
|
|
26
|
-
width: 100%;
|
|
27
|
-
margin-bottom: layout.$spacing-03;
|
|
28
|
-
|
|
29
|
-
&.centeredContent {
|
|
30
|
-
justify-content: center;
|
|
31
|
-
text-align: center;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.cardLabelWrapper {
|
|
36
|
-
display: flex;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
align-items: center;
|
|
39
|
-
width: layout.$spacing-10;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.cardLabel {
|
|
43
|
-
font-size: layout.$spacing-05;
|
|
44
|
-
line-height: 1.29;
|
|
45
|
-
color: colors.$blue-60;
|
|
46
|
-
width: layout.$spacing-13;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.deceasedName,
|
|
50
|
-
.noCompartment {
|
|
51
|
-
font-size: type.type-scale(2);
|
|
52
|
-
font-weight: 600;
|
|
53
|
-
color: colors.$black;
|
|
54
|
-
width: 100%;
|
|
55
|
-
margin-right: layout.$spacing-09;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.assignButton {
|
|
59
|
-
width: 100%;
|
|
60
|
-
margin-top: layout.$spacing-05;
|
|
61
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { MorgueHeader } from '../header/morgue-header.component';
|
|
4
|
-
import { MorgueTabs } from '../tabs/tabs.component';
|
|
5
|
-
|
|
6
|
-
const MainComponent: React.FC = () => {
|
|
7
|
-
const { t } = useTranslation();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div className={`omrs-main-content`}>
|
|
11
|
-
<MorgueHeader title={t('mortuary', 'Mortuary')} />
|
|
12
|
-
<MorgueTabs />
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default MainComponent;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './nextOfKinDetails.scss';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Tag } from '@carbon/react';
|
|
5
|
-
import toUpper from 'lodash/toUpper';
|
|
6
|
-
import capitalize from 'lodash/capitalize';
|
|
7
|
-
import { formatDateTime } from '../../utils/utils';
|
|
8
|
-
import { CardHeader } from '@openmrs/esm-patient-common-lib';
|
|
9
|
-
|
|
10
|
-
interface NextOfKinProps {
|
|
11
|
-
nextOfKin?: {
|
|
12
|
-
name: string;
|
|
13
|
-
phone: string;
|
|
14
|
-
address: string;
|
|
15
|
-
relationship: string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const NextOfKinDetails: React.FC<NextOfKinProps> = ({ nextOfKin }) => {
|
|
20
|
-
const { t } = useTranslation();
|
|
21
|
-
|
|
22
|
-
if (!nextOfKin) {
|
|
23
|
-
return <div>{t('noAvailable', 'No available')}</div>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div className={styles.nextOfKinDetailsContainer}>
|
|
28
|
-
<div className={styles.nextOfKinTitle}>
|
|
29
|
-
<span>{toUpper(t('nextOfKin', 'Next of Kin'))}</span>
|
|
30
|
-
<span>{formatDateTime(new Date())}</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div className={styles.nextOfKinName}>
|
|
33
|
-
<span>
|
|
34
|
-
{toUpper(nextOfKin?.name)} ·
|
|
35
|
-
<Tag size="md">{capitalize(nextOfKin?.relationship)}</Tag>
|
|
36
|
-
</span>
|
|
37
|
-
</div>
|
|
38
|
-
<div className={styles.nextOfKinInfo}>
|
|
39
|
-
<span className={styles.nextOfKinPhone}>
|
|
40
|
-
{t('phone', 'Phone')}: {nextOfKin?.phone}
|
|
41
|
-
</span>
|
|
42
|
-
<span>
|
|
43
|
-
{t('address', 'Address')}: {nextOfKin?.address}
|
|
44
|
-
</span>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default NextOfKinDetails;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
|
|
5
|
-
.nextOfKinDetailsContainer {
|
|
6
|
-
background-color: colors.$white;
|
|
7
|
-
width: 50%;
|
|
8
|
-
padding: layout.$spacing-04;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.nextOfKinTitle {
|
|
12
|
-
@include type.type-style('label-02');
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
align-items: center;
|
|
16
|
-
color: colors.$gray-70;
|
|
17
|
-
gap: layout.$spacing-01;
|
|
18
|
-
margin-left: layout.$spacing-02;
|
|
19
|
-
margin-right: layout.$spacing-02;
|
|
20
|
-
margin-bottom: layout.$spacing-02;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
}
|
|
23
|
-
.nextOfKinName {
|
|
24
|
-
margin-left: layout.$spacing-02;
|
|
25
|
-
margin-right: layout.$spacing-02;
|
|
26
|
-
}
|
|
27
|
-
.nextOfKinInfo {
|
|
28
|
-
margin-left: layout.$spacing-02;
|
|
29
|
-
margin-right: layout.$spacing-02;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.middot {
|
|
33
|
-
margin: 0 layout.$spacing-01;
|
|
34
|
-
}
|
|
35
|
-
.nextOfKinPhone {
|
|
36
|
-
margin-right: layout.$spacing-05;
|
|
37
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Search } from '@carbon/react';
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
import styles from './admitted-queue-header.scss';
|
|
4
|
-
|
|
5
|
-
const DeceasedFilter: React.FC<{ onSearchChange: (searchQuery: string) => void }> = ({ onSearchChange }) => {
|
|
6
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
7
|
-
|
|
8
|
-
const handleSearchChange = (event) => {
|
|
9
|
-
const query = event.target.value;
|
|
10
|
-
setSearchQuery(query);
|
|
11
|
-
onSearchChange(query);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className={styles.metricsContainer}>
|
|
16
|
-
<Search
|
|
17
|
-
size="sm"
|
|
18
|
-
placeholder="Search for deceased"
|
|
19
|
-
labelText="Search"
|
|
20
|
-
closeButtonLabelText="Clear search input"
|
|
21
|
-
id="search-deceased"
|
|
22
|
-
onChange={handleSearchChange}
|
|
23
|
-
value={searchQuery}
|
|
24
|
-
className={styles.searchInput}
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default DeceasedFilter;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
|
|
5
|
-
.metricsContainer {
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding: 0 layout.$spacing-05;
|
|
10
|
-
height: 4rem;
|
|
11
|
-
margin-bottom: 0 layout.$spacing-05;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.searchInput {
|
|
15
|
-
flex-grow: 1;
|
|
16
|
-
margin-right: layout.$spacing-03;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.actionBtn {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
column-gap: layout.$spacing-03;
|
|
23
|
-
min-width: 200px;
|
|
24
|
-
}
|
|
25
|
-
.comboBox input[type='text'] {
|
|
26
|
-
background-color: colors.$white;
|
|
27
|
-
cursor: default;
|
|
28
|
-
}
|
|
29
|
-
.searchInput input[type='text'] {
|
|
30
|
-
background-color: colors.$white;
|
|
31
|
-
cursor: default;
|
|
32
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Calendar, Location, UserFollow } from '@carbon/react/icons';
|
|
4
|
-
import { useSession, formatDate } from '@openmrs/esm-framework';
|
|
5
|
-
import styles from './morgue-header.scss';
|
|
6
|
-
import MorgueIllustration from './morgue-illustration.component';
|
|
7
|
-
import { InlineLoading } from '@carbon/react';
|
|
8
|
-
|
|
9
|
-
interface MorgueHeaderProps {
|
|
10
|
-
title: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const MorgueHeader: React.FC<MorgueHeaderProps> = ({ title }) => {
|
|
14
|
-
const { t } = useTranslation();
|
|
15
|
-
const session = useSession();
|
|
16
|
-
const location = session?.sessionLocation?.display;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div className={styles.header}>
|
|
20
|
-
<div className={styles['left-justified-items']}>
|
|
21
|
-
<MorgueIllustration />
|
|
22
|
-
<div className={styles['page-labels']}>
|
|
23
|
-
<p className={styles['page-name']}>{title}</p>
|
|
24
|
-
<p>{t('mortuaryManagement', 'Mortuary management')}</p>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div className={styles['right-justified-items']}>
|
|
28
|
-
<div className={styles['date-and-location']}>
|
|
29
|
-
<Location size={16} />
|
|
30
|
-
<span className={styles.value}>{location}</span>
|
|
31
|
-
<span className={styles.middot}>·</span>
|
|
32
|
-
<Calendar size={16} />
|
|
33
|
-
<span className={styles.value}>{formatDate(new Date(), { mode: 'standard' })}</span>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
@use '@carbon/layout';
|
|
2
|
-
@use '@carbon/type';
|
|
3
|
-
@use '@carbon/colors';
|
|
4
|
-
.header {
|
|
5
|
-
@include type.type-style('body-compact-02');
|
|
6
|
-
height: layout.$spacing-12;
|
|
7
|
-
border-left: 0;
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin-bottom: layout.$spacing-07;
|
|
12
|
-
margin-right: 0;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
padding: 0 layout.$spacing-05;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.left-justified-items {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: row;
|
|
20
|
-
align-items: center;
|
|
21
|
-
margin-left: layout.$spacing-04;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.page-name {
|
|
25
|
-
@include type.type-style('heading-04');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.page-labels {
|
|
29
|
-
p:first-of-type {
|
|
30
|
-
margin-bottom: layout.$spacing-02;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
svg.iconOverrides {
|
|
35
|
-
width: 72 !important;
|
|
36
|
-
height: 72 !important;
|
|
37
|
-
fill: var(--brand-03);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.svgContainer svg {
|
|
41
|
-
width: layout.$spacing-11;
|
|
42
|
-
height: layout.$spacing-11;
|
|
43
|
-
fill: var(--brand-03);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.left-justified-items {
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: row;
|
|
49
|
-
align-items: center;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
align-items: center;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.right-justified-items {
|
|
55
|
-
@include type.type-style('body-compact-02');
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
justify-content: space-between;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.page-name {
|
|
62
|
-
@include type.type-style('heading-04');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.page-labels {
|
|
66
|
-
margin: layout.$spacing-05;
|
|
67
|
-
|
|
68
|
-
p:first-of-type {
|
|
69
|
-
margin-bottom: layout.$spacing-02;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.date-and-location {
|
|
74
|
-
display: flex;
|
|
75
|
-
justify-content: flex-end;
|
|
76
|
-
align-items: center;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.userContainer {
|
|
80
|
-
display: flex;
|
|
81
|
-
justify-content: flex-end;
|
|
82
|
-
gap: layout.$spacing-05;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.value {
|
|
86
|
-
margin-left: layout.$spacing-02;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.middot {
|
|
90
|
-
margin: 0 layout.$spacing-03;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.view {
|
|
94
|
-
@include type.type-style('label-01');
|
|
95
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styles from './morgue-header.scss';
|
|
3
|
-
import { HospitalBed } from '@carbon/react/icons';
|
|
4
|
-
|
|
5
|
-
const MorgueIllustration: React.FC = () => {
|
|
6
|
-
return (
|
|
7
|
-
<div className={styles.svgContainer}>
|
|
8
|
-
<HospitalBed className={styles.iconOverrides} />
|
|
9
|
-
</div>
|
|
10
|
-
);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default MorgueIllustration;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
2
|
-
import { PaginatedResponse } from '../types';
|
|
3
|
-
export async function fetchDeceasedPatient(query: string, abortController: AbortController) {
|
|
4
|
-
const customRepresentation =
|
|
5
|
-
'custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name)),person:(uuid,display,gender,birthdate,dead,age,deathDate,causeOfDeath:(uuid,display),preferredAddress:(uuid,stateProvince,countyDistrict,address4)))';
|
|
6
|
-
const url = `${restBaseUrl}/morgue/patient?v=${customRepresentation}&dead=true&name=${query}`;
|
|
7
|
-
|
|
8
|
-
const resp = await openmrsFetch<{ results: Array<PaginatedResponse> }>(url, {
|
|
9
|
-
signal: abortController.signal,
|
|
10
|
-
});
|
|
11
|
-
return resp?.data?.results;
|
|
12
|
-
}
|