@kenyaemr/esm-service-queues-app 7.0.2-pre.65
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 +40 -0
- package/README.md +20 -0
- package/dist/130.js +2 -0
- package/dist/130.js.LICENSE.txt +3 -0
- package/dist/130.js.map +1 -0
- package/dist/152.js +1 -0
- package/dist/152.js.map +1 -0
- package/dist/169.js +1 -0
- package/dist/169.js.map +1 -0
- package/dist/185.js +1 -0
- package/dist/185.js.map +1 -0
- package/dist/233.js +1 -0
- package/dist/233.js.map +1 -0
- package/dist/237.js +1 -0
- package/dist/237.js.map +1 -0
- package/dist/255.js +2 -0
- package/dist/255.js.LICENSE.txt +9 -0
- package/dist/255.js.map +1 -0
- package/dist/271.js +1 -0
- package/dist/276.js +1 -0
- package/dist/276.js.map +1 -0
- package/dist/303.js +1 -0
- package/dist/303.js.map +1 -0
- package/dist/319.js +1 -0
- package/dist/401.js +1 -0
- package/dist/401.js.map +1 -0
- package/dist/430.js +2 -0
- package/dist/430.js.LICENSE.txt +50 -0
- package/dist/430.js.map +1 -0
- package/dist/460.js +1 -0
- package/dist/501.js +1 -0
- package/dist/501.js.map +1 -0
- package/dist/574.js +1 -0
- package/dist/591.js +2 -0
- package/dist/591.js.LICENSE.txt +32 -0
- package/dist/591.js.map +1 -0
- package/dist/644.js +1 -0
- package/dist/647.js +1 -0
- package/dist/647.js.map +1 -0
- package/dist/650.js +1 -0
- package/dist/650.js.map +1 -0
- package/dist/669.js +1 -0
- package/dist/669.js.map +1 -0
- package/dist/696.js +1 -0
- package/dist/696.js.map +1 -0
- package/dist/703.js +1 -0
- package/dist/703.js.map +1 -0
- package/dist/729.js +1 -0
- package/dist/729.js.map +1 -0
- package/dist/738.js +1 -0
- package/dist/738.js.map +1 -0
- package/dist/757.js +1 -0
- package/dist/764.js +1 -0
- package/dist/764.js.map +1 -0
- package/dist/784.js +2 -0
- package/dist/784.js.LICENSE.txt +9 -0
- package/dist/784.js.map +1 -0
- package/dist/788.js +1 -0
- package/dist/806.js +1 -0
- package/dist/806.js.map +1 -0
- package/dist/807.js +1 -0
- package/dist/833.js +1 -0
- package/dist/877.js +1 -0
- package/dist/877.js.map +1 -0
- package/dist/917.js +1 -0
- package/dist/917.js.map +1 -0
- package/dist/940.js +1 -0
- package/dist/940.js.map +1 -0
- package/dist/981.js +1 -0
- package/dist/981.js.map +1 -0
- package/dist/kenyaemr-esm-service-queues-app.js +1 -0
- package/dist/kenyaemr-esm-service-queues-app.js.buildmanifest.json +965 -0
- package/dist/kenyaemr-esm-service-queues-app.js.map +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +60 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.js +3 -0
- package/package.json +54 -0
- package/src/active-visits/active-visits-row-actions.component.tsx +25 -0
- package/src/active-visits/active-visits-row-actions.scss +4 -0
- package/src/active-visits/active-visits-table.resource.ts +273 -0
- package/src/active-visits/change-status-dialog.component.tsx +272 -0
- package/src/active-visits/change-status-dialog.scss +47 -0
- package/src/active-visits/change-status-dialog.test.tsx +154 -0
- package/src/add-patient-toqueue/add-patient-toqueue-dialog.component.tsx +228 -0
- package/src/add-patient-toqueue/add-patient-toqueue-dialog.scss +32 -0
- package/src/add-provider-queue-room/add-provider-queue-room.component.tsx +238 -0
- package/src/add-provider-queue-room/add-provider-queue-room.resource.ts +76 -0
- package/src/add-provider-queue-room/add-provider-queue-room.scss +17 -0
- package/src/add-provider-queue-room/add-provider-queue-room.test.tsx +105 -0
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.component.tsx +76 -0
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.resource.ts +7 -0
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.scss +8 -0
- package/src/clear-queue-entries-dialog/clear-queue-entries-dialog.test.tsx +43 -0
- package/src/clear-queue-entries-dialog/clear-queue-entries.component.tsx +43 -0
- package/src/config-schema.ts +465 -0
- package/src/constants.ts +10 -0
- package/src/createDashboardLink.component.tsx +39 -0
- package/src/current-visit/current-visit-summary.component.tsx +38 -0
- package/src/current-visit/current-visit-summary.test.tsx +43 -0
- package/src/current-visit/current-visit.resource.ts +84 -0
- package/src/current-visit/current-visit.scss +34 -0
- package/src/current-visit/hooks/useVitalsConceptMetadata.tsx +101 -0
- package/src/current-visit/visit-details/biometrics-config-schema.ts +14 -0
- package/src/current-visit/visit-details/current-visit-details.component.tsx +96 -0
- package/src/current-visit/visit-details/triage-note.component.tsx +53 -0
- package/src/current-visit/visit-details/triage-note.scss +89 -0
- package/src/current-visit/visit-details/vitals-config-schema.ts +17 -0
- package/src/current-visit/visit-details/vitals.component.tsx +165 -0
- package/src/dashboard.meta.ts +5 -0
- package/src/declarations.d.ts +4 -0
- package/src/helpers/functions.ts +28 -0
- package/src/helpers/helpers.ts +177 -0
- package/src/helpers/time-helpers.ts +15 -0
- package/src/home.component.tsx +16 -0
- package/src/home.test.tsx +48 -0
- package/src/hooks/useConcept.ts +13 -0
- package/src/hooks/useQueue.ts +10 -0
- package/src/hooks/useQueueEntries.ts +187 -0
- package/src/hooks/useQueues.ts +22 -0
- package/src/hooks/useSystemSetting.ts +18 -0
- package/src/index.ts +172 -0
- package/src/past-visit/past-visit-details/encounter-list.component.tsx +54 -0
- package/src/past-visit/past-visit-details/medications-list.component.tsx +98 -0
- package/src/past-visit/past-visit-details/notes-list.component.tsx +41 -0
- package/src/past-visit/past-visit-details/past-visit-summary.component.tsx +181 -0
- package/src/past-visit/past-visit-details/past-visit-summary.scss +58 -0
- package/src/past-visit/past-visit.component.tsx +37 -0
- package/src/past-visit/past-visit.resource.ts +83 -0
- package/src/past-visit/past-visit.scss +126 -0
- package/src/past-visit/past-visit.test.tsx +41 -0
- package/src/patient-info/appointment-details.component.tsx +98 -0
- package/src/patient-info/appointment-details.scss +34 -0
- package/src/patient-info/appointment-details.test.tsx +36 -0
- package/src/patient-info/appointments.resource.ts +43 -0
- package/src/patient-info/hooks/usePatientAttributes.tsx +42 -0
- package/src/patient-info/patient-info.component.tsx +82 -0
- package/src/patient-info/patient-info.scss +60 -0
- package/src/patient-info/patient-info.test.tsx +43 -0
- package/src/patient-queue-header/patient-queue-header.component.tsx +99 -0
- package/src/patient-queue-header/patient-queue-header.scss +90 -0
- package/src/patient-queue-header/patient-queue-illustration.component.tsx +22 -0
- package/src/patient-queue-metrics/clinic-metrics.component.tsx +98 -0
- package/src/patient-queue-metrics/clinic-metrics.resource.ts +58 -0
- package/src/patient-queue-metrics/clinic-metrics.scss +11 -0
- package/src/patient-queue-metrics/clinic-metrics.test.tsx +76 -0
- package/src/patient-queue-metrics/metrics-card.component.tsx +68 -0
- package/src/patient-queue-metrics/metrics-card.scss +80 -0
- package/src/patient-queue-metrics/metrics-header.component.tsx +61 -0
- package/src/patient-queue-metrics/metrics-header.scss +26 -0
- package/src/patient-queue-metrics/queue-metrics.resource.ts +42 -0
- package/src/patient-search/advanced-search.component.tsx +191 -0
- package/src/patient-search/advanced-search.scss +154 -0
- package/src/patient-search/advanced-search.test.tsx +29 -0
- package/src/patient-search/basic-search.component.tsx +112 -0
- package/src/patient-search/basic-search.scss +139 -0
- package/src/patient-search/basic-search.test.tsx +23 -0
- package/src/patient-search/empty-data-illustration.component.tsx +41 -0
- package/src/patient-search/hooks/useActivePatientEnrollment.tsx +29 -0
- package/src/patient-search/hooks/useDefaultLocation.ts +14 -0
- package/src/patient-search/hooks/usePatients.tsx +25 -0
- package/src/patient-search/hooks/useQueueLocations.tsx +23 -0
- package/src/patient-search/hooks/useRecommendedVisitTypes.tsx +35 -0
- package/src/patient-search/hooks/useScheduledVisits.ts +52 -0
- package/src/patient-search/patient-scheduled-visits.component.tsx +324 -0
- package/src/patient-search/patient-scheduled-visits.scss +131 -0
- package/src/patient-search/patient-scheduled-visits.test.tsx +44 -0
- package/src/patient-search/patient-search.scss +43 -0
- package/src/patient-search/patient-search.workspace.tsx +135 -0
- package/src/patient-search/search-illustration.component.tsx +27 -0
- package/src/patient-search/search-results.component.tsx +75 -0
- package/src/patient-search/search-results.scss +80 -0
- package/src/patient-search/search-results.test.tsx +77 -0
- package/src/patient-search/search.resource.ts +10 -0
- package/src/patient-search/visit-form/existing-visit-form.component.tsx +112 -0
- package/src/patient-search/visit-form/queue.resource.ts +64 -0
- package/src/patient-search/visit-form/visit-form.component.tsx +344 -0
- package/src/patient-search/visit-form/visit-form.scss +73 -0
- package/src/patient-search/visit-form/visit-type-selector.component.tsx +155 -0
- package/src/patient-search/visit-form/visit-type-selector.scss +100 -0
- package/src/patient-search/visit-form/visit-type-selector.test.tsx +83 -0
- package/src/patient-search/visit-form-queue-fields/visit-form-queue-fields.component.tsx +178 -0
- package/src/patient-search/visit-form-queue-fields/visit-form-queue-fields.scss +19 -0
- package/src/patient-search/visit-form-queue-fields/visit-form-queue-fields.test.tsx +63 -0
- package/src/queue-entry-table-components/edit-entry.scss +14 -0
- package/src/queue-entry-table-components/queue-duration.component.tsx +41 -0
- package/src/queue-entry-table-components/queue-priority.component.tsx +38 -0
- package/src/queue-entry-table-components/queue-priority.scss +12 -0
- package/src/queue-entry-table-components/queue-status.component.tsx +39 -0
- package/src/queue-entry-table-components/transition-entry.component.tsx +55 -0
- package/src/queue-entry-table-components/transition-entry.scss +22 -0
- package/src/queue-patient-linelists/queue-linelist-base-table.component.tsx +241 -0
- package/src/queue-patient-linelists/queue-linelist-base-table.scss +110 -0
- package/src/queue-patient-linelists/queue-linelist-base-table.test.tsx +93 -0
- package/src/queue-patient-linelists/queue-linelist-filter.scss +63 -0
- package/src/queue-patient-linelists/queue-linelist-filter.test.tsx +94 -0
- package/src/queue-patient-linelists/queue-linelist-filter.workspace.tsx +185 -0
- package/src/queue-patient-linelists/queue-linelist.resource.ts +84 -0
- package/src/queue-patient-linelists/queue-services-table.component.tsx +63 -0
- package/src/queue-patient-linelists/scheduled-appointments-table.component.tsx +305 -0
- package/src/queue-patient-linelists/scheduled-appointments-table.test.tsx +41 -0
- package/src/queue-rooms/queue-room-form.scss +56 -0
- package/src/queue-rooms/queue-room-form.test.tsx +80 -0
- package/src/queue-rooms/queue-room-form.workspace.tsx +169 -0
- package/src/queue-rooms/queue-room.resource.ts +20 -0
- package/src/queue-screen/queue-screen.component.tsx +47 -0
- package/src/queue-screen/queue-screen.scss +39 -0
- package/src/queue-screen/queue-screen.test.tsx +51 -0
- package/src/queue-screen/useActiveTickets.tsx +13 -0
- package/src/queue-services/queue-service-form.scss +61 -0
- package/src/queue-services/queue-service-form.test.tsx +60 -0
- package/src/queue-services/queue-service-form.workspace.tsx +179 -0
- package/src/queue-services/queue-service.resource.ts +33 -0
- package/src/queue-table/cells/columns.resource.ts +135 -0
- package/src/queue-table/cells/queue-table-action-cell.component.tsx +88 -0
- package/src/queue-table/cells/queue-table-action-cell.scss +7 -0
- package/src/queue-table/cells/queue-table-coming-from-cell.component.tsx +13 -0
- package/src/queue-table/cells/queue-table-extension-cell.component.tsx +16 -0
- package/src/queue-table/cells/queue-table-name-cell.component.tsx +20 -0
- package/src/queue-table/cells/queue-table-patient-age-cell.component.tsx +18 -0
- package/src/queue-table/cells/queue-table-patient-identifier-cell.component.tsx +25 -0
- package/src/queue-table/cells/queue-table-priority-cell.component.tsx +23 -0
- package/src/queue-table/cells/queue-table-queue-name-cell.component.tsx +14 -0
- package/src/queue-table/cells/queue-table-status-cell.component.tsx +18 -0
- package/src/queue-table/cells/queue-table-visit-attribute-queue-number-cell.component.tsx +37 -0
- package/src/queue-table/cells/queue-table-visit-start-time-cell.component.tsx +20 -0
- package/src/queue-table/cells/queue-table-wait-time-cell.component.tsx +17 -0
- package/src/queue-table/default-queue-table.component.tsx +174 -0
- package/src/queue-table/default-queue-table.test.tsx +131 -0
- package/src/queue-table/queue-entry-actions/edit-queue-entry-modal.component.tsx +52 -0
- package/src/queue-table/queue-entry-actions/end-queue-entry-modal.component.tsx +39 -0
- package/src/queue-table/queue-entry-actions/queue-entry-actions-modal.component.tsx +362 -0
- package/src/queue-table/queue-entry-actions/queue-entry-actions-modal.test.tsx +152 -0
- package/src/queue-table/queue-entry-actions/queue-entry-actions.resource.ts +83 -0
- package/src/queue-table/queue-entry-actions/queue-entry-actons-modal.scss +36 -0
- package/src/queue-table/queue-entry-actions/queue-entry-confirm-action-modal.component.tsx +97 -0
- package/src/queue-table/queue-entry-actions/queue-entry-confirm-action-modal.test.tsx +106 -0
- package/src/queue-table/queue-entry-actions/queue-entry-undo-actions-modal.test.tsx +76 -0
- package/src/queue-table/queue-entry-actions/transition-queue-entry-modal.component.tsx +51 -0
- package/src/queue-table/queue-entry-actions/undo-transition-queue-entry-modal.component.tsx +58 -0
- package/src/queue-table/queue-entry-actions/void-queue-entry-modal.component.tsx +34 -0
- package/src/queue-table/queue-table-by-status-menu.component.tsx +42 -0
- package/src/queue-table/queue-table-by-status-menu.scss +11 -0
- package/src/queue-table/queue-table-by-status-skeleton.component.tsx +32 -0
- package/src/queue-table/queue-table-by-status.component.tsx +96 -0
- package/src/queue-table/queue-table-expanded-row.component.tsx +29 -0
- package/src/queue-table/queue-table-metrics-card.component.tsx +50 -0
- package/src/queue-table/queue-table-metrics-card.scss +48 -0
- package/src/queue-table/queue-table-metrics.component.tsx +30 -0
- package/src/queue-table/queue-table-metrics.scss +11 -0
- package/src/queue-table/queue-table.component.tsx +179 -0
- package/src/queue-table/queue-table.scss +192 -0
- package/src/queue-table/queue-table.test.tsx +210 -0
- package/src/remove-queue-entry-dialog/remove-queue-entry.component.tsx +87 -0
- package/src/remove-queue-entry-dialog/remove-queue-entry.resource.ts +93 -0
- package/src/remove-queue-entry-dialog/remove-queue-entry.scss +7 -0
- package/src/remove-queue-entry-dialog/remove-queue-entry.test.tsx +45 -0
- package/src/root.component.tsx +28 -0
- package/src/root.scss +15 -0
- package/src/root.test.tsx +24 -0
- package/src/routes.json +133 -0
- package/src/side-menu/nav-group/createNavGroup.tsx +17 -0
- package/src/side-menu/nav-group/nav-group.component.tsx +24 -0
- package/src/side-menu/nav-group/nav-group.test.tsx +32 -0
- package/src/side-menu/nav-group/nav-group.ts +10 -0
- package/src/side-menu/side-menu.component.tsx +6 -0
- package/src/side-menu/side-menu.test.tsx +17 -0
- package/src/transition-queue-entry/transition-queue-entry-dialog.component.tsx +134 -0
- package/src/transition-queue-entry/transition-queue-entry-dialog.scss +12 -0
- package/src/transition-queue-entry/transition-queue-entry-dialog.test.tsx +102 -0
- package/src/transition-queue-entry/transition-queue-entry.resource.ts +16 -0
- package/src/types/index.ts +494 -0
- package/src/views/queue-table-by-status-view.component.tsx +25 -0
- package/src/views/queue-tables-for-all-statuses.component.tsx +150 -0
- package/src/visits-missing-inqueue/visits-missing-inqueue.component.tsx +277 -0
- package/src/visits-missing-inqueue/visits-missing-inqueue.resource.ts +93 -0
- package/src/visits-missing-inqueue/visits-missing-inqueue.scss +108 -0
- package/translations/am.json +295 -0
- package/translations/ar.json +295 -0
- package/translations/en.json +305 -0
- package/translations/es.json +295 -0
- package/translations/fr.json +295 -0
- package/translations/he.json +295 -0
- package/translations/km.json +295 -0
- package/translations/zh.json +295 -0
- package/translations/zh_CN.json +295 -0
- package/tsconfig.json +5 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import {
|
|
5
|
+
StructuredListHead,
|
|
6
|
+
StructuredListCell,
|
|
7
|
+
StructuredListRow,
|
|
8
|
+
StructuredListBody,
|
|
9
|
+
StructuredListWrapper,
|
|
10
|
+
} from '@carbon/react';
|
|
11
|
+
import { formatDatetime, parseDate } from '@openmrs/esm-framework';
|
|
12
|
+
import { type FormattedEncounter } from '../../types/index';
|
|
13
|
+
import styles from '../past-visit.scss';
|
|
14
|
+
|
|
15
|
+
interface EncounterListProps {
|
|
16
|
+
encounters: Array<FormattedEncounter>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const EncounterList: React.FC<EncounterListProps> = ({ encounters }) => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
|
|
22
|
+
const structuredListBodyRowGenerator = () => {
|
|
23
|
+
return encounters.map((encounter, i) => (
|
|
24
|
+
<StructuredListRow label key={`row-${i}`}>
|
|
25
|
+
<StructuredListCell>{formatDatetime(parseDate(encounter.datetime), { mode: 'wide' })}</StructuredListCell>
|
|
26
|
+
<StructuredListCell className={styles.textColor}>{encounter.encounterType}</StructuredListCell>
|
|
27
|
+
<StructuredListCell>{encounter.provider}</StructuredListCell>
|
|
28
|
+
</StructuredListRow>
|
|
29
|
+
));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
if (encounters?.length) {
|
|
33
|
+
return (
|
|
34
|
+
<div className={styles.encounterListContainer}>
|
|
35
|
+
<StructuredListWrapper>
|
|
36
|
+
<StructuredListHead>
|
|
37
|
+
<StructuredListRow head>
|
|
38
|
+
<StructuredListCell head>{t('date&Time', 'Date & time')}</StructuredListCell>
|
|
39
|
+
<StructuredListCell head>{t('encounterType', 'Encounter type')}</StructuredListCell>
|
|
40
|
+
<StructuredListCell head>{t('provider', 'Provider')}</StructuredListCell>
|
|
41
|
+
</StructuredListRow>
|
|
42
|
+
</StructuredListHead>
|
|
43
|
+
<StructuredListBody>{structuredListBodyRowGenerator()}</StructuredListBody>
|
|
44
|
+
</StructuredListWrapper>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<p className={classNames(styles.bodyLong01, styles.text02)}>{t('noEncountersFound', 'No encounters found')}</p>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default EncounterList;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import capitalize from 'lodash-es/capitalize';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Tile } from '@carbon/react';
|
|
6
|
+
import { formatDate } from '@openmrs/esm-framework';
|
|
7
|
+
import { getDosage } from '../past-visit.resource';
|
|
8
|
+
import { type OrderItem } from '../../types/index';
|
|
9
|
+
import styles from './past-visit-summary.scss';
|
|
10
|
+
interface MedicationProps {
|
|
11
|
+
medications: Array<OrderItem>;
|
|
12
|
+
}
|
|
13
|
+
const Medications: React.FC<MedicationProps> = ({ medications }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
{medications.length > 0 ? (
|
|
19
|
+
medications.map(
|
|
20
|
+
(medication: OrderItem, ind) =>
|
|
21
|
+
medication.order?.dose &&
|
|
22
|
+
medication.order?.orderType?.display === 'Drug Order' && (
|
|
23
|
+
<div className={styles.medicationContainer}>
|
|
24
|
+
<Tile className={styles.medicationTile}>
|
|
25
|
+
<p className={styles.medicationRecord}>
|
|
26
|
+
<strong>{capitalize(medication.order.drug?.name)}</strong> —{' '}
|
|
27
|
+
{medication.order.drug?.strength?.toLowerCase()}
|
|
28
|
+
— {medication.order.doseUnits?.display?.toLowerCase()} —{' '}
|
|
29
|
+
<span>
|
|
30
|
+
<span className={styles.label01}> {t('dose', 'Dose').toUpperCase()} </span>{' '}
|
|
31
|
+
</span>
|
|
32
|
+
<span className={styles.dosage}>
|
|
33
|
+
{getDosage(medication.order.drug?.strength, medication.order?.dose)?.toLowerCase()}
|
|
34
|
+
</span>{' '}
|
|
35
|
+
— {medication.order.route?.display?.toLowerCase()} —{' '}
|
|
36
|
+
{medication.order.frequency?.display?.toLowerCase()} —{' '}
|
|
37
|
+
{!medication.order.duration
|
|
38
|
+
? t('orderIndefiniteDuration', 'Indefinite duration')
|
|
39
|
+
: t('orderDurationAndUnit', 'for {{duration}} {{durationUnit}}', {
|
|
40
|
+
duration: medication.order.duration,
|
|
41
|
+
durationUnit: medication.order.durationUnits?.display?.toLowerCase(),
|
|
42
|
+
})}
|
|
43
|
+
{medication.order?.numRefills !== 0 && (
|
|
44
|
+
<span>
|
|
45
|
+
<span className={styles.label01}> — {t('refills', 'Refills').toUpperCase()}</span>{' '}
|
|
46
|
+
{medication.order.numRefills}
|
|
47
|
+
{''}
|
|
48
|
+
</span>
|
|
49
|
+
)}
|
|
50
|
+
{medication.order?.dosingInstructions && (
|
|
51
|
+
<span> — {medication.order?.dosingInstructions.toLocaleLowerCase()}</span>
|
|
52
|
+
)}
|
|
53
|
+
{medication.order?.orderReasonNonCoded ? (
|
|
54
|
+
<span>
|
|
55
|
+
— <span className={styles.label01}>{t('indication', 'Indication').toUpperCase()}</span>{' '}
|
|
56
|
+
{medication.order?.orderReasonNonCoded}
|
|
57
|
+
</span>
|
|
58
|
+
) : null}
|
|
59
|
+
{medication.order?.quantity ? (
|
|
60
|
+
<span>
|
|
61
|
+
<span className={styles.label01}> — {t('quantity', 'Quantity').toUpperCase()}</span>{' '}
|
|
62
|
+
{medication.order?.quantity}
|
|
63
|
+
</span>
|
|
64
|
+
) : null}
|
|
65
|
+
{medication.order?.dateStopped ? (
|
|
66
|
+
<span className={styles.bodyShort01}>
|
|
67
|
+
<span className={styles.label01}>
|
|
68
|
+
{medication.order?.quantity ? ` — ` : ''} {t('endDate', 'End date').toUpperCase()}
|
|
69
|
+
</span>{' '}
|
|
70
|
+
{formatDate(new Date(medication.order?.dateStopped))}
|
|
71
|
+
</span>
|
|
72
|
+
) : null}
|
|
73
|
+
</p>
|
|
74
|
+
</Tile>
|
|
75
|
+
<p className={styles.metadata}>
|
|
76
|
+
{medication.time} ·{' '}
|
|
77
|
+
{medication.provider.name ? (
|
|
78
|
+
<span>
|
|
79
|
+
{' '}
|
|
80
|
+
{medication.provider && medication.provider.name},{' '}
|
|
81
|
+
{medication.provider && medication.provider.role}{' '}
|
|
82
|
+
</span>
|
|
83
|
+
) : null}{' '}
|
|
84
|
+
·{' '}
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
),
|
|
88
|
+
)
|
|
89
|
+
) : (
|
|
90
|
+
<p className={classNames(styles.bodyLong01, styles.text02)}>
|
|
91
|
+
{t('noMedicationsFound', 'No medications found')}
|
|
92
|
+
</p>
|
|
93
|
+
)}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default Medications;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Tag } from '@carbon/react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { type DiagnosisItem, type Note } from '../../types/index';
|
|
6
|
+
import styles from './past-visit-summary.scss';
|
|
7
|
+
|
|
8
|
+
interface NotesProps {
|
|
9
|
+
notes: Array<Note>;
|
|
10
|
+
diagnoses: Array<DiagnosisItem>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Notes: React.FC<NotesProps> = ({ notes, diagnoses }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
{diagnoses.length > 0
|
|
19
|
+
? diagnoses.map((d: DiagnosisItem, ind) => (
|
|
20
|
+
<Tag type="blue" size="md">
|
|
21
|
+
{d.diagnosis}
|
|
22
|
+
</Tag>
|
|
23
|
+
))
|
|
24
|
+
: null}
|
|
25
|
+
{notes.length ? (
|
|
26
|
+
notes.map((note: Note, index) => (
|
|
27
|
+
<div key={`note-` + index}>
|
|
28
|
+
<p className={styles.notesContainer}>{note.note}</p>
|
|
29
|
+
<p className={styles.notesSubHeading}>
|
|
30
|
+
{note.provider.name ? <span> {note.provider.name} </span> : null} · {note.time}
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
))
|
|
34
|
+
) : (
|
|
35
|
+
<p className={classNames(styles.bodyLong01, styles.text02)}>{t('noNotesFound', 'No notes found')}</p>
|
|
36
|
+
)}
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default Notes;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import React, { useState, useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { Tab, Tabs, TabList, TabPanel, TabPanels } from '@carbon/react';
|
|
5
|
+
import { formatTime, parseDate, useLayoutType, formatDatetime } from '@openmrs/esm-framework';
|
|
6
|
+
import {
|
|
7
|
+
type Encounter,
|
|
8
|
+
type OrderItem,
|
|
9
|
+
type Order,
|
|
10
|
+
type Note,
|
|
11
|
+
type DiagnosisItem,
|
|
12
|
+
type Observation,
|
|
13
|
+
} from '../../types/index';
|
|
14
|
+
import { useVitalsFromObs } from '../../current-visit/hooks/useVitalsConceptMetadata';
|
|
15
|
+
import EncounterList from './encounter-list.component';
|
|
16
|
+
import Notes from './notes-list.component';
|
|
17
|
+
import Medications from './medications-list.component';
|
|
18
|
+
import Vitals from '../../current-visit/visit-details/vitals.component';
|
|
19
|
+
import styles from '../past-visit.scss';
|
|
20
|
+
|
|
21
|
+
interface PastVisitSummaryProps {
|
|
22
|
+
encounters: Array<any>;
|
|
23
|
+
patientUuid: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
enum visitTypes {
|
|
27
|
+
CURRENT = 'currentVisit',
|
|
28
|
+
PAST = 'pastVisit',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const PastVisitSummary: React.FC<PastVisitSummaryProps> = ({ encounters, patientUuid }) => {
|
|
32
|
+
const { t } = useTranslation();
|
|
33
|
+
const [selectedTabIndex, setSelectedTabIndex] = useState(0);
|
|
34
|
+
const isTablet = useLayoutType() === 'tablet';
|
|
35
|
+
|
|
36
|
+
const encountersToDisplay = useMemo(
|
|
37
|
+
() =>
|
|
38
|
+
encounters
|
|
39
|
+
? encounters?.map((encounter: Encounter) => ({
|
|
40
|
+
id: encounter?.uuid,
|
|
41
|
+
datetime: formatDatetime(parseDate(encounter?.encounterDatetime)),
|
|
42
|
+
encounterType: encounter?.encounterType?.display,
|
|
43
|
+
form: encounter?.form,
|
|
44
|
+
obs: encounter?.obs,
|
|
45
|
+
provider:
|
|
46
|
+
encounter?.encounterProviders?.length > 0
|
|
47
|
+
? encounter.encounterProviders[0].provider?.person?.display
|
|
48
|
+
: '--',
|
|
49
|
+
}))
|
|
50
|
+
: [],
|
|
51
|
+
[encounters],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const [medications, notes, diagnoses, vitalsToRetrieve]: [
|
|
55
|
+
Array<OrderItem>,
|
|
56
|
+
Array<Note>,
|
|
57
|
+
Array<DiagnosisItem>,
|
|
58
|
+
Array<Encounter>,
|
|
59
|
+
] = useMemo(() => {
|
|
60
|
+
// Medication Tab
|
|
61
|
+
const medications: Array<OrderItem> = [];
|
|
62
|
+
const notes: Array<Note> = [];
|
|
63
|
+
const diagnoses: Array<DiagnosisItem> = [];
|
|
64
|
+
const vitalsToRetrieve: Array<Encounter> = [];
|
|
65
|
+
|
|
66
|
+
// Iterating through every Encounter
|
|
67
|
+
encounters?.forEach((encounter) => {
|
|
68
|
+
if (encounter.orders != undefined) {
|
|
69
|
+
medications.push(
|
|
70
|
+
...encounter.orders.map((order: Order) => ({
|
|
71
|
+
order,
|
|
72
|
+
provider: {
|
|
73
|
+
name: encounter.encounterProviders.length ? encounter.encounterProviders[0].provider.person.display : '',
|
|
74
|
+
role: encounter.encounterProviders.length ? encounter.encounterProviders[0].encounterRole.display : '',
|
|
75
|
+
},
|
|
76
|
+
time: encounter.encounterDatetime ? formatTime(parseDate(encounter.encounterDatetime)) : '',
|
|
77
|
+
})),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Check for Visit Diagnoses and Notes
|
|
82
|
+
encounter?.obs?.forEach((obs: Observation) => {
|
|
83
|
+
if (obs?.concept?.display === 'Visit Diagnoses') {
|
|
84
|
+
// Putting all the diagnoses in a single array.
|
|
85
|
+
diagnoses.push({
|
|
86
|
+
diagnosis: obs.groupMembers.find((mem) => mem.concept.display === 'PROBLEM LIST')?.value.display,
|
|
87
|
+
});
|
|
88
|
+
} else if (obs?.concept?.display === 'General patient note') {
|
|
89
|
+
// Putting all notes in a single array.
|
|
90
|
+
notes.push({
|
|
91
|
+
note: obs.value,
|
|
92
|
+
provider: {
|
|
93
|
+
name: encounter.encounterProviders.length ? encounter.encounterProviders[0].provider.person.display : '',
|
|
94
|
+
role: encounter.encounterProviders.length ? encounter.encounterProviders[0].encounterRole.display : '',
|
|
95
|
+
},
|
|
96
|
+
time: encounter.encounterDatetime ? formatTime(parseDate(encounter.encounterDatetime)) : '',
|
|
97
|
+
concept: obs.concept,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
vitalsToRetrieve.push(encounter);
|
|
103
|
+
|
|
104
|
+
// Check for Visit Diagnoses and Notes
|
|
105
|
+
if (encounter.encounterType?.display === 'Visit Note') {
|
|
106
|
+
encounter.obs.forEach((obs: Observation) => {
|
|
107
|
+
if (obs.concept && obs.concept.display === 'Visit Diagnoses') {
|
|
108
|
+
// // Putting all the diagnoses in a single array.
|
|
109
|
+
diagnoses.push({
|
|
110
|
+
diagnosis: obs.groupMembers.find((mem) => mem.concept.display === 'PROBLEM LIST').value.display,
|
|
111
|
+
});
|
|
112
|
+
} else if (obs.concept && obs.concept.display === 'General patient note') {
|
|
113
|
+
// Putting all notes in a single array.
|
|
114
|
+
notes.push({
|
|
115
|
+
note: obs.value,
|
|
116
|
+
provider: {
|
|
117
|
+
name: encounter.encounterProviders.length
|
|
118
|
+
? encounter.encounterProviders[0].provider.person.display
|
|
119
|
+
: '',
|
|
120
|
+
role: encounter.encounterProviders.length ? encounter.encounterProviders[0].encounterRole.display : '',
|
|
121
|
+
},
|
|
122
|
+
time: formatTime(parseDate(obs.obsDatetime)),
|
|
123
|
+
concept: obs.concept,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return [medications, notes, diagnoses, vitalsToRetrieve];
|
|
130
|
+
}, [encounters]);
|
|
131
|
+
|
|
132
|
+
const tabsClasses = classNames(styles.verticalTabs, {
|
|
133
|
+
[styles.tabletTabs]: isTablet,
|
|
134
|
+
[styles.desktopTabs]: !isTablet,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const tabClasses = (index) =>
|
|
138
|
+
classNames(styles.tab, styles.bodyLong01, {
|
|
139
|
+
[styles.selectedTab]: selectedTabIndex === index,
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<div className={styles.wrapper}>
|
|
144
|
+
<div className={styles.visitContainer}>
|
|
145
|
+
<Tabs className={tabsClasses}>
|
|
146
|
+
<TabList className={styles.verticalTabList} aria-label="Past visits tabs">
|
|
147
|
+
<Tab className={tabClasses(0)} id="vitals-tab" onClick={() => setSelectedTabIndex(0)}>
|
|
148
|
+
{t('vitals', 'Vitals')}
|
|
149
|
+
</Tab>
|
|
150
|
+
<Tab className={tabClasses(1)} id="notes-tab" onClick={() => setSelectedTabIndex(1)}>
|
|
151
|
+
{t('notes', 'Notes')}
|
|
152
|
+
</Tab>
|
|
153
|
+
<Tab className={tabClasses(2)} id="medications-tab" onClick={() => setSelectedTabIndex(2)}>
|
|
154
|
+
{t('medications', 'Medications')}
|
|
155
|
+
</Tab>
|
|
156
|
+
</TabList>
|
|
157
|
+
<TabPanels>
|
|
158
|
+
<TabPanel>
|
|
159
|
+
<Vitals
|
|
160
|
+
vitals={useVitalsFromObs(vitalsToRetrieve)}
|
|
161
|
+
patientUuid={patientUuid}
|
|
162
|
+
visitType={visitTypes.PAST}
|
|
163
|
+
/>
|
|
164
|
+
</TabPanel>
|
|
165
|
+
<TabPanel>
|
|
166
|
+
<Notes notes={notes} diagnoses={diagnoses} />
|
|
167
|
+
</TabPanel>
|
|
168
|
+
<TabPanel>
|
|
169
|
+
<Medications medications={medications} />
|
|
170
|
+
</TabPanel>
|
|
171
|
+
<TabPanel>
|
|
172
|
+
<EncounterList encounters={encountersToDisplay} />
|
|
173
|
+
</TabPanel>
|
|
174
|
+
</TabPanels>
|
|
175
|
+
</Tabs>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export default PastVisitSummary;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
|
+
@import '~@openmrs/esm-styleguide/src/vars';
|
|
4
|
+
|
|
5
|
+
.medicationContainer {
|
|
6
|
+
margin-bottom: spacing.$spacing-06;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.medicationRecord {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-flow: row wrap;
|
|
12
|
+
align-items: center;
|
|
13
|
+
@include type.type-style('body-01');
|
|
14
|
+
color: $text-02;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.medicationTile {
|
|
18
|
+
width: 100% !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.bodyLong01 {
|
|
22
|
+
@include type.type-style('body-01');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.bodyShort02 {
|
|
26
|
+
@include type.type-style('body-compact-02');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dosage {
|
|
30
|
+
@include type.type-style('heading-compact-01');
|
|
31
|
+
margin-left: spacing.$spacing-03;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.date {
|
|
35
|
+
@include type.type-style('body-compact-01');
|
|
36
|
+
color: $text-02;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.metadata {
|
|
40
|
+
@include type.type-style('label-01');
|
|
41
|
+
color: $text-02;
|
|
42
|
+
margin: spacing.$spacing-02 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.label01 {
|
|
46
|
+
@include type.type-style('label-01');
|
|
47
|
+
color: $text-02;
|
|
48
|
+
margin: spacing.$spacing-02 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.notesSubHeading {
|
|
52
|
+
@include type.type-style('label-01');
|
|
53
|
+
color: $text-02;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.notesContainer {
|
|
57
|
+
margin: spacing.$spacing-05 0 spacing.$spacing-05;
|
|
58
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { StructuredListSkeleton } from '@carbon/react';
|
|
4
|
+
import { parseDate, formatDatetime } from '@openmrs/esm-framework';
|
|
5
|
+
import { usePastVisits } from './past-visit.resource';
|
|
6
|
+
import PastVisitSummary from './past-visit-details/past-visit-summary.component';
|
|
7
|
+
import styles from './past-visit.scss';
|
|
8
|
+
|
|
9
|
+
interface PastVisitProps {
|
|
10
|
+
patientUuid: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const PastVisit: React.FC<PastVisitProps> = ({ patientUuid }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const { visits, isError, isLoading } = usePastVisits(patientUuid);
|
|
16
|
+
|
|
17
|
+
if (isLoading) {
|
|
18
|
+
return <StructuredListSkeleton role="progressbar" />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (visits) {
|
|
22
|
+
return (
|
|
23
|
+
<div className={styles.visitContainer}>
|
|
24
|
+
<div className={styles.container}>
|
|
25
|
+
<div className={styles.header}>
|
|
26
|
+
<h4 className={styles.visitType}>{visits?.visitType?.display}</h4>
|
|
27
|
+
<p className={styles.date}>{formatDatetime(parseDate(visits?.startDatetime))}</p>
|
|
28
|
+
</div>
|
|
29
|
+
<PastVisitSummary encounters={visits.encounters} patientUuid={patientUuid} />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return <p className={styles.bodyLong01}>{t('noPreviousVisitFound', 'No previous visit found')}</p>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default PastVisit;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import useSWR from 'swr';
|
|
2
|
+
import { openmrsFetch, restBaseUrl, type Visit } from '@openmrs/esm-framework';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
|
|
5
|
+
export function usePastVisits(patientUuid: string) {
|
|
6
|
+
const customRepresentation =
|
|
7
|
+
'custom:(uuid,encounters:(uuid,form:(uuid,display),encounterDatetime,' +
|
|
8
|
+
'orders:full,' +
|
|
9
|
+
'obs:(uuid,concept:(uuid,display,conceptClass:(uuid,display)),' +
|
|
10
|
+
'display,groupMembers:(uuid,concept:(uuid,display),' +
|
|
11
|
+
'value:(uuid,display)),value),encounterType:(uuid,display),' +
|
|
12
|
+
'encounterProviders:(uuid,display,encounterRole:(uuid,display),' +
|
|
13
|
+
'provider:(uuid,person:(uuid,display)))),visitType:(uuid,name,display),startDatetime,stopDatetime,patient';
|
|
14
|
+
|
|
15
|
+
const apiUrl = `${restBaseUrl}/visit?patient=${patientUuid}&v=${customRepresentation}`;
|
|
16
|
+
|
|
17
|
+
const { data, error, isLoading, isValidating } = useSWR<{ data: { results: Array<Visit> } }, Error>(
|
|
18
|
+
patientUuid ? apiUrl : null,
|
|
19
|
+
openmrsFetch,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const previousVisit = data?.data?.results
|
|
23
|
+
?.filter((result) => dayjs(result.startDatetime).isBefore(dayjs().startOf('day')))
|
|
24
|
+
?.shift();
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
visits: data ? previousVisit : null,
|
|
28
|
+
isError: error,
|
|
29
|
+
isLoading,
|
|
30
|
+
isValidating,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface Observation {
|
|
35
|
+
uuid: string;
|
|
36
|
+
concept: {
|
|
37
|
+
uuid: string;
|
|
38
|
+
display: string;
|
|
39
|
+
conceptClass: {
|
|
40
|
+
uuid: string;
|
|
41
|
+
display: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
display: string;
|
|
45
|
+
groupMembers: null | Array<{
|
|
46
|
+
uuid: string;
|
|
47
|
+
concept: {
|
|
48
|
+
uuid: string;
|
|
49
|
+
display: string;
|
|
50
|
+
};
|
|
51
|
+
value: {
|
|
52
|
+
uuid: string;
|
|
53
|
+
display: string;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
value: any;
|
|
57
|
+
obsDatetime: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function getDosage(strength: string, doseNumber: number) {
|
|
61
|
+
if (!strength || !doseNumber) {
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const i = strength.search(/\D/);
|
|
66
|
+
const strengthQuantity = parseInt(strength.substring(0, i));
|
|
67
|
+
|
|
68
|
+
const concentrationStartIndex = strength.search(/\//);
|
|
69
|
+
|
|
70
|
+
let strengthUnits = strength.substring(i);
|
|
71
|
+
|
|
72
|
+
if (concentrationStartIndex >= 0) {
|
|
73
|
+
strengthUnits = strength.substring(i, concentrationStartIndex);
|
|
74
|
+
const j = strength.substring(concentrationStartIndex + 1).search(/\D/);
|
|
75
|
+
const concentrationQuantity = parseInt(strength.substr(concentrationStartIndex + 1, j));
|
|
76
|
+
const concentrationUnits = strength.substring(concentrationStartIndex + 1 + j);
|
|
77
|
+
return `${doseNumber} ${strengthUnits} (${
|
|
78
|
+
(doseNumber / strengthQuantity) * concentrationQuantity
|
|
79
|
+
} ${concentrationUnits})`;
|
|
80
|
+
} else {
|
|
81
|
+
return `${strengthQuantity * doseNumber} ${strengthUnits}`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/type';
|
|
2
|
+
@use '@carbon/styles/scss/spacing';
|
|
3
|
+
@import '~@openmrs/esm-styleguide/src/vars';
|
|
4
|
+
|
|
5
|
+
.wrapper {
|
|
6
|
+
margin-top: spacing.$spacing-03;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.bodyShort02 {
|
|
10
|
+
@include type.type-style('body-compact-02');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.bodyLong01 {
|
|
14
|
+
@include type.type-style('body-01');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.date {
|
|
18
|
+
@include type.type-style('label-01');
|
|
19
|
+
color: $text-02;
|
|
20
|
+
margin: spacing.$spacing-03 0rem spacing.$spacing-03;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.visitType {
|
|
24
|
+
@include type.type-style('heading-compact-02');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.container {
|
|
28
|
+
background-color: $ui-background;
|
|
29
|
+
padding: spacing.$spacing-03;
|
|
30
|
+
margin: spacing.$spacing-03 0rem spacing.$spacing-03;
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tabs > :global(.cds--tab-content) {
|
|
35
|
+
padding: spacing.$spacing-05 0rem !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.header::after {
|
|
39
|
+
content: '';
|
|
40
|
+
display: block;
|
|
41
|
+
width: spacing.$spacing-07;
|
|
42
|
+
padding-top: 0.188rem;
|
|
43
|
+
border-bottom: 0.375rem solid var(--brand-03);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.visitContainer {
|
|
47
|
+
background-color: $ui-background;
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: max-content auto;
|
|
50
|
+
min-height: spacing.$spacing-13;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.flexSections {
|
|
54
|
+
display: flex;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.verticalTabs {
|
|
58
|
+
margin: spacing.$spacing-04 0;
|
|
59
|
+
|
|
60
|
+
&:global(.cds--tabs--scrollable .cds--tabs--scrollable__nav-item + .cds--tabs--scrollable__nav-item) {
|
|
61
|
+
margin-left: 0rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> ul {
|
|
65
|
+
flex-direction: column !important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.verticalTabList {
|
|
70
|
+
:global(.cds--tab--list) {
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
max-height: fit-content;
|
|
73
|
+
overflow-x: visible;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.desktopTabs {
|
|
78
|
+
button {
|
|
79
|
+
height: spacing.$spacing-07;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tabletTabs {
|
|
84
|
+
button {
|
|
85
|
+
height: spacing.$spacing-09;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tab {
|
|
90
|
+
outline: 0;
|
|
91
|
+
outline-offset: 0;
|
|
92
|
+
|
|
93
|
+
&:active,
|
|
94
|
+
&:focus {
|
|
95
|
+
outline: 2px solid var(--brand-03) !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&[aria-selected='true'] {
|
|
99
|
+
border-left: 3px solid var(--brand-03);
|
|
100
|
+
border-bottom: none;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
margin-left: 0rem !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[aria-selected='false'] {
|
|
106
|
+
border-bottom: none;
|
|
107
|
+
border-left: 2px solid $ui-03;
|
|
108
|
+
margin-left: 0rem !important;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.selectedTab > button {
|
|
113
|
+
border-left: 3px solid var(--brand-03) !important;
|
|
114
|
+
border-bottom: 0 !important;
|
|
115
|
+
font-weight: 600 !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tabContent {
|
|
119
|
+
border-top: 1px solid $ui-03;
|
|
120
|
+
padding: spacing.$spacing-05 0;
|
|
121
|
+
width: 70%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.textColor {
|
|
125
|
+
color: $color-blue-60-2;
|
|
126
|
+
}
|