static void Main(string[] args) { AppSettings.Initialize(); Console.WriteLine($"Excel path = {AppSettings.SurveyResultFilePath}"); Console.WriteLine($"Template path = {AppSettings.ReportTemplatePath}"); Console.WriteLine($"Scoring config = {AppSettings.ScoringRulesConfigPath}"); Console.WriteLine($"Output directory = {AppSettings.OutputDirectory}"); //Verify.TestSerialization(); Console.WriteLine("Press `Enter` to continue..."); Console.ReadLine(); string scoringXml = File.ReadAllText(AppSettings.ScoringRulesConfigPath); ScoringConfig config = XmlHelper.DeserializeData <ScoringConfig>(scoringXml); var outputDir = FileHelper.CreateDirectoryWithTimestamp(AppSettings.OutputDirectory, null); //here is the actual application logic var scores = new SurveyExcelReader().ReadFromExcelFile(AppSettings.SurveyResultFilePath, config); var excelSummary = SurveySummaryGenerator.CreateExcel(scores); FileHelper.CreateFileWithTimestampAndWrite(excelSummary, outputDir, AppSettings.OutputFilePrefix, "xlsx"); //var html = SurveyReportGenerator.Create(scores[0], AppSettings.ReportTemplatePath); SurveyReportGenerator.Process(scores, AppSettings.ReportTemplatePath, outputDir); Console.WriteLine("Scores calculated & reports generated. See output directory."); Console.WriteLine("Press `Enter` to exit..."); Console.ReadLine(); }
public SurveyReport GetMedicalStaffSurveyReport() { SurveyReportGenerator generator = _staffRepository.Get(); return(generator.GenerateReport()); }
public SurveyReport GetHospitalSurveyReport() { SurveyReportGenerator generator = _hospitalRepository.Get(); return(generator.GenerateReport()); }
public SurveyReport GetDoctorSurveyReport(string jmbg) { SurveyReportGenerator generator = _doctorRepository.Get(jmbg); return(generator.GenerateReport()); }
//Worksheet 4: Mapping Survey //no aggregation - list all //all Oncho Mapping indicators private void Add4(excel.Worksheet xlsWorksheet, excel.Range rng, List<AdminLevel> districts, DateTime start, DateTime end, int month) { ReportOptions options = new ReportOptions { MonthYearStarts = month, StartDate = start, EndDate = end, IsCountryAggregation = false, IsByLevelAggregation = false, IsAllLocations = true, IsNoAggregation = true }; SurveyRepository repo = new SurveyRepository(); SurveyType survey = repo.GetSurveyType((int)StaticSurveyType.OnchoMapping); SurveyReportGenerator gen = new SurveyReportGenerator(); AddReportToSheet(xlsWorksheet, survey.Indicators, options, gen, (int)StaticSurveyType.OnchoMapping, survey.SurveyTypeName, rng); }