Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hospitalmanagement;
- import java.util.Scanner;
- public class Test {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int b=1,digit,d1,n,i,j = 0,d2,d3,d4,d8,d7,d5,A1,q = 0,A3,A4,q1=0,e = 0,e1,e2,e3,A5;
- String s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,h,h1,h2,h3;
- System.out.println("***WELL COME TO Medi 360***\n\n");
- while(true){
- if(b==0){break;}
- else if(b==1){
- System.out.println("(1)Hospital\n(2)Ambulance Hire\n(3)Doctor Consulting\n"
- + "(4)Medicine\n(5)Medical Equipment\n(6)Blood\n(7)Precription Timer\n\n");
- System.out.print("Select Your choice : ");
- digit = input.nextInt();
- switch(digit){
- case 1:
- {
- System.out.println("(1)Appoint Hospital\n(2)Emergency\n(3)Bill Payment\n\n");
- System.out.print("Select Your choice : ");
- A4 = input.nextInt();
- switch (A4){
- case 1 :
- {
- System.out.println("Select Cabin or Seat");
- System.out.println("(1)VIP Cabin\n(2)Seat\n");
- System.out.print("Select Your type : ");
- j = input.nextInt();
- switch(j){
- case 1:{System.out.println("Five Cabin are available in Hospital");
- break; }
- case 2:{System.out.println("Five Seat are available this Hospital");
- break;}
- }
- System.out.print("How many Seat you want to book ");
- n = input.nextInt();
- for(i=1;i<=n;i++)
- {
- if(n>=6){System.out.println("Max Out << "+n);
- System.out.println("You can able to book (max) 5\n");
- break;}
- System.out.println(" **Fill up Information form**");
- s8 = input.nextLine();
- System.out.print("Name : ");
- s0 = input.nextLine();
- System.out.print("Age : ");
- s1 = input.nextLine();
- System.out.print("Gender : ");
- s2 = input.nextLine();
- System.out.print("Address : ");
- s3 = input.nextLine();
- System.out.print("Father name : ");
- s4 = input.nextLine();
- System.out.print("Mother Name : ");
- s5 = input.nextLine();
- System.out.print("Disease : ");
- s6 = input.nextLine();
- System.out.print("Mobile No : ");
- s8 = input.nextLine();
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.print("* Patient Infomation \n");
- System.out.print("* -------------------- ");
- System.out.println("\n* Name : "+s0+" \n* Age : "+s1+" \n* Gender : "+s2+" \n* Address : "+s3+
- " \n* Father Name : "+s4+"\n* Mother Name : "+s5+"\n* Disease : "+s6+"\n* Mobile No : "+s8+"\n*");
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.println("\n **" +i+ "Booking Successfully**\n");
- }
- break;
- }
- case 2 :{
- System.out.println("Welcome to Emergency Service");
- System.out.println("(1)Emergency Treatment\n(2)Outdoor Treatment\n");
- System.out.print("Select Your choice : ");
- q1 = input.nextInt();
- switch (q1)
- {
- case 1:{
- System.out.println("The patient are treated rapidly according to disease");
- break;
- }
- case 2:{
- System.out.println("Patient are released with some basic treatment");
- break;
- }
- default : {
- System.out.println("Error selection");
- break;
- }
- }
- }
- case 3 :
- {
- h1 = input.nextLine();
- System.out.print("Name : ");
- h1 = input.nextLine();
- System.out.print("Amount : ");
- e2 = input.nextInt();
- h3 = input.nextLine();
- System.out.print("Payment via : ");
- h3 = input.nextLine();
- System.out.print("Account no : ");
- e2 = input.nextInt();
- System.out.print("Pin : ");
- e1 = input.nextInt();
- System.out.println("Please wait for confirmation...");
- }
- }
- break;
- }
- case 2 :
- {
- System.out.println("Give Information to hire Ambulance");
- s8 = input.nextLine();
- System.out.print("Name : ");
- s0 = input.nextLine();
- System.out.print("Age : ");
- s9 = input.nextLine();
- System.out.print("Disease : ");
- s6 = input.nextLine();
- System.out.print("Pick up Address : ");
- s3 = input.nextLine();
- System.out.print("Destination Address : ");
- s4 = input.nextLine();
- System.out.print("Mobile No : ");
- d2 = input.nextInt();
- System.out.println("\n(1)Freezing Ambulance\n(2)AC Ambulance\n(3)Non AC Ambulance\n");
- System.out.print("Which type of Ambulance you need ");
- A1 = input.nextInt();
- switch(A1){
- case 1:{
- System.out.println("-------------------------------");
- System.out.println("Freezing Ambulance is only for Deadbody");
- System.out.println(" ***Patient Information***");
- System.out.println("Name : "+s0+"\nAge : "+s9+"\nDisease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
- System.out.println("-------------------------------");
- break;
- }
- case 2 :
- {
- System.out.println("------------------------------");
- System.out.println(" ***Information***");
- System.out.println("Name : "+s0+"\nAge : "+s9+"\nDisease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
- System.out.println("-------------------------------");
- break;
- }
- case 3 :
- {
- System.out.println("-------------------------------");
- System.out.println(" ***Information***");
- System.out.println("Name : "+s0+"Age :"+s9+"Disease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
- System.out.println("-------------------------------");
- break;
- }
- default : System.out.println("Error selection");
- }
- break;
- }
- case 3 :
- {
- System.out.println("Doctor Consulting");
- System.out.println("(1))Neurologist\n(2)Cardiologist\n(3)Dermatologist\n(4)Nephrologist\n(5)Gastrologist\n"
- + "(6)Gyneocologist\n(7)ENT\n(8)Psychaiatrists\n(9)General Medicine\n");
- System.out.print("Select Your specialist Doctor according to your dieases : ");
- q =input.nextInt();
- switch (q){
- case 1 :{
- System.out.println("Neurologists are specialist in Nervs,Spine and Brain");
- System.out.println("(1)Direct Contract\n(2)Take Serial\n");
- System.out.print("Select your choice ");
- A3 = input.nextInt();
- switch (A3){
- case 1 :{
- System.out.println("3 Neurologists are available for virtual consulting");
- System.out.println("Click 1 to make call now");
- d5 = input.nextInt();
- if(d5==1){
- System.out.println("Your call is Ringing...");
- }
- else{
- System.out.println("Click right button");
- }
- break;
- }
- case 2 : {
- System.out.println("59 Neurologists are available for Normal consulting");
- System.out.println("Click 5 to confirm your serial ");
- d5 = input.nextInt();
- if(d5==5){
- System.out.println("Your Consulting time is confirm...");
- System.out.println("30/04/2020 at 19:00 O clock");
- break;
- }
- else{
- System.out.println("Click right button");
- }
- break;
- }
- }
- break;
- }
- case 2 :{
- System.out.println("Cardiologist Are specialist on the cardiovascular system,heartand Blood vessels");
- }
- case 3 :{
- System.out.println("Dermatologists focus on diseases and conditions of the skin, nails, and hair");
- }
- case 4 :{
- System.out.println("A nephrologist focuses on kidney care and conditions that affect the kidneys");
- }
- case 5 :{
- System.out.println("Gastroenterologists Specialize on the digestive system. This includes the esophagus, pancreas, stomach, liver, small intestine, colon, and gallbladder.");
- }
- case 6 :{
- System.out.println("Gynecologists provide preventive care and disease management for female health conditions. ");
- }
- case 7 :{
- System.out.println("ENT are focous on Ear,Nose and Eye");
- }
- case 8 :{
- System.out.println("psychiatrist treats mental health conditions.They use counseling, medication, or hospitalization as part of their treatment.");
- }
- case 9 :{
- System.out.println("Medicine specialist provide appropriate medicine");
- }
- default : System.out.println("Error Selection");
- }
- break;
- }
- case 4 :
- {
- System.out.println("Medicine");
- System.out.println(" **Fill up Information to buy medicine**");
- s8 = input.nextLine();
- System.out.print("Medicine name : ");
- s0 = input.nextLine();
- System.out.print("Age : ");
- s1 = input.nextLine();
- System.out.print("Gender : ");
- s2 = input.nextLine();
- System.out.print("Address : ");
- s3 = input.nextLine();
- System.out.print("Disease : ");
- s6 = input.nextLine();
- System.out.print("Mobile No : ");
- s8 = input.nextLine();
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.print(" Patient (Buyer)Infomation \n");
- System.out.print(" -------------------- ");
- System.out.println("\nMedicine Name : "+s0+"\nAge : "+s1+"\nGender : "+s2+"\nAddress : "+s3+
- "\nDisease : "+s6+"\nMobile No : "+s8);
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.println("this medicine is available here");
- System.out.println("To buy this medicine you have to pay \n");
- System.out.println("(1)Cash on delevery\n(2)Payment first");
- System.out.print("\nSelect Your choice : ");
- e = input.nextInt();
- switch(e){
- case 1 :
- {
- System.out.println("\nMake Payment after receiving medicine\n");
- break;
- }
- case 2 :
- {
- h1 = input.nextLine();
- System.out.print("Name : ");
- h1 = input.nextLine();
- System.out.print("Amount : ");
- e2 = input.nextInt();
- h3 = input.nextLine();
- System.out.print("Payment via : ");
- h3 = input.nextLine();
- System.out.print("Account no : ");
- e2 = input.nextInt();
- System.out.print("Pin : ");
- e1 = input.nextInt();
- System.out.println("Please wait for confirmation...\n");
- break;
- }
- default :{System.out.println("Error selection\n");
- break;
- }
- }
- break;
- }
- case 5 :
- {
- System.out.println("Medical Equipment");
- System.out.println(" **Fill up Information to buy**");
- s8 = input.nextLine();
- System.out.print("Equipment Name : ");
- s0 = input.nextLine();
- System.out.print("Address : ");
- s3 = input.nextLine();
- System.out.print("Road Number : ");
- s4 = input.nextLine();
- System.out.print("Appartment No: ");
- s5 = input.nextLine();
- System.out.print("Floor : ");
- s6 = input.nextLine();
- System.out.print("Mobile No : ");
- s9 = input.nextLine();
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.println(" Equipment Buyer Infomation ");
- System.out.println(" -------------------------- ");
- System.out.println("\n Equipment Name : "+s0+" \n Address : "+s3+" \n Road Number : "+s4+" \n Appartment No: "+s5+" \n Floor : "+s6+"\n Mobile No : "+s9+"\n");
- System.out.println("* * * * * * * * * * * * * * * * * * ");
- System.out.println("this Equipment is available here");
- System.out.println("To buy this Equipment you have to pay \n");
- System.out.println("(1)Cash on delevery\n(2)Payment first");
- System.out.print("\nSelect Your choice : ");
- e = input.nextInt();
- switch(e){
- case 1 :
- {
- System.out.println("Make Payment after receiving medicine\n");
- break;
- }
- case 2 :
- {
- h1 = input.nextLine();
- System.out.print("Account Name : ");
- h1 = input.nextLine();
- System.out.print("Amount : ");
- e2 = input.nextInt();
- h3 = input.nextLine();
- System.out.print("Payment via : ");
- h3 = input.nextLine();
- System.out.print("Account no : ");
- e2 = input.nextInt();
- System.out.print("Pin : ");
- e1 = input.nextInt();
- System.out.println("Please wait for confirmation...\n");
- break;
- }
- default :{System.out.println("Error selection\n");
- }
- }
- break;
- }
- case 6 :
- {
- System.out.println("Blood");
- System.out.println("Select one : ");
- System.out.println("(1)Blood donor\n(2)Blood recipent");
- System.out.print("Select Your choice : ");
- A5 = input.nextInt();
- switch(A5){
- case 1 :{
- System.out.println("Give Information to add as a donor");
- s8 = input.nextLine();
- System.out.print("Name : ");
- s0 = input.nextLine();
- System.out.print("Age : ");
- s1 = input.nextLine();
- System.out.print("Blood group : ");
- s2 = input.nextLine();
- System.out.print("Last donte(in Days) : ");
- d8 = input.nextInt();
- s8 = input.nextLine();
- System.out.print("District : ");
- s3 = input.nextLine();
- System.out.print("Upazilla/University name : ");
- s5 = input.nextLine();
- System.out.print("Address : ");
- s4 = input.nextLine();
- System.out.print("Mobile No : ");
- d2 = input.nextInt();
- System.out.println("**********************************************");
- System.out.println(" Blood Donor Information");
- System.out.println(" -----------------------");
- System.out.println("Name : "+s0+"Age : "+s1+"\nBlood group : "+s2+"Last donte(in Days) : "+d8+"\nDistrict : "+s3+"\nUpazilla/University name "+s5+
- "\nAddress: "+s4+"\nMobile number : "+d2);
- if(d8 <120)
- {
- d8 = 120-d8;
- System.out.println("You are available to donate Blood after "+d8+" days\n");
- }
- else if(d8>120)
- {
- System.out.println("You are available to donate Blood\n");
- }
- else {
- System.out.println("Error selection\n");
- }
- System.out.println("**********************************************");
- break;
- }
- case 2:{
- System.out.println("Give Information to add as a Blood Recipent");
- s8 = input.nextLine();
- System.out.print("Name : ");
- s0 = input.nextLine();
- System.out.print("Age : ");
- s1 = input.nextLine();
- System.out.print("Blood group : ");
- s2 = input.nextLine();
- System.out.print("Disease name : ");
- s8 = input.nextLine();
- System.out.print("District : ");
- s3 = input.nextLine();
- System.out.print("Upazilla/University name : ");
- s5 = input.nextLine();
- System.out.print("Address : ");
- s4 = input.nextLine();
- System.out.print("Mobile No : ");
- s6 = input.nextLine();
- System.out.println("**********************************************");
- System.out.println(" Blood Recipent Information");
- System.out.println(" --------------------------");
- System.out.println("Name : "+s0+"\nAge : "+s1+"\nBlood group : "+s2+"\nDisease Name : "+s8+"\nDistrict : "+s3+"\nUpazilla/University name : "+s5+
- "\nAddress: "+s4+"\nMobile number : "+s6);
- System.out.println("**********************************************\n");
- }
- }
- break;
- }
- case 7 :
- {
- System.out.println("Setup here while you consume your medicine");
- System.out.print("Day : ");
- d1 = input.nextInt();
- System.out.print("Hour : ");
- d2 = input.nextInt();
- System.out.print("Minute : ");
- d3 = input.nextInt();
- System.out.println("Day : "+d1+"\nHour : "+d2+"\nMinute : "+d3+"\n");
- System.out.println("Prescription Time Confirmed");
- System.out.println("You will get notfication on time");
- }
- default :
- {
- System.out.println("Error Selection!!Select from above list");
- break;
- }
- }
- System.out.println("Press 1 to continue\nPress 0 to Finish");
- System.out.print("Enter Input : ");
- b = input.nextInt();
- System.out.println("\n\n");
- }
- else{System.out.println("Error");
- }
- }
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement