Ajp 2
Ajp 2
Micro project
On
Sinhgad Institutes
                              Certificate
  This is to certify that Ms. Samruddhi Zurange with Roll No. 46 of Semester
  V of Diploma in Computer Technology of Institute Sou. Venutai Chavan
  Polytechnic (Code: 0040) has successfully completed the Micro-Project
  Advance Java Programming (22517) for the academic year 2022-2023 as
  prescribed in the curriculum.
INDEX
4 Literature Review 05
          9            Conclusion                                 11
Advance java (22517)                                                         “Hospital management system”
3.0Proposed methodology:
  1.0      Rationale:
The project Hospital Management system includes registration of patients, storing their details into the
system, and also computerized billing in the pharmacy, and labs. The software has the facility to give a
unique id for every patient and stores the details of every patient and the staff automatically. It includes
a search facility to know the current status of each room. User can search availability of a doctor and the
details of a patient using the id.
The Hospital Management System can be entered using a username and password. It is accessible either
by an administrator or receptionist. Only they can add data into the database. The data can be retrieved
easily. The interface is very user-friendly. The data are well protected for personal use and makes the
data processing very fast.
The purpose of the project entitled as “HOSPITAL MANAGEMENT SYSTEM” is to computerize the
Front Office Management of Hospital to develop software which is user friendly, simple, fast, and cost –
effective. It deals with the collection of patient’s information, diagnosis details, etc.
One of the major challenges existing hospital management systems face is around operational
efficiency and wait times between different processes, departments and persons. This paper highlights
such limitations of existing systems and proposes a RFID(Radio Frequency ID) and wireless sensor
based , location and information management framework that facilitates real time tracking of hospital
assets, personnel and patients as they move through pre-set procedures as part of daily activities of the
hospitals. The system covers the visual simulation and providing ability to analyse the ongoing
operations so they can be corrected to achieve increased process efficiency and service levels.
This paper reviews the HIS (Hospital Information Systems) which are widely used in many hospitals in
China mainly to provide easier and faster way for daily medical tasks /activities with a GUI And
provides for overcoming some of the limitations of HIS , eg. HIS aims at improving quality of health
care services but do not have way of evaluating /measuring those. So this paper proposes HSMS
(Hospital Services Management System) which aims at improving quality of services, identifying cost
reduction areas , analyses and evaluate /rate heath care services . The ability to evaluate the services
facilitates hospital achieve higher Customer satisfaction scores
and get a competitive edge against those hospitals which score less or use HIS and do not have ways of
promoting the quality of their services.
Code :-
import java.util.*;
import java.util.Calendar;
/* Hospital Management System Project in Java with Source Code PDF Visit for
more https://www.programmingwithbasics.com/ */
class staff
{
    String sid, sname, desg, sex;
    int salary;
    void new_staff()
    {
        Scanner sc = new Scanner(System.in);
             System.out.print("id:-");
             sid = sc.nextLine();
             System.out.print("name:-");
             sname = sc.nextLine();
             System.out.print("desigination:-");
             desg = sc.nextLine();
             System.out.print("sex:-");
             sex = sc.nextLine();
             System.out.print("salary:-");
             salary = sc.nextInt();
      }
Advance java (22517)                                        “Hospital management system”
void staff_info()
      {
             System.out.println(sid + "\t" + sname + "\t" + sex + "\t" + salary);
      }
class doctor
{
      String did, dname, specilist, appoint, doc_qual;
      int droom;
      void new_doctor()
      {
             Scanner sc= new Scanner(System.in);
             System.out.print("id:-");
             did = sc.nextLine();
             System.out.print("name:-");
             dname = sc.nextLine();
             System.out.print("specilization:-");
             specilist = sc.nextLine();
             System.out.print("work time:-");
             appoint = sc.nextLine();
             System.out.print("qualification:-");
             doc_qual = sc.nextLine();
             System.out.print("room no.:-");
             droom = sc.nextInt();
void doctor_info()
      {
            System.out.println(did + "\t" + dname + "   \t" + specilist +
"         \t" + appoint + "    \t" + doc_qual + "        \t" + droom);
      }
}
class patient
{
      String pid, pname, disease, sex, admit_status;
      int age;
      void new_patient()
      {
             Scanner sc = new Scanner(System.in);
             System.out.print("id:-");
             pid = sc.nextLine();
Advance java (22517)                                         “Hospital management system”
             System.out.print("name:-");
             pname = sc.nextLine();
             System.out.print("disease:-");
             disease = sc.nextLine();
             System.out.print("sex:-");
             sex = sc.nextLine();
             System.out.print("admit_status:-");
             admit_status = sc.nextLine();
             System.out.print("age:-");
             age = sc.nextInt();
    void patient_info()
    {
        System.out.println(pid + "\t" + pname + " \t" + disease + "                    \t"
+ sex + "      \t" + admit_status + "\t" + age);
    }
}
class medical
{
      String med_name, med_comp, exp_date;
      int med_cost, count;
      void new_medi()
      {
             System.out.print("name:-");
             med_name = sc.nextLine();
             System.out.print("comp:-");
             med_comp = sc.nextLine();
             System.out.print("exp_date:-");
             exp_date = sc.nextLine();
             System.out.print("cost:-");
             med_cost = sc.nextInt();
             System.out.print("no of unit:-");
             count = sc.nextInt();
    void find_medi()
    {
        System.out.println(med_name + "        \t" + med_comp + "       \t" +
exp_date + "     \t" + med_cost);
    }
}
Advance java (22517)                                     “Hospital management system”
class lab
{
      String fecility;
      int lab_cost;
      void new_feci()
      {
          Scanner sc = new Scanner(System.in);
             System.out.print("fecility:-");
             fecility = sc.nextLine();
             System.out.print("cost:-");
             lab_cost = sc.nextInt();
      void feci_list()
      {
          System.out.println(fecility + "\t\t" + lab_cost);
      }
}
{
      String fec_name;
      void add_feci()
      {
             Scanner sc = new Scanner(System.in);
             System.out.print("fecility:-");
             fec_name = sc.nextLine();
      }
      void show_feci()
      {
          System.out.println(fec_name);
      }
}
{
      public static void main(String args[])
      {
          String months[] = {
                   "Jan",
                   "Feb",
                   "Mar",
                   "Apr",
                   "May",
                   "Jun",
                   "Jul",
                   "Aug",
Advance java (22517)                                       “Hospital management system”
                   "Sep",
                   "Oct",
                   "Nov",
                   "Dec"
             };
//System.out.println("------------------------------------------------------
--------------------------");
        int count1 = 4, count2 = 4, count3 = 4, count4 = 4, count5 = 4,
count6 = 4;
System.out.println("\n------------------------------------------------------
--------------------------");
        System.out.println("            *** Welcome to Hospital Management
System Project in Java ***");
System.out.println("--------------------------------------------------------
------------------------");
        System.out.println("\t\t\t\t\t\tTime: " +
calendar.get(Calendar.HOUR) + ":" + calendar.get(Calendar.MINUTE) + ":" +
calendar.get(Calendar.SECOND));
int i;
             d[0].did = "21";
             d[0].dname = "Dr.Ghanendra";
             d[0].specilist = "ENT";
             d[0].appoint = "5-11AM";
             d[0].doc_qual = "MBBS,MD";
             d[0].droom = 17;
             d[1].did = "32";
             d[1].dname = "Dr.Vikram";
             d[1].specilist = "Physician";
             d[1].appoint = "10-3AM";
             d[1].doc_qual = "MBBS,MD";
             d[1].droom = 45;
             d[2].did = "17";
             d[2].dname = "Dr.Rekha";
             d[2].specilist = "Surgeon";
             d[2].appoint = "8-2AM";
             d[2].doc_qual = "BDM";
             d[2].droom = 8;
             d[3].did = "33";
             d[3].dname = "Dr.Pramod";
             d[3].specilist = "Artho";
             d[3].appoint = "10-4PM";
             d[3].doc_qual = "MBBS,MS";
             d[3].droom = 40;
             p[0].pid = "12";
             p[0].pname = "Pankaj";
             p[0].disease = "Cancer";
             p[0].sex = "Male";
             p[0].admit_status = "y";
             p[0].age = 30;
             p[1].pid = "13";
             p[1].pname = "Sumit";
             p[1].disease = "Cold";
             p[1].sex = "Male";
             p[1].admit_status = "y";
             p[1].age = 23;
             p[2].pid = "14";
             p[2].pname = "Alok";
             p[2].disease = "Maleriya";
             p[2].sex = "Male";
             p[2].admit_status = "y";
Advance java (22517)                              “Hospital management system”
p[2].age = 45;
             p[3].pid = "15";
             p[3].pname = "Ravi";
             p[3].disease = "Diabetes";
             p[3].sex = "Male";
             p[3].admit_status = "y";
             p[3].age = 25;
             m[0].med_name =   "Corex";
             m[0].med_comp =   "Cino pvt";
             m[0].exp_date =   "9-5-16";
             m[0].med_cost =   55;
             m[0].count = 8;
             m[1].med_name =   "Nytra";
             m[1].med_comp =   "Ace pvt";
             m[1].exp_date =   "4-4-15";
             m[1].med_cost =   500;
             m[1].count = 5;
             m[2].med_name = "Brufa";
             m[2].med_comp = "Reckitt";
             m[2].exp_date = "12-7-17";
             m[2].med_cost = 50;
             m[2].count = 56;
             m[3].med_name = "Pride";
             m[3].med_comp = "DDF pvt";
             m[3].exp_date = "12-4-12";
             m[3].med_cost = 1100;
             m[3].count = 100;
f[0].fec_name = "Ambulance";
f[2].fec_name = "Canteen";
f[3].fec_name = "Emergency";
             s[0].sid = "22";
             s[0].sname = "Prakash";
Advance java (22517)                                   “Hospital management system”
             s[0].desg = "Worker";
             s[0].sex = "Male";
             s[0].salary = 5000;
             s[1].sid = "23";
             s[1].sname = "Komal";
             s[1].desg = "Nurse";
             s[1].sex = "Female";
             s[1].salary = 2000;
             s[2].sid = "24";
             s[2].sname = "Raju";
             s[2].desg = "Worker";
             s[2].sex = "Male";
             s[2].salary = 5000;
             s[3].sid = "25";
             s[3].sname = "Rani";
             s[3].desg = "Nurse";
             s[3].sex = "Female";
             s[3].salary = 20000;
while (status == 1)
             {
                   System.out.println("\n                                     MAIN
MENU");
System.out.println("--------------------------------------------------------
---------------------------");
            System.out.println("1.Doctos 2. Patients 3.Medicines
4.Laboratories 5. Facilities 6. Staff ");
System.out.println("--------------------------------------------------------
---------------------------");
                   choice = sc.nextInt();
                   switch (choice)
case 1:
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("                      **DOCTOR
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
Advance java (22517)                                                “Hospital management system”
s1 = 1;
                                 while (s1 == 1)
                                 {
                                     System.out.println("1.Add New Entry\n2.Existing
Doctors List");
                                    c1 = sc.nextInt();
                                    switch (c1)
                                    {
                                           case 1:
                                               {
                                                     d[count1].new_doctor();count1++;
                                                     break;
                                               }
                                           case 2:
                                               {
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("id \t Name\t
Specilist \t Timing \t Qualification \t Room No.");
System.out.println("--------------------------------------------------------
------------------------");
                                        for (j = 0; j < count1; j++)
                                        {
                                            d[j].doctor_info();
                                        }
                                        break;
                                    }
                            }
                            System.out.println("\nReturn to Back Press 1 and
for Main Menu Press 0");
                            s1 = sc.nextInt();
                         }
                                 break;
                          }
case 2:
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("                     **PATIENT
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
s2 = 1;
                                 while (s2 == 1)
                                 {
                                     System.out.println("1.Add New Entry\n2.Existing
Patients List");
Advance java (22517)                                                “Hospital management system”
                                     c1 = sc.nextInt();
                                     switch (c1)
                                     {
                                         case 1:
                                             {
                                                 p[count2].new_patient();count2++;
                                                 break;
                                             }
                                           case 2:
                                               {
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("id \t Name \t
Disease \t Gender \t Admit Status \t Age");
System.out.println("--------------------------------------------------------
------------------------");
                                        for (j = 0; j < count2; j++) {
                                            p[j].patient_info();
                                        }
                                        break;
                                    }
                            }
                                 break;
                          }
                       case 3:
                           {
                                 s3 = 1;
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("                     **MEDICINE
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
                                 while (s3 == 1)
                                 {
                                     System.out.println("1.Add New Entry\n2. Existing
Medicines List");
                                     c1 = sc.nextInt();
                                     switch (c1)
                                     {
                                           case 1:
                                               {
                                                     m[count3].new_medi();count3++;
Advance java (22517)                                                “Hospital management system”
                                                     break;
                                               }
                                           case 2:
                                               {
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("Name \t
Company \t Expiry Date \t Cost");
System.out.println("--------------------------------------------------------
------------------------");
                                     }
                                     System.out.println("\nReturn to Back Press 1 and
for Main Menu Press 0");
                                     s3 = sc.nextInt();
                                 }
                                 break;
                          }
case 4:
                          {
                                 s4 = 1;
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("                    **LABORATORY
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
while (s4 == 1)
                                 {
                                     System.out.println("1.Add New Entry \n2.Existing
Laboratories List");
                                     c1 = sc.nextInt();
switch (c1)
                                     {
                                           case 1:
                                               {
                                                     l[count4].new_feci();count4++;
                                                     break;
                                               }
Advance java (22517)                                                “Hospital management system”
case 2:
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("Fecilities\t\t
Cost");
System.out.println("--------------------------------------------------------
------------------------");
                                 break;
                          }
case 5:
                          {
                                 s5 = 1;
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("          **HOSPITAL FACILITY
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
while (s5 == 1)
                                 {
                            System.out.println("1.Add New
Facility\n2.Existing Fecilities List");
                            c1 = sc.nextInt();
switch (c1)
                                     {
                                           case 1:
                                               {
                                                     f[count5].add_feci();count5++;
                                                     break;
                                               }
                                           case 2:
                                               {
Advance java (22517)                                                “Hospital management system”
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("Hospital
Facility are:");
System.out.println("--------------------------------------------------------
------------------------");
                                 break;
                          }
case 6:
                          {
                                 s6 = 1;
System.out.println("--------------------------------------------------------
------------------------");
                        System.out.println("                       **STAFF
SECTION**");
System.out.println("--------------------------------------------------------
------------------------");
while (s6 == 1)
                                 {
                                     String a = "nurse", b = "worker", c =
"security";
                            System.out.println("1.Add New Entry \n2.Existing
Nurses List\n3.Existing Workers List \n4.Existing Security List");
                            c1 = sc.nextInt();
switch (c1)
                                     {
                                           case 1:
                                               {
                                                     s[count6].new_staff();count6++;
                                                     break;
                                               }
                                           case 2:
                                               {
Advance java (22517)                                        “Hospital management system”
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("id \t Name \t
Gender \t Salary");
System.out.println("--------------------------------------------------------
------------------------");
                                   case 3:
                                       {
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("id \t Name \t
Gender \t Salary");
System.out.println("--------------------------------------------------------
------------------------");
System.out.println("--------------------------------------------------------
------------------------");
                                        System.out.println("id \t Name \t
Gender \t Salary");
System.out.println("--------------------------------------------------------
------------------------");
                                  break;
                           }
                       default:
                           {
                                  System.out.println(" You Have Enter Wrong
Choice!!!");
                           }
                   }
                   status = sc.nextInt();
             }
      }
}
Output:-
Advance java (22517)   “Hospital management system”
Advance java (22517)   “Hospital management system”
Advance java (22517)   “Hospital management system”
Advance java (22517)                                                         “Hospital management system”
        3              Books on             -                 01          Available
                       Hospital
                       Management
  9.0 Conclusion
  Thus we studied the 2different types of Operating System.