Skip to content

Commit

Permalink
(chore) Appointments - remove unused config parameters (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
chibongho authored Dec 13, 2024
1 parent 0b3e877 commit d58418a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 84 deletions.
76 changes: 6 additions & 70 deletions packages/esm-appointments-app/src/config-schema.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import { Type, restBaseUrl, validators } from '@openmrs/esm-framework';
import { spaHomePage } from './constants';
import { Type, validators } from '@openmrs/esm-framework';

export const configSchema = {
includePhoneNumberInExcelSpreadsheet: {
_type: Type.Boolean,
_description: 'Whether to include phone numbers in the exported Excel spreadsheet',
_default: false,
},
allowAllDayAppointments: {
_type: Type.Boolean,
_description: 'Whether to allow scheduling of all-day appointments (vs appointments with start time and end time)',
_default: false,
},
appointmentsBaseUrl: {
_type: Type.String,
_description: 'Configurable alternative URL for the Appointments UI. Eg, the Bahmni Appointments UI URL',
_default: `${spaHomePage}`,
},
appointmentStatuses: {
_type: Type.Array,
_description: 'Configurable appointment status (status of appointments)',
Expand All @@ -27,11 +16,6 @@ export const configSchema = {
_description: 'Configurable appointment types (types of appointments)',
_default: ['Scheduled'],
},
bahmniAppointmentsUiBaseUrl: {
_type: Type.String,
_description: 'Configurable base URL that points to the Bahmni Appointments UI',
_default: '/appointments',
},
checkInButton: {
enabled: {
_type: Type.Boolean,
Expand Down Expand Up @@ -61,13 +45,6 @@ export const configSchema = {
_default: '',
},
},
concepts: {
visitQueueNumberAttributeUuid: {
_type: Type.String,
_description: 'The UUID of the visit attribute that contains the visit queue number.',
_default: 'c61ce16f-272a-41e7-9924-4c555d0932c5',
},
},
customPatientChartUrl: {
_type: Type.String,
_description: `Template URL that will be used when clicking on the patient name in the queues table.
Expand All @@ -76,57 +53,26 @@ export const configSchema = {
_default: '${openmrsSpaBase}/patient/${patientUuid}/chart',
_validators: [validators.isUrlWithTemplateParameters(['patientUuid'])],
},
daysOfTheWeek: {
_type: Type.Array,
_description: 'Configurable days of the week',
_default: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
},
defaultFacilityUrl: {
_type: Type.String,
_default: `${restBaseUrl}/kenyaemr/default-facility`,
_description: 'Custom URL to load default facility if it is not in the session',
},
fullViewPrivilege: {
_type: Type.String,
_description: 'Name of the privilege to display the full view of the Appointments dashboard widget.',
_default: "Today's Appointments Widget: Display Full View",
},
hiddenFormFields: {
_type: Type.Array,
_description: 'Array of form controls to be hidden on form load',
_default: [],
includePhoneNumberInExcelSpreadsheet: {
_type: Type.Boolean,
_description: 'Whether to include phone numbers in the exported Excel spreadsheet',
_default: false,
},
patientIdentifierType: {
_type: Type.String,
_description: 'The name of the patient identifier type to be used for the patient identifier field',
_default: '',
},
showServiceQueueFields: {
_type: Type.Boolean,
_description: 'Whether start visit form should display service queue fields`',
_default: false,
},
showUnscheduledAppointmentsTab: {
_type: Type.Boolean,
_description:
'Whether to show the Unscheduled Appointments tab. Note that configuring this to true requires a custom unscheduledAppointment endpoint not currently available',
_default: false,
},
useBahmniAppointmentsUI: {
_type: Type.Boolean,
_description: 'Open links in Bahmni Appointments UI instead of O3 UI',
_default: false,
},
useFullViewPrivilege: {
_type: Type.Boolean,
_description: "If set to 'false', will always display the full view, disregarding any privilege",
_default: false,
},
};

export interface ConfigObject {
allowAllDayAppointments: boolean;
appointmentComments: Array<string>;
appointmentStatuses: Array<string>;
appointmentTypes: Array<string>;
checkInButton: {
Expand All @@ -138,18 +84,8 @@ export interface ConfigObject {
enabled: boolean;
customUrl: string;
};
concepts: {
visitQueueNumberAttributeUuid: string;
};
customPatientChartUrl: string;
daysOfTheWeek: Array<string>;
defaultFacilityUrl: string;
fullViewPrivilege: string;
hiddenFormFields: Array<string>;
includePhoneNumberInExcelSpreadsheet: boolean;
patientIdentifierType: string;
showServiceQueueFields: boolean;
showUnscheduledAppointmentsTab: boolean;
useBahmniAppointmentsUI: boolean;
useFullViewPrivilege: boolean;
includePhoneNumberInExcelSpreadsheet: boolean;
}
14 changes: 0 additions & 14 deletions packages/esm-appointments-app/src/hooks/useDefaultLocation.ts

This file was deleted.

0 comments on commit d58418a

Please sign in to comment.