@openmrs/esm-laboratory-app 1.0.1-pre.106

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 (157) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +32 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +14 -0
  7. package/.turbo/turbo-build.log +30 -0
  8. package/.turbo/turbo-lint.log +12 -0
  9. package/.turbo/turbo-typescript.log +0 -0
  10. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
  11. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  12. package/.yarn/plugins/@yarnpkg/plugin-version.cjs +550 -0
  13. package/.yarn/versions/3d4697b8.yml +0 -0
  14. package/README.md +39 -0
  15. package/__mocks__/react-i18next.js +50 -0
  16. package/assets/logo/logo.png +0 -0
  17. package/assets/logo/moh_logo_without_word.png +0 -0
  18. package/assets/screenshots/labs_enter_results.png +0 -0
  19. package/assets/screenshots/labs_general_dashboard.png +0 -0
  20. package/dist/142.js +1 -0
  21. package/dist/142.js.map +1 -0
  22. package/dist/319.js +1 -0
  23. package/dist/36.js +1 -0
  24. package/dist/36.js.map +1 -0
  25. package/dist/395.js +1 -0
  26. package/dist/395.js.map +1 -0
  27. package/dist/453.js +1 -0
  28. package/dist/453.js.map +1 -0
  29. package/dist/533.js +1 -0
  30. package/dist/533.js.map +1 -0
  31. package/dist/56.js +2 -0
  32. package/dist/56.js.LICENSE.txt +32 -0
  33. package/dist/56.js.map +1 -0
  34. package/dist/572.js +1 -0
  35. package/dist/572.js.map +1 -0
  36. package/dist/574.js +1 -0
  37. package/dist/581.js +1 -0
  38. package/dist/581.js.map +1 -0
  39. package/dist/66.js +1 -0
  40. package/dist/66.js.map +1 -0
  41. package/dist/757.js +1 -0
  42. package/dist/769.js +1 -0
  43. package/dist/769.js.map +1 -0
  44. package/dist/770.js +1 -0
  45. package/dist/770.js.map +1 -0
  46. package/dist/800.js +2 -0
  47. package/dist/800.js.LICENSE.txt +3 -0
  48. package/dist/800.js.map +1 -0
  49. package/dist/809.js +1 -0
  50. package/dist/809.js.map +1 -0
  51. package/dist/889.js +1 -0
  52. package/dist/889.js.map +1 -0
  53. package/dist/894.js +2 -0
  54. package/dist/894.js.LICENSE.txt +48 -0
  55. package/dist/894.js.map +1 -0
  56. package/dist/924.js +1 -0
  57. package/dist/924.js.map +1 -0
  58. package/dist/928.js +1 -0
  59. package/dist/928.js.map +1 -0
  60. package/dist/967b98e46b0984c4.png +0 -0
  61. package/dist/97.js +1 -0
  62. package/dist/97.js.map +1 -0
  63. package/dist/983.js +1 -0
  64. package/dist/983.js.map +1 -0
  65. package/dist/main.js +2 -0
  66. package/dist/main.js.LICENSE.txt +48 -0
  67. package/dist/main.js.map +1 -0
  68. package/dist/openmrs-esm-laboratory-app.js +1 -0
  69. package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +628 -0
  70. package/dist/openmrs-esm-laboratory-app.js.map +1 -0
  71. package/dist/routes.json +1 -0
  72. package/i18next-parser.config.js +89 -0
  73. package/jest.config.js +16 -0
  74. package/package.json +121 -0
  75. package/src/completed-list/completed-list.component.tsx +242 -0
  76. package/src/completed-list/completed-list.resource.ts +0 -0
  77. package/src/completed-list/completed-list.scss +232 -0
  78. package/src/components/create-dashboard-link.component.tsx +44 -0
  79. package/src/components/overlay/hook.ts +47 -0
  80. package/src/components/overlay/overlay.component.tsx +52 -0
  81. package/src/components/overlay/overlay.scss +93 -0
  82. package/src/config-schema.ts +36 -0
  83. package/src/constants.ts +5 -0
  84. package/src/declarations.d.ts +6 -0
  85. package/src/header/laboratory-header.component.tsx +35 -0
  86. package/src/header/laboratory-header.scss +68 -0
  87. package/src/header/laboratory-illustration.component.tsx +13 -0
  88. package/src/index.ts +92 -0
  89. package/src/laboratory.component.tsx +18 -0
  90. package/src/patient-chart/laboratory-item/view-laboratory-item.component.tsx +39 -0
  91. package/src/patient-chart/laboratory-item/view-laboratory-item.resource.ts +290 -0
  92. package/src/patient-chart/laboratory-item/view-laboratory-item.scss +0 -0
  93. package/src/patient-chart/laboratory-order.component.tsx +453 -0
  94. package/src/patient-chart/laboratory-order.resource.ts +437 -0
  95. package/src/patient-chart/laboratory-order.scss +66 -0
  96. package/src/patient-chart/results-summary/print-results-summary.component.tsx +240 -0
  97. package/src/patient-chart/results-summary/print-results-summary.scss +105 -0
  98. package/src/patient-chart/results-summary/print-results-table.component.tsx +163 -0
  99. package/src/patient-chart/results-summary/results/results.component.tsx +25 -0
  100. package/src/patient-chart/results-summary/results/results.resource.ts +50 -0
  101. package/src/patient-chart/results-summary/results/results.scss +0 -0
  102. package/src/patient-chart/results-summary/results-dialog/edit-results-dialog.component.tsx +46 -0
  103. package/src/patient-chart/results-summary/results-summary.component.tsx +98 -0
  104. package/src/patient-chart/results-summary/results-summary.resource.tsx +185 -0
  105. package/src/patient-chart/results-summary/results-summary.scss +154 -0
  106. package/src/patient-chart/results-summary/send-email-dialog.component.tsx +111 -0
  107. package/src/patient-chart/results-summary/test-children-results.component.tsx +221 -0
  108. package/src/patient-chart/results-summary/test-print-results-table.component.tsx +148 -0
  109. package/src/patient-chart/results-summary/test-results-delete-action-menu.component.tsx +27 -0
  110. package/src/patient-chart/results-summary/test-results-rescend-action-menu.component.tsx +26 -0
  111. package/src/patient-chart/results-summary/test-results-table.component.tsx +153 -0
  112. package/src/patient-chart/results-summary/tests-children-detail.component.tsx +54 -0
  113. package/src/patient-chart/results-summary/views/email.handlebars +13 -0
  114. package/src/queue-list/lab-dialogs/add-to-worklist-dialog.component.tsx +323 -0
  115. package/src/queue-list/lab-dialogs/add-to-worklist-dialog.resource.ts +155 -0
  116. package/src/queue-list/lab-dialogs/add-to-worklist-dialog.scss +20 -0
  117. package/src/queue-list/lab-tests/lab-tests.component.tsx +116 -0
  118. package/src/queue-list/lab-tests/lab-tests.resource.ts +17 -0
  119. package/src/queue-list/lab-tests/lab-tests.scss +12 -0
  120. package/src/queue-list/laboratory-patient-list.component.tsx +277 -0
  121. package/src/queue-list/laboratory-patient-list.resource.ts +86 -0
  122. package/src/queue-list/laboratory-queue.component.tsx +120 -0
  123. package/src/queue-list/laboratory-queue.scss +213 -0
  124. package/src/queue-list/laboratory-tabs.component.tsx +81 -0
  125. package/src/queue-list/pick-lab-request-menu.component.tsx +38 -0
  126. package/src/reject-order/reject-order-dialog.component.tsx +114 -0
  127. package/src/reject-order/reject-order-dialog.resource.ts +14 -0
  128. package/src/reject-order/reject-order-dialog.scss +14 -0
  129. package/src/results/result-form.component.tsx +223 -0
  130. package/src/results/result-form.resource.ts +328 -0
  131. package/src/results/result-form.scss +19 -0
  132. package/src/review-list/dialog/review-item.component.tsx +283 -0
  133. package/src/review-list/dialog/review-item.resource.ts +14 -0
  134. package/src/review-list/dialog/review-item.scss +0 -0
  135. package/src/review-list/review-list.component.tsx +277 -0
  136. package/src/review-list/review-list.resource.ts +0 -0
  137. package/src/review-list/review-list.scss +189 -0
  138. package/src/root.component.tsx +15 -0
  139. package/src/root.scss +50 -0
  140. package/src/routes.json +72 -0
  141. package/src/setup-tests.ts +1 -0
  142. package/src/summary-tiles/laboratory-summary-tiles.component.tsx +53 -0
  143. package/src/summary-tiles/laboratory-summary-tiles.scss +12 -0
  144. package/src/summary-tiles/laboratory-summary.resource.tsx +50 -0
  145. package/src/summary-tiles/summary-tile.component.tsx +48 -0
  146. package/src/summary-tiles/summary-tile.scss +43 -0
  147. package/src/types/index.ts +412 -0
  148. package/src/types/patient-queues.ts +189 -0
  149. package/src/utils/functions.ts +246 -0
  150. package/src/work-list/work-list.component.tsx +310 -0
  151. package/src/work-list/work-list.resource.ts +136 -0
  152. package/src/work-list/work-list.scss +215 -0
  153. package/translations/en.json +16 -0
  154. package/translations/es.json +3 -0
  155. package/translations/fr.json +3 -0
  156. package/tsconfig.json +23 -0
  157. package/webpack.config.js +29 -0
@@ -0,0 +1,44 @@
1
+ import React, { useMemo } from "react";
2
+ import { ConfigurableLink } from "@openmrs/esm-framework";
3
+ import { BrowserRouter, useLocation } from "react-router-dom";
4
+
5
+ export interface DashboardLinkConfig {
6
+ name: string;
7
+ title: string;
8
+ slot?: string;
9
+ }
10
+
11
+ function DashboardExtension({
12
+ dashboardLinkConfig,
13
+ }: {
14
+ dashboardLinkConfig: DashboardLinkConfig;
15
+ }) {
16
+ const { name, title } = dashboardLinkConfig;
17
+ const location = useLocation();
18
+ const spaBasePath = `${window.spaBase}/home`;
19
+
20
+ const navLink = useMemo(() => {
21
+ const pathArray = location.pathname.split("/home");
22
+ const lastElement = pathArray[pathArray.length - 1];
23
+ return decodeURIComponent(lastElement);
24
+ }, [location.pathname]);
25
+
26
+ return (
27
+ <ConfigurableLink
28
+ to={`${spaBasePath}/${name}`}
29
+ className={`cds--side-nav__link ${
30
+ navLink.match(name) && "active-left-nav-link"
31
+ }`}
32
+ >
33
+ {title}
34
+ </ConfigurableLink>
35
+ );
36
+ }
37
+
38
+ export const createHomeDashboardLink =
39
+ (dashboardLinkConfig: DashboardLinkConfig) => () =>
40
+ (
41
+ <BrowserRouter>
42
+ <DashboardExtension dashboardLinkConfig={dashboardLinkConfig} />
43
+ </BrowserRouter>
44
+ );
@@ -0,0 +1,47 @@
1
+ import { getGlobalStore } from "@openmrs/esm-framework";
2
+ import { useEffect, useState } from "react";
3
+
4
+ interface OverlayStore {
5
+ isOverlayOpen: boolean;
6
+ component?: any;
7
+ header: string;
8
+ }
9
+
10
+ const initialState = { isOverlayOpen: false, component: Function, header: "" };
11
+
12
+ const getOverlayStore = () => {
13
+ return getGlobalStore("laboratory", initialState);
14
+ };
15
+
16
+ export const launchOverlay = (headerTitle: string, componentToRender) => {
17
+ const store = getOverlayStore();
18
+ store.setState({
19
+ isOverlayOpen: true,
20
+ component: componentToRender,
21
+ header: headerTitle,
22
+ });
23
+ };
24
+
25
+ export const closeOverlay = () => {
26
+ const store = getOverlayStore();
27
+ store.setState({ component: null, isOverlayOpen: false });
28
+ };
29
+
30
+ export const useOverlay = () => {
31
+ const [overlay, setOverlay] = useState<OverlayStore>();
32
+
33
+ useEffect(() => {
34
+ function update(state: OverlayStore) {
35
+ setOverlay(state);
36
+ }
37
+
38
+ update(getOverlayStore().getState());
39
+ getOverlayStore().subscribe(update);
40
+ }, []);
41
+
42
+ return {
43
+ isOverlayOpen: overlay?.isOverlayOpen,
44
+ component: overlay?.component,
45
+ header: overlay?.header,
46
+ };
47
+ };
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Button, Header } from "@carbon/react";
3
+ import { ArrowLeft, Close } from "@carbon/react/icons";
4
+ import { useLayoutType } from "@openmrs/esm-framework";
5
+ import styles from "./overlay.scss";
6
+ import { useTranslation } from "react-i18next";
7
+ import { closeOverlay, useOverlay } from "./hook";
8
+
9
+ const Overlay: React.FC = () => {
10
+ const { header, component, isOverlayOpen } = useOverlay();
11
+ const layout = useLayoutType();
12
+ const { t } = useTranslation();
13
+ return (
14
+ <>
15
+ {isOverlayOpen && (
16
+ <div
17
+ className={
18
+ layout !== "tablet" ? styles.desktopOverlay : styles.tabletOverlay
19
+ }
20
+ >
21
+ {layout !== "tablet" ? (
22
+ <div className={styles.desktopHeader}>
23
+ <div className={styles.headerContent}>{header}</div>
24
+ <Button
25
+ className={styles.closePanelButton}
26
+ onClick={() => closeOverlay()}
27
+ kind="ghost"
28
+ hasIconOnly
29
+ >
30
+ <Close size={16} />
31
+ </Button>
32
+ </div>
33
+ ) : (
34
+ <Header
35
+ onClick={() => closeOverlay()}
36
+ aria-label={t("tabletOverlay", "Tablet overlay")}
37
+ className={styles.tabletOverlayHeader}
38
+ >
39
+ <Button hasIconOnly>
40
+ <ArrowLeft size={16} />
41
+ </Button>
42
+ <div className={styles.headerContent}>{header}</div>
43
+ </Header>
44
+ )}
45
+ <div>{component}</div>
46
+ </div>
47
+ )}
48
+ </>
49
+ );
50
+ };
51
+
52
+ export default Overlay;
@@ -0,0 +1,93 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+ @import '~@openmrs/esm-styleguide/src/vars';
4
+ @import '../../root.scss';
5
+
6
+ .desktopOverlay {
7
+ position: fixed;
8
+ top: spacing.$spacing-09;
9
+ width: 37rem;
10
+ right: 0;
11
+ bottom: 0;
12
+ border-left: 1px solid $text-03;
13
+ background-color: $ui-01;
14
+ overflow-y: auto;
15
+ height: calc(100vh - 3rem);
16
+ }
17
+
18
+ .desktopOverlay::after {
19
+ height: 100%;
20
+ border-left: 1px solid $text-03;
21
+ }
22
+
23
+ .tabletOverlay {
24
+ position: fixed;
25
+ top: 0;
26
+ bottom: 0;
27
+ left: 0;
28
+ right: 0;
29
+ z-index: 9999;
30
+ background-color: $ui-01;
31
+ overflow-y: scroll;
32
+ -ms-overflow-style: none;
33
+ scrollbar-width: none;
34
+
35
+ &::-webkit-scrollbar {
36
+ width: 0;
37
+ }
38
+
39
+ &>div {
40
+ margin-top: spacing.$spacing-09;
41
+ }
42
+ }
43
+
44
+ .tabletOverlayHeader {
45
+ button {
46
+ @include brand-01(background-color);
47
+ }
48
+
49
+ .headerContent {
50
+ color: $ui-02;
51
+ }
52
+ }
53
+
54
+ .desktopHeader {
55
+ display: flex;
56
+ justify-content: space-between;
57
+ align-items: center;
58
+ background-color: $ui-03;
59
+ border-bottom: 1px solid $text-03;
60
+ position: sticky;
61
+ position: -webkit-sticky;
62
+ width: 100%;
63
+ z-index: 1000;
64
+ top: 0;
65
+ }
66
+
67
+ .headerContent {
68
+ @include type.type-style('heading-compact-02');
69
+ padding: 0 spacing.$spacing-05;
70
+ color: $ui-05;
71
+ }
72
+
73
+ .closeButton {
74
+ background-color: $ui-background;
75
+ color: $ui-05;
76
+ fill: $ui-05;
77
+ }
78
+
79
+ /* Desktop */
80
+ :global(.omrs-breakpoint-gt-tablet) {
81
+ .overlayContent {
82
+ padding: 0 0 0 0;
83
+ overflow-y: auto;
84
+ }
85
+ }
86
+
87
+ /* Tablet */
88
+ :global(.omrs-breakpoint-lt-desktop) {
89
+ .overlayContent {
90
+ padding: 0 0 0 0;
91
+ overflow-y: auto;
92
+ }
93
+ }
@@ -0,0 +1,36 @@
1
+ import { Type } from "@openmrs/esm-framework";
2
+
3
+ export const configSchema = {
4
+ laboratoryQueueConcept: {
5
+ _type: Type.String,
6
+ _default: "1836ac8a-a855-4c7e-b2ba-a290233c67b7",
7
+ _description: "Concept uuid for the laboratory queue.",
8
+ },
9
+ laboratoryLocationTag: {
10
+ _type: Type.String,
11
+ _default: "Laboratory",
12
+ _description: "Location tag for laboratory locations.",
13
+ },
14
+ laboratorySpecimenTypeConcept: {
15
+ _type: Type.ConceptUuid,
16
+ _default: "159959AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
17
+ _description: "Concept UUID for laboratory specimen types",
18
+ },
19
+ laboratoryEncounterTypeUuid: {
20
+ _type: Type.String,
21
+ _default: "214e27a1-606a-4b1e-a96e-d736c87069d5",
22
+ _description: "Concept uuid for the laboratory tool encounter type.",
23
+ },
24
+ laboratoryOrderTypeUuid: {
25
+ _type: Type.String,
26
+ _default: "52a447d3-a64a-11e3-9aeb-50e549534c5e",
27
+ _description: "Uuid for orderType",
28
+ },
29
+ };
30
+
31
+ export type Config = {
32
+ laboratoryQueueConcept: string;
33
+ laboratoryLocationTag: string;
34
+ laboratorySpecimenTypeConcept: string;
35
+ laboratoryEncounterTypeUuid: string;
36
+ };
@@ -0,0 +1,5 @@
1
+ export const moduleName = "@openmrs/esm-laboratory-app";
2
+
3
+ export const LABORATARORY_ENCOUNTER_TYPE =
4
+ "cbf01392-ca29-11e9-a32f-2a2ae2dbcce4";
5
+ export const TEST_ORDER_ENCOUNTER_TYPE = "dca07f4a-30ab-102d-86b0-7a5022ba4115";
@@ -0,0 +1,6 @@
1
+ declare module "@carbon/react";
2
+ declare module "*.css";
3
+ declare module "*.scss";
4
+ declare module "*.png";
5
+
6
+ declare type SideNavProps = object;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Calendar, Location } from "@carbon/react/icons";
4
+ import { useSession, formatDate } from "@openmrs/esm-framework";
5
+ import LaboratoryIllustration from "./laboratory-illustration.component";
6
+ import styles from "./laboratory-header.scss";
7
+
8
+ export const LaboratoryHeader: React.FC = () => {
9
+ const { t } = useTranslation();
10
+ const userSession = useSession();
11
+ const userLocation = userSession?.sessionLocation?.display;
12
+
13
+ return (
14
+ <div className={styles.header}>
15
+ <div className={styles["left-justified-items"]}>
16
+ <LaboratoryIllustration />
17
+ <div className={styles["page-labels"]}>
18
+ {/* <p>{t('laboratory', 'Laboratory')}</p> */}
19
+ <p className={styles["page-name"]}>{t("laboratory", "Laboratory")}</p>
20
+ </div>
21
+ </div>
22
+ <div className={styles["right-justified-items"]}>
23
+ <div className={styles["date-and-location"]}>
24
+ <Location size={16} />
25
+ <span className={styles.value}>{userLocation}</span>
26
+ <span className={styles.middot}>&middot;</span>
27
+ <Calendar size={16} />
28
+ <span className={styles.value}>
29
+ {formatDate(new Date(), { mode: "standard" })}
30
+ </span>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ );
35
+ };
@@ -0,0 +1,68 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+ @import '~@openmrs/esm-styleguide/src/vars';
4
+
5
+ .header {
6
+ @include type.type-style('body-compact-02');
7
+ color: $text-02;
8
+ height: spacing.$spacing-12;
9
+ background-color: $ui-02;
10
+ display: flex;
11
+ justify-content: space-between;
12
+ }
13
+
14
+ .left-justified-items {
15
+ display: flex;
16
+ flex-direction: row;
17
+ align-items: center;
18
+ margin-left: 0.75rem;
19
+ }
20
+
21
+ .right-justified-items {
22
+ @include type.type-style('body-compact-02');
23
+ color: $text-02;
24
+ padding-top: 1rem;
25
+ }
26
+
27
+ .page-name {
28
+ @include type.type-style('heading-04');
29
+ }
30
+
31
+ .page-labels {
32
+ margin-left: 1rem;
33
+
34
+ p:first-of-type {
35
+ margin-bottom: 0.25rem;
36
+ }
37
+ }
38
+
39
+ .date-and-location {
40
+ display: flex;
41
+ justify-content: flex-end;
42
+ align-items: center;
43
+ margin-right: 1rem;
44
+ }
45
+
46
+ .value {
47
+ margin-left: 0.25rem;
48
+ }
49
+
50
+ .middot {
51
+ margin: 0 0.5rem;
52
+ }
53
+
54
+ .view {
55
+ @include type.type-style('label-01');
56
+ }
57
+
58
+ svg.iconOverrides {
59
+ width: 72 !important;
60
+ height: 72 !important;
61
+ fill: var(--brand-03);
62
+ }
63
+
64
+ .svgContainer svg {
65
+ width: 72px;
66
+ height: 72px;
67
+ fill: var(--brand-03);
68
+ }
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Microscope } from "@carbon/react/icons";
3
+ import styles from "./laboratory-header.scss";
4
+
5
+ const LaboratoryIllustration: React.FC = () => {
6
+ return (
7
+ <div className={styles.svgContainer}>
8
+ <Microscope className={styles.iconOverrides} />
9
+ </div>
10
+ );
11
+ };
12
+
13
+ export default LaboratoryIllustration;
package/src/index.ts ADDED
@@ -0,0 +1,92 @@
1
+ import {
2
+ getAsyncLifecycle,
3
+ defineConfigSchema,
4
+ getSyncLifecycle,
5
+ } from "@openmrs/esm-framework";
6
+ import { configSchema } from "./config-schema";
7
+ import { createHomeDashboardLink } from "./components/create-dashboard-link.component";
8
+ import { createDashboardLink } from "@openmrs/esm-patient-common-lib";
9
+
10
+ const moduleName = "@openmrs/esm-laboratory-app";
11
+
12
+ const options = {
13
+ featureName: "ugandaemr-laboratory",
14
+ moduleName,
15
+ };
16
+
17
+ export const importTranslation = require.context(
18
+ "../translations",
19
+ false,
20
+ /.json$/,
21
+ "lazy"
22
+ );
23
+
24
+ export const root = getAsyncLifecycle(
25
+ () => import("./root.component"),
26
+ options
27
+ );
28
+
29
+ export const laboratoryDashboardLink = getSyncLifecycle(
30
+ createHomeDashboardLink({
31
+ name: "laboratory",
32
+ slot: "laboratory-dashboard-slot",
33
+ title: "Laboratory",
34
+ }),
35
+ options
36
+ );
37
+
38
+ export const laboratoryComponent = getAsyncLifecycle(
39
+ () => import("./laboratory.component"),
40
+ options
41
+ );
42
+
43
+ // Patient chart
44
+ export const laboratoryOrderDashboardLink = getSyncLifecycle(
45
+ createDashboardLink({
46
+ path: "laboratory-orders",
47
+ title: "Investigative Results",
48
+ moduleName,
49
+ }),
50
+ options
51
+ );
52
+ export const laboratoryOrderComponent = getAsyncLifecycle(
53
+ () => import("./patient-chart/laboratory-order.component"),
54
+ options
55
+ );
56
+
57
+ export const addToWorklistDialog = getAsyncLifecycle(
58
+ () => import("./queue-list/lab-dialogs/add-to-worklist-dialog.component"),
59
+ options
60
+ );
61
+
62
+ export const sendEmailDialog = getAsyncLifecycle(
63
+ () => import("./patient-chart/results-summary/send-email-dialog.component"),
64
+ options
65
+ );
66
+
67
+ export const resultsSummaryWorkSpace = getAsyncLifecycle(
68
+ () => import("./patient-chart/results-summary/results-summary.component"),
69
+ options
70
+ );
71
+
72
+ export const editResultsDialog = getAsyncLifecycle(
73
+ () =>
74
+ import(
75
+ "./patient-chart/results-summary/results-dialog/edit-results-dialog.component"
76
+ ),
77
+ options
78
+ );
79
+
80
+ export const reviewItemDialog = getAsyncLifecycle(
81
+ () => import("./review-list/dialog/review-item.component"),
82
+ options
83
+ );
84
+
85
+ export const rejectOrderDialog = getAsyncLifecycle(
86
+ () => import("./reject-order/reject-order-dialog.component"),
87
+ options
88
+ );
89
+
90
+ export function startupApp() {
91
+ defineConfigSchema(moduleName, configSchema);
92
+ }
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { LaboratoryHeader } from "./header/laboratory-header.component";
3
+ import LaboratorySummaryTiles from "./summary-tiles/laboratory-summary-tiles.component";
4
+ import LaboratoryQueueList from "./queue-list/laboratory-tabs.component";
5
+ import Overlay from "./components/overlay/overlay.component";
6
+
7
+ const Laboratory: React.FC = () => {
8
+ return (
9
+ <div className={`omrs-main-content`}>
10
+ <LaboratoryHeader />
11
+ <LaboratorySummaryTiles />
12
+ <LaboratoryQueueList />
13
+ <Overlay />
14
+ </div>
15
+ );
16
+ };
17
+
18
+ export default Laboratory;
@@ -0,0 +1,39 @@
1
+ import React, { useCallback } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Button, Tooltip } from "@carbon/react";
4
+ import { View } from "@carbon/react/icons";
5
+ import { launchPatientWorkspace } from "@openmrs/esm-patient-common-lib";
6
+ import { EncounterResponse } from "./view-laboratory-item.resource";
7
+
8
+ interface ViewLaboratoryItemActionMenuProps {
9
+ closeModal: () => void;
10
+ encounter: EncounterResponse;
11
+ }
12
+
13
+ const ViewLaboratoryItemActionMenu: React.FC<
14
+ ViewLaboratoryItemActionMenuProps
15
+ > = ({ encounter }) => {
16
+ const { t } = useTranslation();
17
+
18
+ const handleClick = useCallback(
19
+ () =>
20
+ launchPatientWorkspace("results-summary", {
21
+ workspaceTitle: `Results Summary Form`,
22
+ encounter,
23
+ }),
24
+ [encounter]
25
+ );
26
+
27
+ return (
28
+ <Tooltip align="bottom" label="View Results">
29
+ <Button
30
+ kind="ghost"
31
+ onClick={handleClick}
32
+ iconDescription={t("viewResults", "View Results ")}
33
+ renderIcon={(props) => <View size={16} {...props} />}
34
+ ></Button>
35
+ </Tooltip>
36
+ );
37
+ };
38
+
39
+ export default ViewLaboratoryItemActionMenu;