Advertisement
Guest User

Medical 360

a guest
Mar 29th, 2020
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 22.08 KB | None | 0 0
  1. package hospitalmanagement;
  2.  
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class Test {
  7.    
  8.     public static void main(String[] args) {
  9.        
  10.         Scanner input = new Scanner(System.in);
  11.         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;
  12.         String s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,h,h1,h2,h3;
  13.        
  14.         System.out.println("***WELL COME TO Medi 360***\n\n");  
  15.        
  16.         while(true){
  17.             if(b==0){break;}
  18.         else if(b==1){
  19.        
  20.        
  21.         System.out.println("(1)Hospital\n(2)Ambulance Hire\n(3)Doctor Consulting\n"
  22.                 + "(4)Medicine\n(5)Medical Equipment\n(6)Blood\n(7)Precription Timer\n\n");
  23.        
  24.         System.out.print("Select Your choice : ");
  25.         digit = input.nextInt();
  26.    
  27.         switch(digit){
  28.             case 1:
  29.             {
  30.             System.out.println("(1)Appoint Hospital\n(2)Emergency\n(3)Bill Payment\n\n");
  31.             System.out.print("Select Your choice : ");
  32.             A4 = input.nextInt();
  33.             switch (A4){
  34.             case 1 :
  35.             {
  36.                 System.out.println("Select Cabin or Seat");
  37.                 System.out.println("(1)VIP Cabin\n(2)Seat\n");
  38.                         System.out.print("Select Your type : ");
  39.                          j = input.nextInt();
  40.  
  41.                 switch(j){
  42.                     case 1:{System.out.println("Five Cabin are available in Hospital");
  43.                             break; }
  44.                     case 2:{System.out.println("Five Seat are available this Hospital");
  45.                             break;}
  46.                    
  47.                 }
  48.                
  49.                 System.out.print("How many Seat you want to book ");
  50.                 n = input.nextInt();
  51.                
  52.                 for(i=1;i<=n;i++)
  53.                 {
  54.                   if(n>=6){System.out.println("Max Out << "+n);
  55.                 System.out.println("You can able to book (max) 5\n");
  56.                 break;}
  57.                      
  58.                 System.out.println("      **Fill up Information form**");
  59.                 s8 = input.nextLine();
  60.                 System.out.print("Name : ");
  61.                 s0 = input.nextLine();
  62.                 System.out.print("Age : ");
  63.                 s1 = input.nextLine();
  64.                 System.out.print("Gender : ");
  65.                 s2 = input.nextLine();
  66.                 System.out.print("Address : ");
  67.                 s3 = input.nextLine();
  68.                 System.out.print("Father name : ");
  69.                 s4 = input.nextLine();
  70.                 System.out.print("Mother Name : ");
  71.                 s5 = input.nextLine();
  72.                 System.out.print("Disease : ");
  73.                 s6 = input.nextLine();
  74.                 System.out.print("Mobile No : ");
  75.                 s8 = input.nextLine();
  76.      System.out.println("* * * * * * * * * * * * * * * * * * ");
  77.                    
  78.      System.out.print("*        Patient Infomation   \n");
  79.      System.out.print("*       --------------------     ");
  80.      System.out.println("\n*  Name : "+s0+" \n*  Age : "+s1+" \n*  Gender : "+s2+" \n*  Address : "+s3+
  81.                         " \n*  Father Name : "+s4+"\n*  Mother Name : "+s5+"\n*  Disease : "+s6+"\n*  Mobile No : "+s8+"\n*");
  82.      System.out.println("* * * * * * * * * * * * * * * * * * ");
  83.      System.out.println("\n **" +i+ "Booking Successfully**\n");
  84.                    
  85.                    
  86.  
  87.                 }
  88.                  break;
  89.             }
  90.             case 2 :{
  91.                 System.out.println("Welcome to Emergency Service");
  92.                 System.out.println("(1)Emergency Treatment\n(2)Outdoor Treatment\n");
  93.                 System.out.print("Select Your choice : ");
  94.                 q1 = input.nextInt();
  95.                 switch (q1)
  96.                 {
  97.                     case 1:{
  98.                         System.out.println("The patient are treated rapidly according to disease");
  99.                         break;
  100.                     }
  101.                     case 2:{
  102.                         System.out.println("Patient are released with some basic treatment");
  103.                         break;
  104.                     }
  105.                     default : {
  106.                         System.out.println("Error selection");
  107.                         break;
  108.                     }
  109.                 }
  110.             }
  111.             case 3 :
  112.             {
  113.                 h1 = input.nextLine();
  114.                 System.out.print("Name : ");
  115.                 h1 = input.nextLine();
  116.                 System.out.print("Amount : ");
  117.                 e2 = input.nextInt();
  118.                 h3 = input.nextLine();
  119.                 System.out.print("Payment via : ");
  120.                 h3 = input.nextLine();
  121.                 System.out.print("Account no : ");
  122.                 e2 = input.nextInt();
  123.                 System.out.print("Pin : ");
  124.                 e1 = input.nextInt();
  125.                 System.out.println("Please wait for confirmation...");
  126.                
  127.             }
  128.             }
  129.                
  130.            
  131.                
  132.                 break;
  133.             }
  134.             case 2 :
  135.             {
  136.                 System.out.println("Give Information to hire Ambulance");
  137.                  s8 = input.nextLine();
  138.                  System.out.print("Name : ");
  139.                  s0 = input.nextLine();
  140.                  System.out.print("Age : ");
  141.                  s9 = input.nextLine();
  142.                  System.out.print("Disease : ");
  143.                  s6 = input.nextLine();
  144.                  System.out.print("Pick up Address : ");
  145.                  s3 = input.nextLine();
  146.                  System.out.print("Destination Address : ");
  147.                  s4 = input.nextLine();
  148.                  System.out.print("Mobile No : ");
  149.                  d2 = input.nextInt();
  150.                  System.out.println("\n(1)Freezing Ambulance\n(2)AC Ambulance\n(3)Non AC Ambulance\n");
  151.                  
  152.                  System.out.print("Which type of Ambulance you need ");
  153.                  A1 = input.nextInt();
  154.                  switch(A1){
  155.                      case 1:{
  156.                         System.out.println("-------------------------------");
  157.                         System.out.println("Freezing Ambulance is only for Deadbody");
  158.                         System.out.println("    ***Patient Information***");
  159.                         System.out.println("Name : "+s0+"\nAge : "+s9+"\nDisease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
  160.                         System.out.println("-------------------------------");
  161.                          break;
  162.                      }
  163.                      case 2 :
  164.                      {
  165.                         System.out.println("------------------------------");
  166.                         System.out.println("    ***Information***");
  167.                         System.out.println("Name : "+s0+"\nAge : "+s9+"\nDisease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
  168.                         System.out.println("-------------------------------");
  169.                         break;
  170.                        
  171.                      }
  172.                      case 3 :
  173.                      {
  174.                         System.out.println("-------------------------------");
  175.                         System.out.println("    ***Information***");
  176.                         System.out.println("Name : "+s0+"Age :"+s9+"Disease Name : "+s6+"\nPick up Address : "+s3+"\nDestination Address : "+s4+"\nMobile No : "+d2);
  177.                         System.out.println("-------------------------------");
  178.                         break;
  179.                      }
  180.                      default : System.out.println("Error selection");
  181.                  }
  182.                  break;
  183.                
  184.                 }
  185.            
  186.             case 3 :
  187.             {
  188.               System.out.println("Doctor Consulting");
  189.               System.out.println("(1))Neurologist\n(2)Cardiologist\n(3)Dermatologist\n(4)Nephrologist\n(5)Gastrologist\n"
  190.                + "(6)Gyneocologist\n(7)ENT\n(8)Psychaiatrists\n(9)General Medicine\n");
  191.               System.out.print("Select Your specialist Doctor according to your dieases : ");
  192.               q =input.nextInt();
  193.               switch (q){
  194.                   case 1 :{
  195.                   System.out.println("Neurologists are specialist in Nervs,Spine and Brain");
  196.                   System.out.println("(1)Direct Contract\n(2)Take Serial\n");
  197.                   System.out.print("Select your choice ");
  198.                   A3 = input.nextInt();
  199.                   switch (A3){
  200.                       case 1 :{
  201.                           System.out.println("3 Neurologists are available for virtual consulting");
  202.                           System.out.println("Click 1 to make call now");
  203.                           d5 = input.nextInt();
  204.                           if(d5==1){
  205.                               System.out.println("Your call is Ringing...");
  206.                           }
  207.                           else{
  208.                               System.out.println("Click right button");
  209.                           }
  210.                           break;
  211.                       }
  212.                       case 2 : {
  213.                            System.out.println("59 Neurologists are available for Normal consulting");
  214.                            System.out.println("Click 5 to confirm your serial ");
  215.                           d5 = input.nextInt();
  216.                           if(d5==5){
  217.                               System.out.println("Your Consulting time is confirm...");
  218.                               System.out.println("30/04/2020 at 19:00 O clock");
  219.                               break;
  220.                           }
  221.                           else{
  222.                               System.out.println("Click right button");
  223.                           }
  224.                           break;
  225.                       }
  226.                      
  227.                   }
  228.                   break;
  229.                          
  230.                   }
  231.                   case 2 :{
  232.                   System.out.println("Cardiologist Are specialist on the cardiovascular system,heartand Blood vessels");
  233.                          
  234.                   }
  235.                   case 3 :{
  236.                   System.out.println("Dermatologists focus on diseases and conditions of the skin, nails, and hair");
  237.                          
  238.                      }
  239.                   case 4 :{
  240.                       System.out.println("A nephrologist focuses on kidney care and conditions that affect the kidneys");
  241.                          
  242.                      }
  243.                   case 5 :{
  244.                          System.out.println("Gastroenterologists Specialize on the digestive system. This includes the esophagus, pancreas, stomach, liver, small intestine, colon, and gallbladder.");
  245.                      }
  246.                   case 6 :{
  247.                          System.out.println("Gynecologists provide preventive care and disease management for female health conditions. ");
  248.                      }
  249.                   case 7 :{
  250.                          System.out.println("ENT are focous on Ear,Nose and Eye");
  251.                      }
  252.                   case 8 :{
  253.                          System.out.println("psychiatrist treats mental health conditions.They use counseling, medication, or hospitalization as part of their treatment.");
  254.                      }
  255.                   case 9 :{
  256.                          System.out.println("Medicine specialist provide appropriate medicine");
  257.                      }    
  258.                      default : System.out.println("Error Selection");
  259.                  }
  260.                  break;
  261.             }
  262.             case 4 :
  263.             {
  264.                  System.out.println("Medicine");
  265.                 System.out.println("      **Fill up Information to buy medicine**");
  266.                 s8 = input.nextLine();
  267.                 System.out.print("Medicine name : ");
  268.                 s0 = input.nextLine();
  269.                 System.out.print("Age : ");
  270.                 s1 = input.nextLine();
  271.                 System.out.print("Gender : ");
  272.                 s2 = input.nextLine();
  273.                 System.out.print("Address : ");
  274.                 s3 = input.nextLine();
  275.                 System.out.print("Disease : ");
  276.                 s6 = input.nextLine();
  277.                 System.out.print("Mobile No : ");
  278.                 s8 = input.nextLine();
  279.              
  280.           System.out.println("* * * * * * * * * * * * * * * * * * ");
  281.                    
  282.           System.out.print("        Patient (Buyer)Infomation   \n");
  283.           System.out.print("       --------------------     ");
  284.           System.out.println("\nMedicine Name : "+s0+"\nAge : "+s1+"\nGender : "+s2+"\nAddress : "+s3+
  285.                       "\nDisease : "+s6+"\nMobile No : "+s8);
  286.           System.out.println("* * * * * * * * * * * * * * * * * * ");
  287.           System.out.println("this medicine is available here");
  288.           System.out.println("To buy this medicine you have to pay \n");
  289.           System.out.println("(1)Cash on delevery\n(2)Payment first");
  290.           System.out.print("\nSelect Your choice : ");
  291.           e = input.nextInt();
  292.    
  293.         switch(e){
  294.             case 1 :
  295.             {
  296.                 System.out.println("\nMake Payment after receiving medicine\n");
  297.                 break;
  298.             }
  299.             case 2 :
  300.             {
  301.                 h1 = input.nextLine();
  302.                 System.out.print("Name : ");
  303.                 h1 = input.nextLine();
  304.                 System.out.print("Amount : ");
  305.                 e2 = input.nextInt();
  306.                 h3 = input.nextLine();
  307.                 System.out.print("Payment via : ");
  308.                 h3 = input.nextLine();
  309.                 System.out.print("Account no : ");
  310.                 e2 = input.nextInt();
  311.                 System.out.print("Pin : ");
  312.                 e1 = input.nextInt();
  313.                 System.out.println("Please wait for confirmation...\n");
  314.                 break;
  315.                
  316.             }
  317.             default :{System.out.println("Error selection\n");
  318.             break;
  319.            
  320.         }
  321.         }
  322.                    
  323.                          
  324.                  break;
  325.             }
  326.             case 5 :
  327.             {
  328.                  System.out.println("Medical Equipment");
  329.                  System.out.println("      **Fill up Information to buy**");
  330.                 s8 = input.nextLine();
  331.                 System.out.print("Equipment Name : ");
  332.                 s0 = input.nextLine();
  333.                 System.out.print("Address : ");
  334.                 s3 = input.nextLine();
  335.                 System.out.print("Road Number : ");
  336.                 s4 = input.nextLine();
  337.                 System.out.print("Appartment No: ");
  338.                 s5 = input.nextLine();
  339.                 System.out.print("Floor : ");
  340.                 s6 = input.nextLine();              
  341.                 System.out.print("Mobile No : ");
  342.                 s9 = input.nextLine();
  343.              
  344.           System.out.println("* * * * * * * * * * * * * * * * * * ");
  345.                    
  346.           System.out.println("     Equipment Buyer Infomation   ");
  347.           System.out.println("     --------------------------    ");
  348.           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");
  349.           System.out.println("* * * * * * * * * * * * * * * * * * ");
  350.           System.out.println("this Equipment is available here");
  351.           System.out.println("To buy this Equipment you have to pay \n");
  352.           System.out.println("(1)Cash on delevery\n(2)Payment first");
  353.           System.out.print("\nSelect Your choice : ");
  354.           e = input.nextInt();
  355.    
  356.         switch(e){
  357.             case 1 :
  358.             {
  359.                 System.out.println("Make Payment after receiving medicine\n");
  360.                 break;
  361.             }
  362.             case 2 :
  363.             {
  364.                 h1 = input.nextLine();
  365.                 System.out.print("Account Name : ");
  366.                 h1 = input.nextLine();
  367.                 System.out.print("Amount : ");
  368.                 e2 = input.nextInt();
  369.                 h3 = input.nextLine();
  370.                 System.out.print("Payment via : ");
  371.                 h3 = input.nextLine();
  372.                 System.out.print("Account no : ");
  373.                 e2 = input.nextInt();
  374.                 System.out.print("Pin : ");
  375.                 e1 = input.nextInt();
  376.                 System.out.println("Please wait for confirmation...\n");
  377.                 break;
  378.                
  379.             }
  380.             default :{System.out.println("Error selection\n");
  381.            
  382.         }
  383.         }
  384.                  break;
  385.             }
  386.             case 6 :
  387.             {
  388.                  System.out.println("Blood");
  389.                  System.out.println("Select one : ");
  390.                  System.out.println("(1)Blood donor\n(2)Blood recipent");
  391.                  System.out.print("Select Your choice : ");
  392.                  A5 = input.nextInt();
  393.    
  394.         switch(A5){
  395.             case 1 :{
  396.                         System.out.println("Give Information to add as a donor");
  397.                         s8 = input.nextLine();
  398.                         System.out.print("Name : ");
  399.                         s0 = input.nextLine();
  400.                         System.out.print("Age : ");
  401.                         s1 = input.nextLine();
  402.                         System.out.print("Blood group : ");
  403.                         s2 = input.nextLine();
  404.                         System.out.print("Last donte(in Days) : ");                      
  405.                         d8 = input.nextInt();
  406.                         s8 = input.nextLine();
  407.                         System.out.print("District : ");
  408.                         s3 = input.nextLine();
  409.                         System.out.print("Upazilla/University name : ");
  410.                         s5 = input.nextLine();
  411.                         System.out.print("Address : ");
  412.                         s4 = input.nextLine();
  413.                         System.out.print("Mobile No : ");
  414.                         d2 = input.nextInt();
  415.                         System.out.println("**********************************************");
  416.            
  417.                         System.out.println("          Blood Donor Information");
  418.                         System.out.println("          -----------------------");
  419.                        
  420.                 System.out.println("Name : "+s0+"Age : "+s1+"\nBlood group : "+s2+"Last donte(in Days) : "+d8+"\nDistrict : "+s3+"\nUpazilla/University name "+s5+
  421.                         "\nAddress: "+s4+"\nMobile number : "+d2);
  422.                 if(d8 <120)
  423.                  {
  424.                      d8 = 120-d8;
  425.                      
  426.                     System.out.println("You are available to donate Blood after "+d8+" days\n");
  427.                      }
  428.                 else if(d8>120)
  429.                 {
  430.                     System.out.println("You are available to donate Blood\n");
  431.                 }
  432.                 else {
  433.                     System.out.println("Error selection\n");
  434.                 }
  435.                 System.out.println("**********************************************");
  436.                 break;
  437.                
  438.         }
  439.             case 2:{
  440.                 System.out.println("Give Information to add as a Blood Recipent");
  441.                         s8 = input.nextLine();
  442.                         System.out.print("Name : ");
  443.                         s0 = input.nextLine();
  444.                         System.out.print("Age : ");
  445.                         s1 = input.nextLine();
  446.                         System.out.print("Blood group : ");
  447.                         s2 = input.nextLine();
  448.                         System.out.print("Disease name : ");                                            
  449.                         s8 = input.nextLine();
  450.                         System.out.print("District : ");
  451.                         s3 = input.nextLine();
  452.                         System.out.print("Upazilla/University name : ");
  453.                         s5 = input.nextLine();
  454.                         System.out.print("Address : ");
  455.                         s4 = input.nextLine();
  456.                         System.out.print("Mobile No : ");
  457.                         s6 = input.nextLine();
  458.                         System.out.println("**********************************************");
  459.                         System.out.println("        Blood Recipent Information");
  460.                         System.out.println("        --------------------------");
  461.                 System.out.println("Name : "+s0+"\nAge : "+s1+"\nBlood group : "+s2+"\nDisease Name : "+s8+"\nDistrict : "+s3+"\nUpazilla/University name : "+s5+
  462.                         "\nAddress: "+s4+"\nMobile number : "+s6);
  463.                         System.out.println("**********************************************\n");
  464.             }
  465.         }
  466.                  break;
  467.             }
  468.             case 7 :
  469.             {
  470.                 System.out.println("Setup here while you consume your medicine");
  471.                 System.out.print("Day : ");
  472.                 d1 = input.nextInt();
  473.                 System.out.print("Hour : ");
  474.                 d2 = input.nextInt();
  475.                 System.out.print("Minute : ");
  476.                 d3 = input.nextInt();
  477.                 System.out.println("Day : "+d1+"\nHour : "+d2+"\nMinute : "+d3+"\n");
  478.                 System.out.println("Prescription Time Confirmed");
  479.                 System.out.println("You will get notfication on time");
  480.                          
  481.             }
  482.            
  483.            
  484.             default :
  485.             {
  486.                  System.out.println("Error Selection!!Select from above list");
  487.                  break;
  488.             }
  489.         }
  490.        
  491.            System.out.println("Press 1 to continue\nPress 0 to Finish");
  492.            System.out.print("Enter Input : ");
  493.            b = input.nextInt();
  494.            System.out.println("\n\n");
  495.            
  496.        
  497.         }
  498.         else{System.out.println("Error");
  499.       }
  500.    }
  501. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement