Agreement reached for development of old hospital site