Skip to content

initials101/medref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 Medical Referral Appointment System

A full-stack MERN (MongoDB, Express, React, Node.js) application that enables seamless patient referrals, hospital management, and appointment scheduling.

Banner


📚 Table of Contents


✨ Features

  • 🧑‍⚕️ Role-based system for Admins, Doctors, and Patients
  • 🏥 Manage hospitals and doctor availability
  • 📅 Book, update, and cancel appointments
  • 🔁 Refer patients between hospitals/doctors
  • 🩺 View and upload medical records
  • 🔒 JWT authentication with OTP email verification
  • 📊 Admin dashboard for insights and stats

📸 Screenshots

🛠️ Admin Dashboard

Manage hospitals and users
Admin Screenshot


🩺 Doctor Dashboard

Create and view referrals and appointments
Doctor Screenshot


👤 Patient Dashboard

Search doctors, view hospitals, and book appointments
Patient Screenshot


📡 API Endpoints

Click to expand full documentation:

🔐 Authentication
  • POST /api/auth/register – Register a new user
  • POST /api/auth/login – Login with email or username
  • POST /api/auth/verify – Verify OTP
  • POST /api/auth/resend-otp – Resend OTP
  • GET /api/auth/profile – Get current profile
  • PUT /api/auth/profile – Update profile
👥 User Management (Admin)
  • GET /api/users – All users
  • GET /api/users/:id – Single user
  • PUT /api/users/:id – Update user
  • DELETE /api/users/:id – Remove user
🧑‍⚕️ Doctor
  • POST /api/doctors – Create profile
  • GET /api/doctors/profile – My profile
  • PUT /api/doctors/profile – Update profile
  • GET /api/doctors – List all doctors
  • GET /api/doctors/:id – Doctor by ID
  • GET /api/doctors/specialization/:specialization
  • GET /api/doctors/hospital/:hospitalId
🧑‍🤝‍🧑 Patient
  • POST /api/patients – Create profile
  • GET /api/patients/profile – My profile
  • PUT /api/patients/profile – Update profile
  • GET /api/patients – All patients (doctor/admin)
  • GET /api/patients/:id
🏥 Hospitals
  • POST /api/hospitals – Add hospital (admin)
  • GET /api/hospitals – Public list
  • GET /api/hospitals/:id – Hospital by ID
  • PUT /api/hospitals/:id – Update (admin)
  • DELETE /api/hospitals/:id – Remove (admin)
  • GET /api/hospitals/search?keyword=...
📅 Appointments
  • POST /api/appointments – Book appointment
  • GET /api/appointments/patient – Patient view
  • GET /api/appointments/doctor – Doctor view
  • GET /api/appointments/all – Admin view
  • GET /api/appointments/:id – Single view
  • PUT /api/appointments/:id/status – Update status
  • PUT /api/appointments/:id/cancel – Cancel appointment
🔁 Referrals
  • POST /api/referrals – New referral
  • GET /api/referrals/patient
  • GET /api/referrals/referring
  • GET /api/referrals/referred
  • GET /api/referrals/all
  • GET /api/referrals/:id
  • PUT /api/referrals/:id/status
  • POST /api/referrals/:id/appointment
🧾 Medical Records
  • POST /api/medical-records/upload
  • GET /api/medical-records/patient/:patientId
  • GET /api/medical-records/:id
  • GET /api/medical-records/download/:id
  • DELETE /api/medical-records/:id
🧑‍💼 Admin
  • POST /api/admins
  • GET /api/admins/profile
  • PUT /api/admins/profile
  • GET /api/admin/db-stats

🛠️ Tech Stack

  • Frontend: React, Tailwind CSS, Redux, Framer Motion
  • Backend: Node.js, Express.js
  • Database: MongoDB Atlas
  • Authentication: JWT, OTP via email
  • Deployment: Vercel

⚙️ Setup Instructions

1. Clone Repository

git clone https://github.com/your-username/your-project.git

2. Install Dependencies

cd backend && npm install
cd ../frontend && npm install

3. Configure Environment Variables

Create .env files in both the backend and frontend directories with your environment-specific variables.
4. Run the Project

# Backend
cd backend
npm run dev

# Frontend
cd ../frontend
npm run dev

🤝 Contributing

We welcome all contributions! Follow these steps:

    Fork the repository

    Create a new branch: git checkout -b feature-name

    Make and commit your changes

    Push to your fork

    Submit a Pull Request

📄 License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published

Languages