This project aims to create a virtual clinic system, facilitating seamless interaction between patients, doctors, pharmacists, and admins. The system includes functionalities like appointment scheduling, medicine ordering, chat communication, and more, aiming to streamline the healthcare process.
As of now, the project is in a functional state. However, real-time features like instant messaging or notification systems are not implemented.
Standard - This project follows standard coding conventions for clarity and maintainability.
- React
- Node.js
- Express
- MongoDB
- Bootstrap for React
- Axios
- User Authentication for Patients, Doctors, Pharmacists, and Admins.
- Appointment scheduling and management.
- Medicine ordering and management.
- Chat functionality for communication between different user types.
- Management of patient health records and prescriptions.
- Wallet system for transactions.
Example of Chat functionality in React:
import React, { useState } from 'react';
import { Form, Button, FormControl } from 'react-bootstrap';
function Chat() {
const [message, setMessage] = useState('');
const sendMessage = () => {
// API call to send message
console.log("Sending message:", message);
};
return (
<div>
<FormControl
type="text"
value={message}
onChange={(e) => setMessage(e.target.value)}
placeholder="Type a message"
/>
<Button onClick={sendMessage}>Send</Button>
</div>
);
}
export default Chat;
To install this project, clone the repository and install the required npm packages:
git clone <repository-url>
cd virtual-clinic
npm install
POST /addPatient
- Add a new patientDELETE /removePatient/:id
- Remove a patientGET /patients
- Get all patientsGET /patients/:id
- Get patient by IDGET /getPatientByName/:name
- Get patient by nameGET /getPatientsByAppointments/:id
- Get patients by appointmentsGET /getPatientsByUpcomingAppointments/:id
- Get patients by upcoming appointmentsGET /checkWallet/:id
- Check wallet balance of a patientPUT /changePassword
- Change password of a patient
POST /addDoctor
- Add a new doctorDELETE /removeDoctor/:id
- Remove a doctorGET /doctors
- Get all doctorsGET /doctors/:id
- Get doctor by IDPUT /editDoctorDetails/:id
- Edit doctor detailsGET /getDoctorByName/:name
- Get doctor by nameGET /getDoctorBySpecialty/:specialty
- Get doctors by specialtyGET /getDoctorByDateTime/:datetime
- Get doctor by date and timeGET /getDoctorBySpecialtyAndDateTime/:specialty/:datetime
- Get doctor by specialty and date/timeGET /getDoctorByDate/:date
- Get doctor by dateGET /getDoctorBySpecialtyAndDate/:specialty/:date
- Get doctor by specialty and date
POST /addAppointment
- Add a new appointmentPUT /editAppointment/:id
- Edit an appointmentDELETE /removeAppointment/:id
- Remove an appointmentGET /getAppointmentsByDate/:date
- Get appointments by dateGET /getAppointmentsByStatus/:status
- Get appointments by statusGET /getAppointmentsByPatient/:id
- Get appointments by patient IDGET /getAppointmentsByDoctor/:id
- Get appointments by doctor IDGET /getAppointments
- Get all appointmentsPOST /scheduleFollowUpDoctor
- Schedule a follow-up appointment by doctorPOST /scheduleFollowUpPatient
- Schedule a follow-up appointment by patientPOST /cancelAppointment/:id
- Cancel an appointment
POST /addPrescription
- Add a new prescriptionPUT /editPrescription/:id
- Edit a prescriptionDELETE /removePrescription/:id
- Remove a prescriptionGET /getPrescriptionsByPatient/:id
- Get prescriptions by patient IDGET /getPrescriptionsByDate/:id/:date
- Get prescriptions by dateGET /getPrescriptionsByDoctor/:doc_id
- Get prescriptions by doctor IDGET /getPrescriptionByStatus/:id/:status
- Get prescription by statusGET /getPrescription/:id
- Get a specific prescriptionGET /downloadPrescription/:id
- Download a prescription
POST /addAdmin
- Add a new adminDELETE /removeAdmin/:id
- Remove an adminGET /admins
- Get all admins
POST /addPackage
- Add a new packagePUT /editPackage/:id
- Edit a packageDELETE /removePackage/:id
- Remove a packageGET /packages
- Get all packagesGET /getPackageForPatient/:id
- Get package for a specific patientPUT /subscribePackage/:id
- Subscribe to a packagePUT /unsubscribePackage/:id
- Unsubscribe from a packageGET /getCurrentPackage/:id
- Get current package of a patient
POST /sendMessage/:id/:receiver_id
- Send a messageGET /getMessages/:id
- Get messagesGET /getChats/:id
- Get all chats for a userGET /getPatientsDoctorsChats/:id/:receiver_id
- Check if a chat exists between a patient and a doctor
POST /uploadHealthRecord/:id
- Upload a health recordGET /getHealthRecords/:id
- Get health recordsGET /removeHealthRecords/:patientId/:recordName
- Remove a health record
POST /checkOTP/:username
- Check OTPPUT /resetPassword
- Reset passwordPUT /acceptDoctor/:id
- Accept a doctorPUT /rejectDoctor/:id
- Reject a doctorPUT /acceptFollowUp/:id
- Accept a follow-upPUT /revokeFollowUp/:id
- Revoke a follow-upGET /getPendingAppointments
- Get pending appointmentsPOST /acceptContract/:id
- Accept a contract
Testing is done using Postman for API routes. Jest is used for unit testing components.
To use the system:
- Start the server:
npm start
- Navigate to
http://localhost:3000
in your web browser. - Register or login as a patient, doctor, or pharmacist.
- ... (Provide step-by-step instructions)
Contributions to the project are welcome. Please fork the repository and submit pull requests.
Credits go to all libraries and frameworks used. Special thanks to tutorials and guides from sources like React Documentation and MongoDB Docs.
This project is licensed under the MIT License - see the LICENSE file for details. Additional licenses include Apache 2.0 for Stripe integration.