refactor controller for medical conditions submission