@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.
Files changed (146) hide show
  1. package/.turbo/turbo-build.log +24 -16
  2. package/dist/130.js +1 -1
  3. package/dist/130.js.map +1 -1
  4. package/dist/169.js +1 -0
  5. package/dist/169.js.map +1 -0
  6. package/dist/269.js +1 -0
  7. package/dist/269.js.map +1 -0
  8. package/dist/346.js +1 -0
  9. package/dist/346.js.map +1 -0
  10. package/dist/348.js +1 -0
  11. package/dist/348.js.map +1 -0
  12. package/dist/466.js +1 -0
  13. package/dist/466.js.map +1 -0
  14. package/dist/501.js +1 -0
  15. package/dist/501.js.map +1 -0
  16. package/dist/574.js +1 -1
  17. package/dist/577.js +1 -0
  18. package/dist/577.js.map +1 -0
  19. package/dist/659.js +1 -0
  20. package/dist/659.js.map +1 -0
  21. package/dist/749.js +1 -0
  22. package/dist/749.js.map +1 -0
  23. package/dist/76.js +1 -0
  24. package/dist/76.js.map +1 -0
  25. package/dist/767.js +1 -0
  26. package/dist/767.js.map +1 -0
  27. package/dist/793.js +2 -0
  28. package/dist/793.js.map +1 -0
  29. package/dist/803.js +1 -0
  30. package/dist/803.js.map +1 -0
  31. package/dist/940.js +1 -0
  32. package/dist/940.js.map +1 -0
  33. package/dist/960.js +1 -0
  34. package/dist/960.js.map +1 -0
  35. package/dist/kenyaemr-esm-ward-app.js +1 -1
  36. package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +330 -42
  37. package/dist/kenyaemr-esm-ward-app.js.map +1 -1
  38. package/dist/main.js +1 -1
  39. package/dist/main.js.map +1 -1
  40. package/dist/routes.json +1 -1
  41. package/package.json +3 -4
  42. package/src/action-menu-buttons/transfer-workspace-siderail.component.tsx +27 -0
  43. package/src/beds/empty-bed.component.tsx +1 -1
  44. package/src/beds/empty-bed.scss +6 -6
  45. package/src/beds/occupied-bed.component.tsx +5 -5
  46. package/src/beds/occupied-bed.scss +2 -3
  47. package/src/beds/occupied-bed.test.tsx +37 -21
  48. package/src/beds/unassigned-patient.component.tsx +20 -0
  49. package/src/beds/unassigned-patient.scss +6 -0
  50. package/src/config-schema-admission-request-note.ts +9 -0
  51. package/src/config-schema-extension-colored-obs-tags.ts +91 -0
  52. package/src/config-schema.ts +165 -231
  53. package/src/createDashboardLink.component.tsx +42 -0
  54. package/src/hooks/useAdmissionLocation.ts +12 -7
  55. package/src/hooks/useCurrentWardCardConfig.ts +32 -0
  56. package/src/hooks/useEmrConfiguration.ts +112 -0
  57. package/src/hooks/useInpatientAdmission.ts +28 -0
  58. package/src/hooks/useInpatientRequest.ts +39 -9
  59. package/src/hooks/useLocation.test.ts +38 -0
  60. package/src/hooks/useLocation.ts +9 -0
  61. package/src/hooks/useLocations.ts +54 -0
  62. package/src/hooks/useMostRecentObs.ts +27 -0
  63. package/src/hooks/useRestPatient.ts +18 -0
  64. package/src/hooks/useWardLocation.test.ts +108 -0
  65. package/src/hooks/useWardLocation.ts +26 -0
  66. package/src/index.ts +71 -4
  67. package/src/location-selector/location-selector.component.tsx +118 -0
  68. package/src/location-selector/location-selector.scss +48 -0
  69. package/src/root.component.tsx +2 -1
  70. package/src/routes.json +79 -12
  71. package/src/types/index.ts +87 -46
  72. package/src/ward-patient-card/card-rows/admission-request-note.extension.tsx +27 -0
  73. package/src/ward-patient-card/card-rows/colored-obs-tags-card-row.extension.tsx +13 -0
  74. package/src/ward-patient-card/row-elements/ward-patient-age.tsx +7 -13
  75. package/src/ward-patient-card/row-elements/ward-patient-bed-number.tsx +2 -2
  76. package/src/ward-patient-card/row-elements/ward-patient-coded-obs-tags.tsx +51 -50
  77. package/src/ward-patient-card/row-elements/ward-patient-gender.component.tsx +27 -0
  78. package/src/ward-patient-card/row-elements/ward-patient-header-address.tsx +16 -15
  79. package/src/ward-patient-card/row-elements/ward-patient-identifier.tsx +53 -0
  80. package/src/ward-patient-card/row-elements/ward-patient-name.tsx +7 -7
  81. package/src/ward-patient-card/row-elements/ward-patient-obs.resource.ts +4 -4
  82. package/src/ward-patient-card/row-elements/ward-patient-obs.tsx +45 -44
  83. package/src/ward-patient-card/row-elements/ward-patient-time-on-ward.tsx +22 -0
  84. package/src/ward-patient-card/row-elements/ward-patient-time-since-admission.tsx +22 -0
  85. package/src/ward-patient-card/ward-patient-card-element.component.tsx +65 -0
  86. package/src/ward-patient-card/ward-patient-card.component.tsx +64 -0
  87. package/src/ward-patient-card/ward-patient-card.scss +61 -12
  88. package/src/ward-patient-workspace/ward-patient-action-button.extension.tsx +18 -0
  89. package/src/ward-patient-workspace/ward-patient.style.scss +11 -0
  90. package/src/ward-patient-workspace/ward-patient.workspace.tsx +51 -0
  91. package/src/ward-view/ward-bed.component.tsx +0 -1
  92. package/src/ward-view/ward-view.component.tsx +114 -76
  93. package/src/ward-view/ward-view.resource.ts +2 -2
  94. package/src/ward-view/ward-view.scss +4 -4
  95. package/src/ward-view/ward-view.test.tsx +76 -49
  96. package/src/ward-view-header/admission-requests-bar.component.tsx +29 -28
  97. package/src/ward-view-header/admission-requests-bar.test.tsx +11 -15
  98. package/src/ward-view-header/admission-requests.scss +20 -25
  99. package/src/ward-view-header/ward-view-header.component.tsx +7 -7
  100. package/src/ward-view-header/ward-view-header.scss +2 -2
  101. package/src/ward-workspace/admission-request-card/admission-request-card-actions.component.tsx +29 -0
  102. package/src/ward-workspace/admission-request-card/admission-request-card-header.component.tsx +51 -0
  103. package/src/ward-workspace/admission-request-card/admission-request-card.component.tsx +16 -0
  104. package/src/ward-workspace/admission-request-card/admission-request-card.scss +49 -0
  105. package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.scss +12 -0
  106. package/src/ward-workspace/admission-request-workspace/admission-requests-workspace.test.tsx +48 -0
  107. package/src/ward-workspace/admission-request-workspace/admission-requests.workspace.tsx +61 -0
  108. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.scss +35 -0
  109. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.test.tsx +341 -0
  110. package/src/ward-workspace/admit-patient-form-workspace/admit-patient-form.workspace.tsx +267 -0
  111. package/src/ward-workspace/admit-patient-form-workspace/types.ts +7 -0
  112. package/src/ward-workspace/patient-banner/patient-banner.component.tsx +29 -0
  113. package/src/ward-workspace/patient-banner/style.scss +23 -0
  114. package/src/ward-workspace/patient-transfer-bed-swap/patient-bed-swap-form.component.tsx +210 -0
  115. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-request-form.component.tsx +238 -0
  116. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-swap.scss +73 -0
  117. package/src/ward-workspace/patient-transfer-bed-swap/patient-transfer-swap.workspace.tsx +44 -0
  118. package/src/ward-workspace/ward-patient-notes/form/notes-form.component.tsx +180 -0
  119. package/src/ward-workspace/ward-patient-notes/form/notes-form.scss +30 -0
  120. package/src/ward-workspace/ward-patient-notes/form/notes-form.test.tsx +116 -0
  121. package/src/ward-workspace/ward-patient-notes/history/note.component.tsx +53 -0
  122. package/src/ward-workspace/ward-patient-notes/history/notes-container.component.tsx +55 -0
  123. package/src/ward-workspace/ward-patient-notes/history/notes-container.test.tsx +84 -0
  124. package/src/ward-workspace/ward-patient-notes/history/styles.scss +61 -0
  125. package/src/ward-workspace/ward-patient-notes/notes-action-button.extension.tsx +18 -0
  126. package/src/ward-workspace/ward-patient-notes/notes.resource.ts +71 -0
  127. package/src/ward-workspace/ward-patient-notes/notes.workspace.tsx +25 -0
  128. package/src/ward-workspace/ward-patient-notes/types.ts +44 -0
  129. package/src/ward.resource.ts +25 -0
  130. package/translations/en.json +63 -2
  131. package/dist/443.js +0 -1
  132. package/dist/443.js.map +0 -1
  133. package/dist/589.js +0 -1
  134. package/dist/589.js.map +0 -1
  135. package/dist/695.js +0 -2
  136. package/dist/695.js.map +0 -1
  137. package/src/hooks/useAdmittedPatients.ts +0 -13
  138. package/src/ward-patient-card/row-elements/row-elements.scss +0 -16
  139. package/src/ward-patient-card/ward-patient-card-row.resources.tsx +0 -92
  140. package/src/ward-patient-card/ward-patient-card.tsx +0 -20
  141. package/src/ward-workspace/admission-request-card.component.tsx +0 -23
  142. package/src/ward-workspace/admission-request-card.scss +0 -34
  143. package/src/ward-workspace/admission-request-workspace.test.tsx +0 -38
  144. package/src/ward-workspace/admission-requests-workspace.component.tsx +0 -21
  145. package/src/ward-workspace/admission-requests-workspace.scss +0 -13
  146. /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-cards","component":"admissionRequestWorkspace","title":"admissionRequests","type":"admission-requests"}],"pages":[{"component":"root","route":"ward"}],"version":"7.0.3-pre.89"}
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": "7.0.3-pre.89",
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}`}>
@@ -1,14 +1,14 @@
1
- @use '@carbon/styles/scss/spacing';
2
- @use '@carbon/styles/scss/type';
3
- @import '~@openmrs/esm-styleguide/src/vars';
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: spacing.$spacing-04;
7
+ gap: layout.$spacing-04;
8
8
  justify-content: center;
9
9
  align-items: center;
10
10
  border: 1px dashed $ui-04;
11
- padding: spacing.$spacing-03 spacing.$spacing-04;
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: 100px;
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 WardPatientCard from '../ward-patient-card/ward-patient-card';
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(({ patient, visit }, index: number) => {
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 patient={patient} visit={visit} bed={bed} />
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/styles/scss/spacing';
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: spacing.$spacing-01;
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 { mockAdmissionLocation } from '../../../../__mocks__/wards.mock';
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, defaultPatientCardElementConfig } from '../config-schema';
8
- import { mockAdmittedPatient } from '../../../../__mocks__/ward-patient';
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
- const mockBedToUse = mockBedLayouts[0];
17
- jest.replaceProperty(mockBedToUse.patients[0].person, 'preferredName', {
18
- uuid: '',
19
- givenName: 'Alice',
20
- familyName: 'Johnson',
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
- describe('Occupied bed: ', () => {
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
- const mockPatient = mockAdmittedPatient.patient;
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 = `${mockPatient.person.age} yrs`;
46
+ const patientAge = `${mockPatientAlice.person.age} yrs`;
31
47
  expect(screen.getByText(patientAge)).toBeInTheDocument();
32
- const defaultAddressFields = defaultPatientCardElementConfig.address.addressFields;
48
+ const defaultAddressFields = ['cityVillage', 'country'];
33
49
  defaultAddressFields.forEach((addressField) => {
34
- const addressFieldValue = mockPatient.person.preferredAddress[addressField] as string;
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
- { ...mockAdmittedPatient, admitted: true },
44
- { ...mockAdmittedPatient, admitted: true },
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,6 @@
1
+ @use '@openmrs/esm-styleguide/src/vars';
2
+
3
+ .unassignedPatient {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
@@ -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
+ }