DRY up data methods on DB model
Added seperate methods for data retrieval based on type opf request
Change records controller to call pdf  method than graph method