private ArrayList<Models.DatabaseModel.Bill> findUserBill(int patientId, boolean outStanding) {
        String query = "SELECT `bill`.`billId`, "
                + "     `bill`.`patientId`, "
                + "     `bill`.`dateCreated`, "
                + "     `bill`.`datePaid`, "
                + "     `bill`.`consultationCost` "
                + " FROM `bill` "
                + " WHERE `bill`.`patientId` = '%d'";
        if (outStanding) {
            query += " AND `bill`.`datePaid` IS NULL;";
        } else {
            query += " AND `bill`.`datePaid` IS NOT NULL;";
        }
        DBA dba = Helper.getDBA();

        ArrayList<Models.DatabaseModel.Bill> listOfBills = new ArrayList<>();
        try {
            ResultSet rs = dba.executeQuery(String.format(query, patientId));

            if (rs != null) {

                while (rs.next()) {
                    Models.DatabaseModel.Bill newBill = new Models.DatabaseModel.Bill();

                    newBill.setId(rs.getInt("billId"));
                    newBill.setPatientId(rs.getInt("patientId"));
                    newBill.setDateCreated(rs.getTimestamp("dateCreated"));
                    newBill.setDatePaid(rs.getTimestamp("datePaid"));
                    newBill.setConsultationCost(rs.getInt("consultationCost"));

                    listOfBills.add(newBill);
                }

                rs.close();
            }
            dba.closeConnections();

        } catch (SQLException sqlEx) {
            dba.closeConnections();
            Helper.logException(sqlEx);
        }
        return listOfBills;
    }