Skip to content

Commit

Permalink
fix name display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahum committed Oct 11, 2024
1 parent 42c54f9 commit 3f6c777
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/completed-list/completed-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const CompletedList: React.FC<CompletedListProps> = ({ fulfillerStatus }) => {
<ConfigurableLink
to={`\${openmrsSpaBase}/patient/${entry?.patient?.uuid}/chart/laboratory-orders`}
>
{entry?.patient?.display.split("-")[1]}
{entry?.patient?.names[0]?.display}
</ConfigurableLink>
),
orderNumber: entry?.orderNumber,
Expand Down
4 changes: 1 addition & 3 deletions src/referred-orders/referred-orders.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import {
TableToolbarSearch,
Layer,
Tile,
DatePicker,
DatePickerInput,
} from "@carbon/react";
import { getStatusColor, useOrderDate } from "../utils/functions";
import styles from "./referred-orders.scss";
Expand Down Expand Up @@ -83,7 +81,7 @@ const ReferredOrdersList: React.FC = () => {
<ConfigurableLink
to={`\${openmrsSpaBase}/patient/${entry?.patient?.uuid}/chart/laboratory-orders`}
>
{entry?.patient?.display.split("-")[1]}
{entry?.patient?.names[0]?.display}
</ConfigurableLink>
),
artNumber: entry.patient?.identifiers
Expand Down
11 changes: 5 additions & 6 deletions src/reject-order/rejected-tests-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ const RejectedTestsList: React.FC = () => {
key: "accessionNumber",
},
{ id: 4, header: t("patient", "Patient"), key: "patient" },
{ id: 5, header: t("artNumber", "Art Number"), key: "artNumber" },

{ 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: 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: 9,
id: 8,
header: t("fulfillerComment", "Reason for Rejection"),
key: "fulfillerComment",
},
Expand All @@ -78,7 +77,7 @@ const RejectedTestsList: React.FC = () => {
{formatDate(parseDate(entry?.dateActivated))}
</span>
),
patient: entry?.patient?.display.split("-")[1],
patient: entry?.patient?.names[0]?.display,
artNumber: entry.patient?.identifiers
.find(
(item) =>
Expand Down
2 changes: 1 addition & 1 deletion src/review-list/review-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const ReviewList: React.FC<ReviewlistProps> = ({ fulfillerStatus }) => {
...entry,
id: entry?.uuid,
date: formatDate(parseDate(entry?.dateActivated)),
patient: entry?.patient?.display.split("-")[1],
patient: entry?.patient?.names[0]?.display,
orderNumber: entry?.orderNumber,
artNumber: entry.patient?.identifiers
.find(
Expand Down
2 changes: 1 addition & 1 deletion src/tests-ordered/tests-ordered-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const TestsOrderedList: React.FC<LaboratoryPatientListProps> = () => {
{formatDate(parseDate(entry?.dateActivated))}
</span>
),
patient: entry?.patient?.display.split("-")[1],
patient: entry?.patient?.names[0]?.display,
artNumber: entry.patient?.identifiers
.find(
(item) =>
Expand Down
2 changes: 1 addition & 1 deletion src/work-list/work-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const WorkList: React.FC<WorklistProps> = ({ fulfillerStatus }) => {
<ConfigurableLink
to={`\${openmrsSpaBase}/patient/${entry?.patient?.uuid}/chart/laboratory-orders`}
>
{entry?.patient?.display.split("-")[1]}
{entry?.patient?.names[0]?.display}
</ConfigurableLink>
),
orderNumber: entry?.orderNumber,
Expand Down
2 changes: 1 addition & 1 deletion src/work-list/work-list.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export interface IdentifierType {
export function useGetOrdersWorklist(fulfillerStatus: string, dateTo?: string) {
const { laboratoryOrderTypeUuid } = useConfig();
const customRepresentation =
"v=custom:(uuid,orderNumber,accessionNumber,instructions,careSetting:(uuid),encounter:(uuid,obs:(order:(uuid,display,patient:(uuid,display)))),fulfillerComment,orderType:(display),concept:(display,uuid),action,dateStopped,fulfillerStatus,dateActivated,orderer:(uuid,display),urgency,patient:(uuid,names:(display),display,gender,birthdate,identifiers:(voided,preferred,uuid,display,identifierType:(uuid))))";
"v=custom:(uuid,orderNumber,accessionNumber,instructions,careSetting:(uuid),encounter:(uuid,obs:(order:(uuid,display,patient:(uuid,display,names)))),fulfillerComment,orderType:(display),concept:(display,uuid),action,dateStopped,fulfillerStatus,dateActivated,orderer:(uuid,display),urgency,patient:(uuid,names:(display),display,gender,birthdate,identifiers:(voided,preferred,uuid,display,identifierType:(uuid))))";
const orderTypeQuery =
laboratoryOrderTypeUuid !== ""
? `orderTypes=${laboratoryOrderTypeUuid}`
Expand Down

0 comments on commit 3f6c777

Please sign in to comment.