Forgot to rename meddate to medtable