Ajpr MP
Ajpr MP
CERTIFICATE
1
This is to certify that the Project Report entitled Web Medical Management System
Computer Engineering
2
ACKNOWLEDGEMENT
Firstly, we would like to express our special thanks of gratitude to our subject teacher Mrs.
Archana Bansod and principal Dr. A.S. Kondekar of Y.B Patil Polytechnic, Akurdi, Pune,
who gave us the golden opportunity to do this wonderful project of Advanced Java
Programming on ‘Web Medical Management System’ due to which we came to know
about so many new things in the field of Billing systems and we are really thankful to them
for the same.
We also thank them for their able guidance and support in completing our project.
Secondly, we would also like to extent our gratitude to the Y.B. Patil Polytechnic, Akurdi,
Pune for providing us the facility required.
Thirdly, we would like to thank our friends who helped us a lot in finalizing this project
within the limited time frame.
Lastly, thanks to our group members for co-operating and doing the team work together.
Date:
Place:Akurdi
3
INDEX
1. Introduction 5
2. Problem Statement 6
3. Objectives 7
5. Advantages 9
6. Code 10
7. Output 21
8. References
9. Conclusion
4
Introduction
In today's rapidly evolving healthcare landscape, the ability to manage patient records,
appointments, and user authentication efficiently is crucial for ensuring smooth operations and
quality care. Healthcare providers, whether they are hospitals, clinics, or private practices, rely
heavily on managing vast amounts of patient data, tracking appointments, and ensuring secure
access to sensitive medical information. As the demand for medical services grows, it becomes
increasingly important to have systems in place that can streamline these processes and reduce
human error.
For any healthcare institution, managing patient data, scheduling appointments, and ensuring that
only authorized users have access to critical information is of paramount importance. Manual
processes for handling patient records, authentication, and appointment scheduling are not only
time-consuming but also prone to errors, which can impact patient care and operational
efficiency. Ensuring that patient details are accurately stored, and appointments are properly
scheduled, can be a daunting task without automation.
The Web Medical Management System was developed to automate and streamline the core
processes in medical organizations, including user authentication, patient management, and
appointment scheduling (with future plans for implementation). This system leverages modern
software technologies to provide a seamless and efficient interface for managing patient
information, securing user logins, and storing data in an easily accessible format.
This project aims to simplify the complex and critical tasks of managing medical records by
utilizing a powerful combination of Java, Swing (for the user interface), and SQLite (for local
database management). The system offers intuitive interfaces for users to input patient details,
securely log into the platform, and manage patient records, including essential information like
contact details, gender, age, and medical history. It also includes functionality for adding new
patients to the database, with records stored for future access and modifications.
The Web Medical Management System is an ideal solution for small to medium-sized healthcare
organizations that require an efficient, user-friendly system for managing patient data and user
authentication. By automating these essential tasks, the system not only reduces the potential for
errors but also helps healthcare providers focus on what matters most—delivering excellent
patient care. With the flexibility of future feature expansion, such as appointment management,
this system is designed to evolve alongside the needs of modern healthcare practices.
5
Problem statement
In the healthcare industry, medical practices, clinics, and hospitals face significant challenges in
managing patient records, appointments, and ensuring secure access to sensitive medical data.
While large healthcare facilities may have sophisticated software infrastructure, smaller practices
and individual healthcare providers often lack access to such advanced systems. This disparity
results in inefficiencies in handling patient information, scheduling appointments, and ensuring
secure, authorized access to medical data.
Manual handling of patient records is prone to errors such as incorrect data entry, missed
appointments, or improper access control. These errors not only impact patient care but also
expose healthcare organizations to potential regulatory and compliance risks.
Recognizing these challenges, the Web Medical Management System is designed to address
the following critical issues:
1. Manual Data Entry Errors: Manual record-keeping is prone to inaccuracies, which can
compromise patient care. By automating the process, the system ensures that patient records
are accurate, reducing the risk of medical errors
2. Inefficient Record Management: Without a structured system for storing patient data, it
becomes difficult to organize and access medical records quickly. The system utilizes a
centralized database to securely store and retrieve patient details, improving efficiency and
accessibility.
3. Security and Privacy Concerns: Sensitive patient data must be protected from unauthorized
access. The system incorporates user authentication and data encryption to ensure that only
authorized personnel can access medical records, ensuring compliance with privacy
regulations like HIPAA.
4. Appointment Scheduling Challenges: Without a streamlined appointment management
system, healthcare providers face difficulties in tracking patient appointments, leading to
scheduling conflicts or missed appointments.
Through the Web Medical Management System, healthcare providers can simplify
administrative tasks, improve the accuracy and security of patient data, and enhance overall
patient care. This project aims to provide a user-friendly, cost-effective, and scalable solution for
managing medical records and appointments, reducing errors and improving operational
efficiency.
6
Objectives
1. Patient Record Management:To provide a seamless and efficient way to store, manage,
and retrieve patient records. The system will ensure that all patient details, such as
personal information, age, gender, contact, and address, are accurately recorded and
easily accessible for healthcare providers.
2. User Authentication and Access Control:The system will incorporate secure user
authentication to manage access to patient records. Admin users will have full access to
the system’s features, including record management and report generation, while other
users (e.g., medical staff) will only have access to relevant data based on their roles
4. Patient Data Security and Privacy:To implement robust security features to protect
sensitive patient data. The system will enforce user authentication and authorization to
ensure that only authorized personnel can access patient information, in compliance with
privacy laws and regulations like HIPAA.
5. Error-Free Patient Data Entry:To minimize human errors in patient data entry by
automating the process and using validation checks. The system will ensure that
information such as patient age, gender, and contact details are entered accurately,
reducing the risk of incorrect diagnoses or treatments.
7
Key Features of the system
2. Patient Data Entry and Update: The system provides an interface for healthcare
professionals to enter and update patient information, including name, age, contact
details, gender, and medical history, ensuring accurate and up-to-date patient profiles.
4. User-Friendly Interface: The system is designed with a simple and intuitive graphical
user interface (GUI), allowing users, including healthcare staff and patients, to interact
with the system without requiring advanced technical knowledge.
5. Database Management: The system uses an SQLite database to store and retrieve
patient information. It ensures that all records are securely saved and easily accessible for
future reference, providing efficient data storage and retrieval.
6. Secure Login and Authentication: The system features user authentication for secure
access, with different roles (such as admin, doctor, patient) having distinct access levels
to ensure data privacy and security.
8
Advantages
1. Efficiency: The system automates key tasks such as patient record management and user
authentication, drastically reducing time spent on manual processes. This enables
healthcare providers to streamline workflows and spend more time on patient care.
2. Accuracy: The system minimizes human errors by automating data entry and
management, ensuring that patient information is consistently accurate. With accurate
records, the risk of mistakes in treatment or medication is reduced.
4. Transparency: The system offers clear and easily accessible records for healthcare
providers, making it easy to track patient information. This improves trust and clarity in
healthcare operations.
5. Easy Record Keeping: Patient data is stored in a centralized database, making it simple
to retrieve and update records as necessary. This eliminates the need for physical
paperwork, reducing clutter and the risk of losing important information.
6. Scalability and Flexibility: The system is designed to grow alongside the needs of the
healthcare facility, allowing for the addition of new features such as appointment
scheduling.
7. User-Friendly Interface: Built with a simple and intuitive GUI, the system is easy for
medical staff to navigate with minimal training. Users can quickly input and access
patient information, reducing the time spent on learning the system.
8. Improved Data Security: With user authentication in place, the system ensures that
sensitive patient data is accessed only by authorized personnel. This protects patient
privacy and helps meet healthcare data protection regulations like HIPAA.
9
Codes
package MyPackage;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.table.DefaultTableModel;
initializeDatabase();
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setSize(800, 600);
mainFrame.setLayout(new CardLayout());
10
JPanel registrationPanel = createPatientRegistrationPanel();
mainFrame.add(mainTabs);
mainFrame.setVisible(true);
adminLoginPanel.setLayout(null);
11
adminTitle.setBounds(300, 20, 300, 30);
adminLoginPanel.add(adminTitle);
adminLoginPanel.add(usernameLabel);
adminLoginPanel.add(usernameField);
adminLoginPanel.add(passwordLabel);
adminLoginPanel.add(passwordField);
adminLoginPanel.add(loginButton);
12
JLabel loginMessage = new JLabel("");
adminLoginPanel.add(loginMessage);
loginButton.addActionListener(e -> {
if (username.equals(ADMIN_USERNAME) &&
password.equals(ADMIN_PASSWORD)) {
loginMessage.setText("Login successful!");
showAdminPanel(mainFrame);
} else {
});
return adminLoginPanel;
13
private static void showAdminPanel(JFrame mainFrame) {
patientsPanel.add(patientsScrollPane, BorderLayout.CENTER);
adminTabs.addTab("Patients", patientsPanel);
doctorsPanel.add(doctorsScrollPane, BorderLayout.CENTER);
adminTabs.addTab("Doctors", doctorsPanel);
medicinesPanel.add(medicinesScrollPane, BorderLayout.CENTER);
14
adminTabs.addTab("Medicines", medicinesPanel);
mainFrame.getContentPane().removeAll();
mainFrame.add(adminTabs);
mainFrame.revalidate();
mainFrame.repaint();
while (rs.next()) {
model.addRow(new Object[]{
rs.getInt("id"),
rs.getString("name"),
rs.getInt("age"),
15
rs.getString("gender"),
rs.getString("contact"),
rs.getString("disease")
});
} catch (SQLException e) {
e.printStackTrace();
while (rs.next()) {
model.addRow(new Object[]{
rs.getInt("id"),
16
rs.getString("name"),
rs.getString("specialty"),
rs.getString("contact")
});
} catch (SQLException e) {
e.printStackTrace();
while (rs.next()) {
model.addRow(new Object[]{
rs.getInt("id"),
17
rs.getString("name"),
rs.getDouble("price"),
rs.getInt("stock")
});
} catch (SQLException e) {
e.printStackTrace();
18
String createPatientsTable = "CREATE TABLE IF NOT EXISTS
patients (" +
"disease TEXT)";
statement.execute(createPatientsTable);
"contact TEXT)";
statement.execute(createDoctorsTable);
"stock INTEGER)";
19
statement.execute(createMedicinesTable);
} catch (SQLException e) {
e.printStackTrace();
panel.setLayout(null);
20
JLabel contactLabel = new JLabel("Contact:");
panel.add(nameLabel);
panel.add(nameField);
panel.add(ageLabel);
panel.add(ageField);
panel.add(genderLabel);
panel.add(genderField);
panel.add(contactLabel);
panel.add(contactField);
panel.add(diseaseLabel);
21
panel.add(diseaseField);
panel.add(registerButton);
registerButton.addActionListener(e -> {
stmt.setString(1, name);
stmt.setInt(2, age);
stmt.setString(3, gender);
stmt.setString(4, contact);
stmt.setString(5, disease);
stmt.executeUpdate();
22
ex.printStackTrace();
});
return panel;
doctorPanel.add(title);
doctorPanel.add(nameLabel);
23
nameField.setBounds(200, 80, 200, 25);
doctorPanel.add(nameField);
doctorPanel.add(specialtyLabel);
doctorPanel.add(specialtyField);
doctorPanel.add(contactLabel);
doctorPanel.add(contactField);
doctorPanel.add(registerButton);
24
JLabel registrationMessage = new JLabel("");
doctorPanel.add(registrationMessage);
registerButton.addActionListener(e -> {
return;
stmt.setString(1, name);
stmt.setString(2, specialty);
stmt.setString(3, contact);
stmt.executeUpdate();
25
nameField.setText("");
specialtyField.setText("");
contactField.setText("");
ex.printStackTrace();
});
return doctorPanel;
medicinePanel.setLayout(null);
medicinePanel.add(title);
26
JLabel nameLabel = new JLabel("Name:");
medicinePanel.add(nameLabel);
medicinePanel.add(nameField);
medicinePanel.add(priceLabel);
medicinePanel.add(priceField);
medicinePanel.add(stockLabel);
medicinePanel.add(stockField);
27
JButton registerButton = new JButton("Register");
medicinePanel.add(registerButton);
medicinePanel.add(registrationMessage);
registerButton.addActionListener(e -> {
return;
try {
28
try (Connection connection =
DriverManager.getConnection(DATABASE_URL);
stmt.setString(1, name);
stmt.setDouble(2, price);
stmt.setInt(3, stock);
stmt.executeUpdate();
nameField.setText("");
priceField.setText("");
stockField.setText("");
ex.printStackTrace();
});
return medicinePanel;
29
Database
package MyPackage;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
try {
Connection connection =
DriverManager.getConnection(DATABASE_URL);
30
+ "gender TEXT NOT NULL, "
+ ");";
connection.createStatement().execute(createPatientsTableSQL);
+ ");";
connection.createStatement().execute(createDoctorsTableSQL);
31
+ ");";
connection.createStatement().execute(createMedicinesTableSQL);
PreparedStatement patientStatement =
connection.prepareStatement(insertPatientSQL);
patientStatement.setString(1, "ABC");
patientStatement.setInt(2, 30);
patientStatement.setString(3, "Male");
patientStatement.setString(4, "1234567890");
patientStatement.setString(5, "Flu");
patientStatement.executeUpdate();
PreparedStatement doctorStatement =
connection.prepareStatement(insertDoctorSQL);
doctorStatement.setString(2, "Cardiology");
doctorStatement.setString(3, "9876543210");
doctorStatement.executeUpdate();
32
System.out.println("Doctor data inserted successfully!");
PreparedStatement medicineStatement =
connection.prepareStatement(insertMedicineSQL);
medicineStatement.setString(1, "Paracetamol");
medicineStatement.setDouble(2, 50.0);
medicineStatement.setInt(3, 100);
medicineStatement.executeUpdate();
ResultSet patientsResultSet =
connection.createStatement().executeQuery(selectPatientsSQL);
System.out.println("Patient Records:");
while (patientsResultSet.next()) {
System.out.println("Gender: " +
patientsResultSet.getString("gender"));
System.out.println("Contact: " +
patientsResultSet.getString("contact"));
33
System.out.println("Disease: " +
patientsResultSet.getString("disease"));
System.out.println("-------------------");
ResultSet doctorsResultSet =
connection.createStatement().executeQuery(selectDoctorsSQL);
System.out.println("Doctor Records:");
while (doctorsResultSet.next()) {
System.out.println("Specialty: " +
doctorsResultSet.getString("specialty"));
System.out.println("Contact: " +
doctorsResultSet.getString("contact"));
System.out.println("-------------------");
ResultSet medicinesResultSet =
connection.createStatement().executeQuery(selectMedicinesSQL);
System.out.println("Medicine Records:");
while (medicinesResultSet.next()) {
34
System.out.println("ID: " + medicinesResultSet.getInt("id"));
System.out.println("Name: " +
medicinesResultSet.getString("name"));
System.out.println("Price: " +
medicinesResultSet.getDouble("price"));
System.out.println("-------------------");
connection.close();
System.out.println("Connection closed.");
} catch (Exception e) {
e.printStackTrace();
35
Output
36
37
38
39
Database
40
References
1. www.codewithc.com
2. www.codebun.com
3. www.javatpoint.com
4. www.1000projects.org
41
Conclusion
The Web Medical Management System, as outlined in the provided code, presents a
comprehensive solution for managing patient information, appointments, and user
authentication within healthcare environments. By streamlining the process of patient
record management, appointment scheduling, and data storage, the system significantly
improves the efficiency of healthcare service delivery. It eliminates the challenges of
manual record-keeping and offers an intuitive platform for both healthcare staff and
patients.
Through features like secure login, real-time data entry, and automated patient
management, the system ensures the accuracy and integrity of medical records, ultimately
enhancing the quality of care provided. The use of SQLite for database management allows
for seamless data storage and retrieval, making it both cost-effective and easy to maintain.
While the system currently provides basic functionality, it can be expanded to include more
advanced features such as automated billing, patient reminders, and integration with other
healthcare software. This scalability ensures that the system can grow along with the
healthcare provider's needs, making it a valuable tool for small to medium-sized healthcare
practices.
In conclusion, this Web Medical Management System serves as a foundation for improving
operational efficiency and patient care within the healthcare industry, offering a simple yet
effective solution to common administrative challenges. With its user-friendly interface,
secure data management, and potential for future enhancements, it offers a promising
approach to modernizing healthcare administration.
42