public async Task <ActionResult <IEnumerable <object> > > PatientHistory(decimal patientId, int?limit, int?skip)
        {
            if (!await _authorizationService.CanUserAccessPatientData(patientId, this))
            {
                return(Unauthorized(UnauthorizedEmptyJsonResult));
            }

            List <object> patientsHistory = new List <object>();

            patientsHistory.AddRange(await _repository.GetAll(patientId));
            patientsHistory.AddRange(await _oldMedicinesHistoryRepository.GetAll(patientId));

            return(Ok(PaginationService <object> .SplitAndLimitIEnumerable(skip, limit, patientsHistory)));
        }
 public async Task <ActionResult <IEnumerable <Oldmedicinehistory> > > GetOldmedicinehistory(int?limit, int?skip)
 {
     return(Ok(await _repository.GetAll(limit, skip)));
 }