Skip to content

Commit

Permalink
(refactor) Updated outpatient label to serivce queues (#473)
Browse files Browse the repository at this point in the history
* (refactor) Updated outpatient label to serivce queues

* updated status column to show queue name instead of concept name
  • Loading branch information
CynthiaKamau authored Nov 16, 2022
1 parent a0ebb6f commit c806132
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/esm-outpatient-app/__mocks__/active-visits.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const mockVisitQueueEntries = [
endedAt: null,
queue: {
uuid: '6a97bd65-3a9a-4fab-ae8f-be59dd4ddd87',
display: 'TRIAGE QUEUE',
name: 'TRIAGE QUEUE',
display: 'Triage',
name: 'Triage',
description: 'Queue for patients waiting for triage',
service: {
display: 'Triage',
Expand Down Expand Up @@ -67,8 +67,8 @@ export const mockVisitQueueEntries = [
endedAt: null,
queue: {
uuid: 'c187d78b-5c54-49bf-a0f8-b7fb6034d36d',
display: 'Consultation queue',
name: 'Consultation queue',
display: 'Clinical Consultation',
name: 'Clinical Consultation',
description: 'A queue for patients for a clincal consultation i.e. Doctor, Clinician',
service: {
display: 'Clinical Consultation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function ActiveVisitsTable() {
}
};

const buildStatusString = (status: string, service: QueueService) => {
const buildStatusString = (status: string, service: string) => {
if (!status || !service) {
return '';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export interface MappedVisitQueueEntry {
priority: MappedQueuePriority;
priorityComment: string;
priorityUuid: string;
service: QueueService;
service: string;
status: QueueStatus;
statusUuid: string;
visitStartDateTime: string;
Expand Down Expand Up @@ -198,7 +198,7 @@ export function useVisitQueueEntries(currServiceName: string): UseVisitQueueEntr
: visitQueueEntry.queueEntry.priority.display,
priorityComment: visitQueueEntry.queueEntry.priorityComment,
priorityUuid: visitQueueEntry.queueEntry.priority.uuid,
service: visitQueueEntry.queueEntry.queue.service.display,
service: visitQueueEntry?.queueEntry.queue.name,
status: visitQueueEntry.queueEntry.status.display,
statusUuid: visitQueueEntry.queueEntry.status.uuid,
waitTime: visitQueueEntry.queueEntry.startedAt
Expand Down
7 changes: 7 additions & 0 deletions packages/esm-outpatient-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ function setupOpenMRS() {
moduleName,
}),
},
{
id: 'service-queue-entries-table',
load: getAsyncLifecycle(() => import('./active-visits/active-visits-table.component'), {
featureName: 'view list of patients in queue',
moduleName,
}),
},
],
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-outpatient-app/src/outpatient-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import { spaBasePath } from './constants';

export default function OutpatientAppLink() {
const { t } = useTranslation();
return <ConfigurableLink to={spaBasePath}>{t('outpatient', 'Outpatient')}</ConfigurableLink>;
return <ConfigurableLink to={spaBasePath}>{t('serviceQueues', 'Service Queues')}</ConfigurableLink>;
}

0 comments on commit c806132

Please sign in to comment.