public static boolean delete (Object bean) {

		String sql;
		PreparedStatement stmt=null;
		
		try{
			if(bean instanceof Patient){
				sql = "DELETE FROM patients WHERE pid = ?";
				stmt = conn.prepareStatement(sql);
				return deletePatient((Patient)bean, stmt);
			}
			if(bean instanceof Employee){
				sql = "DELETE FROM employees WHERE username = ?";
				stmt = conn.prepareStatement(sql);
				return deleteEmployee((Employee)bean, stmt);
			}
			if(bean instanceof Drug){
				sql = "DELETE FROM Drugs WHERE drugid = ?";
				stmt = conn.prepareStatement(sql);
				return deleteDrug((Drug)bean, stmt);
			}
			if(bean instanceof Prescription){
				sql = "DELETE FROM Prescriptions WHERE presc_id = ?";
				stmt = conn.prepareStatement(sql);
				return deletePrescription((Prescription) bean, stmt);
			}
			if(bean instanceof Schedule){
				sql = "DELETE FROM schedules WHERE work_day = ? and username = ?";
				stmt = conn.prepareStatement(sql);
				return deleteSchedule((Schedule)bean, stmt);
			}
		}catch(SQLException e){
			System.out.println("SQLException within delete()");
			System.out.println(e);
		}finally{
			if(stmt != null)
				try {
					stmt.close();
				} catch (SQLException e) {
					System.out.println("unable to close stmt within delete()");
					e.printStackTrace();
				}
		}
		return false;
	}