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

fix approval dialog #11

Merged
merged 2 commits into from
Jun 27, 2024
Merged
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
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
Loading