From bf81ee23dd6a0f666e059053b4ec7e4350c4250a Mon Sep 17 00:00:00 2001 From: jabahum Date: Mon, 12 Aug 2024 19:57:51 +0300 Subject: [PATCH] add art number on all lists --- .../completed-list.component.tsx | 21 +++++++++++----- .../referred-orders.component.tsx | 1 - .../rejected-tests-list.component.tsx | 16 +++++++------ src/review-list/review-list.component.tsx | 21 +++++++++++----- src/work-list/work-list.component.tsx | 24 ++++++++++++------- 5 files changed, 55 insertions(+), 28 deletions(-) diff --git a/src/completed-list/completed-list.component.tsx b/src/completed-list/completed-list.component.tsx index 8fab2d00..98b0b5e9 100644 --- a/src/completed-list/completed-list.component.tsx +++ b/src/completed-list/completed-list.component.tsx @@ -53,16 +53,17 @@ const CompletedList: React.FC = ({ fulfillerStatus }) => { const tableColumns = [ { 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, header: t("artNumber", "Art Number"), key: "artNumber" }, + { id: 3, header: t("patient", "Patient"), key: "patient" }, { - id: 3, + id: 4, header: t("accessionNumber", "Accession Number"), key: "accessionNumber", }, - { id: 4, header: t("test", "Test"), key: "test" }, - { id: 5, header: t("status", "Status"), key: "status" }, - { id: 6, header: t("orderer", "Ordered By"), key: "orderer" }, - { id: 7, header: t("urgency", "Urgency"), key: "urgency" }, + { id: 5, header: t("test", "Test"), key: "test" }, + { id: 6, header: t("status", "Status"), key: "status" }, + { id: 7, header: t("orderer", "Ordered By"), key: "orderer" }, + { id: 8, header: t("urgency", "Urgency"), key: "urgency" }, ]; const tableRows = useMemo(() => { @@ -86,6 +87,14 @@ const CompletedList: React.FC = ({ fulfillerStatus }) => { ), orderNumber: entry?.orderNumber, + artNumber: entry.patient?.identifiers + .find( + (item) => + item?.identifierType?.uuid === + "e1731641-30ab-102d-86b0-7a5022ba4115" + ) + ?.display.split("=")[1] + .trim(), accessionNumber: entry?.accessionNumber, test: entry?.concept?.display, action: entry?.action, diff --git a/src/referred-orders/referred-orders.component.tsx b/src/referred-orders/referred-orders.component.tsx index dbd49f99..d9924274 100644 --- a/src/referred-orders/referred-orders.component.tsx +++ b/src/referred-orders/referred-orders.component.tsx @@ -64,7 +64,6 @@ const ReferredOrdersList: React.FC = () => { { id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" }, { id: 2, header: t("patient", "Patient"), key: "patient" }, { id: 3, header: t("artNumber", "Art Number"), key: "artNumber" }, - { id: 4, header: t("accessionNumber", "Accession Number"), diff --git a/src/reject-order/rejected-tests-list.component.tsx b/src/reject-order/rejected-tests-list.component.tsx index d710f94f..329a76b7 100644 --- a/src/reject-order/rejected-tests-list.component.tsx +++ b/src/reject-order/rejected-tests-list.component.tsx @@ -49,19 +49,21 @@ const RejectedTestsList: React.FC = () => { { id: 0, header: t("date", "Date"), key: "date" }, { id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" }, + { id: 2, header: t("artNumber", "Art Number"), key: "artNumber" }, + { - id: 2, + id: 3, header: t("accessionNumber", "Accession Number"), key: "accessionNumber", }, - { id: 3, header: t("patient", "Patient"), key: "patient" }, - { id: 4, header: t("artNumber", "Art Number"), key: "artNumber" }, + { id: 4, header: t("patient", "Patient"), key: "patient" }, + { id: 5, header: t("artNumber", "Art Number"), key: "artNumber" }, - { id: 5, header: t("test", "Test"), key: "test" }, - { id: 6, header: t("orderer", "Ordered By"), key: "orderer" }, - { id: 7, header: t("urgency", "Urgency"), key: "urgency" }, + { id: 6, header: t("test", "Test"), key: "test" }, + { id: 7, header: t("orderer", "Ordered By"), key: "orderer" }, + { id: 8, header: t("urgency", "Urgency"), key: "urgency" }, { - id: 8, + id: 9, header: t("fulfillerComment", "Reason for Rejection"), key: "fulfillerComment", }, diff --git a/src/review-list/review-list.component.tsx b/src/review-list/review-list.component.tsx index 5a5e0e7d..3ad26c1f 100644 --- a/src/review-list/review-list.component.tsx +++ b/src/review-list/review-list.component.tsx @@ -96,17 +96,18 @@ const ReviewList: 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, header: t("artNumber", "Art Number"), key: "artNumber" }, + { id: 3, header: t("patient", "Patient"), key: "patient" }, { - id: 3, + id: 4, header: t("accessionNumber", "Accession Number"), key: "accessionNumber", }, - { id: 4, header: t("test", "Test"), key: "test" }, - { id: 5, header: t("status", "Status"), key: "status" }, - { id: 6, header: t("orderer", "Ordered By"), key: "orderer" }, - { id: 7, header: t("urgency", "Urgency"), key: "urgency" }, + { id: 5, header: t("test", "Test"), key: "test" }, + { id: 6, header: t("status", "Status"), key: "status" }, + { id: 7, header: t("orderer", "Ordered By"), key: "orderer" }, + { id: 8, header: t("urgency", "Urgency"), key: "urgency" }, ]; const tableRows = useMemo(() => { @@ -116,6 +117,14 @@ const ReviewList: React.FC = ({ fulfillerStatus }) => { date: formatDate(parseDate(entry?.dateActivated)), patient: entry?.patient?.display.split("-")[1], orderNumber: entry?.orderNumber, + artNumber: entry.patient?.identifiers + .find( + (item) => + item?.identifierType?.uuid === + "e1731641-30ab-102d-86b0-7a5022ba4115" + ) + ?.display.split("=")[1] + .trim(), accessionNumber: entry?.accessionNumber, test: entry?.concept?.display, action: entry?.action, diff --git a/src/work-list/work-list.component.tsx b/src/work-list/work-list.component.tsx index 104713eb..cd12a5fa 100644 --- a/src/work-list/work-list.component.tsx +++ b/src/work-list/work-list.component.tsx @@ -95,18 +95,18 @@ 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, header: t("artNumber", "Art Number"), key: "artNumber" }, + { id: 3, header: t("patient", "Patient"), key: "patient" }, { - id: 3, + id: 4, header: t("accessionNumber", "Accession Number"), key: "accessionNumber", }, - { id: 4, header: t("test", "Test"), key: "test" }, - { id: 5, header: t("status", "Status"), key: "status" }, - { id: 6, header: t("orderer", "Ordered By"), key: "orderer" }, - { id: 7, header: t("urgency", "Urgency"), key: "urgency" }, - { id: 8, header: t("actions", "Actions"), key: "actions" }, + { id: 5, header: t("test", "Test"), key: "test" }, + { id: 6, header: t("status", "Status"), key: "status" }, + { id: 7, header: t("orderer", "Ordered By"), key: "orderer" }, + { id: 8, header: t("urgency", "Urgency"), key: "urgency" }, + { id: 9, header: t("actions", "Actions"), key: "actions" }, ]; const ResultsOrder = useCallback( @@ -140,6 +140,14 @@ const WorkList: React.FC = ({ fulfillerStatus }) => { ), orderNumber: entry?.orderNumber, + artNumber: entry.patient?.identifiers + .find( + (item) => + item?.identifierType?.uuid === + "e1731641-30ab-102d-86b0-7a5022ba4115" + ) + ?.display.split("=")[1] + .trim(), accessionNumber: entry?.accessionNumber, test: entry?.concept?.display, action: entry?.action,