This Java Swing application implements a Patient Management System for a hospital, allowing users to add, query, and delete patient records. The UI is designed using the Swing UI designer, providing a user-friendly interface.
- Add Patient Record: Users can input patient details, including ID, Name, State, City, Address, and Phone, and add them to the database.
- Query Patient Record: Retrieve patient details based on the provided Patient ID.
- Delete Patient Record: Remove a patient record from the database using the Patient ID.
- Java Swing: The graphical user interface is built using the Swing framework.
- MySQL Database: Patient records are stored and retrieved from a MySQL database.
-
Add Patient Record:
- Enter patient details in the respective text fields.
- Click the "ADD" button to add the patient record to the database.
-
Query Patient Record:
- Enter the Patient ID in the designated text field.
- Click the "QUERY" button to retrieve and display the patient details.
-
Delete Patient Record:
- Enter the Patient ID in the designated text field.
- Click the "DELETE" button to remove the patient record from the database.
- The application connects to a MySQL database named "hospital2" on localhost at port 3306.
- Database connection parameters (username and password) are left blank in the code. Update them as per your MySQL setup.
- Compile and run the
patient_type2class. - The Swing UI will appear, allowing you to interact with the Patient Management System.
- Ensure that the MySQL JDBC driver is available in your project.
This project is licensed under the MIT License.
- The UI design is created using the Swing UI designer.
- The application utilizes MySQL for database interactions.
Feel free to contribute to and enhance this Patient Management System. If you encounter issues or have suggestions, please open an issue in the repository.