0% found this document useful (0 votes)
19 views

Siddhart Java Project KK

Java micro project

Uploaded by

pravinkatkade90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Siddhart Java Project KK

Java micro project

Uploaded by

pravinkatkade90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

D.Y. Patil Technical Campus, Ambi

D. Y. PATIL POLYTECHNIC

Institute Code: 0996

MICRO PROJECT
Academic year: 2024 – 25

TITLE OF PROJECT: - Hospital Management System

BRANCH:- Computer Engineering (co) SUBJECT:- Adv. Java Programming

COURSE CODE:- CO-5I SUBJECT CODE:- 22517

1|P a g e
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

Certificate
This is to certify that Mr. /Mrs. Siddhart Ravindra Naiknavre

Roll No: 01 of Fifth Semester of Diploma in computer Engineering & Technology

at [ D. Y. PATIL POLYTECHNIC ] (Code 0996) , has completed the Micro Project

satisfactorily in Subject Adv. Java Programming (22517) in the academic year 2024 -

2025 as per the MSBTE prescribed curriculum of I Scheme.

Place: Ambi Enrollment No: 2 0 0 9 9 6 0 0 9 1

Date: / /2024 Exam Seat No:

Project Guide Head of the Department Principal

Head of
Institute

2|P a g e
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

Certificate
This is to certify that Mr. /Mrs. Kanchan subhash Chaugule

Roll No: 02 of Fifth Semester of Diploma in computer Engineering & Technology

at [ D. Y. PATIL POLYTECHNIC ] (Code 0996) , has completed the Micro Project

satisfactorily in Subject Adv. Java Programming (22517) in the academic year 2024 -

2025 as per the MSBTE prescribed curriculum of I Scheme.

Place: Ambi Enrollment No: 2 0 0 9 9 6 0 0 9 4

Date: / /2024 Exam Seat No:

Project Guide Head of the Department Principal


Head Of
Institute 4
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

Certificate
This is to certify that Mr. /Mrs. Ashish Namdev kshirsagar

Roll No: 03 of Fifth Semester of Diploma in computer Engineering & Technology

at [ D. Y. PATIL POLYTECHNIC ] (Code 0996) , has completed the Micro Project

satisfactorily in Subject Adv. Java Programming (22517) in the academic year 2024 -

2025 as per the MSBTE prescribed curriculum of I Scheme.

Place: Ambi Enrollment No: 2 1 0 9 9 6 0 0 2 9

Date: / /2024 Exam Seat No:

Project Guide Head of the Department Principal

Head Of
Institute
5
INDEX:

Sr. Title Page No.

1 Abstract 02

2 Introduction 03

3 Simple Java Program for Hospital 04


Management System:
1. Docter List
2. Patient List

4 How to Run Hospital Management 05


System :

5 Source Code & Output 6 to 13

6 Module and Functionality 13

7 Prerequisites for Hospital 14


Management System

8 Conclusion 17

9 Weekly Progress Report 24

10 Annexure II 25

1
Abstract of Hospital Management System:

In this technical world, humans are trying to convert manual processes into
automation to save time and money. The hospital Management system is a
solution for hospitals. To manage many employees who are working with doctors,
nurses, and staff members.
This application is a web platform to handle and manage all the activity and
maintain and centralize a database of information that will be easily available with
just one click on the web.
The main objective to develop a Hospital management system in Java is to
manage the hospital activity online. There will be Three main Actors or Users of
the application 1) doctor 2) Admin 3) Receptionist. This project is only for
college students who want to complete their Semester projects.

2
Introduction:

This(Hospital Management System Project in Java with Source Code PDF) is a


very popular project among students. In this project, I cover 1. DOCTOR, 2.
PATIENT, 3. MEDICAL, 4. LAB, 5. FACILITY, 6. STAFF tables. Now take an
example of the Doctor table, I already saved some doctor details, when you
select option 1. The doctor then 2 option will occur. new entry or 2. doctor list
Here you can save the details of the New Doctor like Below.

1. ID
2. Name
3. Specializations
4. Working Time
5. Qualification

3
Simple Java Program for Hospital Management System:

You can see the newly updated list of doctors and by pressing 2 you can see
those details

Doctors List :

In this Hospital Management System Project in Java with Source Code PDF.
You can also check the patient list or you can admit new patients same as the
Doctors List for that you have to go to the main menu and then select a patient
then 2 options will occur
1. Add New Entry or 2. Existing Patients List and by pressing 2 you can check
the patient details. These are the list of my friend and they are not patient they
are absolutely fine(Just for Fun).

4
Patients List:

How to Run Hospital Management System :

How to run this Hospital Management System Project in Java with Source Code
PDF. First, create a folder on your desktop with any name then save or download
the code as hospitalmanagement.java. Now open a command prompt by pressing
win+r simultaneously and go to the location of
the hospitalmanagement.java by using the cd command.

CD desktop
CD “folder name”(without quotes)

Now run the below command. The first, command is for compiling the program
and the second one is for running the program.

javac hospitalmanagement.java java


hospitalmanagement

after running the command their will be 7 .class( doctor.class,


fecility.class,hospitalmanagement.class, lab.class, medical.class,

5
patient.class, and staff.class) will be created.

Now your program is ready to work do whatever you want to perform operations.
We also have some competitive websites solution in C, C++, and Java
Programming languages. Free Download Java Projects and others here.

Hospital Management System Project in Java with Source Code

Below you can find the Hospital Management System Project in Java with
Source Code . This is a very important mini or we can say that medium size of
project for bachelors and masters student.

Source Code:-
import java.io.IOException; import
java.util.List;

import javax.servlet.ServletException; import


javax.servlet.annotation.WebServlet; import
javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import
javax.servlet.http.HttpServletResponse; import
javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;

import in.co.hospital.mgt.sys.bean.BaseBean; import


in.co.hospital.mgt.sys.bean.PatientBean;

6
import in.co.hospital.mgt.sys.bean.UserBean;
import in.co.hospital.mgt.sys.exception.ApplicationException; import
in.co.hospital.mgt.sys.model.PatientModel;
import in.co.hospital.mgt.sys.model.UserModel;
import in.co.hospital.mgt.sys.util.DataUtility; import
in.co.hospital.mgt.sys.util.PropertyReader; import
in.co.hospital.mgt.sys.util.ServletUtility;

/**
* Servlet implementation class PatientListCtl
*/
@WebServlet(name = "PatientListCtl", urlPatterns = { "/ctl/PatientListCtl" })
public class PatientListCtl extends BaseCtl { private
static final long serialVersionUID = 1L;

private static Logger log = Logger.getLogger(PatientListCtl.class);

/**
* Populates bean object from request parameters
*
* @param request
* @return
*/ @Override
protected BaseBean populateBean(HttpServletRequest request) {
log.debug("PatientListCtl populateBean method start"); PatientBean
bean = new PatientBean();

7
bean.setFirstName(DataUtility.getString(request.getParameter("fName")))
;

bean.setEmailId(DataUtility.getString(request.getParameter("emailId")));
log.debug("PatientListCtl populateBean method end");
return bean;
}
/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
log.debug("PatientListCtl doGet method start"); List
list = null;
int pageNo = 1;
int pageSize = DataUtility.getInt(PropertyReader.getValue("page.size"));

PatientModel model = new PatientModel();


PatientBean bean = (PatientBean) populateBean(request); try {
HttpSession session=request.getSession();
UserBean uBean=(UserBean)session.getAttribute("user");

if(uBean.getRoleId()==2) {
bean.setDoctorId(uBean.getId());
}
list = model.search(bean, pageNo, pageSize);

8
if (list == null || list.size() == 0) { ServletUtility.setErrorMessage("No
Record Found", request);
}
ServletUtility.setList(list, request); ServletUtility.setPageNo(pageNo,
request); ServletUtility.setPageSize(pageSize, request);
ServletUtility.forward(getView(), request, response);

} catch (ApplicationException e) { ServletUtility.handleException(e,


request, response); e.printStackTrace();
return;
}
log.debug("PatientListCtl doGet method end");
}
/**
* @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
log.debug("PatientListCtl doPost method start"); List
list = null;

int pageNo = DataUtility.getInt(request.getParameter("pageNo"));

int pageSize = DataUtility.getInt(request.getParameter("pageSize"));

9
pageNo = (pageNo == 0) ? 1 : pageNo;

pageSize = (pageSize == 0) ?
DataUtility.getInt(PropertyReader.getValue("page.size")) : pageSize;

PatientBean bean = (PatientBean) populateBean(request);

PatientModel model = new PatientModel(); String[]


ids = request.getParameterValues("ids");
String op = DataUtility.getString(request.getParameter("operation"));

if (OP_SEARCH.equalsIgnoreCase(op) || OP_NEXT.equalsIgnoreCase(op) ||
OP_PREVIOUS.equalsIgnoreCase(op))
{

if (OP_SEARCH.equalsIgnoreCase(op)) {

pageNo = 1;

} else if (OP_NEXT.equalsIgnoreCase(op)) {

pageNo++;
} else if (OP_PREVIOUS.equalsIgnoreCase(op) && pageNo > 1) {

pageNo--;
}
} else if (OP_NEW.equalsIgnoreCase(op)) {
ServletUtility.redirect(HMSView.PATIENT_CTL, request, response);

10
return;
} else if (OP_DELETE.equalsIgnoreCase(op)) {
pageNo = 1;
if (ids != null && ids.length > 0) { PatientBean
deletebean = new PatientBean(); for (String id :
ids) { deletebean.setId(DataUtility.getInt(id));
try
{
model.delete(deletebean);
} catch (ApplicationException e) {
ServletUtility.handleException(e, request, response);
e.printStackTrace();
return;
}
}
ServletUtility.setSuccessMessage("Data Deleted Successfully", request);
}
else
{
ServletUtility.setErrorMessage("Select at least one record", request);
}
} else if (OP_RESET.equalsIgnoreCase(op)) {
ServletUtility.redirect(HMSView.PATIENT_LIST_CTL, request,
response);
Return;
}
try {
HttpSession session=request.getSession();

11
UserBean uBean=(UserBean)session.getAttribute("user");

if(uBean.getRoleId()==2) {
bean.setDoctorId(uBean.getId());
}
list = model.search(bean, pageNo, pageSize); if
(list == null || list.size() == 0) {
ServletUtility.setErrorMessage("NO Record Found", request);
}
ServletUtility.setList(list, request); ServletUtility.setPageNo(pageNo,
request); ServletUtility.setPageSize(pageSize, request);
ServletUtility.forward(getView(), request, response);
} catch (ApplicationException e) { ServletUtility.handleException(e,
request, response); e.printStackTrace();
return;
}

log.debug("PatientListCtl doPost method end");


}

@Override
protected String getView() {
// TODO Auto-generated method stub return
HMSView.PATIENT_LIST_VIEW;
}

12
}

Output :

Module and Functionality of Hospital Management:


Three main actors of the system going to manage or run the complete application.
Let’s discuss it one by one according to the role and readabilities.

Admin User
Admin is the main actor who will be responsible for managing Doctors and
Receptionists. Below is the task list which will be performed by the admin.

 Admin can ADD/DELETE/UPDATE a doctor.


 Admin can VIEW the list of doctors.
 Admin can ADD/DELETE/UPDATE a receptionist.
 Admin can VIEW the list of receptionists.

13
 Admin can ADD/DELETE/UPDATE a patient.
 Admin can ADD/DELETE/UPDATE an appointment.
Doctor User in HMS
 A doctor can check the appointment and the patient list.
 The doctor can VIEW the appointments.
 The doctor can VIEW the patient list.

Receptionist User in HMS


 The receptionist can ADD/EDIT/VIEW appointments.
 The receptionist can ADD/EDIT/VIEW the patient.

Prerequisites for Hospital Management System :

To complete this project, you should have:


 Basic Java programming skills
 Knowledge of Java Swing for GUI development
 SQL database knowledge and SQL query skills
 Understanding of JAR files in Java projects
 Basic database management knowledge, including SQLite
 A Java IDE, such as Eclipse
Optionally, experience with the WindowBuilder plugin in Eclipse to make
GUI design easier.

14
Modules:

1. Patient Registration
2. Doctor Management
3. Appointment Scheduling
4. Ward Management
5. Laboratory Management
6. Pharmacy Management
7. Billing and Payment

Java Classes:

// Patient.java
public class Patient {
private int id;
private String name;
private String contact;
// Getters and setters
}

// Doctor.java
public class Doctor {
private int id;
private String name;
private String specialty;
// Getters and setters
}

// Appointment.java
public class Appointment {
private int id;
private Patient patient;
private Doctor doctor;
private Date date;
private Time time;
// Getters and setters
15
}

// Ward.java
public class Ward {
private int id;
private int capacity;
private List<Patient> patients;
// Getters and setters
}

// Laboratory.java
public class Laboratory {
private int id;
private String testName;
private double cost;
// Getters and setters
}

// Pharmacy.java
public class Pharmacy {
private int id;
private String medicationName;
private int quantity;
// Getters and setters
}

// Billing.java
public class Billing {
private int id;
private Patient patient;
private double amount;
// Getters and setters
}

HospitalManagementSystem.java

import java.util.*;
16
public class HospitalManagementSystem {
private List<Patient> patients;
private List<Doctor> doctors;
private List<Appointment> appointments;
private List<Ward> wards;
private List<Laboratory> laboratories;
private List<Pharmacy> pharmacies;
private List<Billing> billings;

// Constructor
public HospitalManagementSystem() {
patients = new ArrayList<>();
doctors = new ArrayList<>();
appointments = new ArrayList<>();
wards = new ArrayList<>();
laboratories = new ArrayList<>();
pharmacies = new ArrayList<>();
billings = new ArrayList<>();
}

// Patient Registration
public void registerPatient(Patient patient) {
patients.add(patient);
}

// Doctor Management
public void addDoctor(Doctor doctor) {
doctors.add(doctor);
}

// Appointment Scheduling
public void scheduleAppointment(Appointment appointment) {
appointments.add(appointment);
}

// Ward Management
public void addWard(Ward ward) {
17
wards.add(ward);
}

// Laboratory Management
public void addLaboratory(Laboratory laboratory) {
laboratories.add(laboratory);
}

// Pharmacy Management
public void addPharmacy(Pharmacy pharmacy) {
pharmacies.add(pharmacy);
}

// Billing and Payment


public void generateBill(Billing billing) {
billings.add(billing);
}

// Main method
public static void main(String[] args) {
HospitalManagementSystem hms = new HospitalManagementSystem();
// Create patients, doctors, appointments, wards, laboratories, pharmacies, and billings
// Call respective methods to manage hospital operations
}
}

conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/hms",
"username", "password");
} catch (Exception e) {
System.out.println("Error connecting to database: " + e.getMessage());
}
}

// CRUD operations for each module


}

18
Conclusion:

This Hospital Management System project serves as a solid foundation for


understanding Java-based application development with JDBC and MySQL
integration. By following the setup instructions carefully, you can ensure the
code runs efficiently on your system.
Hence, we have successfully built a Hospital Management System Java Project
that helps to manage patients’ as well as doctors’ information & helps to manage
a hospital easily with Swing used for GUI. This program is a very efficient & easy
way to maintain the data regarding patients & doctors. With the implementation
of the Swing module for GUI, this program is a very efficient & easy way to
manage patients’ as well as doctors’ information and store the results in a
database.

19
MICRO PROJECT

Sr.No. Week Activity Performed date Sign


1 1st Discussion and 18/07/24
finalization of topic
2 2nd Preparation and 01/08/24
submission of Abstract
3 3rd Literature Review 08/08/24
4 4th Collection of Data 15/08/24
5 5th Collection of Data 22/08/24
6 6th Discussion and outline 29/08/24
of Content
7 7th Formulation of Content 05/09/24
8 8th Editing and proof 12/09/24
Reading of Content
9 9th Compilation of Report 19/09/24
And Presentation
10 10th Seminar 03/10/24
11 11th Viva voce 10/10/24
12th Final submission of 07/11/24
12 Micro Project

Sign of the student Sign of the faculty


ANEEXURE II

Evaluation Sheet for the Micro Project

Academic Year: 2024 - 25 Course code: 22517 Semester: 5th

Subject: Adv. Java Programming Name Of Faculty:- Prof. Shubhangi Shivankar Mam

Title of the project :- Hospital Management System


Coatdresses by Micro Project:
A: Major learning outcomes achieved by students by doing the project
Practical Outcome:
…………………………………………………………………………………………………………………………………………………………

Marks out of 6 for Marks out of 6


Roll. Student Name performance in for performance Total Marks
No group activity (D5 in oral /
Col.8) presentation (D5
Col.9)
01 Siddhart Naiknavare
02 Kanchan Chaugule
03 Ashish Kshirsagar

Name And Signature of Faculty

You might also like