Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ MedCare – Medical Management System

A full-featured Android application for managing medical appointments, treatment records, and billing β€” built for both Patients and Doctors.


πŸ“± Screenshots

Add your screenshots here after uploading them to the repo

Role Select Patient Dashboard Doctor Dashboard
Book Appointment Today's Appointments Generate Bill

✨ Features

πŸ‘€ Patient

Feature Description
πŸ“ Registration & Login Create a new patient account securely via Firebase Auth
πŸ‘€ View Profile View personal details β€” name, age, gender, phone, address
πŸ“… Book Appointment Select a doctor, pick a date & time, describe symptoms
🧾 Bill History View bills from all completed appointments
πŸ’Š Treatment History View prescription, disease, and progress from past visits

🩺 Doctor

Feature Description
🩺 Doctor Profile View personal profile and specialization
⏳ Pending Appointments See all appointments waiting for action
πŸ“… Today's Appointments View today's schedule β€” Accept or Reject each appointment
πŸ“‹ Update Treatment Add disease diagnosis, prescription, and progress notes
πŸ’° Generate Bill Create itemized bills with consultation and medicine fees
πŸ“ Patient History View treatment records of all previously treated patients

πŸ› οΈ Tech Stack

Technology Purpose
Java Primary programming language
XML UI layouts
Firebase Authentication Secure login and registration
Firebase Realtime Database Cloud data storage and sync
Material Design Components Modern UI (Cards, TextInputLayout, Buttons)
RecyclerView Efficient list rendering
Android DatePickerDialog Date selection for appointments
Android TimePickerDialog Time selection for appointments

πŸ—‚οΈ Project Structure

MedicalManagementSystem/
β”‚
β”œβ”€β”€ app/src/main/
β”‚   β”œβ”€β”€ java/com/example/medicalmanagementsystem/
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ MainActivity.java               # Role selection screen
β”‚   β”‚   β”œβ”€β”€ LoginActivity.java              # Login for patient & doctor
β”‚   β”‚   β”œβ”€β”€ RegisterActivity.java           # Registration for patient & doctor
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ patient/
β”‚   β”‚   β”‚   β”œβ”€β”€ PatientDashboardActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ PatientProfileActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ BookAppointmentActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ BillHistoryActivity.java
β”‚   β”‚   β”‚   └── TreatmentHistoryActivity.java
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ doctor/
β”‚   β”‚   β”‚   β”œβ”€β”€ DoctorDashboardActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ DoctorProfileActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ PendingAppointmentsActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ TodaysAppointmentsActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ HistoryUpdateActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ GenerateBillActivity.java
β”‚   β”‚   β”‚   β”œβ”€β”€ PatientHistoryActivity.java
β”‚   β”‚   β”‚   └── AppointmentAdapter.java
β”‚   β”‚   β”‚
β”‚   β”‚   └── model/
β”‚   β”‚       β”œβ”€β”€ User.java
β”‚   β”‚       β”œβ”€β”€ Appointment.java
β”‚   β”‚       β”œβ”€β”€ Bill.java
β”‚   β”‚       └── Treatment.java
β”‚   β”‚
β”‚   └── res/
β”‚       β”œβ”€β”€ layout/
β”‚       β”‚   β”œβ”€β”€ activity_main.xml
β”‚       β”‚   β”œβ”€β”€ activity_login.xml
β”‚       β”‚   β”œβ”€β”€ activity_register.xml
β”‚       β”‚   β”œβ”€β”€ activity_patient_dashboard.xml
β”‚       β”‚   β”œβ”€β”€ activity_patient_profile.xml
β”‚       β”‚   β”œβ”€β”€ activity_book_appointment.xml
β”‚       β”‚   β”œβ”€β”€ activity_doctor_dashboard.xml
β”‚       β”‚   β”œβ”€β”€ activity_history_update.xml
β”‚       β”‚   β”œβ”€β”€ activity_generate_bill.xml
β”‚       β”‚   β”œβ”€β”€ activity_list.xml
β”‚       β”‚   β”œβ”€β”€ item_appointment.xml
β”‚       β”‚   β”œβ”€β”€ item_bill.xml
β”‚       β”‚   └── item_treatment.xml
β”‚       β”‚
β”‚       β”œβ”€β”€ values/
β”‚       β”‚   β”œβ”€β”€ strings.xml
β”‚       β”‚   β”œβ”€β”€ colors.xml
β”‚       β”‚   └── themes.xml
β”‚       β”‚
β”‚       └── drawable/
β”‚           └── spinner_bg.xml
β”‚
β”œβ”€β”€ google-services.json                    # Firebase config (not pushed to GitHub)
β”œβ”€β”€ build.gradle
└── AndroidManifest.xml

πŸ”₯ Firebase Database Structure

Firebase Realtime Database
β”‚
β”œβ”€β”€ users/
β”‚   └── {uid}/
β”‚       β”œβ”€β”€ uid
β”‚       β”œβ”€β”€ name
β”‚       β”œβ”€β”€ email
β”‚       β”œβ”€β”€ phone
β”‚       β”œβ”€β”€ role          # "patient" or "doctor"
β”‚       β”œβ”€β”€ age
β”‚       β”œβ”€β”€ gender
β”‚       β”œβ”€β”€ specialization
β”‚       └── address
β”‚
β”œβ”€β”€ appointments/
β”‚   └── {appointmentId}/
β”‚       β”œβ”€β”€ appointmentId
β”‚       β”œβ”€β”€ patientId
β”‚       β”œβ”€β”€ doctorId
β”‚       β”œβ”€β”€ patientName
β”‚       β”œβ”€β”€ doctorName
β”‚       β”œβ”€β”€ date
β”‚       β”œβ”€β”€ time
β”‚       β”œβ”€β”€ status        # pending / accepted / rejected / completed
β”‚       └── symptoms
β”‚
β”œβ”€β”€ treatments/
β”‚   └── {treatmentId}/
β”‚       β”œβ”€β”€ treatmentId
β”‚       β”œβ”€β”€ appointmentId
β”‚       β”œβ”€β”€ patientId
β”‚       β”œβ”€β”€ doctorId
β”‚       β”œβ”€β”€ patientName
β”‚       β”œβ”€β”€ doctorName
β”‚       β”œβ”€β”€ disease
β”‚       β”œβ”€β”€ prescription
β”‚       β”œβ”€β”€ progress
β”‚       └── date
β”‚
└── bills/
    └── {billId}/
        β”œβ”€β”€ billId
        β”œβ”€β”€ appointmentId
        β”œβ”€β”€ patientId
        β”œβ”€β”€ doctorId
        β”œβ”€β”€ patientName
        β”œβ”€β”€ doctorName
        β”œβ”€β”€ date
        β”œβ”€β”€ consultationFee
        β”œβ”€β”€ medicineFee
        β”œβ”€β”€ totalAmount
        └── status        # paid / unpaid

πŸš€ Getting Started

Prerequisites

  • Android Studio (latest version recommended)
  • Java JDK 8 or higher
  • A Firebase account (free)
  • Android device or emulator with API 21+

Installation

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/MedicalManagementSystem.git
cd MedicalManagementSystem

2. Set up Firebase

  • Go to Firebase Console
  • Create a new project named MedicalManagementSystem
  • Add an Android app with package name com.example.medicalmanagementsystem
  • Download google-services.json
  • Place it inside the app/ folder of this project
  • Enable Authentication β†’ Email/Password
  • Enable Realtime Database β†’ Start in test mode

3. Open in Android Studio

  • Open Android Studio
  • Click File β†’ Open β†’ select the cloned folder
  • Wait for Gradle to sync

4. Run the App

  • Connect your Android device via USB (enable USB Debugging)
  • Or launch an emulator from Device Manager
  • Click the green β–Ά Run button

πŸ” Firebase Security Rules

Set these rules in Firebase Console β†’ Realtime Database β†’ Rules:

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

πŸ“‹ App Flow

Launch App
    β”‚
    β”œβ”€β”€ Select Role
    β”‚       β”œβ”€β”€ Patient β†’ Login / Register
    β”‚       └── Doctor  β†’ Login / Register
    β”‚
    β”œβ”€β”€ Patient Flow
    β”‚       β”œβ”€β”€ Dashboard
    β”‚       β”œβ”€β”€ View Profile
    β”‚       β”œβ”€β”€ Book Appointment (select doctor, date, time, symptoms)
    β”‚       β”œβ”€β”€ View Bill History
    β”‚       └── View Treatment History
    β”‚
    └── Doctor Flow
            β”œβ”€β”€ Dashboard
            β”œβ”€β”€ View Profile
            β”œβ”€β”€ Pending Appointments
            β”œβ”€β”€ Today's Appointments β†’ Accept / Reject
            β”œβ”€β”€ Update Treatment (disease, prescription, progress)
            β”œβ”€β”€ Generate Bill (consultation + medicine fee)
            └── Patient History (all treated patients)

βš™οΈ Dependencies

// Firebase
implementation platform('com.google.firebase:firebase-bom:32.7.0')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-database'

// UI
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add YourFeature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Your Name


πŸ™ Acknowledgements


Made with ❀️ for a better healthcare experience

About

A full-stack Medical Management System app for patients and doctors built using Java and Firebase.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages