implemented ajax for treatment page