more checks added in rankhospital valid state valid outcome