How cuonglmptit/sad-health-management-system works
Project Type and Purpose
• The README indicates “SAD-health-management-system” with a note on databases (MongoDB, MySQL) and a single command (run_all_server.py) to start the system. This points to a full-blown health management system that is split into multiple service components.
• The system supports functionalities related to appointments, clinics, doctors, employees, health records, patients, and overall system orchestration via an “hms” component.
File Structure
• There are several major directories each representing a Django project/service:
• appointment_service: Manages appointment-related functionality.
• clinic_service: Handles clinic information.
• doctor_service: Manages doctor profiles and details.
• employee_service: Deals with employee management.
• healthrecord_service: Manages patient health records.
• patient_service: Manages patient data.
• hms: Provides the frontend and main integration layer (UI templates, static files, and a separate Django project).
• Each service project contains the typical Django layout (an inner service folder with settings, urls, wsgi/asgi, and an app folder with models, views, serializers, and migrations).
• There’s a run_all_server.py at the root level used to start all the services and bring up the unified application, likely orchestrating the microservices.
README Insights
• The README highlights the entry point (run_all_server.py) and the deployed URL (http://127.0.0.1:1300/hms/home), indicating that the “hms” project might be acting as the main gateway for the entire system.
• It confirms that the application leverages both MongoDB and MySQL. This suggests different components may use different databases based on the data they handle.
a. Main Components:
• Service Components: Appointment Service, Clinic Service, Doctor Service, Employee Service, HealthRecord Service, and Patient Service.
• Central Integration / Frontend: The hms component.
• Databases: MongoDB and MySQL; assign each service to the appropriate DB if known (or denote that some services might choose one based on data type).
• Orchestration Entry Point: run_all_server.py as the initializer or orchestrator.
b. Relationships and Data Flow:
• Each service component runs as a separate Django project exposing its own REST API endpoints (as seen by the urls.py in each folder).
• That the run_all_server.py is responsible for launching all these services.
• If there is any inter-service communication (for example, appointments might tie patients, doctors, and clinics), represent these dependencies as well.
c. Architectural Patterns:
• Microservices-Oriented Architecture: Each healthcare domain (appointment, clinic, etc.) is separated into its own service.
• RESTful Communication: With each service exposing its endpoints for CRUD operations.
• Layered/Django MVC pattern: Inside each microservice, the typical separation between models, views, and serializers indicates structured internal design.
• Database Segregation: Use of both MongoDB and MySQL to possibly separate high transaction relational data from more flexible storage (document based) data.
d. Relevant Technologies and Frameworks:
• Django: All service components are Django applications (as indicated by the manage.py, settings.py, views.py, etc.).
• MongoDB and MySQL for data storage.
• Likely Django REST Framework for API endpoints (inferred by serializers and views).
• Frontend rendering and static content management through the hms/frontend module.
Summary
• Pay extra attention to how the frontend hms integrates and orchestrates across these discrete services, ensuring a seamless flow of data and functionality across the system.