class HibernateConditionDAO implements ConditionDAO {

	@Override
	public List<Condition> getConditionHistory(Patient patient) {
		Query query = sessionFactory.getCurrentSession().createQuery(
				"from Condition con where con.patient.patientId = :patientId and con.voided = false " +
						"order by con.onsetDate desc");
		query.setInteger("patientId", patient.getId());
		return query.list();
	}

}