diff --git a/packages/esm-appointments-app/src/home/appointments-base-table.component.tsx b/packages/esm-appointments-app/src/home/appointments-base-table.component.tsx
index cbda01011..403897672 100644
--- a/packages/esm-appointments-app/src/home/appointments-base-table.component.tsx
+++ b/packages/esm-appointments-app/src/home/appointments-base-table.component.tsx
@@ -187,8 +187,8 @@ const AppointmentsBaseTable = () => {
sortKey: appointment.patient.identifier,
},
location: {
- content: {appointment.location.display},
- sortKey: appointment.location,
+ content: {appointment.location?.name},
+ sortKey: appointment.location?.name,
},
service: {
content: {appointment.service.name},
diff --git a/packages/esm-appointments-app/src/types/index.ts b/packages/esm-appointments-app/src/types/index.ts
index b76eac1db..10d306420 100644
--- a/packages/esm-appointments-app/src/types/index.ts
+++ b/packages/esm-appointments-app/src/types/index.ts
@@ -8,12 +8,17 @@ export enum SearchTypes {
SCHEDULED_VISITS = 'scheduled-visits',
}
+export interface AppointmentLocation {
+ uuid: string;
+ name: string;
+}
+
export interface Appointment {
appointmentKind: string;
appointmentNumber: string;
comments: string;
endDateTime: Date | number | any;
- location: OpenmrsResource;
+ location: AppointmentLocation;
patient: {
identifier: string;
identifiers: Array;