Skip to content

Refactor project structure and implement prescription management features#234

Open
harshiill wants to merge 10 commits into
FusionIIIT:health-center-v1from
harshiill:health-center-v1
Open

Refactor project structure and implement prescription management features#234
harshiill wants to merge 10 commits into
FusionIIIT:health-center-v1from
harshiill:health-center-v1

Conversation

@harshiill
Copy link
Copy Markdown

This pull request introduces a new Health Center module to the application and refactors several parts of the existing Health Center compounder codebase for improved maintainability, user experience, and code consistency. Key changes include the addition of a dashboard for compounders, improvements to error handling and data validation, and the consolidation of breadcrumb imports. There are also enhancements to feedback, history, and patient update flows.

Health Center Module Integration:

  • Added the HealthCenter module and route to the main application, enabling /healthcenter/* navigation. [1] [2]
  • Introduced CompounderDashboard.jsx, providing a user-friendly dashboard for compounders to manage patients, stock, schedules, feedback, announcements, and more.

Code Refactoring and Consistency:

  • Refactored all breadcrumb imports in Health Center compounder components to use a unified path: ../../components/common/Breadcrumbs. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

API and Data Handling Improvements:

  • Replaced direct axios calls with dedicated API utility functions (e.g., createAnnouncementApi, getAnnouncementsApi) for announcements, improving code modularity and maintainability. [1] [2]
  • Enhanced data validation and error handling in feedback, history, and patient update components to handle unexpected or malformed API responses more gracefully. [1] [2] [3] [4] [5] [6]

User Experience Enhancements:

  • Added immediate feedback and page reloads upon successful doctor/pathologist addition or removal, ensuring the UI reflects the latest state. [1] [2] [3] [4]
  • Improved patient update flow by fetching and managing a list of patients, and by providing clearer error messages. [1] [2] [3]

These updates collectively improve the modularity, usability, and robustness of the Health Center compounder module.

- Added CompPrescription component for managing prescriptions, including follow-up forms and medicine entries.

- Created CompounderPrescriptionPage to handle prescription creation and history display.

- Introduced PrescriptionForm for creating new prescriptions with validation.

- Developed PrescriptionTable for displaying prescription history.

- Integrated API calls for fetching and creating prescriptions.

- Updated RequiredMedicine component to fetch required medicines using a new API service.

- Enhanced routing to include new prescription management pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants