From 2a545be7f848e736cf8c381a2b701a121467e89e Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Sun, 28 Apr 2024 12:12:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=B4=D0=B5=D1=80=D0=B5=D0=B2?= =?UTF-8?q?=D1=8C=D1=8E,=20=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=B0=20=D1=81=D1=83=D1=89=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D0=B4=D0=B8=D0=B0=D0=B3=D0=BD=D0=BE?= =?UTF-8?q?=D0=B7=D0=B0,=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20=D0=BB?= =?UTF-8?q?=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20using?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/CourseBindingModel.cs | 2 +- ...isBindingModel.cs => DiagnoseBindingModel.cs} | 2 +- .../BindingModels/MedicamentBindingModel.cs | 4 ++-- .../BindingModels/ProcedureBindingModel.cs | 2 +- .../BindingModels/RecipeBindingModel.cs | 2 +- .../BindingModels/SymptomBindingModel.cs | 2 +- .../BusinessLogicsContracts/IDiagnoseLogic.cs | 15 +++++++++++++++ .../BusinessLogicsContracts/IDiagnosisLogic.cs | 15 --------------- ...osisSearchModel.cs => DiagnoseSearchModel.cs} | 2 +- .../StoragesContracts/IDiagnoseStorage.cs | 16 ++++++++++++++++ .../StoragesContracts/IDiagnosisStorage.cs | 16 ---------------- .../ViewModels/CourseViewModel.cs | 2 +- ...iagnosisViewModel.cs => DiagnoseViewModel.cs} | 2 +- .../ViewModels/MedicamentViewModel.cs | 2 -- .../ViewModels/ProcedureViewModel.cs | 9 +++------ .../ViewModels/RecipeViewModel.cs | 4 +--- .../ViewModels/SymptomViewModel.cs | 2 +- .../PolyclinicDataModels/Models/ICourseModel.cs | 2 +- .../{IDiagnosisModel.cs => IDiagnoseModel.cs} | 2 +- .../Models/IMedicamentModel.cs | 8 +------- .../Models/IProcedureModel.cs | 10 ++-------- .../PolyclinicDataModels/Models/IRecipeModel.cs | 10 ++-------- .../PolyclinicDataModels/Models/ISymptomModel.cs | 2 +- 23 files changed, 54 insertions(+), 79 deletions(-) rename Polyclinic/PolyclinicContracts/BindingModels/{DiagnosisBindingModel.cs => DiagnoseBindingModel.cs} (83%) create mode 100644 Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnoseLogic.cs delete mode 100644 Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnosisLogic.cs rename Polyclinic/PolyclinicContracts/SearchModels/{DiagnosisSearchModel.cs => DiagnoseSearchModel.cs} (78%) create mode 100644 Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnoseStorage.cs delete mode 100644 Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnosisStorage.cs rename Polyclinic/PolyclinicContracts/ViewModels/{DiagnosisViewModel.cs => DiagnoseViewModel.cs} (88%) rename Polyclinic/PolyclinicDataModels/Models/{IDiagnosisModel.cs => IDiagnoseModel.cs} (77%) diff --git a/Polyclinic/PolyclinicContracts/BindingModels/CourseBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/CourseBindingModel.cs index a172f23..a6b7777 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/CourseBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/CourseBindingModel.cs @@ -8,7 +8,7 @@ namespace PolyclinicContracts.BindingModels public int PillsPerDay { get; set; } public string Comment { get; set; } = string.Empty; public int RecipeId { get; set; } - public Dictionary CourseDiagnosis { get; set; } = new(); + public Dictionary CourseDiagnoses { get; set; } = new(); public int Id { get; set; } } } diff --git a/Polyclinic/PolyclinicContracts/BindingModels/DiagnosisBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/DiagnoseBindingModel.cs similarity index 83% rename from Polyclinic/PolyclinicContracts/BindingModels/DiagnosisBindingModel.cs rename to Polyclinic/PolyclinicContracts/BindingModels/DiagnoseBindingModel.cs index 6827d46..b406e97 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/DiagnosisBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/DiagnoseBindingModel.cs @@ -2,7 +2,7 @@ namespace PolyclinicContracts.BindingModels { - public class DiagnosisBindingModel : IDiagnosisModel + public class DiagnoseBindingModel : IDiagnoseModel { public string Name { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; diff --git a/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs index 4bb54b0..6840e73 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs @@ -9,7 +9,7 @@ namespace PolyclinicContracts.BindingModels public int ProcedureId { get; set; } public string Name { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; - public Dictionary MedicamentSymptom { get; set; } = new(); - public Dictionary MedicamentProcedure { get; set; } = new(); + public Dictionary MedicamentSymptomes { get; set; } = new(); + public Dictionary MedicamentProcedures { get; set; } = new(); } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs index 3acc49b..c6d8b1f 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs @@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels public int Id { get; set; } public string Name { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; - public Dictionary ProcedureCourse { get; set; } = new(); + public Dictionary ProcedureCourses { get; set; } = new(); } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs index 4170766..6f80dc5 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs @@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels public int Id { get; set; } public int ProceduresCount { get; set; } public string Comment { get; set; } = string.Empty; - public Dictionary ProcedureRecipe { get; set; } = new(); + public Dictionary ProcedureRecipes { get; set; } = new(); } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/SymptomBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/SymptomBindingModel.cs index bc4c191..8367902 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/SymptomBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/SymptomBindingModel.cs @@ -6,7 +6,7 @@ namespace PolyclinicContracts.BindingModels { public string Name { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; - public Dictionary SymptomDiagnosis { get; set; } = new(); + public Dictionary SymptomDiagnoses { get; set; } = new(); public Dictionary SymptomRecipes { get; set; } = new(); public int Id { get; set; } } diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnoseLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnoseLogic.cs new file mode 100644 index 0000000..d931c6d --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnoseLogic.cs @@ -0,0 +1,15 @@ +using PolyclinicContracts.BindingModels; +using PolyclinicContracts.SearchModels; +using PolyclinicContracts.ViewModels; + +namespace PolyclinicContracts.BusinessLogicsContracts +{ + public interface IDiagnoseLogic + { + List? ReadList(DiagnoseSearchModel? model); + DiagnoseViewModel? ReadElement(DiagnoseSearchModel model); + bool Create(DiagnoseBindingModel model); + bool Update(DiagnoseBindingModel model); + bool Delete(DiagnoseBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnosisLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnosisLogic.cs deleted file mode 100644 index cce64f3..0000000 --- a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IDiagnosisLogic.cs +++ /dev/null @@ -1,15 +0,0 @@ -using PolyclinicContracts.BindingModels; -using PolyclinicContracts.SearchModels; -using PolyclinicContracts.ViewModels; - -namespace PolyclinicContracts.BusinessLogicsContracts -{ - public interface IDiagnosisLogic - { - List? ReadList(DiagnosisSearchModel? model); - DiagnosisViewModel? ReadElement(DiagnosisSearchModel model); - bool Create(DiagnosisBindingModel model); - bool Update(DiagnosisBindingModel model); - bool Delete(DiagnosisBindingModel model); - } -} diff --git a/Polyclinic/PolyclinicContracts/SearchModels/DiagnosisSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/DiagnoseSearchModel.cs similarity index 78% rename from Polyclinic/PolyclinicContracts/SearchModels/DiagnosisSearchModel.cs rename to Polyclinic/PolyclinicContracts/SearchModels/DiagnoseSearchModel.cs index 03435b6..da88efa 100644 --- a/Polyclinic/PolyclinicContracts/SearchModels/DiagnosisSearchModel.cs +++ b/Polyclinic/PolyclinicContracts/SearchModels/DiagnoseSearchModel.cs @@ -1,6 +1,6 @@ namespace PolyclinicContracts.SearchModels { - public class DiagnosisSearchModel + public class DiagnoseSearchModel { public int? Id { get; set; } public int? UserId { get; set; } diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnoseStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnoseStorage.cs new file mode 100644 index 0000000..5891a0c --- /dev/null +++ b/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnoseStorage.cs @@ -0,0 +1,16 @@ +using PolyclinicContracts.BindingModels; +using PolyclinicContracts.SearchModels; +using PolyclinicContracts.ViewModels; + +namespace PolyclinicContracts.StoragesContracts +{ + public interface IDiagnoseStorage + { + List GetFullList(); + List GetFilteredList(DiagnoseSearchModel model); + DiagnoseViewModel? GetElement(DiagnoseSearchModel model); + DiagnoseViewModel? Insert(DiagnoseBindingModel model); + DiagnoseViewModel? Update(DiagnoseBindingModel model); + DiagnoseViewModel? Delete(DiagnoseBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnosisStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnosisStorage.cs deleted file mode 100644 index 9c1015b..0000000 --- a/Polyclinic/PolyclinicContracts/StoragesContracts/IDiagnosisStorage.cs +++ /dev/null @@ -1,16 +0,0 @@ -using PolyclinicContracts.BindingModels; -using PolyclinicContracts.SearchModels; -using PolyclinicContracts.ViewModels; - -namespace PolyclinicContracts.StoragesContracts -{ - public interface IDiagnosisStorage - { - List GetFullList(); - List GetFilteredList(DiagnosisSearchModel model); - DiagnosisViewModel? GetElement(DiagnosisSearchModel model); - DiagnosisViewModel? Insert(DiagnosisBindingModel model); - DiagnosisViewModel? Update(DiagnosisBindingModel model); - DiagnosisViewModel? Delete(DiagnosisBindingModel model); - } -} diff --git a/Polyclinic/PolyclinicContracts/ViewModels/CourseViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/CourseViewModel.cs index 9ecb07a..89fbc16 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/CourseViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/CourseViewModel.cs @@ -12,7 +12,7 @@ namespace PolyclinicContracts.ViewModels [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; public int RecipeId { get; set; } - public Dictionary CourseDiagnosis { get; set; } = new(); + public Dictionary CourseDiagnoses { get; set; } = new(); public int Id { get; set; } } } diff --git a/Polyclinic/PolyclinicContracts/ViewModels/DiagnosisViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/DiagnoseViewModel.cs similarity index 88% rename from Polyclinic/PolyclinicContracts/ViewModels/DiagnosisViewModel.cs rename to Polyclinic/PolyclinicContracts/ViewModels/DiagnoseViewModel.cs index 8140660..d3455a4 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/DiagnosisViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/DiagnoseViewModel.cs @@ -3,7 +3,7 @@ using System.ComponentModel; namespace PolyclinicContracts.ViewModels { - public class DiagnosisViewModel : IDiagnosisModel + public class DiagnoseViewModel : IDiagnoseModel { [DisplayName("Название")] public string Name { get; set; } = string.Empty; diff --git a/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs index 1847baa..64f8aba 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs @@ -8,10 +8,8 @@ namespace PolyclinicContracts.ViewModels public int Id { get; set; } public int ProcedureId { get; set; } public int SymptomId { get; set; } - [DisplayName("Название медикамента")] public string Name { get; set; } = string.Empty; - [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; } diff --git a/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs index 40c4d06..f10e28c 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs @@ -6,14 +6,11 @@ namespace PolyclinicContracts.ViewModels public class ProcedureViewModel : IProcedureModel { public int Id { get; set; } - [DisplayName("Название процедуры")] - public string Name { get; set; } - + public string Name { get; set; } = string.Empty; [DisplayName("Комментарий")] - public string Comment { get; set; } - - public Dictionary ProcedureCourse { get; set; } = new(); + public string Comment { get; set; } = string.Empty; + public Dictionary ProcedureCourses { get; set; } = new(); } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs index c2e0a4d..b852f50 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs @@ -6,12 +6,10 @@ namespace PolyclinicContracts.ViewModels public class RecipeViewModel : IRecipeModel { public int Id { get; set; } - [DisplayName("Количество процедур")] public int ProceduresCount { get; set; } - [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; - public Dictionary ProcedureRecipe { get; set; } = new(); + public Dictionary ProcedureRecipes { get; set; } = new(); } } diff --git a/Polyclinic/PolyclinicContracts/ViewModels/SymptomViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/SymptomViewModel.cs index 20879c8..334e2fc 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/SymptomViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/SymptomViewModel.cs @@ -9,7 +9,7 @@ namespace PolyclinicContracts.ViewModels public string Name { get; set; } = string.Empty; [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; - public Dictionary SymptomDiagnosis { get; set; } = new(); + public Dictionary SymptomDiagnoses { get; set; } = new(); public Dictionary SymptomRecipes { get; set; } = new(); public int Id { get; set; } } diff --git a/Polyclinic/PolyclinicDataModels/Models/ICourseModel.cs b/Polyclinic/PolyclinicDataModels/Models/ICourseModel.cs index 9766f92..2ace9f7 100644 --- a/Polyclinic/PolyclinicDataModels/Models/ICourseModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/ICourseModel.cs @@ -6,6 +6,6 @@ int PillsPerDay { get; } string Comment { get; } int RecipeId { get; } - Dictionary CourseDiagnosis { get; } + Dictionary CourseDiagnoses { get; } } } diff --git a/Polyclinic/PolyclinicDataModels/Models/IDiagnosisModel.cs b/Polyclinic/PolyclinicDataModels/Models/IDiagnoseModel.cs similarity index 77% rename from Polyclinic/PolyclinicDataModels/Models/IDiagnosisModel.cs rename to Polyclinic/PolyclinicDataModels/Models/IDiagnoseModel.cs index 9a6c0a3..a68bf2d 100644 --- a/Polyclinic/PolyclinicDataModels/Models/IDiagnosisModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/IDiagnoseModel.cs @@ -1,6 +1,6 @@ namespace PolyclinicDataModels.Models { - public interface IDiagnosisModel : IId + public interface IDiagnoseModel : IId { string Name { get; } string Comment { get; } diff --git a/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs b/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs index 847433a..e865b50 100644 --- a/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PolyclinicDataModels.Models +namespace PolyclinicDataModels.Models { public interface IMedicamentModel : IId { diff --git a/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs index 2a3345d..3c1d743 100644 --- a/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PolyclinicDataModels.Models +namespace PolyclinicDataModels.Models { public interface IProcedureModel : IId { string Name { get; } string Comment { get; } - Dictionary ProcedureCourse { get; } + Dictionary ProcedureCourses { get; } } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs b/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs index 07323a8..c3b5b1a 100644 --- a/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs @@ -1,16 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PolyclinicDataModels.Models +namespace PolyclinicDataModels.Models { public interface IRecipeModel : IId { int ProceduresCount { get; set; } string Comment { get; set; } - Dictionary ProcedureRecipe { get; } + Dictionary ProcedureRecipes { get; } } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/ISymptomModel.cs b/Polyclinic/PolyclinicDataModels/Models/ISymptomModel.cs index 64a9988..9dfa3b0 100644 --- a/Polyclinic/PolyclinicDataModels/Models/ISymptomModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/ISymptomModel.cs @@ -4,7 +4,7 @@ { string Name { get; } string Comment { get; } - Dictionary SymptomDiagnosis { get; } + Dictionary SymptomDiagnoses { get; } Dictionary SymptomRecipes { get; } } }