Skip to content

Commit

Permalink
O3-2383 Add column to denote patient previous queue in queue table
Browse files Browse the repository at this point in the history
  • Loading branch information
CynthiaKamau committed Sep 14, 2023
1 parent 81034f7 commit 634d4a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ function ActiveVisitsTable() {
},
{
id: 3,
header: t('locationComingFrom', 'Coming from'),
key: 'locationComingFrom',
header: t('queueComingFrom', 'Coming from'),
key: 'queueComingFrom',
},
{
id: 4,
Expand Down Expand Up @@ -218,8 +218,8 @@ function ActiveVisitsTable() {
</>
),
},
locationComingFrom: {
content: <span className={styles.statusContainer}>{entry?.locationComingFrom}</span>,
queueComingFrom: {
content: <span className={styles.statusContainer}>{entry?.queueComingFrom}</span>,
},
status: {
content: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface VisitQueueEntry {
uuid: string;
visit: Visit;
sortWeight: number;
locationComingFrom: {
queueComingFrom: {
name: string;
};
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export interface MappedVisitQueueEntry {
sortWeight: number;
visitQueueNumber: string;
identifiers: Array<Identifer>;
locationComingFrom: string;
queueComingFrom: string;
}

interface UseVisitQueueEntries {
Expand Down Expand Up @@ -248,7 +248,7 @@ export function useVisitQueueEntries(currServiceName: string, locationUuid: stri
(e) => e.attributeType.uuid === visitQueueNumberAttributeUuid,
)?.value,
identifiers: visitQueueEntry.queueEntry.patient?.identifiers,
locationComingFrom: visitQueueEntry.queueEntry?.locationComingFrom?.name,
queueComingFrom: visitQueueEntry.queueEntry?.queueComingFrom?.name,
});

let mappedVisitQueueEntries;
Expand Down Expand Up @@ -315,7 +315,7 @@ export async function updateQueueEntry(
},
startedAt: toDateObjectStrict(toOmrsIsoString(new Date())),
sortWeight: sortWeight,
locationComingFrom: previousQueueUuid,
queueComingFrom: previousQueueUuid,
},
},
});
Expand Down

0 comments on commit 634d4a1

Please sign in to comment.