Skip to content

Commit

Permalink
Fix approval dialog (#11)
Browse files Browse the repository at this point in the history
Fix approval dialog (#11)
  • Loading branch information
jabahum authored Jun 27, 2024
1 parent 87c6b44 commit 69ca283
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lab-tiles/referred-tile.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const ReferredTileComponent = () => {
return (
<SummaryTile
label={t("transferred", "Transferred")}
value={filteredData.length}
headerLabel={t("referredTests", "Ex-Referred tests")}
value={filteredData?.length}
headerLabel={t("referredTests", "Referred tests")}
/>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/lab-tiles/worklist-tile.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const WorklistTileComponent = () => {
<SummaryTile
label={t("inProgress", "In progress")}
value={filteredData?.length}
headerLabel={t("worklist", "Ex-Worklist")}
headerLabel={t("worklist", "Worklist")}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface Ob {
groupMembers: GroupMember[];
comment: any;
location: Location;
order: any;
order: Order;
encounter: Encounter;
voided: boolean;
value: any;
Expand Down
2 changes: 1 addition & 1 deletion src/reject-order/rejected-tests-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const RejectedTestsList: React.FC = () => {
item?.identifierType?.uuid ===
"e1731641-30ab-102d-86b0-7a5022ba4115"
)
.display.split("=")[1]
?.display.split("=")[1]
.trim(),
orderNumber: entry?.orderNumber,
accessionNumber: entry?.accessionNumber,
Expand Down
6 changes: 4 additions & 2 deletions src/review-list/dialog/review-item.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ const ReviewItem: React.FC<ReviewItemDialogProps> = ({
const { encounter, isLoading } = useGetEncounterById(encounterUuid);

const testsOrder = useMemo(() => {
return encounter?.obs?.filter((item) => item?.order?.type === "testorder");
}, [encounter?.obs]);
return encounter?.obs?.filter(
(item) => item?.order?.uuid === orderItem?.uuid
);
}, [encounter?.obs, orderItem]);

const filteredGroupedResults = useMemo(() => {
let groupedResults = [];
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 @@ -40,8 +40,8 @@ interface ApproveResultMenuProps {
}

const ApproveTestMenu: React.FC<ApproveResultMenuProps> = ({
encounterUuid,
orderItem,
encounterUuid,
}) => {
const { t } = useTranslation();
const launchReviewItemModal = useCallback(() => {
Expand Down
3 changes: 3 additions & 0 deletions src/work-list/work-list.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useSWR, { mutate } from "swr";
export interface Result {
uuid: string;
orderNumber: string;
display: string;
accessionNumber?: string;
instructions?: string;
careSetting: CareSetting;
Expand All @@ -19,6 +20,7 @@ export interface Result {
orderer: Orderer;
urgency: string;
patient: Patient2;
type: string;
}

export interface CareSetting {
Expand Down Expand Up @@ -46,6 +48,7 @@ export interface Patient {
}

export interface OrderType {
uuid: string;
display: string;
}

Expand Down

0 comments on commit 69ca283

Please sign in to comment.