Фикс функции в логике отчетов исполнителя

This commit is contained in:
Никита Потапов 2024-05-02 02:10:30 +04:00
parent c73e54da8e
commit 68329a7444

View File

@ -52,14 +52,13 @@ namespace PolyclinicBusinessLogic.BusinessLogics
{ {
diagnoseMedicaments.AddRange(medicaments.Where(x => x.SymptomId == symptom.Id)); diagnoseMedicaments.AddRange(medicaments.Where(x => x.SymptomId == symptom.Id));
} }
diagnoseMedicaments.Distinct();
var diagnoseReportModel = new ReportMedicamentsByDiagnoseViewModel { var diagnoseReportModel = new ReportMedicamentsByDiagnoseViewModel {
DiagnoseId = diagnose.Id, DiagnoseId = diagnose.Id,
DiagnoseName = diagnose.Name, DiagnoseName = diagnose.Name,
DiagnoseComment = diagnose.Comment, DiagnoseComment = diagnose.Comment,
DiagnoseDateStart = diagnose.DateStartDiagnose, DiagnoseDateStart = diagnose.DateStartDiagnose,
DiagnoseDateStop = diagnose.DateStopDiagnose, DiagnoseDateStop = diagnose.DateStopDiagnose,
Medicaments = diagnoseMedicaments.Select(x => x.Name).ToList() Medicaments = diagnoseMedicaments.Distinct().Select(x => x.Name).ToList()
}; };
result.Add(diagnoseReportModel); result.Add(diagnoseReportModel);
} }