Pagination added to ehrList
corrected constraints