Hundreds of solar panels will be installed at the University Hospital of Hartlepool after clearing a planning hurdle.