From ba3f132a70d1ae76deb502069a6f6e1d618bf1e3 Mon Sep 17 00:00:00 2001 From: snehabjadhav <71016217+snehabjadhav@users.noreply.github.com> Date: Tue, 8 Jun 2021 21:51:52 +0530 Subject: [PATCH 1/2] Add files via upload --- Doctor.java | 134 +++++++++ Hospital.java | 632 +++++++++++++++++++++++++++++++++++++++++++ Main.java | 7 + MedicalFacility.java | 37 +++ Patient.java | 130 +++++++++ Sign_up.java | 22 ++ Start.java | 33 +++ 7 files changed, 995 insertions(+) create mode 100644 Doctor.java create mode 100644 Hospital.java create mode 100644 Main.java create mode 100644 MedicalFacility.java create mode 100644 Patient.java create mode 100644 Sign_up.java create mode 100644 Start.java diff --git a/Doctor.java b/Doctor.java new file mode 100644 index 0000000..9167928 --- /dev/null +++ b/Doctor.java @@ -0,0 +1,134 @@ +package Hospital; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Scanner; +@SuppressWarnings("unused") +public class Doctor { + private String doctorName; + private String doctorSpeciality; + private double from; + private double to; + private double fees; + private int id; + //String doctorStatus; + LinkedHashSet doctorPatientList= new LinkedHashSet(); + Doctor(String c, String cc,double f,double t,int i) + { + this.doctorName=c; + this.doctorSpeciality=cc; + this.from=f; + this.to=t; + this.id=i+2000; + } + public double getRegistrationFees(Doctor d) + { + if(d.getDoctorspeciality().equals("Opthalmologist")) + { + fees=200; + return fees; + } + else if(d.getDoctorspeciality().equals("Surgeon")) + { + fees=300; + return fees; + } + else + { + fees=250; + return fees; + } + } + public String getDoctorName() + { + return doctorName; + } + + @SuppressWarnings("rawtypes") + public LinkedHashSet getDoctorPatientList() + { + return doctorPatientList; + } + + @SuppressWarnings({ "rawtypes" }) + public void addPatientsToDoctor(Patient o,Doctor dc) + { + Patient p=null; + Iterator itr=doctorPatientList.iterator(); + while(itr.hasNext()) + { + p=(Patient)itr.next(); + } + double avail=dc.doctorAvailablefrom(); + if(p==null) + { + o.setTimehr((int)avail); + o.setTimemin(0); + } + else + { + if(p.getTimehr()==24&&p.getTimemin()==0) + { + o.setTimehr(0); + o.setTimemin(1); + } + if(p.getTimemin()+15==60) + { + o.setTimehr(p.getTimehr()+1); + o.setTimemin(0); + } + else + { + o.setTimehr(p.getTimehr()); + o.setTimemin(p.getTimemin()+15); + } + } + o.setFlag(1); + doctorPatientList.add(o); + if(o.getTimehr()>=1||o.getTimehr()<=12) + { + System.out.println(o.getId()+" "+o.getName()+",Your appointment is booked! at "+o.getTimehr()+":"+o.getTimemin()+"AM"); + } + else + { + System.out.println(o.getId()+" "+o.getName()+",Your appointment is booked! at "+o.getTimehr()+":"+o.getTimemin()+"PM"); + } + } + public void clearPatientsToDoctor() + { + doctorPatientList.clear(); + } + + String getDoctorspeciality() + { + return doctorSpeciality; + } + double doctorAvailablefrom() + { + return from; + } + double doctorAvailabletTill() + { + return to; + } + public String toString() + { + if(from==8&&to==16) { + return (id+" "+doctorName+" "+doctorSpeciality+" is available from 8:00 AM to 4:00 PM"); + } + else if(from==16&&to==24){ + return (id+" "+doctorName+" "+doctorSpeciality+" is available from 4:00 PM to 12:00 AM"); + } + else + { + return (id+" "+doctorName+" "+doctorSpeciality+" is available from 12:00 AM to 8:00 AM"); + } + + } + public int getId() + { + return id; + } + +} \ No newline at end of file diff --git a/Hospital.java b/Hospital.java new file mode 100644 index 0000000..170df58 --- /dev/null +++ b/Hospital.java @@ -0,0 +1,632 @@ +package Hospital; +import java.util.ArrayList; +import java.time.format.DateTimeFormatter; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Scanner; +import java.util.Set; +@SuppressWarnings("unused") +public class Hospital { + int doctorCount = 0; + int patientCount=0; + ArrayList doctorList = new ArrayList(); + ArrayList patientList = new ArrayList(); + ArrayList sign=new ArrayList(); + @SuppressWarnings("rawtypes") + HashMap hm=new HashMap(); + int key1 = 500,key2=100,key3=200; + String name=null; + @SuppressWarnings({ "rawtypes", "unchecked", "resource" }) + public void start() { + @SuppressWarnings("resource") + Scanner input = new Scanner(System.in); + char YesOrNo = 'Y'; + int ch2=0,choice=0; + while (YesOrNo =='Y') + { + System.out.println("1 Admin"); + System.out.println("2 User"); + System.out.print("\nEnter your choice:"); + int ch=input.nextInt(); + switch(ch) + { + case 1:System.out.println("Enter password:"); + String pass=input.next(); + if(pass.equals("Admin@123")) + { + do + { + System.out.print("\n\n\t\t1 : Add doctor\n\n"); + System.out.print("\t\t2 : Show doctors\n\n"); + System.out.print("\t\t3 : Show doctor-patient List\n\n"); + System.out.print("\t\t4 : Enter patient's condition\n\n"); + System.out.print("\t\t5 : Enter mediacal expenses of patient\n\n"); + System.out.print("\t\t6 : Show ptients\n\n"); + System.out.print("\t\t7 : Display total medical bill of patient\n\n"); + System.out.print("\t\t8 : Cancel doctor\n\n"); + System.out.print("\t\t9 : Exit\n\n"); + System.out.println("\t\t\tYou Select : "); + choice=0; + choice=input.nextInt(); + switch (choice) + { + case 1:enterDoctors();//enter doctor details + break; + case 2:showDoctors();//show doctors available + break; + case 3:getDoctorPatientList();//display doctor-patient list + break; + case 4:patientReport();//remarks of doctor for their patients + break; + case 5:createMedicalBill();//enter medical expenses of patient + break; + case 6:getPatientList();//display the details of all patients + break; + case 7:getMedicalBill();//total medical bill of patient + break; + case 8:cnacelDoctor(); + break; + case 9:System.out.println("Exiting..."); + break; + default:System.out.println("Invalid Selection!!"); + break; + } + }while(choice!=9); + } + else + { + System.out.println("Invalid Password!!"); + } + break; + case 2:System.out.println("\nDo you have an account??\nY=Yes Or N=No"); + String ac=input.next(); + int f=0; + if(ac.equals("y")||ac.equals("Y")) + { + Iterator it=sign.iterator(); + System.out.println("Enter username:"); + String name=input.next(); + System.out.println("Enter Password:"); + String p=input.next(); + while(it.hasNext()) + { + Sign_up s=(Sign_up)it.next(); + if(s.getName().equals(name)&&s.getPass().equals(p)) + { + f=1; + System.out.println("Logged in successfully!!"); + break; + } + + } + } + else if(ac.equals("n")||ac.equals("N")) + { + System.out.println("\n\nSign in"); + System.out.println("Enter username:"); + String name=input.next(); + System.out.println("Enter your mobile no:"); + String mb=input.next(); + if(mb.length()<10&&mb.charAt(0)<'7') + { + System.out.println("Invalid mobile number!!"); + break; + } + System.out.println("Enter Password:"); + String p=input.next(); + Sign_up s=new Sign_up(name,mb,p); + sign.add(s); + f=1; + System.out.println("Signed in successfully!!"); + } + else + { + System.out.println("Invalid choice!!"); + break; + } + if(f==0) + { + System.out.println("Account does'nt exist!!"); + break; + } + do + { + System.out.print("\n\n\t\t1 : Show doctors\n\n"); + System.out.print("\t\t2 : Book appointment\n\n"); + System.out.print("\t\t3 : Exit\n\n"); + System.out.println("\t\t\tYou Select : "); + ch2=input.nextInt(); + switch(ch2) + { + case 1:showDoctors();//show doctors available + break; + case 2:getAppointment();//enter patient details and give them appointment + break; + case 3:System.out.println("Exiting..."); + break; + default:System.out.println("Invalid Selection!!"); + break; + } + }while(ch2!=3); + break; + default:System.out.println("Invalid Selection!!"); + break; + } + System.out.println("\n\tDo u want to Do some thing Else \n\t\tY = yes\n\t\tN = No\n"); + System.out.println("You Select : "); + YesOrNo =(input.next()).charAt(0); + if(Character.isLowerCase(YesOrNo )) + { + YesOrNo =Character.toUpperCase(YesOrNo ); + } + }//End While + }// End Start() + + public void enterDoctors() + { + Scanner input1 = new Scanner(System.in); + String tempName; + String tempSpeciality; + double from,to; + System.out.print("Enter Doctor Name: "); + tempName = input1.nextLine(); + System.out.print("\n1: Opthalmologist \n2: Surgeon \n3: ENT"); + System.out.print("\nSelect Doctor Speciality: "); + @SuppressWarnings({ }) + Scanner input2 = new Scanner(System.in); + int tempSpecNo = input1.nextInt(); + if(tempSpecNo==1){ + tempSpeciality="Opthalmologist"; + }else if(tempSpecNo==2){ + tempSpeciality="Surgeon"; + }else if(tempSpecNo==3){ + tempSpeciality="ENT"; + }else{ + tempSpeciality=" "; + } + System.out.println("\n1.First shift:8:00 AM to 4:00 PM"); + System.out.println("2.Second shift:4:00 PM to 12:00 AM"); + System.out.println("3.Third shift:12:00 AM to 8:00 AM"); + System.out.print("Choose the shift:"); + int shift=0; + try + { + Scanner input3=new Scanner(System.in); + shift=input3.nextInt(); + } + catch(NumberFormatException e) + { + System.out.print("Enter integer value:"); + Scanner input3=new Scanner(System.in); + shift=input3.nextInt(); + System.out.println(); + } + switch(shift) + { + case 1:from=8.00; + to=16.00; + break; + case 2:from=16.00; + to=24.00; + break; + case 3:from=0.00; + to=8.00; + break; + default:from=8.00; + to=16.00; + break; + } + int cnt=doctorCount; + Doctor o1 = new Doctor(tempName,tempSpeciality,from,to,cnt); + doctorList.add(doctorCount,o1); + doctorCount++; + } + public void showDoctors() + { + for(int i = 0 ; i=8&&y.doctorAvailabletTill()<=16) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + if(p1.getPreference().equals("Evening")&&y.doctorAvailablefrom()>=16&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + if(p1.getPreference().equals("Night")&&y.doctorAvailablefrom()>=1&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + } + } + if (p1.getDisease().equals("heart patient")) + { + if (y.getDoctorspeciality().equals("Surgeon")) + { + if(p1.getPreference().equals("Morning")&&y.doctorAvailablefrom()>=8&&y.doctorAvailabletTill()<=16) + { + y.addPatientsToDoctor(p1,y); + System.out.println("\n Docter(Surgeon)"+y.getDoctorName()+" Added With Patient with heart disease\n"); + } + if(p1.getPreference().equals("Evening")&&y.doctorAvailablefrom()>=16&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + if(p1.getPreference().equals("Night")&&y.doctorAvailablefrom()>=1&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + } + } + if (p1.getDisease().equals("earnose")) + { + if (y.getDoctorspeciality().equals("ENT")) + { + if(p1.getPreference().equals("Morning")&&y.doctorAvailablefrom()>=8&&y.doctorAvailabletTill()<=16) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(ENT)"+y.getDoctorName()+"Added With Patient with earnose disease\n"); + } + if(p1.getPreference().equals("Evening")&&y.doctorAvailablefrom()>=16&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + if(p1.getPreference().equals("Night")&&y.doctorAvailablefrom()>=1&&y.doctorAvailabletTill()<=24) + { + y.addPatientsToDoctor(p1,y); + System.out.println("Docter(Opthalmologist)"+y.getDoctorName()+"Added With Patient with Eye disease\n"); + } + } + } + } + } + public void getDoctorPatientList() + { + System.out.print("Enter Doctor ID >= 0 AND < "+Integer.toString(doctorCount)); + Scanner in = new Scanner(System.in); + int i = 0; + try + { + i=in.nextInt(); + i=i--; + } + catch(Exception a) + { + System.out.println(a); + } + + System.out.println("\n \n \n "+ ""+doctorList.get(i).getDoctorName()+""+doctorList.get(i).getDoctorPatientList()); + } + public void patientReport() + { + for(Doctor d:doctorList) + { + LinkedHashSetp=d.getDoctorPatientList(); + Iterator itr=p.iterator(); + while(itr.hasNext()) + { + + Patient p1=(Patient)itr.next(); + if(p1.getCondition().equals("DEF")) { + + System.out.println("Choose the condition of "+p1.getName()); + System.out.println("\n1.Severe"); + System.out.println("2.Moderate"); + System.out.println("3.Normal"); + Scanner sc=new Scanner(System.in); + int con=sc.nextInt(); + switch(con) + { + case 1:p1.setCondition("severe"); + break; + case 2:p1.setCondition("moderate"); + break; + case 3:p1.setCondition("normal"); + break; + default:System.out.println("Invalid Choice!!"); + break; + } + if(p1.getCondition().equals("severe")) + { + Set s=hm.keySet(); + Iterator it=s.iterator(); + while(it.hasNext()) + { + Integer key=(Integer)it.next(); + } + if(p1.getStatus().equals("ANY")) + { + System.out.println("Enter sevierity status of"+ p1.getName()); + System.out.println("\n1.Needs ICU "); + System.out.println("2.Can be accomodated in Non ICU "); + Scanner sc1=new Scanner(System.in); + int cin=sc1.nextInt(); + switch(cin) { + case 1: {p1.setStatus("Needs ICU"); + break; + } + case 2: { + p1.setStatus("No need of ICU"); + break; + } + } + if(p1.getStatus().equals("Needs ICU")) { + + key1=key1+1; + if(key1<=600) + { + hm.put(key1, p1.getName()); + System.out.println(p1.getName()+" Your ICU room no is "+key1); + } + + } + if(p1.getStatus().equals("No need of ICU")) { + System.out.println("Enter room prefered \n 1. Private \n 2. Semi Private"); + Scanner s1 =new Scanner(System.in); + int in=s1.nextInt(); + if(in == 1) { + key2=key2+1; + if(key2<=200) + { + hm.put(key2, p1.getName()); + System.out.println(p1.getName()+" Your Private room no is "+key2); + } + } + if(in == 2) { + key3=key3+1; + if(key3<=300) + { + hm.put(key3, p1.getName()); + System.out.println(p1.getName()+" Your Semi private room no is "+key3); + } + } + } + } + + } + if(p1.getCondition().equals("moderate")) { + String fromDate=p1.getJoiningDate(); + StringBuffer sBuffer = new StringBuffer(fromDate); + String year = sBuffer.substring(2,4); + String mon = sBuffer.substring(5,7); + String dd = sBuffer.substring(8,10); + + String modifiedFromDate = dd +'/'+mon+'/'+year; + int MILLIS_IN_DAY = 1000 * 60 * 60 * 24*5; + java.text.SimpleDateFormat dateFormat = + new java.text.SimpleDateFormat("dd/MM/yy"); + java.util.Date dateSelectedFrom = null; + java.util.Date dateNextDate = null; + java.util.Date datePreviousDate = null; + + // convert date present in the String to java.util.Date. + try + { + dateSelectedFrom = dateFormat.parse(modifiedFromDate); + } + catch(Exception e) + { + e.printStackTrace(); + } + + + String nextDate = + dateFormat.format(dateSelectedFrom.getTime() + MILLIS_IN_DAY); + + + try + { + dateNextDate = dateFormat.parse(nextDate); + System.out.println(p1.getName()+" Your Next appointment is: "+dateNextDate); + } + catch(Exception e) + { + e.printStackTrace(); + } + + } + + }} + } + + } + public void createMedicalBill() + { + double fees=0.0; + Scanner sc=new Scanner(System.in); + for(Doctor d:doctorList) + { + fees=d.getRegistrationFees(d); + LinkedHashSet p=d.getDoctorPatientList(); + for(Patient p1:p) + { + double room=0.0,medicine=0.0,other=0.0,treatment=0.0; + if(p1.getCondition().equals("severe")&&p1.getFlag2()!=1) + { + System.out.println("\n"+p1.getId()+" "+p1.getName()+": "); + System.out.print("\nEnter room bill:"); + room=sc.nextDouble(); + System.out.print("\nEnter medicine bill:"); + medicine=sc.nextDouble(); + System.out.print("\nEnter other expenses:"); + other=sc.nextDouble(); + System.out.print("\nEnter special treatment bill:"); + treatment=sc.nextDouble(); + p1.setFlag2(); + p1.medicalExpenses(room,medicine,other,treatment,fees); + } + else + { + + p1.medicalExpenses(room,medicine,other,treatment,fees); + } + + } + } + + } + public void getMedicalBill() + { + System.out.println("Enter patient ID: "); + Scanner s=new Scanner(System.in); + int i=s.nextInt(); + for(Doctor d:doctorList) + { + LinkedHashSet p=d.getDoctorPatientList(); + Iterator itr=p.iterator(); + Patient p1=null; + while(itr.hasNext()) + { + p1=(Patient) itr.next(); + if(p1.getId()==i) + { + System.out.println("Medical bill of "+p1.getId()+" "+p1.getName()+" is "+p1.getMedicalBill()); + break; + } + } + + } + } + public void getPatientList() + { + ArrayList al=new ArrayList(); + al=patientList;//display the details of all patients + Iterator itr=al.iterator(); + while(itr.hasNext()) + { + Patient p=(Patient)itr.next(); + System.out.println("Name: "+p.getName()+" Age: "+p.getAge()+" Disease: "+p.getDisease()); + } + } + public void cnacelDoctor() + { + int f2=0; + System.out.print("\nEnter doctor ID:"); + Scanner scan=new Scanner(System.in); + int i=scan.nextInt(); + + Iterator itr=doctorList.iterator(); + while(itr.hasNext()) + { + Doctor doc=(Doctor) itr.next(); + if(doc.getId()==i) + { + f2=1; + itr.remove(); + doctorCount--; + System.out.println("Cancelled successfully!!"); + } + } + if(f2==0) + { + System.out.println("No doctor found!!"); + } + } +} diff --git a/Main.java b/Main.java new file mode 100644 index 0000000..7d51694 --- /dev/null +++ b/Main.java @@ -0,0 +1,7 @@ +import Hospital.Start; +public class Main { + public static void main(String[] args) { + //Static Function Demonstration + Start.StartHms(); + } +} \ No newline at end of file diff --git a/MedicalFacility.java b/MedicalFacility.java new file mode 100644 index 0000000..4565bf2 --- /dev/null +++ b/MedicalFacility.java @@ -0,0 +1,37 @@ +package Hospital; +public class MedicalFacility +{ + private double room=0.0; + private double medicine=0.0; + private double otherFacilities=0.0; + private double specialTreatment=0.0; + private double fees=0.0; + public MedicalFacility(double room,double medicine,double otherFacilities,double specialTreatment,double registrationfees) + { + this.room=room; + this.medicine=medicine; + this.otherFacilities=otherFacilities; + this.specialTreatment=specialTreatment; + this.fees=registrationfees; + } + public double getRoomAmount() + { + return room; + } + public double getMedicineAmount() + { + return medicine; + } + public double getOtherFacilitiesAmount() + { + return otherFacilities; + } + public double getSpecialTreatmentAmount() + { + return specialTreatment; + } + public double getTotalBill() + { + return (room+medicine+otherFacilities+specialTreatment+fees); + } +} \ No newline at end of file diff --git a/Patient.java b/Patient.java new file mode 100644 index 0000000..ba5ae1e --- /dev/null +++ b/Patient.java @@ -0,0 +1,130 @@ +package Hospital; + +import java.util.LinkedHashSet; + +public class Patient { + private String patientName; + private int patientAge; + private String patientGender; + private String disease; + private String condition="DEF"; + private String next_appointment; + private int flag=0; + private int flag2=0; + private int hr,min; + private String pref=null; + private double room=0.0; + private double medicine=0.0; + private double otherFacilities=0.0; + private double specialTreatment=0.0; + private String status="ANY"; + private double fees=0.0; + private String joining_date; + private int id=0; + Patient (String patientName, int patientAge,String patientGender, String disease,String slot,String joining_date,int i) + { + this.patientName= patientName; + this.patientGender= patientGender; + this.patientAge=patientAge; + this.disease=disease; + this.pref=slot; + this.joining_date=joining_date; + this.id=i+1000; + } + public void medicalExpenses(double rm,double med,double other,double special,double fee) + { + room=rm; + medicine=med; + otherFacilities=other; + specialTreatment=special; + fees=fee; + } + public String getNextAppointment() + { + return next_appointment; + } + public int getAge() + { + return patientAge; + } + public double getMedicalBill() + { + System.out.println(getName()+"\nYour registration fee is "+fees+"\nYour room bill is "+room+ + "\nYour medicine bill is "+medicine+"\nYour other expenses are " + +otherFacilities+"\nYour special treatment bill is " + +specialTreatment); + return (room+medicine+otherFacilities+specialTreatment+fees); + } + public String getCondition() + { + return condition; + } + public String getName() + { + return patientName; + } + public String getDisease() + {return disease;} + + public String toString() + { + return (id+" "+patientName+" "+patientAge+" "+patientGender +" "+ disease); + } + public String getJoiningDate() + { + return joining_date; + } + public int getTimehr() + { + return hr; + } + public int getTimemin() + { + return min; + } + public String getStatus() + { + return status; + } + public String getPreference() + { + return pref; + } + public int getFlag() + { + return flag; + } + public void setCondition(String con) + { + condition=con; + } + public void setStatus(String stat) + { + status=stat; + } + public void setTimehr(int h) + { + hr=h; + } + public void setTimemin(int m) + { + min=m; + } + public void setFlag(int i) + { + flag=i; + } + public void setFlag2() + { + flag2=1; + } + public int getFlag2() + { + return flag2; + } + public int getId() + { + return id; + } + +} diff --git a/Sign_up.java b/Sign_up.java new file mode 100644 index 0000000..e29fb76 --- /dev/null +++ b/Sign_up.java @@ -0,0 +1,22 @@ +package Hospital; + +public class Sign_up { +private String name; +private String mobile_no; +private String password; +public Sign_up(String nm,String mb,String pass) +{ + name=nm; + mobile_no=mb; + password=pass; +} +public String getName() +{ + return name; +} + +public String getPass() +{ + return password; +} +} \ No newline at end of file diff --git a/Start.java b/Start.java new file mode 100644 index 0000000..00e4380 --- /dev/null +++ b/Start.java @@ -0,0 +1,33 @@ +package Hospital; +import java.util.Scanner; +public class Start { + public static void StartHms() { + int c=0; + @SuppressWarnings("resource") + Scanner input = new Scanner(System.in); + char YesOrNo = 'Y'; + while (YesOrNo =='Y'){ + + System.out.print("\t\t ============================\n"); + System.out.print("\t\t Welcome To Hospital Managment \n"); + System.out.print("\t\t System \n"); + if(c==0) + { + c++; + } + else + { + System.out.print("\t\t Again\n"); + } + System.out.print("\t\t ============================\n"); + Hospital obj_hosptl=new Hospital(); + obj_hosptl.start(); + System.out.println("\n\tDo u want to Continue \n\t\tY = Continue Again\n\t\tN = Exit\n"); + System.out.println("You Select : "); + YesOrNo =(input.next()).charAt(0); + if(Character.isLowerCase(YesOrNo )){ + YesOrNo =Character.toUpperCase(YesOrNo ); + } + }//End While + } +} From deab61f48c7a71f2488fa23e97496c28b8c43eea Mon Sep 17 00:00:00 2001 From: snehabjadhav <71016217+snehabjadhav@users.noreply.github.com> Date: Tue, 8 Jun 2021 22:44:18 +0530 Subject: [PATCH 2/2] Create README1.md --- README1.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 README1.md diff --git a/README1.md b/README1.md new file mode 100644 index 0000000..5520b96 --- /dev/null +++ b/README1.md @@ -0,0 +1,51 @@ +Team no 24 +Hospital Management System + +Objectives of project: +1.Safety +2.Effectiveness +3.Equity +4.Timeliness +5.Patient-centeredness +6.Efficiency + +Features of project: +1.Patient registration process +2.Improve visibility and transparency +3.Easy access to data +4.Improved revenue management +5.Patient management +6.Online Appointment Management + +Data structures used: +Arraylist-To store the details of doctors and patients. +LinkedHashSet- To store the doctor patient list. +HashMap- To allocate room number to patients depending on their condition. + +Team members: +1.Sneha Jadhav - +Book appointment +Create Medical bill +Doctor class +2.Ankita Chandavale - +Get patient Report based on health condition +Get medical bill of patient +Patient class +3.Sneha Chalake - +Sign up and log in +Show doctors +Main class +4.Ruchita Bhangire - +Add doctors +Cancel doctors +MedicalFacility class + +Task accomplished by file: +1.Main.java- Start of execution +2.Start.java- Calls functionalities of hospital class +3.Patient.java- Patient class to store the details of patient +4.Doctor.java- Doctor class to store the details of doctor related functions +5.MedicalFacility.java- MedicalFacility class to store medical expenses of patients +6.Sign_up.java- to store the details of user +7.Hospital.java- Hospital class which is having all the functionalities of hospital management system +