Skip to content

Complete module implementation with workflow coverage and RBAC#1907

Open
harshiill wants to merge 2 commits into
FusionIIIT:health-center-v2from
harshiill:health-center-v2
Open

Complete module implementation with workflow coverage and RBAC#1907
harshiill wants to merge 2 commits into
FusionIIIT:health-center-v2from
harshiill:health-center-v2

Conversation

@harshiill
Copy link
Copy Markdown

This pull request introduces significant improvements to the Health Center module by enhancing admin configuration, clarifying user roles and permissions, updating CORS settings for secure frontend-backend communication, and extending global user role choices. The changes focus on strengthening maintainability, security, and documentation for both developers and administrators.

Health Center Admin Interface Improvements:

  • Refactored health_center/admin.py to explicitly register all relevant models with the Django admin interface, providing custom admin classes for better usability (e.g., search, filtering, ordering, and field display) for models such as Doctor, Appointment, Consultation, Medicine, Stock, Prescription, ReimbursementClaim, AuditLog, and others. This greatly enhances the administrative experience and maintainability.

Documentation and Role Management:

  • Added a comprehensive Designated_Roles.md to the Health Center module, thoroughly documenting the responsibilities and permissions of key user roles (Compounder, Patient, Accounts Manager, Approving Authority) and mapping them to API endpoints. This clarifies RBAC (Role-Based Access Control) enforcement and aids future development and onboarding.
  • Updated the Constants class in globals/models.py to include a new AUDITOR user type, preparing the system for expanded auditing and oversight capabilities.

Security and Package Structure:

  • Modified CORS settings in settings/common.py to restrict allowed origins, enabling credentialed requests only from specific development and production frontends, and explicitly enabling credential support. This change improves security for frontend-backend interactions.
  • Added an __init__.py file to the applications directory to ensure it is recognized as a standard Python package, resolving unittest path issues in Python 3.8.
    [Copilot is generating a summary...]

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