Background
The current implementation of Patient ID sticker printing relies on frontend logic, which can introduce delays in PDF generation. To improve performance and maintainability, its recommended to shift the sticker generation process to the backend. Configuration can look like this
Suggestions
- Move Sticker Processing to the Backend
- Shift PDF generation from the frontend to the backend to improve performance and reliability.
- Use a dedicated OpenMRS module (openmrs/openmrs-module-webservices.rest ) for handling sticker creation.
- Implement a REST API for PDF Generation
- Create an API endpoint that accepts sticker configuration as JSON and returns a PDF.
- Ensure the API can handle multiple sticker layouts and configurations dynamically.
- Store Configurations in System Settings
- Move sticker printing configurations from the frontend to OpenMRS system settings.
- Ensure settings are easily configurable for different implementations.
- Update Frontend to Use the New API
- Remove frontend-based sticker configurations.
- Modify the frontend to request PDF stickers from the backend and display/download them accordingly.
- Validate Design and Performance
- Ensure backend-generated PDFs match the existing sticker layout.
Next Steps
Task | Action Required |
---|---|
Interact with other interested implementors | Interact with other organizations for further requirements gathering |
Select the backend module | Identify the best OpenMRS module for handling PDF generation |
Develop REST API | Create an endpoint that generates and returns sticker PDFs |
Move configurations to system settings | Store all sticker-related configurations in OpenMRS settings |
Update frontend integration | Modify the frontend to request PDFs from the backend |
Test and validate | Ensure PDF output matches expected design and performance |
Questions
What do you think about the above?
Which other Patient ID sticker features/requirements would you need in your organization?