esm-appointments-app-custom
v8.5.0-custom.2
Published
Appointments front-end module for O3 - Custom Build
Readme
@openmrs/esm-appointments-app
Appointments front-end module for OpenMRS 3.x (O3).
Installation
npm install @openmrs/esm-appointments-appUsage
This module can be consumed by other OpenMRS 3.x applications in several ways:
1. As a Module Federation Remote
// In your app's webpack config
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
module.exports = {
plugins: [
new ModuleFederationPlugin({
remotes: {
'@openmrs/esm-appointments-app': 'appointments@http://localhost:8080/remoteEntry.js',
},
}),
],
};2. Importing Specific Components
// Import the main appointments dashboard
import { appointmentsDashboard } from '@openmrs/esm-appointments-app/appointments-dashboard';
// Import the appointments form workspace
import { appointmentsFormWorkspace } from '@openmrs/esm-appointments-app/appointments-form-workspace';
// Import patient appointments components
import { patientAppointmentsOverview } from '@openmrs/esm-appointments-app/patient-appointments-overview';3. Using the Root Component
import { root } from '@openmrs/esm-appointments-app/root';4. Available Exports
The module exports the following components and functions:
root- Main root componentappointmentsDashboard- Appointments dashboard componenthomeAppointments- Home appointments componentappointmentsList- Appointments list componentearlyAppointments- Early appointments componentmetricsCardScheduledAppointments- Scheduled appointments metrics cardmetricsCardHighestVolumeService- Highest volume service metrics cardmetricsCardProvidersBooked- Providers booked metrics cardsearchPatient- Patient search componentpatientAppointmentsOverview- Patient appointments overviewpatientUpcomingAppointmentsWidget- Patient upcoming appointments widgetcancelAppointmentModal- Cancel appointment modalappointmentsFormWorkspace- Appointments form workspaceendAppointmentModal- End appointment modalhomeAppointmentsTile- Home appointments tile
Configuration
The module supports various configuration options through the OpenMRS configuration system:
// Example configuration
{
"@openmrs/esm-appointments-app": {
"allowAllDayAppointments": true,
"appointmentStatuses": ["Requested", "Scheduled", "CheckedIn", "Completed", "Cancelled", "Missed"],
"appointmentTypes": ["Scheduled"],
"checkInButton": {
"enabled": true,
"showIfActiveVisit": false
}
}
}Development
Build
# Production build
npm run build
# Development build
npm run build:dev
# Clean build
npm run build:clean
# Build with analysis
npm run build:analyzeDevelopment Server
npm startDependencies
Peer Dependencies
@openmrs/esm-framework: 6.x@openmrs/esm-patient-common-lib: 10.xreact: 18.xreact-dom: 18.xreact-i18next: 11.xreact-router-dom: 6.xswr: 2.x
Dependencies
@carbon/react: ^1.83.0@hookform/resolvers: ^3.9.1classnames: ^2.3.2formik: ^2.2.9lodash-es: ^4.17.15react-hook-form: ^7.54.0xlsx: ^0.18.5yup: ^0.32.11zod: ^3.24.1
License
MPL-2.0
