Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-management into patient-registration
  • Loading branch information
ayush-AI committed Jul 9, 2023
2 parents 2b0a5e5 + 2d15566 commit bc9d91a
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ export function useVisitQueueEntries(currServiceName: string, locationUuid: stri
?.map(mapVisitQueueEntryProperties)
.filter((data) => dayjs(data.visitStartDateTime).isToday());
} else {
mappedVisitQueueEntries = data?.data?.results
?.map(mapVisitQueueEntryProperties)
.filter((data) => data.service === currServiceName && dayjs(data.visitStartDateTime).isToday());
mappedVisitQueueEntries = data?.data?.results?.map(mapVisitQueueEntryProperties);
}

return {
Expand Down Expand Up @@ -349,9 +347,7 @@ export function useServiceQueueEntries(service: string, locationUuid: string) {
patientUuid: visitQueueEntry.queueEntry ? visitQueueEntry?.queueEntry.uuid : '--',
});

const mappedServiceQueueEntries = data?.data?.results
?.map(mapServiceQueueEntryProperties)
.filter(({ returnDate }) => dayjs(returnDate).isToday());
const mappedServiceQueueEntries = data?.data?.results?.map(mapServiceQueueEntryProperties);

return {
serviceQueueEntries: mappedServiceQueueEntries ? mappedServiceQueueEntries : [],
Expand Down

0 comments on commit bc9d91a

Please sign in to comment.