diff --git a/About_us.java b/About_us.java new file mode 100644 index 0000000..5564513 --- /dev/null +++ b/About_us.java @@ -0,0 +1,67 @@ +package services; + +public class About_us { + public static void main(String[] args) { + System.out.println("\n\tSwayam Multi-Speciality hospital was established in 1990. "); + System.out.println("\tWe have the largest chain in India."); + + System.out.println("\n\n\t\t\t************ MISSION STATEMENT ************"); + System.out.println("\n\t\tFaithful to our tradition, we provide the highest \n\t\tpossible standard of care and treatment in a"); + System.out.println("\t\tprofessional and compassionate manner to every"); + System.out.println("\t\tperson who avails of our services"); + + System.out.println("\n\n\t\t\t************ VISION & VALUES ************"); + System.out.println("\n\t\tBased on our Mission Statement, our vision and values are:"); + System.out.println("\n\t\t\t1. To build a first class patient focused service based on high quality and "); + System.out.println("\t\t\t evidence based practice throughout the organisation."); + System.out.println("\n\t\t\t2.To provide this service as close to the patient as possible, in a well-managed"); + System.out.println("\t\t\t and appropriate environment."); + System.out.println("\n\t\t\t3.To promote a culture that will : "); + System.out.println("\t\t\t\ta. Ensure high quality care/service is provided."); + System.out.println("\t\t\t\tb. Ensure that decisions regarding delivery of care/service " + + "\n\t\t\t\t are patient focused and evidence based."); + System.out.println("\t\t\t\tc. Support and invest in education and training, thereby promoting the continuous "); + System.out.println("\t\t\t\t development of the workforce in order to maximise the potential of staff at all levels Goals"); + + System.out.println("\n\n\t\t\t************ GOALS ************"); + System.out.println("\n\t\tContinuously improve all our services through quality management."); + System.out.println("\n\t\t\t1. Focus on our patients and deliver high quality service."); + System.out.println("\t\t\t2. Involve all our partners in our quality improvement activities."); + System.out.println("\t\t\t3. Empower employees to make appropriate decisions."); + System.out.println("\t\t\t4. Have the highest degree of respect for one another and value diversity."); + System.out.println("\t\t\t5. Use training, teamwork and open communication to enable all employees"); + System.out.println("\t\t\t to achieve their full potential."); + System.out.println("\t\t\t6. Recognise and reward employees’ contributions."); + System.out.println("\t\t\t7. Take all reasonable steps to ensure that patients, visitors, staff and all others in"); + System.out.println("\t\t\t contact with the Hospital are afforded the safest possible environment."); + System.out.println("\t\t\t8. Maintain the highest ethical standards in protecting the public and the environment."); + System.out.println("\t\t\t9. Measure the effectiveness of our activities and monitor progress towards"); + System.out.println("\t\t\t achieving our Vision History and Tradition"); + + System.out.println("\n\n\t\t\t************ VALUES ************"); + System.out.println("\n\t\tCOMPASSION:\n\n\t\t\tWe have a deeper level of patient understanding"); + System.out.println("\t\t\tand are always empathetic to their needs. This encourages a culture"); + System.out.println("\t\t\tof providing a higher standard of patient-centred care. We respect each"); + System.out.println("\t\t\tother and our patients, and ensure that their needs are met with dignity."); + System.out.println("\t\t\tWe rise to the occasion each time for we recognise the positive social impact we can create."); + System.out.println("\n\t\tEXCELLENCE:\n\n\t\t\tWe ask more of ourselves and are always passionate about achieving"); + System.out.println("\t\t\tthe highest standards of medical expertise and patient care. We understand that being"); + System.out.println("\t\t\tthe best is a continuous journey of becoming better versions of ourselves every day."); + System.out.println("\n\t\tEFFICIENCY:\n\n\t\t\tWe create a responsive healing environment, by being nimble to"); + System.out.println("\t\t\tthe needs of our patients and delivering what they really need with precision"); + System.out.println("\t\t\tand timing. We are focused yet fast, personal yet practical, advanced yet seamless "); + System.out.println("\t\t\tin delivering the exact care our patients need."); + System.out.println("\n\t\tCONSISTENCY:\n\n\t\t\tWe always deliver on our commitment and ensure the highest level of"); + System.out.println("\t\t\tpatient care is met at every stage, every time. "); + System.out.println("\t\t\tWe believe that only through consistency can we achieve "); + System.out.println("\t\t\tour patient's trust and fulfil our goals."); + + System.out.println("\n\tCONTACT US : "); + System.out.println("\n\t\tEmail: swayam.multispecialityhospital@gmailcom"); + System.out.println("\n\t\tAddress: Behind Prakash Petrol pump,Kothrud"); + System.out.println("\n\t\tTel : (020) 3214 - 9087"); + System.out.println("\n\tEMERGENCY CONTACT DETAILS :"); + System.out.println("\n\t\tTel : (020) 3456 - 9065"); + + } +} diff --git a/Appointment_Dept1.java b/Appointment_Dept1.java new file mode 100644 index 0000000..7aa6120 --- /dev/null +++ b/Appointment_Dept1.java @@ -0,0 +1,1291 @@ +package appointment; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Scanner; + +import node.Node; +import node.Node2; +import node.Node3; + +public class Appointment_Dept1 { + + Scanner input=new Scanner(System.in); + InputStreamReader i=new InputStreamReader(System.in); + BufferedReader br=new BufferedReader(i); + + public Node2 root1; + Node3 front1; + Node3 rear1; + Node3 front2; + Node3 rear2; + Node3 front3; + Node3 rear3; + Node3 front4; + Node3 rear4; + + int sr_no1; + int sr_no2; + int sr_no3; + int sr_no4; + int max1; + int max2; + int max3; + int max4; + + int count1; + int count2; + int count3; + int count4; + + int o_patient_id1; + int n_patient_id1; + + public Appointment_Dept1() + { + root1=null; + front1=null; + rear1=null; + front2=null; + rear2=null; + front3=null; + rear3=null; + front4=null; + rear4=null; + sr_no1=0; + sr_no2=0; + sr_no3=0; + sr_no4=0; + max1=10; + max2=10; + max3=0; + max4=0; + count1=0; + count2=0; + count3=0; + count4=0; + o_patient_id1=10; + n_patient_id1=11; + + + } + + int q1_full() + { + if(count1==max1) + return 1; + + else + return 0; + } + + int q1_empty() + { + if(count1==0) + return 1; + + else + return 0; + } + + int q2_full() + { + if(count2==max2) + return 1; + + else + return 0; + } + + int q2_empty() + { + if(count2==0) + return 1; + + else + return 0; + } + + int q3_full() + { + if(count3==max1) + return 1; + + else + return 0; + } + + int q3_empty() + { + if(count3==0) + return 1; + + else + return 0; + } + int q4_full() + { + if(count4==max1) + return 1; + + else + return 0; + } + + int q4_empty() + { + if(count4==0) + return 1; + + else + return 0; + } + + + public void old_patient_dept1() throws IOException//INSERTION IN BST + { + Node2 temp; + int no=0; + do + { + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + System.out.print("\nENTER PATIENT NAME : "); + String patient_name=br.readLine(); + + System.out.print("\nENTER PATIENT AGE : "); + int patient_age=input.nextInt(); + + while(patient_age<0) + { + System.out.print("\nPLEASE ENTER VALID AGE : "); + patient_age=input.nextInt(); + } + System.out.print("\nENTER PATIENT GENDER : "); + String patient_gender=br.readLine(); + + System.out.print("\nENTER PATIENT ADDRESS : "); + String patient_address=br.readLine(); + + System.out.print("\nENTER PATIENT MOBILE NUMBER : "); + String patient_ph_no=br.readLine(); + + while(patient_ph_no.length()!=10) + { + System.out.print("\nPLEASE ENTER VALID MOBILE NUMBER : "); + patient_ph_no=br.readLine(); + } + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + + Node2 tree_node=new Node2(o_patient_id1,patient_name,patient_age,patient_gender,patient_address,patient_ph_no); + if(root1==null) + root1=tree_node; + + else + { + temp=root1; + while(temp!=null) + { + if(temp.patient_id>tree_node.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idtree_node1.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node1; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idtree_node2.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node2; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idtree_node.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idtree_node1.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node1; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idtree_node2.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node2; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idtree_node.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idtree_node1.patient_id) + { + if(temp.left1==null) + { + temp.left1=tree_node1; + break; + } + else + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idid) + { + temp=temp.left1; + } + else if(temp.patient_idtable_size) { + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + System.out.println("INVALID NO..."); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + } + else + { + //System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + System.out.println("\n\t******* MEDICINE DETAILS ******** "); + for(int i=0;i=arr[i].quantity) + { + arr[i].rate=hash_table[key1].med_cost; + arr[i].med_name=hash_table[key1].med_name; + + arr[i].amount=arr[i].rate*arr[i].quantity; + hash_table[key1].count=hash_table[key1].count-arr[i].quantity; + + total_cost=total_cost+arr[i].amount; + } + + else if(hash_table[key1].count0) + { + arr[i].flag=0; + System.out.println("\nQUANTITY LEFT : "+hash_table[key1].count); + System.out.println("DO YOU WANT OT BUY QUANTITY OF : "+hash_table[key1].count); + System.out.println("\nPRESS : "); + System.out.println("\n\t1 : YES"); + System.out.println("\n\t0 : NO"); + int ch=Integer.parseInt(br.readLine()); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + + if(ch==1) + { + arr[i].quantity=hash_table[key1].count; + arr[i].rate=hash_table[key1].med_cost; + arr[i].med_name=hash_table[key1].med_name; + + arr[i].amount=arr[i].rate*arr[i].quantity; + hash_table[key1].count=hash_table[key1].count-arr[i].quantity; + + total_cost=total_cost+arr[i].amount; + } + else + arr[i].flag=2; + } + + else + { + System.out.println("\nNOT AVAILABLE !!"); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + arr[i].flag=2; + } + + } + + else + { + int j=1; + + key2=8-(arr[i].med_code%8); + key3=(key1+j*key2)%table_size; + + if(hash_table[key3]==null) + { + System.out.println("\nNOT AVAILABLE !!"); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + arr[i].flag=2; + } + else + { + while(hash_table[key3]!=null) + { + key3=(key1+j*key2)%table_size; + + if(hash_table[key3]==null) + { + System.out.println("\nNOT AVAILABLE !!"); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + arr[i].flag=2; + } + else if(hash_table[key3].med_code==arr[i].med_code) + { + arr[i].flag=1; + System.out.print("\nENTER QUANTITY : "); + arr[i].quantity=Integer.parseInt(br.readLine()); + + if(hash_table[key3].count==0) + arr[i].flag=2; + + else if(hash_table[key3].count>=arr[i].quantity) + { + arr[i].rate=hash_table[key3].med_cost; + arr[i].med_name=hash_table[key3].med_name; + + arr[i].amount=arr[i].rate*arr[i].quantity; + hash_table[key3].count=hash_table[key3].count-arr[i].quantity; + + total_cost=total_cost+arr[i].amount; + } + + else if(hash_table[key3].count0) + { + arr[i].flag=0; + System.out.println("\nQUANTITY LEFT : "+hash_table[key3].count); + System.out.println("DO YOU WANT OT BUY QUANTITY OF :"+hash_table[key3].count); + System.out.println("\nPRESS : "); + System.out.println("\n\t1 : YES"); + System.out.println("\n\t0 : NO"); + int ch=Integer.parseInt(br.readLine()); + + if(ch==1) + { + arr[i].quantity=hash_table[key3].count; + hash_table[key3].count=hash_table[key3].count-arr[i].quantity; + + arr[i].rate=hash_table[key3].med_cost; + arr[i].med_name=hash_table[key3].med_name; + + arr[i].amount=arr[i].rate*arr[i].quantity; + + total_cost=total_cost+arr[i].amount; + } + else + arr[i].flag=2; + } + + else + { + System.out.println("\nNOT AVAILABLE !!"); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + arr[i].flag=2; + } + break; + } + else + { + arr[i].flag=2; + j++; + } + } + + } + } + } + + System.out.println("\n\t***** MEDICAL STORE *****"); + System.out.println("\n\tCUSTOMER NAME : "+c_name); + System.out.println("\tCUSTOMER ADDRESS : "+addr); + + int flag=1; + int j=0; + System.out.println("\n-------------------------------------------------------------------------------\n"); + + System.out.println("\n\tSR. NO.\tMEDICINE CODE \tMEDICINE NAME \tQUANTITY \tRATE \tAMOUNT"); + for(int i=0;i al=new ArrayList(); + ArrayList a2=new ArrayList(); + ArrayList a3=new ArrayList(); + ArrayList a4=new ArrayList(); + ArrayList a5=new ArrayList(); + + int count; + int count1=0; + int count2=0; + int count3=0; + int count4=0; + int count5=0; + + public void accept() throws IOException + { + + obj1[count]=new Person(); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + System.out.print("\nENTER YOUR NAME : "); + obj1[count].name=br.readLine(); + + System.out.print("\nENTER NO OF STARS : "); + obj1[count].rating=Integer.parseInt(br.readLine()); + + System.out.print("\nENTER YOUR FEEDBACK : "); + obj1[count].content=br.readLine(); + System.out.println("\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n"); + switch(obj1[count].rating) + { + case 1: + + obj1[count1]=obj1[count]; + al.add(obj1[count1]); + count++; + count1++; + break; + + case 2: + + obj1[count2]=obj1[count]; + a2.add(obj1[count2]); + count++; + count2++; + break; + + case 3: + + obj1[count3]=obj1[count]; + a3.add(obj1[count3]); + count++; + count3++; + break; + + case 4: + obj1[count4]=obj1[count]; + a4.add(obj1[count4]); + count++; + count4++; + break; + + case 5: + obj1[count5]=obj1[count]; + a5.add(obj1[count5]); + count++; + count5++; + break; + } + } + public void display() throws NumberFormatException, IOException{ + System.out.println("\n\tSORT BY :"); + System.out.println("\n\t\t1.Rating : 1"); + System.out.println("\t\t2.Rating : 2"); + System.out.println("\t\t3.Rating : 3"); + System.out.println("\t\t4.Rating : 4"); + System.out.println("\t\t5.Rating : 5"); + System.out.print("\nENTER YOUR CHOICE : "); + int ch=Integer.parseInt(br.readLine()); + + switch(ch){ + case 1: + for(int j=0;j