fixed a lot of patient data and table issues