@kenyaemr/esm-ward-app 7.0.3-pre.89 → 8.0.0
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 +24 -16
- package/dist/130.js +1 -1
- package/dist/130.js.map +1 -1
- package/dist/169.js +1 -0
- package/dist/169.js.map +1 -0
- package/dist/269.js +1 -0
- package/dist/269.js.map +1 -0
- package/dist/346.js +1 -0
- package/dist/346.js.map +1 -0
- package/dist/348.js +1 -0
- package/dist/348.js.map +1 -0
- package/dist/466.js +1 -0
- package/dist/466.js.map +1 -0
- package/dist/501.js +1 -0
- package/dist/501.js.map +1 -0
- package/dist/574.js +1 -1
- package/dist/577.js +1 -0
- package/dist/577.js.map +1 -0
- package/dist/659.js +1 -0
- package/dist/659.js.map +1 -0
- package/dist/749.js +1 -0
- package/dist/749.js.map +1 -0
- package/dist/76.js +1 -0
- package/dist/76.js.map +1 -0
- package/dist/767.js +1 -0
- package/dist/767.js.map +1 -0
- package/dist/793.js +2 -0
- package/dist/793.js.map +1 -0
- package/dist/803.js +1 -0
- package/dist/803.js.map +1 -0
- package/dist/940.js +1 -0
- package/dist/940.js.map +1 -0
- package/dist/960.js +1 -0
- package/dist/960.js.map +1 -0
- package/dist/kenyaemr-esm-ward-app.js +1 -1
- package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +330 -42
- package/dist/kenyaemr-esm-ward-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 +3 -4
- package/src/action-menu-buttons/transfer-workspace-siderail.component.tsx +27 -0
- package/src/beds/empty-bed.component.tsx +1 -1
- package/src/beds/empty-bed.scss +6 -6
- package/src/beds/occupied-bed.component.tsx +5 -5
- package/src/beds/occupied-bed.scss +2 -3
- package/src/beds/occupied-bed.test.tsx +37 -21
- package/src/beds/unassigned-patient.component.tsx +20 -0
- package/src/beds/unassigned-patient.scss +6 -0
- package/src/config-schema-admission-request-note.ts +9 -0
- package/src/config-schema-extension-colored-obs-tags.ts +91 -0
- package/src/config-schema.ts +165 -231
- package/src/createDashboardLink.component.tsx +42 -0
- package/src/hooks/useAdmissionLocation.ts +12 -7
- package/src/hooks/useCurrentWardCardConfig.ts +32 -0
- package/src/hooks/useEmrConfiguration.ts +112 -0
- package/src/hooks/useInpatientAdmission.ts +28 -0
- package/src/hooks/useInpatientRequest.ts +39 -9
- package/src/hooks/useLocation.test.ts +38 -0
- package/src/hooks/useLocation.ts +9 -0
- package/src/hooks/useLocations.ts +54 -0
- package/src/hooks/useMostRecentObs.ts +27 -0
- package/src/hooks/useRestPatient.ts +18 -0
- package/src/hooks/useWardLocation.test.ts +108 -0
- package/src/hooks/useWardLocation.ts +26 -0
- package/src/index.ts +71 -4
- package/src/location-selector/location-selector.component.tsx +118 -0
- package/src/location-selector/location-selector.scss +48 -0
- package/src/root.component.tsx +2 -1
- package/src/routes.json +79 -12
- package/src/types/index.ts +87 -46
- package/src/ward-patient-card/card-rows/admission-request-note.extension.tsx +27 -0
- package/src/ward-patient-card/card-rows/colored-obs-tags-card-row.extension.tsx +13 -0
- package/src/ward-patient-card/row-elements/ward-patient-age.tsx +7 -13
- package/src/ward-patient-card/row-elements/ward-patient-bed-number.tsx +2 -2
- package/src/ward-patient-card/row-elements/ward-patient-coded-obs-tags.tsx +51 -50
- package/src/ward-patient-card/row-elements/ward-patient-gender.component.tsx +27 -0
- package/src/ward-patient-card/row-elements/ward-patient-header-address.tsx +16 -15
- package/src/ward-patient-card/row-elements/ward-patient-identifier.tsx +53 -0
- package/src/ward-patient-card/row-elements/ward-patient-name.tsx +7 -7
- package/src/ward-patient-card/row-elements/ward-patient-obs.resource.ts +4 -4
- package/src/ward-patient-card/row-elements/ward-patient-obs.tsx +45 -44
- package/src/ward-patient-card/row-elements/ward-patient-time-on-ward.tsx +22 -0
- package/src/ward-patient-card/row-elements/ward-patient-time-since-admission.tsx +22 -0
- package/src/ward-patient-card/ward-patient-card-element.component.tsx +65 -0
- package/src/ward-patient-card/ward-patient-card.component.tsx +64 -0
- package/src/ward-patient-card/ward-patient-card.scss +61 -12
- package/src/ward-patient-workspace/ward-patient-action-button.extension.tsx +18 -0
- package/src/ward-patient-workspace/ward-patient.style.scss +11 -0
- package/src/ward-patient-workspace/ward-patient.workspace.tsx +51 -0
- package/src/ward-view/ward-bed.component.tsx +0 -1
- package/src/ward-view/ward-view.component.tsx +114 -76
- package/src/ward-view/ward-view.resource.ts +2 -2
- package/src/ward-view/ward-view.scss +4 -4
- package/src/ward-view/ward-view.test.tsx +76 -49
- package/src/ward-view-header/admission-requests-bar.component.tsx +29 -28
- package/src/ward-view-header/admission-requests-bar.test.tsx +11 -15
- package/src/ward-view-header/admission-requests.scss +20 -25
- package/src/ward-view-header/ward-view-header.component.tsx +7 -7
- package/src/ward-view-header/ward-view-header.scss +2 -2
- package/src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx +29 -0
- package/src/ward-workspace/admission-request-card/admission-request-card-header.component.tsx +51 -0
- package/src/ward-workspace/admission-request-card/admission-request-card.component.tsx +16 -0
- package/src/ward-workspace/admission-request-card/admission-request-card.scss +49 -0
- package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.scss +12 -0
- package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.test.tsx +48 -0
- package/src/ward-workspace/admission-request-workspace/admission-requests.workspace.tsx +61 -0
- package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.scss +35 -0
- package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +341 -0
- package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +267 -0
- package/src/ward-workspace/admit-patient-form-workspace/types.ts +7 -0
- package/src/ward-workspace/patient-banner/patient-banner.component.tsx +29 -0
- package/src/ward-workspace/patient-banner/style.scss +23 -0
- package/src/ward-workspace/patient-transfer-bed-swap/patient-bed-swap-form.component.tsx +210 -0
- package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-request-form.component.tsx +238 -0
- package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-swap.scss +73 -0
- package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-swap.workspace.tsx +44 -0
- package/src/ward-workspace/ward-patient-notes/form/notes-form.component.tsx +180 -0
- package/src/ward-workspace/ward-patient-notes/form/notes-form.scss +30 -0
- package/src/ward-workspace/ward-patient-notes/form/notes-form.test.tsx +116 -0
- package/src/ward-workspace/ward-patient-notes/history/note.component.tsx +53 -0
- package/src/ward-workspace/ward-patient-notes/history/notes-container.component.tsx +55 -0
- package/src/ward-workspace/ward-patient-notes/history/notes-container.test.tsx +84 -0
- package/src/ward-workspace/ward-patient-notes/history/styles.scss +61 -0
- package/src/ward-workspace/ward-patient-notes/notes-action-button.extension.tsx +18 -0
- package/src/ward-workspace/ward-patient-notes/notes.resource.ts +71 -0
- package/src/ward-workspace/ward-patient-notes/notes.workspace.tsx +25 -0
- package/src/ward-workspace/ward-patient-notes/types.ts +44 -0
- package/src/ward.resource.ts +25 -0
- package/translations/en.json +63 -2
- package/dist/443.js +0 -1
- package/dist/443.js.map +0 -1
- package/dist/589.js +0 -1
- package/dist/589.js.map +0 -1
- package/dist/695.js +0 -2
- package/dist/695.js.map +0 -1
- package/src/hooks/useAdmittedPatients.ts +0 -13
- package/src/ward-patient-card/row-elements/row-elements.scss +0 -16
- package/src/ward-patient-card/ward-patient-card-row.resources.tsx +0 -92
- package/src/ward-patient-card/ward-patient-card.tsx +0 -20
- package/src/ward-workspace/admission-request-card.component.tsx +0 -23
- package/src/ward-workspace/admission-request-card.scss +0 -34
- package/src/ward-workspace/admission-request-workspace.test.tsx +0 -38
- package/src/ward-workspace/admission-requests-workspace.component.tsx +0 -21
- package/src/ward-workspace/admission-requests-workspace.scss +0 -13
- /package/dist/{695.js.LICENSE.txt → 793.js.LICENSE.txt} +0 -0
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0","emrapi":"^2.0.0 || 2.0.0-SNAPSHOT"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"workspaces":[{"name":"admission-requests-
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0","emrapi":"^2.0.0 || 2.0.0-SNAPSHOT"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"wardPatientNotesActionButtonExtension","name":"ward-inpatient-notes-form-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"name":"transfer-swap-patient-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientTransferAndSwapWorkspaceSiderailIcon"},{"component":"admissionRequestNoteRowExtension","name":"admission-request-note-card-row","slot":"ward-patient-card-slot"}],"workspaces":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","title":"admissionRequests","type":"admission-requests"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","type":"ward-patient-notes","title":"inpatientNotesWorkspaceTitle","sidebarFamily":"ward-patient","hasOwnSidebar":true},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","title":"admissionRequests","type":"admission-requests"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","type":"ward","title":"Ward Patient","width":"extra-wide","hasOwnSidebar":true,"sidebarFamily":"ward-patient"},{"name":"patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","title":"transfers","type":"transfer-swap-bed-form","hasOwnSidebar":true,"sidebarFamily":"ward-patient"}],"version":"8.0.0"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenyaemr/esm-ward-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Ward and bed management module for O3",
|
|
5
5
|
"browser": "dist/kenyaemr-esm-ward-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
|
|
19
19
|
"coverage": "yarn test --coverage",
|
|
20
20
|
"typescript": "tsc",
|
|
21
|
-
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.resource.ts' --config ../../tools/i18next-parser.config.js"
|
|
21
|
+
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.resource.ts' 'src/index.ts' 'src/**/**.workspace.tsx' --config ../../tools/i18next-parser.config.js"
|
|
22
22
|
},
|
|
23
23
|
"browserslist": [
|
|
24
24
|
"extends browserslist-config-openmrs"
|
|
@@ -49,6 +49,5 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"webpack": "^5.74.0"
|
|
52
|
-
}
|
|
53
|
-
"stableVersion": "7.0.2"
|
|
52
|
+
}
|
|
54
53
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActionMenuButton,
|
|
3
|
+
getGlobalStore,
|
|
4
|
+
launchWorkspace,
|
|
5
|
+
MovementIcon,
|
|
6
|
+
type DefaultWorkspaceProps,
|
|
7
|
+
} from '@openmrs/esm-framework';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { useTranslation } from 'react-i18next';
|
|
10
|
+
|
|
11
|
+
interface PatientTransferAndSwapSiderailIconProps extends DefaultWorkspaceProps {}
|
|
12
|
+
|
|
13
|
+
export default function PatientTransferAndSwapSiderailIcon(additionalProps: PatientTransferAndSwapSiderailIconProps) {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const handler = () => {
|
|
16
|
+
launchWorkspace('patient-transfer-swap-workspace');
|
|
17
|
+
};
|
|
18
|
+
return (
|
|
19
|
+
<ActionMenuButton
|
|
20
|
+
getIcon={(props) => <MovementIcon {...props} />}
|
|
21
|
+
label={t('transfers', 'Transfers')}
|
|
22
|
+
iconDescription={t('transfers', 'Transfers')}
|
|
23
|
+
handler={handler}
|
|
24
|
+
type="transfer-swap-bed-form"
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -10,7 +10,7 @@ interface EmptyBedProps {
|
|
|
10
10
|
|
|
11
11
|
const EmptyBed: React.FC<EmptyBedProps> = ({ bed }) => {
|
|
12
12
|
const { t } = useTranslation();
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
return (
|
|
15
15
|
<div className={styles.container}>
|
|
16
16
|
<span className={`${wardPatientCardStyles.wardPatientBedNumber} ${wardPatientCardStyles.empty}`}>
|
package/src/beds/empty-bed.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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
|
display: flex;
|
|
7
|
-
gap:
|
|
7
|
+
gap: layout.$spacing-04;
|
|
8
8
|
justify-content: center;
|
|
9
9
|
align-items: center;
|
|
10
10
|
border: 1px dashed $ui-04;
|
|
11
|
-
padding:
|
|
11
|
+
padding: layout.$spacing-03 layout.$spacing-04;
|
|
12
12
|
height: fit-content;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.skeletonText {
|
|
27
|
-
width:
|
|
27
|
+
width: 6.25rem;
|
|
28
28
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Tag } from '@carbon/react';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import
|
|
3
|
+
import { Tag } from '@carbon/react';
|
|
5
4
|
import { type WardBedProps } from '../ward-view/ward-bed.component';
|
|
5
|
+
import WardPatientCard from '../ward-patient-card/ward-patient-card.component';
|
|
6
6
|
import styles from './occupied-bed.scss';
|
|
7
7
|
|
|
8
8
|
const OccupiedBed: React.FC<WardBedProps> = ({ wardPatients, bed }) => {
|
|
9
9
|
return (
|
|
10
10
|
<div className={styles.occupiedBed}>
|
|
11
|
-
{wardPatients.map((
|
|
11
|
+
{wardPatients.map((wardPatient, index: number) => {
|
|
12
12
|
const last = index === wardPatients.length - 1;
|
|
13
13
|
return (
|
|
14
|
-
<div key={'occupied-bed-pt-' + patient.uuid}>
|
|
15
|
-
<WardPatientCard
|
|
14
|
+
<div key={'occupied-bed-pt-' + wardPatient.patient.uuid}>
|
|
15
|
+
<WardPatientCard {...wardPatient} bed={bed} />
|
|
16
16
|
{!last && <BedShareDivider />}
|
|
17
17
|
</div>
|
|
18
18
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/styles/scss/type';
|
|
1
|
+
@use '@carbon/layout';
|
|
3
2
|
@use '@openmrs/esm-styleguide/src/vars';
|
|
4
3
|
|
|
5
4
|
.occupiedBed {
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
.bedDivider {
|
|
12
11
|
background-color: vars.$ui-02;
|
|
13
12
|
color: vars.$text-02;
|
|
14
|
-
padding:
|
|
13
|
+
padding: layout.$spacing-01;
|
|
15
14
|
display: flex;
|
|
16
15
|
align-items: center;
|
|
17
16
|
justify-content: space-between;
|
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import OccupiedBed from './occupied-bed.component';
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { bedLayoutToBed, filterBeds } from '../ward-view/ward-view.resource';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
6
3
|
import { getDefaultsFromConfigSchema, useConfig } from '@openmrs/esm-framework';
|
|
7
|
-
import { configSchema,
|
|
8
|
-
import {
|
|
4
|
+
import { configSchema, type WardConfigObject } from '../config-schema';
|
|
5
|
+
import {
|
|
6
|
+
mockAdmissionLocation,
|
|
7
|
+
mockLocationInpatientWard,
|
|
8
|
+
mockPatientAlice,
|
|
9
|
+
mockPatientBrian,
|
|
10
|
+
} from '../../../../__mocks__';
|
|
11
|
+
import { bedLayoutToBed, filterBeds } from '../ward-view/ward-view.resource';
|
|
12
|
+
import useWardLocation from '../hooks/useWardLocation';
|
|
13
|
+
import OccupiedBed from './occupied-bed.component';
|
|
9
14
|
|
|
10
|
-
const defaultConfig = getDefaultsFromConfigSchema(configSchema);
|
|
15
|
+
const defaultConfig: WardConfigObject = getDefaultsFromConfigSchema(configSchema);
|
|
11
16
|
|
|
12
17
|
jest.mocked(useConfig).mockReturnValue(defaultConfig);
|
|
13
18
|
|
|
14
19
|
const mockBedLayouts = filterBeds(mockAdmissionLocation);
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
jest.mock('../hooks/useWardLocation', () => jest.fn());
|
|
22
|
+
|
|
23
|
+
const mockedUseWardLocation = useWardLocation as jest.Mock;
|
|
24
|
+
mockedUseWardLocation.mockReturnValue({
|
|
25
|
+
location: mockLocationInpatientWard,
|
|
26
|
+
isLoadingLocation: false,
|
|
27
|
+
errorFetchingLocation: null,
|
|
28
|
+
invalidLocation: false,
|
|
21
29
|
});
|
|
30
|
+
|
|
31
|
+
const mockBedToUse = mockBedLayouts[0];
|
|
22
32
|
const mockBed = bedLayoutToBed(mockBedToUse);
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
const mockWardPatientProps = {
|
|
35
|
+
admitted: true,
|
|
36
|
+
visit: null,
|
|
37
|
+
encounterAssigningToCurrentInpatientLocation: null,
|
|
38
|
+
firstAdmissionOrTransferEncounter: null,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
describe('Occupied bed', () => {
|
|
25
42
|
it('renders a single bed with patient details', () => {
|
|
26
|
-
|
|
27
|
-
render(<OccupiedBed wardPatients={[{ ...mockAdmittedPatient, admitted: true }]} bed={mockBed} />);
|
|
43
|
+
render(<OccupiedBed wardPatients={[{ ...mockWardPatientProps, patient: mockPatientAlice }]} bed={mockBed} />);
|
|
28
44
|
const patientName = screen.getByText('Alice Johnson');
|
|
29
45
|
expect(patientName).toBeInTheDocument();
|
|
30
|
-
const patientAge = `${
|
|
46
|
+
const patientAge = `${mockPatientAlice.person.age} yrs`;
|
|
31
47
|
expect(screen.getByText(patientAge)).toBeInTheDocument();
|
|
32
|
-
const defaultAddressFields =
|
|
48
|
+
const defaultAddressFields = ['cityVillage', 'country'];
|
|
33
49
|
defaultAddressFields.forEach((addressField) => {
|
|
34
|
-
const addressFieldValue =
|
|
50
|
+
const addressFieldValue = mockPatientAlice.person.preferredAddress[addressField] as string;
|
|
35
51
|
expect(screen.getByText(addressFieldValue)).toBeInTheDocument();
|
|
36
52
|
});
|
|
37
53
|
});
|
|
@@ -39,11 +55,11 @@ describe('Occupied bed: ', () => {
|
|
|
39
55
|
it('renders a divider for shared patients', () => {
|
|
40
56
|
render(
|
|
41
57
|
<OccupiedBed
|
|
58
|
+
bed={mockBed}
|
|
42
59
|
wardPatients={[
|
|
43
|
-
{ ...
|
|
44
|
-
{ ...
|
|
60
|
+
{ ...mockWardPatientProps, patient: mockPatientAlice },
|
|
61
|
+
{ ...mockWardPatientProps, patient: mockPatientBrian },
|
|
45
62
|
]}
|
|
46
|
-
bed={mockBed}
|
|
47
63
|
/>,
|
|
48
64
|
);
|
|
49
65
|
const bedShareText = screen.getByTitle('Bed share');
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import WardPatientCard from '../ward-patient-card/ward-patient-card.component';
|
|
3
|
+
import styles from './unassigned-patient.scss';
|
|
4
|
+
import { type WardPatient } from '../types';
|
|
5
|
+
|
|
6
|
+
export interface UnassignedPatientProps {
|
|
7
|
+
wardPatient: WardPatient;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const UnassignedPatient: React.FC<UnassignedPatientProps> = ({ wardPatient }) => {
|
|
11
|
+
return (
|
|
12
|
+
<div className={styles.unassignedPatient}>
|
|
13
|
+
<div key={'unassigned-bed-pt-' + wardPatient.patient.uuid}>
|
|
14
|
+
<WardPatientCard {...wardPatient} />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default UnassignedPatient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Type } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
3
|
+
export const admissionRequestNoteRowConfigSchema = {
|
|
4
|
+
conceptUuid: {
|
|
5
|
+
_type: Type.UUID,
|
|
6
|
+
_description: 'Required. Identifies the concept for the admission request note.',
|
|
7
|
+
_default: '161011AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Type } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
3
|
+
export const coloredObsTagsCardRowConfigSchema = {
|
|
4
|
+
conceptUuid: {
|
|
5
|
+
_type: Type.UUID,
|
|
6
|
+
_description: 'Required. Identifies the concept to use to identify the desired observations.',
|
|
7
|
+
// Problem list
|
|
8
|
+
_default: '1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
9
|
+
},
|
|
10
|
+
summaryLabel: {
|
|
11
|
+
_type: Type.String,
|
|
12
|
+
_description: `Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag shows the count of the number of answers that are present but not configured to show as their own tags. If not provided, defaults to the name of the concept.`,
|
|
13
|
+
_default: null,
|
|
14
|
+
},
|
|
15
|
+
summaryLabelI18nModule: {
|
|
16
|
+
_type: Type.String,
|
|
17
|
+
_description: 'Optional. The custom module to use for translation of the summary label',
|
|
18
|
+
_default: null,
|
|
19
|
+
},
|
|
20
|
+
summaryLabelColor: {
|
|
21
|
+
_type: Type.String,
|
|
22
|
+
_description:
|
|
23
|
+
'The color of the summary tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors',
|
|
24
|
+
_default: null,
|
|
25
|
+
},
|
|
26
|
+
tags: {
|
|
27
|
+
_type: Type.Array,
|
|
28
|
+
_description: `An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets will be displayed as their own tags with the specified color. Any observation with coded values not belonging to any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times, the first matching applied-to rule takes precedence.`,
|
|
29
|
+
_default: [],
|
|
30
|
+
_elements: {
|
|
31
|
+
color: {
|
|
32
|
+
_type: Type.String,
|
|
33
|
+
_description:
|
|
34
|
+
'Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors.',
|
|
35
|
+
},
|
|
36
|
+
appliedToConceptSets: {
|
|
37
|
+
_type: Type.Array,
|
|
38
|
+
_description: `The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets will be displayed as their own tag with the specified color. If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.`,
|
|
39
|
+
_elements: {
|
|
40
|
+
_type: Type.UUID,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export interface ColoredObsTagsCardRowConfigObject {
|
|
48
|
+
/**
|
|
49
|
+
* Required. Identifies the concept to use to identify the desired observations.
|
|
50
|
+
*/
|
|
51
|
+
conceptUuid: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Optional. The custom label or i18n key to the translated label to display for the summary tag. The summary tag
|
|
55
|
+
* shows the count of the number of answers that are present but not configured to show as their own tags. If not
|
|
56
|
+
* provided, defaults to the name of the concept.
|
|
57
|
+
*/
|
|
58
|
+
summaryLabel?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Optional. The custom module to use for translation of the summary label
|
|
61
|
+
*/
|
|
62
|
+
summaryLabelI18nModule?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The color of the summary tag.
|
|
66
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors
|
|
67
|
+
*/
|
|
68
|
+
summaryLabelColor?: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* An array specifying concept sets and color. Observations with coded values that are members of the specified concept sets
|
|
72
|
+
* will be displayed as their own tags with the specified color. Any observation with coded values not belonging to
|
|
73
|
+
* any concept sets specified will be summarized as a count in the summary tag. If a concept set is listed multiple times,
|
|
74
|
+
* the first matching applied-to rule takes precedence.
|
|
75
|
+
*/
|
|
76
|
+
tags: Array<TagConfigObject>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface TagConfigObject {
|
|
80
|
+
/**
|
|
81
|
+
* Color of the tag. See https://react.carbondesignsystem.com/?path=/docs/components-tag--overview for a list of supported colors.
|
|
82
|
+
*/
|
|
83
|
+
color: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The concept sets which the color applies to. Observations with coded values that are members of the specified concept sets
|
|
87
|
+
* will be displayed as their own tag with the specified color.
|
|
88
|
+
* If an observation's coded value belongs to multiple concept sets, the first matching applied-to rule takes precedence.
|
|
89
|
+
*/
|
|
90
|
+
appliedToConceptSets: Array<string>;
|
|
91
|
+
}
|