Advertisement
Guest User

Mujahidul islam

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