Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bug) U4X-724 : Under the tests ordered, the display shows numbers instead of the user names. (Change the approach, instead of display but pick the names display) #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 3 additions & 4 deletions src/review-list/dialog/review-item.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,9 @@ const ReviewItem: React.FC<ReviewItemDialogProps> = ({
</td>
<td>
<span>
{
filteredGroupedResults[test]?.value
?.display
}
{filteredGroupedResults[test]?.value
?.display ??
filteredGroupedResults[test]?.value}
</span>
</td>
<td>
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
Loading