Skip to content

pradhansonali67/Hospital-Management-System-Java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital-Management-System-Java

A simple Hospital Management System in java

1. Create two bean classes with below Class Outline namely Doctor and Patient.

  • patientList is the list of the Patients attended by the Doctor.

  • addPatient(Patient p) method receives one Patient object as argument and adds it to the list and returns the current size of the list.

  • releasePatient(Patient p) method receives int patientId as argument and releases (remove) the patient from the system (list) and returns the current size of the list.

1

patientId should be generated using IDGenerator class outline as given below. Id value should start with 1.

2

Patient class outline is given below.

3

2. Create one Interface with following outline

4

3. Implement interface in HospitalMgmtImpl class as shown in below class outline

5

Property and Method description of the above class is given below

  • doctorList is the list of Doctor present for the Hospital Network (ArrayList)

  • registerDoctor(Doctor d) method registers (add) one doctor into system. Returns size of the list on success. -1 in failed scenario. Doctor regNo should be unique unless it should throw DuplicateDoctorException. Exception class outline is given at the end.

  • hospitalizePatient(String regNo, Patient p) method add a patient in the treating Doctor’s List identified by the regNo. Returns size of the patientList on success. -1 in failed scenario. uId is the unique identifier for a Patient (like PAN001). If Patient with same uId is already treated by a Doctor, method will throw PatientExistException. Exception class outline is given at the end.

  • releasePatient(int patientId) method removes one patient based on patientId from system. Returns size of the list after removal if operation is successful. -1 in failed scenario.

  • retrieveDoctorInfo(int patientId) method returns treating Doctor based on patientId from system. Returns Doctor object from List on success. Blank Doctor object in failed scenario.

  • patientCountPerCity(String city) method returns count of patients, who are from the specific city given as argument.

Exception Class Outline is given below

4. DuplicateDoctorException Class Outline

6

Message: Doctor with same Reg No Exist in System

5. PatientExistException Class Outline

7

Message: Patient with given PAN already hospitalized

About

A simple Hospital Management System in java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%