diff --git a/src/ui-components/overflow-menu.component.tsx b/src/ui-components/overflow-menu.component.tsx
new file mode 100644
index 00000000..906324fd
--- /dev/null
+++ b/src/ui-components/overflow-menu.component.tsx
@@ -0,0 +1,88 @@
+import React, { useState, useCallback, useEffect, useRef } from "react";
+import classNames from "classnames";
+import { useLayoutType } from "@openmrs/esm-framework";
+import styles from "./overflow-menu.scss";
+
+interface OrderCustomOverflowMenuComponentProps {
+ menuTitle: React.ReactNode;
+ children: React.ReactNode;
+}
+
+const OrderCustomOverflowMenuComponent: React.FC<
+ OrderCustomOverflowMenuComponentProps
+> = ({ children, menuTitle }) => {
+ const [showMenu, setShowMenu] = useState(false);
+ const isTablet = useLayoutType() === "tablet";
+ const wrapperRef = useRef(null);
+
+ const toggleShowMenu = useCallback(() => setShowMenu((state) => !state), []);
+
+ useEffect(() => {
+ /**
+ * Toggle showMenu if clicked on outside of element
+ */
+ function handleClickOutside(event: MouseEvent) {
+ if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
+ setShowMenu(false);
+ }
+ }
+
+ // Bind the event listener
+ document.addEventListener("mousedown", handleClickOutside);
+ return () => {
+ // Unbind the event listener on clean up
+ document.removeEventListener("mousedown", handleClickOutside);
+ };
+ }, [wrapperRef]);
+
+ return (
+
+
+
+
+ );
+};
+
+export default OrderCustomOverflowMenuComponent;
diff --git a/src/ui-components/overflow-menu.scss b/src/ui-components/overflow-menu.scss
new file mode 100644
index 00000000..c0d70b9e
--- /dev/null
+++ b/src/ui-components/overflow-menu.scss
@@ -0,0 +1,39 @@
+@use '@carbon/colors';
+@import '~@openmrs/esm-styleguide/src/vars';
+
+.container {
+ position: relative;
+ top: 0px;
+}
+
+.menu {
+ display: none;
+ top: 3.125rem;
+ min-width: initial;
+ left: auto;
+ right: 0;
+ background-color: $ui-01;
+ margin-right: 0.2rem;
+ box-shadow: 0 6px 6px rgb(0 0 0 / 30%);
+}
+
+.show {
+ display: block;
+}
+
+.overflowMenuButton {
+ width: auto;
+ height: auto;
+ padding: 0.875rem 1rem;
+ color: colors.$blue-60;
+ display: flex;
+ align-items: center;
+
+ &:hover {
+ background-color: colors.$gray-10-hover;
+ }
+}
+
+.deceased {
+ color: colors.$blue-40;
+}
\ No newline at end of file
diff --git a/src/work-list/work-list.component.tsx b/src/work-list/work-list.component.tsx
index 117894ff..1f7cf1e6 100644
--- a/src/work-list/work-list.component.tsx
+++ b/src/work-list/work-list.component.tsx
@@ -101,18 +101,19 @@ const WorkList: React.FC
= ({ fulfillerStatus }) => {
{ id: 0, header: t("date", "Date"), key: "date" },
{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
+ { id: 2, header: t("patient", "Patient"), key: "patient" },
+
{
- id: 2,
+ id: 3,
header: t("accessionNumber", "Accession Number"),
key: "accessionNumber",
},
- { id: 3, header: t("test", "Test"), key: "test" },
- { id: 4, header: t("action", "Action"), key: "action" },
- { id: 5, header: t("status", "Status"), key: "status" },
- { id: 6, header: t("orderer", "Orderer"), key: "orderer" },
- { id: 7, header: t("orderType", "Order Type"), key: "orderType" },
- { id: 8, header: t("urgency", "Urgency"), key: "urgency" },
- { id: 9, header: t("actions", "Actions"), key: "actions" },
+ { id: 4, header: t("test", "Test"), key: "test" },
+ { id: 5, header: t("action", "Action"), key: "action" },
+ { id: 6, header: t("status", "Status"), key: "status" },
+ { id: 8, header: t("orderer", "Orderer"), key: "orderer" },
+ { id: 9, header: t("urgency", "Urgency"), key: "urgency" },
+ { id: 10, header: t("actions", "Actions"), key: "actions" },
];
const ResultsOrder: React.FC = ({
@@ -124,7 +125,7 @@ const WorkList: React.FC = ({ fulfillerStatus }) => {
kind="ghost"
onClick={() => {
launchOverlay(
- t("resultForm", "Result Tests"),
+ t("resultForm", "Lab results form"),
);
}}
@@ -135,7 +136,7 @@ const WorkList: React.FC = ({ fulfillerStatus }) => {
const tableRows = useMemo(() => {
return paginatedWorkListEntries
- ?.filter((item) => item.action === "REVISE")
+ ?.filter((item) => item.fulfillerStatus === "IN_PROGRESS")
.map((entry, index) => ({
...entry,
id: entry.uuid,
@@ -146,6 +147,13 @@ const WorkList: React.FC = ({ fulfillerStatus }) => {
>
),
},
+ patient: {
+ content: (
+ <>
+ {entry.patient.display.split("-")[1]}
+ >
+ ),
+ },
orderNumber: { content: {entry.orderNumber} },
accessionNumber: { content: {entry.accessionNumber} },
test: { content: {entry.concept.display} },
@@ -267,7 +275,7 @@ const WorkList: React.FC = ({ fulfillerStatus }) => {
{t(
"noWorklistsToDisplay",
- "No workists orders to display"
+ "No worklists orders to display"
)}
diff --git a/translations/en.json b/translations/en.json
index ab242275..d624627d 100644
--- a/translations/en.json
+++ b/translations/en.json
@@ -12,5 +12,7 @@
"transferred": "Transferred",
"visitId": "Visit ID",
"waitingTime": "Waiting time",
- "worklist": "Worklist"
+ "worklist": "Worklist",
+ "rejectOrder": "Reject Order",
+ "pickLabRequest": "Pick Lab Request"
}
diff --git a/yarn.lock b/yarn.lock
index 0759deb0..0a768cc0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1684,6 +1684,15 @@ __metadata:
languageName: node
linkType: hard
+"@hookform/resolvers@npm:^3.3.4":
+ version: 3.3.4
+ resolution: "@hookform/resolvers@npm:3.3.4"
+ peerDependencies:
+ react-hook-form: ^7.0.0
+ checksum: 7761e3340d23acd092dec4023344678e62b0c0ea0ed5aa3687cd315fc339b3b965e11124d643811292e6962683357423e6fe646fffabf9b96f8322f41903924d
+ languageName: node
+ linkType: hard
+
"@humanwhocodes/config-array@npm:^0.11.13":
version: 0.11.13
resolution: "@humanwhocodes/config-array@npm:0.11.13"
@@ -4174,6 +4183,80 @@ __metadata:
languageName: node
linkType: hard
+"@openmrs/esm-laboratory-app@workspace:.":
+ version: 0.0.0-use.local
+ resolution: "@openmrs/esm-laboratory-app@workspace:."
+ dependencies:
+ "@carbon/react": ^1.14.0
+ "@hookform/resolvers": ^3.3.4
+ "@ohri/openmrs-esm-ohri-commons-lib": next
+ "@openmrs/esm-extensions": next
+ "@openmrs/esm-framework": next
+ "@openmrs/esm-patient-common-lib": next
+ "@openmrs/esm-react-utils": next
+ "@openmrs/esm-styleguide": next
+ "@swc/cli": ^0.1.62
+ "@swc/core": ^1.3.62
+ "@swc/jest": ^0.2.26
+ "@testing-library/dom": ^8.20.0
+ "@testing-library/jest-dom": ^5.16.5
+ "@testing-library/react": ^13.4.0
+ "@testing-library/user-event": ^14.4.3
+ "@types/jest": ^28.1.8
+ "@types/react": ^18.2.8
+ "@types/react-dom": ^18.2.4
+ "@types/react-router": ^5.1.20
+ "@types/react-router-dom": ^5.3.3
+ "@types/webpack-env": ^1.18.1
+ "@typescript-eslint/parser": ^5.59.9
+ carbon-components-react: ^8.34.0
+ concurrently: ^7.6.0
+ css-loader: ^6.8.1
+ dayjs: ^1.11.9
+ eslint: ^8.42.0
+ eslint-config-prettier: ^8.8.0
+ eslint-config-ts-react-important-stuff: ^3.0.0
+ eslint-plugin-prettier: ^4.2.1
+ file-saver: ^2.0.5
+ husky: ^8.0.0
+ identity-obj-proxy: ^3.0.0
+ jest: ^28.1.3
+ jest-cli: ^28.1.3
+ jest-environment-jsdom: ^28.1.3
+ lerna: ^5.6.1
+ lodash-es: ^4.17.21
+ openmrs: next
+ plotly.js: ^2.24.3
+ prettier: ^2.8.8
+ pretty-quick: ^3.1.3
+ raw-loader: ^4.0.2
+ react: ^18.2.0
+ react-csv: ^2.2.2
+ react-dom: ^18.2.0
+ react-hook-form: ^7.49.3
+ react-i18next: ^11.18.6
+ react-pivottable: ^0.11.0
+ react-plotly.js: ^2.0.0
+ react-router-dom: ^6.11.2
+ react-table: ^7.8.0
+ react-to-print: ^2.14.15
+ rxjs: ^6.6.7
+ swc-loader: ^0.2.3
+ turbo: ^1.10.12
+ typescript: ^4.9.5
+ webpack: ^5.88.1
+ webpack-cli: ^5.1.3
+ zod: ^3.22.4
+ peerDependencies:
+ "@openmrs/esm-framework": "*"
+ dayjs: 1.x
+ react: 18.x
+ react-i18next: 11.x
+ react-router-dom: 6.x
+ rxjs: 6.x
+ languageName: unknown
+ linkType: soft
+
"@openmrs/esm-offline@npm:^5.2.1-pre.1120":
version: 5.2.1-pre.1129
resolution: "@openmrs/esm-offline@npm:5.2.1-pre.1129"
@@ -6535,77 +6618,6 @@ __metadata:
languageName: node
linkType: hard
-"@ugandaemr/openmrs-esm-laboratory-app@workspace:.":
- version: 0.0.0-use.local
- resolution: "@ugandaemr/openmrs-esm-laboratory-app@workspace:."
- dependencies:
- "@carbon/react": ^1.14.0
- "@ohri/openmrs-esm-ohri-commons-lib": next
- "@openmrs/esm-extensions": next
- "@openmrs/esm-framework": next
- "@openmrs/esm-patient-common-lib": next
- "@openmrs/esm-react-utils": next
- "@openmrs/esm-styleguide": next
- "@swc/cli": ^0.1.62
- "@swc/core": ^1.3.62
- "@swc/jest": ^0.2.26
- "@testing-library/dom": ^8.20.0
- "@testing-library/jest-dom": ^5.16.5
- "@testing-library/react": ^13.4.0
- "@testing-library/user-event": ^14.4.3
- "@types/jest": ^28.1.8
- "@types/react": ^18.2.8
- "@types/react-dom": ^18.2.4
- "@types/react-router": ^5.1.20
- "@types/react-router-dom": ^5.3.3
- "@types/webpack-env": ^1.18.1
- "@typescript-eslint/parser": ^5.59.9
- carbon-components-react: ^8.34.0
- concurrently: ^7.6.0
- css-loader: ^6.8.1
- dayjs: ^1.11.9
- eslint: ^8.42.0
- eslint-config-prettier: ^8.8.0
- eslint-config-ts-react-important-stuff: ^3.0.0
- eslint-plugin-prettier: ^4.2.1
- file-saver: ^2.0.5
- husky: ^8.0.0
- identity-obj-proxy: ^3.0.0
- jest: ^28.1.3
- jest-cli: ^28.1.3
- jest-environment-jsdom: ^28.1.3
- lerna: ^5.6.1
- lodash-es: ^4.17.21
- openmrs: next
- plotly.js: ^2.24.3
- prettier: ^2.8.8
- pretty-quick: ^3.1.3
- raw-loader: ^4.0.2
- react: ^18.2.0
- react-csv: ^2.2.2
- react-dom: ^18.2.0
- react-i18next: ^11.18.6
- react-pivottable: ^0.11.0
- react-plotly.js: ^2.0.0
- react-router-dom: ^6.11.2
- react-table: ^7.8.0
- react-to-print: ^2.14.15
- rxjs: ^6.6.7
- swc-loader: ^0.2.3
- turbo: ^1.10.12
- typescript: ^4.9.5
- webpack: ^5.88.1
- webpack-cli: ^5.1.3
- peerDependencies:
- "@openmrs/esm-framework": "*"
- dayjs: 1.x
- react: 18.x
- react-i18next: 11.x
- react-router-dom: 6.x
- rxjs: 6.x
- languageName: unknown
- linkType: soft
-
"@ungap/structured-clone@npm:^1.2.0":
version: 1.2.0
resolution: "@ungap/structured-clone@npm:1.2.0"
@@ -19112,6 +19124,15 @@ __metadata:
languageName: node
linkType: hard
+"react-hook-form@npm:^7.49.3":
+ version: 7.49.3
+ resolution: "react-hook-form@npm:7.49.3"
+ peerDependencies:
+ react: ^16.8.0 || ^17 || ^18
+ checksum: 9769845e2749f5c9d1d033be3819bc572ffa67f19ec2e567c61a58d0d060107facdf8425aab253c2e667c00853b7706a50bd6739fca6228c284c9313420ca26f
+ languageName: node
+ linkType: hard
+
"react-i18next@npm:^11.18.6":
version: 11.18.6
resolution: "react-i18next@npm:11.18.6"
@@ -23615,6 +23636,13 @@ __metadata:
languageName: node
linkType: hard
+"zod@npm:^3.22.4":
+ version: 3.22.4
+ resolution: "zod@npm:3.22.4"
+ checksum: 80bfd7f8039b24fddeb0718a2ec7c02aa9856e4838d6aa4864335a047b6b37a3273b191ef335bf0b2002e5c514ef261ffcda5a589fb084a48c336ffc4cdbab7f
+ languageName: node
+ linkType: hard
+
"zustand@npm:^4.3.6":
version: 4.4.6
resolution: "zustand@npm:4.4.6"