public String find(Statement stmt, String comboBox, String textField) {

        DefaultTableModel model = (DefaultTableModel) table.getModel();
        model.setRowCount(0);

        if (stmt != null) {
            try {
                if (comboBox.equals("Αριθμό Διαβατηρίου")) {
                    rs = stmt.executeQuery("select  patient.*, medical_info.mid from patient JOIN medical_info  on patient.pid = medical_info.pid where patient.pid = '" + textField + "';");
                } else if (comboBox.equals("Αριθμό Φακέλου")) {
                    rs = stmt.executeQuery("select  patient.*, medical_info.mid from patient JOIN medical_info  on patient.pid = medical_info.pid where medical_info.mid = '" + textField + "';");
                } else if (comboBox.equals("Επώνυμο Ασθενή")) {
                    rs = stmt.executeQuery("select  patient.*, medical_info.mid from patient JOIN medical_info  on patient.pid = medical_info.pid where patient.last_name = '" + textField + "';");
                } else if (comboBox.equals("Όνομα Ασθενή")) {
                    rs = stmt.executeQuery("select  patient.*, medical_info.mid from patient JOIN medical_info  on patient.pid = medical_info.pid where patient.first_name = '" + textField + "';");
                }
            } catch (SQLException es) {
                System.out.println("Unable to create statement ");
                System.out.println(rs);
                return null;
            }
        }

        if (rs != null) {
            try {
                rs.previous();
                while (rs.next()) {
                    this.pid = rs.getString("pid");
                    this.fn = rs.getString("first_name");
                    this.ls = rs.getString("last_name");
                    this.dob = rs.getString("date_of_birth");
                    this.addr = rs.getString("address");
                    this.ct = rs.getString("city");
                    this.pc = rs.getString("post_code");
                    this.ph = rs.getString("phone");
                    this.it = rs.getString("insurance_type");
                    this.mid = rs.getString("mid");
                    model.addRow(new Object[]{fn, ls, dob, addr, ct, pc, pid, ph, it, mid});
                }
                System.out.printf("NAME IS " + fn + " PASSPORT NUM IS " + pid + " MID IS " + mid + "%n");
                return "Found";
            } catch (SQLException e) {
                System.out.println("Unable to iterate over resultset");
                JOptionPane.showMessageDialog(null, "Δεν βρέθηκε ασθενής", "Ανεπιτυχής Αναζήτηση", JOptionPane.ERROR_MESSAGE);
                model.setRowCount(0);
                return "This PID does not exist";
            }
        }
        return "ERROR";
    }