public PatientController(IRepository <Institution> institutionRepository, IDateTimeCountableRepository <SearchHistory> searchHistoryRepository) { _institutionRepository = institutionRepository; _searchHistoryRepository = searchHistoryRepository; _personInfoFetcher = new WcfPersonInfoFetcher(); _patientInfoFetcher = new WcfDataFetcher(institutionRepository, searchHistoryRepository, User.Name); }
public MineReportsListController(IDateTimeCountableRepository <ReportRequest> reportRequestRepository, IRepository <Institution> institutionRepository, IDateTimeCountableRepository <SearchHistory> searchHistoryRepository) { _reportRequestRepository = reportRequestRepository; _institutionRepository = institutionRepository; _searchHistoryRepository = searchHistoryRepository; _patientFetcher = new WcfDataFetcher(institutionRepository, searchHistoryRepository, User.Name); _personInfoFetcher = new WcfPersonInfoFetcher(); }
public byte[] GenerateRaportBytes(string patientPesel, string username) { var personInfo = _personInfoFetcher.GetPersonInfo(patientPesel); if (personInfo == null) { return(null); } var patient = new WcfDataFetcher(_institutionRepository, _searchHistoryRepository, username).GetPatient <PatientTransferObject>(patientPesel, true); return(GeneratePdf(personInfo, patient)); }