reducing the time to open the page case_his.html

improve the logic and now you can open the page in a fast way