private static Prescription getPrescription(Prescription bean, PreparedStatement stmt, ResultSet rs) throws SQLException{
		
		if(bean.getPrescriptionID()!=0)
			stmt.setInt(1, bean.getPrescriptionID());
		else{
			stmt.setInt(1, bean.getPid());
			stmt.setInt(2, bean.getDid());
		}
		rs = stmt.executeQuery();
		if (rs.next()) {
			Prescription newBean = new Prescription();
			newBean.setPrescriptionID(rs.getInt("presc_id"));
			newBean.setStartDate(rs.getDate("start_date"));
			newBean.setThisDay(rs.getDate("this_day"));
			newBean.setDose(rs.getString("dose"));
			newBean.setQuantity(rs.getInt("quantity"));
			newBean.setRefill(rs.getInt("refill"));
			newBean.setDid(rs.getInt("did"));
			newBean.setPid(rs.getInt("pid"));
			return newBean;
		} else {
			System.out.println("unable to retrieve prescription info");
			return null;
		}
	}