This repository contains the source code for a Hospital API. The API allows doctors to register and login, patients to register, and provides endpoints for creating and fetching patient reports. The API is built using Node.js and utilizes various npm packages.
To set up the project on your local system, follow these steps:
-
Clone the repository: git clone https://github.com/your-username/hospital_api.git
-
Install the required packages: npm install
-
Run the application: npm run dev
This command will start the server and make the API accessible at http://localhost:3000.
The following routes are available in the API:
Endpoint: [POST] /api/v1/doctors/register
This route allows a doctor to register in the system.
Endpoint: [POST] /api/v1/doctors/login
This route enables a doctor to log into the system.
Endpoint: [POST] /api/v1/patients/register
This route allows the registration of a new patient.
Endpoint: [POST] /api/v1/patients/:id/create_report
This route is used to create a medical report for a specific patient identified by :id
.
Endpoint: [GET] /api/v1/patients/:id/all_reports
This route retrieves all the medical reports associated with a specific patient identified by :id
.
Endpoint: [GET] /api/v1/reports/:status
This route retrieves all medical reports based on a specific status.