handle back button in tree pharma. check if already have some data