A Spring Boot-based web application for managing patients, doctors, appointments, and consultations in a healthcare environment.
This project is a simple patient management system built with Spring Boot, Spring Data JPA, and Thymeleaf. It supports CRUD operations for patients, doctors, appointments, and consultations, and uses a MySQL database for persistence.
- Manage patients, doctors, appointments, and consultations
- Relational data model with JPA/Hibernate
- RESTful API endpoints (extendable)
- Web interface with Thymeleaf (extendable)
- Pagination and filtering for patient records
- Database initialization with sample data
- Java 17
- Spring Boot 3.4.4
- Spring Data JPA
- Spring Web
- Thymeleaf
- Lombok
- MySQL (with Docker support)
- H2 (for testing)
- Maven
- Java 17+
- Maven 3.6+
- Docker (for running MySQL easily)
-
Clone the repository:
git clone https://github.com/your-username/PatientManagement.git cd PatientManagement -
Configure the database:
The application uses MySQL by default. Update
src/main/resources/application.propertiesif needed:spring.datasource.url=jdbc:mysql://localhost:3306/patient_db?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=someting spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true server.port=8080
Start a MySQL container using Docker:
docker run --name my_sql -e MYSQL_ROOT_PASSWORD=someting -p 3306:3306 -d mysql:latestBuild and run the application using Maven:
./mvnw spring-boot:runThe application will be available at http://localhost:8080.
src/
main/
java/org/example/patientmanagement/
entities/
Appointement.java
AppointementStatus.java
Consultation.java
Doctor.java
Patient.java
repositories/
AppointementRepository.java
ConsultationRepository.java
DoctorRepository.java
PatientRepository.java
PatientManagementApplication.java
resources/
application.properties
test/
java/org/example/patientmanagement/
PatientManagementApplicationTests.java
