move code from providerdetail controller to library to make controller cleaner
Merge branch 'develop' into unit