private static Drug getDrug(Drug bean, PreparedStatement stmt, ResultSet rs) throws SQLException{
		
		if(bean.getDrugId()!=0)
			stmt.setInt(1, bean.getDrugId());
		else
			stmt.setString(1, bean.getDrugName());
		
		rs = stmt.executeQuery();
		if (rs.next()) {
			Drug newBean = new Drug();
			newBean.setDrugId(rs.getInt("drugid"));
			newBean.setDrugName(rs.getString("drugname"));
			newBean.setDescription(rs.getString("description"));
			newBean.setQuantity(rs.getInt("quantity"));
			newBean.setControlFlag(rs.getBoolean("controlflag"));
			newBean.setSideEffect(rs.getString("sideeffect"));
			return newBean;
		} else {
			System.out.println("unable to retrieve drug info");
			return null;
		}
	}