From 13b1baf5cb22d73e793b5cb1811097439fc252ec Mon Sep 17 00:00:00 2001 From: ValAnn Date: Sun, 5 May 2024 02:52:19 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D0=BA=D0=B8=20=D1=80=D0=B5=D0=BF=D0=BE=D1=80=D1=82=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{DoctorReportLogic.cs => ReportLogicDoctor.cs} | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename Hospital/HospitalBusinessLogic/BusinessLogics/{DoctorReportLogic.cs => ReportLogicDoctor.cs} (94%) diff --git a/Hospital/HospitalBusinessLogic/BusinessLogics/DoctorReportLogic.cs b/Hospital/HospitalBusinessLogic/BusinessLogics/ReportLogicDoctor.cs similarity index 94% rename from Hospital/HospitalBusinessLogic/BusinessLogics/DoctorReportLogic.cs rename to Hospital/HospitalBusinessLogic/BusinessLogics/ReportLogicDoctor.cs index 6959cd0..895190d 100644 --- a/Hospital/HospitalBusinessLogic/BusinessLogics/DoctorReportLogic.cs +++ b/Hospital/HospitalBusinessLogic/BusinessLogics/ReportLogicDoctor.cs @@ -47,13 +47,15 @@ namespace HospitalBusinessLogic.BusinessLogics List medicineList = new List(); foreach (var recipe in _recipeStorage.GetFilteredList(new RecipeSearchModel {PatientId = patient.Id})) { - foreach (var medicine in _medicineStorage.GetFilteredList(new MedicineSearchModel { RecipeId = recipe.Id})) + foreach (var medicine in _medicineStorage.GetFilteredList(new MedicineSearchModel { RecipeId = recipe.Id })) { medicineList.Add(new(medicine.Name)); - } - foreach (var disease in _diseaseStorage.GetFilteredList(new DiseaseSearchModel {RecipeId = recipe.Id})) - { - diseaseList.Add(disease.Name); + + + foreach (var disease in medicine.MedicineRecipes) + { + diseaseList.Add(disease.Value.Description); + } } } var record = new ReportPatientViewModel