Change database wrapper api, rewrite medical history page