public Patient getPatientInformation(String username, String password) throws Exception {
    String patientInformationQuery =
        "select p_nachname, p_vorname, zb_belegung_von, zb_belegung_bis from v" + username + ";";
    String bettInformationQuery =
        "select zb_bett_id, z_nummer, s_name, zb_belegung_von, zb_belegung_bis from v"
            + username
            + ";";
    String arztInformationQuery =
        "select f_bezeichnung, a_vorname, a_nachname, b_beschreibung, b_operation from v"
            + username
            + ";";

    Patient patient = new Patient();

    try {
      connect(username, password);

      /*
       * Patient
       */
      ResultSet result = sqlQuery(patientInformationQuery);
      while (result.next()) {
        String vorname = result.getString("p_vorname");
        String nachname = result.getString("p_nachname");
        LocalDate belegung_von = result.getDate("zb_belegung_von").toLocalDate();
        LocalDate belegung_bis =
            (result.getDate("zb_belegung_bis") != null
                ? result.getDate("zb_belegung_bis").toLocalDate()
                : null);

        if (patient.getPrename() == null && patient.getSurname() == null) {
          patient.setPrename(vorname);
          patient.setSurname(nachname);
        }
        // Beandlungsstart und -ende
        if (patient.getBehandlungStart() == null) {
          patient.setBehandlungStart(belegung_von);
        } else if (patient.getBehandlungStart().compareTo(belegung_von) > 0) {
          patient.setBehandlungStart(belegung_von);
        }
        if (belegung_bis != null) {
          if (patient.getBehandlungEnde() == null) {
            patient.setBehandlungEnde(belegung_bis);
          } else if (patient.getBehandlungEnde().compareTo(belegung_bis) < 0) {
            patient.setBehandlungEnde(belegung_bis);
          }
        }
      }

      /*
       * Betten
       */
      ArrayList<Bett> bettenList = new ArrayList<>();
      result = sqlQuery(bettInformationQuery);
      while (result.next()) {
        int bettId = result.getInt("zb_bett_id");
        int raumId = result.getInt("z_nummer");
        String station = result.getString("s_name");
        LocalDate belegungVon = result.getDate("zb_belegung_von").toLocalDate();
        LocalDate belegungBis =
            result.getDate("zb_belegung_bis") != null
                ? result.getDate("zb_belegung_bis").toLocalDate()
                : null;

        Bett newBett = new Bett(bettId, raumId, station, belegungVon, belegungBis);
        boolean bettExists = false;
        for (Bett aBettenList : bettenList) {
          if (compareBed(aBettenList, newBett)) {
            bettExists = true;
          }
        }
        if (!bettExists) bettenList.add(newBett);
      }
      patient.setBettList(bettenList);

      /*
       * Ärzte
       */
      ArrayList<Arzt> arztList = new ArrayList<>();
      result = sqlQuery(arztInformationQuery);
      while (result.next()) {
        String fachbereich = result.getString("f_bezeichnung");
        String vorname = result.getString("a_vorname");
        String nachname = result.getString("a_nachname");
        String behandlung = result.getString("b_beschreibung");
        LocalDate op =
            result.getDate("b_operation") != null
                ? result.getDate("b_operation").toLocalDate()
                : null;

        Arzt newArzt = new Arzt(vorname, nachname, behandlung, op);
        newArzt.addFachbereich(fachbereich);

        boolean arztExists = false;
        for (Arzt anArztList : arztList) {
          if (compareArzt(anArztList, newArzt)) {
            anArztList.addFachbereich(fachbereich);
            arztExists = true;
          }
        }
        if (!arztExists) arztList.add(newArzt);
      }
      patient.setAerzte(arztList);

      close();
    } catch (Exception e) {
      e.printStackTrace();
      throw new Exception();
    }
    return patient;
  }
  private boolean compareArzt(Arzt first, Arzt second) {
    boolean strings =
        (first.getPrename().equals(second.getPrename())
            && first.getSurname().equals(second.getSurname())
            && first.getBehandelndeKrankheit().equals(second.getBehandelndeKrankheit()));
    boolean op = true;

    if (first.getOpTermin() == null && second.getOpTermin() == null) {
      op = true;
    } else if (first.getOpTermin() == null ^ second.getOpTermin() == null) {
      op = false;
    } else if (first.getOpTermin().compareTo(second.getOpTermin()) != 0) {
      op = false;
    }

    return strings && op;
  }