@SuppressWarnings("resource")
	public SearchEngine(DataSource ds) {
		while (true) {
			try {
				System.out
						.println("Search record by: Patient info = 1, Prescribed date = 2, Alarming age = 3, Main menu = 0");
				System.out.print("Enter option: ");
				Scanner s = new Scanner(System.in);
				int option = s.nextInt();
				switch (option) {
				case 1:
					System.out.println("By health care no or patient name");
					this.searchEngineMenu1(ds);
					break;
				case 2:
					System.out.println("By prescribed date");
					this.searchEngineMenu2(ds);
					break;
				case 3:
					System.out.println("By alarming age");
					this.searchEngineMenu3(ds);
					break;
				default:
					return;
				}
			} catch (Exception e) {
				System.out.println("Wrong input.");
			}
		}
	}