if(data.getPatient()!=null) {
q = em.createQuery("SELECT p FROM TblPatientE p where p.id=:id", TblPatientE.class);
q.setParameter("id", data.getPatient());
l = q.getResultList();
TblPatientE patient = (TblPatientE)l.get(0);
patientValues = patient.xfaData(user.getUserName());
} else {
patientValues = objectMapper.readValue(data.getPatient_data(), typeRef);
}
//JavaType type = objectMapper.getTypeFactory().constructCollectionType(ArrayList.class, String.class) ;