public static ArrayList<Medicine> listMedicines() {
        String query = "SELECT * FROM medicine";
        DBA dba = Helper.getDBA();

        ArrayList<Medicine> medicines = new ArrayList<>();

        try {
            ResultSet rs = dba.executeQuery(String.format(query));

            while (rs.next()) {
                Medicine newMedicine = new Medicine();
                newMedicine.setID(rs.getInt("ID"));
                newMedicine.setName(rs.getString("name"));
                newMedicine.setCost(rs.getInt("cost"));
                medicines.add(newMedicine);
            }
            rs.close();
            dba.closeConnections();

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