@Override
    public SymptomDTO getSymptomById(Long id) throws SQLException {
        Session session = null;
        SymptomDTO symptom = null;
        try {
            session = HibernateUtil.getSessionFactory().openSession();
            symptom = (SymptomDTO) session.load(SymptomDTO.class, id);
        } catch (Exception e) {
            System.err.println("Error while getting symptom!");
        } finally {
            if (session != null && session.isOpen()) {
                session.close();
            }
        }
        return symptom;
    }