Skip to content

Commit

Permalink
Add art number on all lists (#13)
Browse files Browse the repository at this point in the history
Add art number on all lists (#13)
  • Loading branch information
jabahum authored Aug 13, 2024
1 parent 69ca283 commit cfa8c58
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 28 deletions.
21 changes: 15 additions & 6 deletions src/completed-list/completed-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ const CompletedList: React.FC<CompletedListProps> = ({ 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(() => {
Expand All @@ -86,6 +87,14 @@ const CompletedList: React.FC<CompletedListProps> = ({ fulfillerStatus }) => {
</ConfigurableLink>
),
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,
Expand Down
1 change: 0 additions & 1 deletion src/referred-orders/referred-orders.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
16 changes: 9 additions & 7 deletions src/reject-order/rejected-tests-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
21 changes: 15 additions & 6 deletions src/review-list/review-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,18 @@ const ReviewList: React.FC<ReviewlistProps> = ({ 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(() => {
Expand All @@ -116,6 +117,14 @@ const ReviewList: React.FC<ReviewlistProps> = ({ 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,
Expand Down
24 changes: 16 additions & 8 deletions src/work-list/work-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ const WorkList: React.FC<WorklistProps> = ({ 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(
Expand Down Expand Up @@ -140,6 +140,14 @@ const WorkList: React.FC<WorklistProps> = ({ fulfillerStatus }) => {
</ConfigurableLink>
),
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,
Expand Down

0 comments on commit cfa8c58

Please sign in to comment.