This project is part of the ISYS2099 course, where Group 5 has developed a comprehensive hospital management system. The system integrates multiple databases and technologies to manage hospital operations, including patient management, staff management, and appointment scheduling.
./
├── app/
│ ├── app.js
│ ├── controllers/
│ ├── databases/
│ ├── middleware/
│ ├── routers/
│ ├── services/
│ └── utils/
├── databases/
│ ├── initDb.js
│ ├── mongo/
│ └── mysql/
├── jsconfig.json
├── package.json
├── package-lock.json
├── README.md
└── tests/
├── Hospital Management.postman_collection copy.json
├── image.png
└── README.md
Important directories and files:
.env
: Global environmental variables (e.g., for setting up databases, encryption key).package.json
: This folder contains basic information about the project (e.g., description, scripts, dependencies).databases/
: This folder contains the setup scripts and sample data for MySQL and MongoDB databases. ( See Installation )app/
: This folder typically contains the server's core logic, communicating with the web client via API handling.middlewares/
,controllers/
,routers/
: Handle incoming HTTP requests and responses with REST API design.databases/
: contains database-related logic, like model definitions or ORM configurations; Not to confused with the identical-nameddatabases/
above.
tests/
: contains the Postman Test Collections for all API endpoints. ( See Testing )
Dependency | Version |
---|---|
NodeJS | 18.19.* |
MySQL Community Server | 8.4.* |
MongoDB Community Server | 7.0.* |
For full installation and usage instructions of the front-end, please visit here
- Make sure your local server of MySQL and MongoDB is running
- Clone and Navigate to the project
git clone https://github.com/G180125/ISYS2099_Group5_2024.git
cd ISYS2099_Group5_2024
- Install dependencies
npm install
- Initialize Database
npm run init-db
> [email protected] init-db
> node databases/initDb.js
> Init MySQL . . .
Enter MySQL root username: # your root here
Enter MySQL password for "your-root-here": # your root password here
validate_password.policy not found. Skipping policy setting.
Script executed successfully: databases/mysql/tables.sql
. . .
- Make sure your local server of MySQL and MongoDB is running and initialized.
- Start the server
npm run app
- The API server now starts listening at port 2099 with the URL below.
localhost:2099/hospital_management/api/v1
- Postman version v11.10.0
-
Import tests collection
tests/Hospital Management.postman_collection.json
-
Check if the base URL
{{base_url}}
is available by clicking into the highlighted variable as below picture. If not, set it with a valuelocalhost:2099/hospital_management/api/v1
-
Make sure the API server is running.
-
Endpoints are splitted based on funtionaclities (e.g., Authorization, Appointment, Treatments). You can get started with the
Testing Server
test. -
Since most of endpoints are protected by auth, relevant account (e.g., admin, staff) should be logged in. Inspect the routers list for more priviledge details.
Name | Score | |
---|---|---|
Dat Pham Xuan | [email protected] | 7 |
Long Nguyen Vi Phi | [email protected] | 7 |
Huan Nguyen Dang | [email protected] | 7 |
Nhan Truong Vo Thien | [email protected] | 7 |
Pavel Potemkin | [email protected] | 7 |