diff --git a/Hospital/Hospital.sln b/Hospital/Hospital.sln
index df20820..37d231c 100644
--- a/Hospital/Hospital.sln
+++ b/Hospital/Hospital.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.8.34525.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalDataModels", "HospitalDataModels\HospitalDataModels.csproj", "{DEC0CC7C-0315-4D11-B383-F5CD19DA7E15}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalContracts", "HospitalContracts\HospitalContracts.csproj", "{435124E0-E0A5-4EB8-A46C-C093C47A65F7}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
{DEC0CC7C-0315-4D11-B383-F5CD19DA7E15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEC0CC7C-0315-4D11-B383-F5CD19DA7E15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEC0CC7C-0315-4D11-B383-F5CD19DA7E15}.Release|Any CPU.Build.0 = Release|Any CPU
+ {435124E0-E0A5-4EB8-A46C-C093C47A65F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {435124E0-E0A5-4EB8-A46C-C093C47A65F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {435124E0-E0A5-4EB8-A46C-C093C47A65F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {435124E0-E0A5-4EB8-A46C-C093C47A65F7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Hospital/HospitalContracts/BindingModels/DiseaseBindingModel.cs b/Hospital/HospitalContracts/BindingModels/DiseaseBindingModel.cs
new file mode 100644
index 0000000..a894a70
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/DiseaseBindingModel.cs
@@ -0,0 +1,35 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Болезнь"
+ ///
+ public class DiseaseBindingModel : IDiseaseModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название болезни
+ ///
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Симптомы заболевания
+ ///
+ public string? Symptoms { get; set; }
+
+ ///
+ /// Идентификатор рецепта
+ ///
+ public int RecipeId { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/BindingModels/DoctorBindingModel.cs b/Hospital/HospitalContracts/BindingModels/DoctorBindingModel.cs
new file mode 100644
index 0000000..3d48f02
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/DoctorBindingModel.cs
@@ -0,0 +1,41 @@
+using HospitalDataModels.Enums;
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Доктор"
+ ///
+ public class DoctorBindingModel : IDoctorModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// ФИО доктора
+ ///
+ public string FullName { get; set; } = string.Empty;
+
+ ///
+ /// Должность доктора
+ ///
+ public DoctorPost Post { get; set; }
+
+ ///
+ /// Логин (электронная почта)
+ ///
+ public string Email { get; set; } = string.Empty;
+
+ ///
+ /// Пароль
+ ///
+ public string Password { get; set; } = string.Empty;
+ }
+}
diff --git a/Hospital/HospitalContracts/BindingModels/MedicineBindingModel.cs b/Hospital/HospitalContracts/BindingModels/MedicineBindingModel.cs
new file mode 100644
index 0000000..b662a59
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/MedicineBindingModel.cs
@@ -0,0 +1,30 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Лекарство"
+ ///
+ public class MedicineBindingModel : IMedicineModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название лекарства
+ ///
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Описание лекарства
+ ///
+ public string? Description { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/BindingModels/PatientBindingModel.cs b/Hospital/HospitalContracts/BindingModels/PatientBindingModel.cs
new file mode 100644
index 0000000..e660ca2
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/PatientBindingModel.cs
@@ -0,0 +1,58 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Пациент"
+ ///
+ public class PatientBindingModel : IPatientModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// ФИО пациента
+ ///
+ public string FullName { get; set; } = string.Empty;
+
+ ///
+ /// Дата рождения пациента
+ ///
+ public DateTime BirthDate { get; set; }
+
+ ///
+ /// Номер телефона пациента
+ ///
+ public string Phone { get; set; } = string.Empty;
+
+ ///
+ /// Идентификатор лечащего врача
+ ///
+ public int DoctorId { get; set; }
+
+ ///
+ /// Список рецептов пациента
+ ///
+ public Dictionary PatientRecipes
+ {
+ get;
+ set;
+ } = new();
+
+ ///
+ /// Список процедур пациента
+ ///
+ public Dictionary PatientProcedures
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/Hospital/HospitalContracts/BindingModels/ProcedureBindingModel.cs b/Hospital/HospitalContracts/BindingModels/ProcedureBindingModel.cs
new file mode 100644
index 0000000..4fa51d3
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/ProcedureBindingModel.cs
@@ -0,0 +1,39 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Процедура"
+ ///
+ public class ProcedureBindingModel : IProcedureModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название процедуры
+ ///
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Описание процедуры
+ ///
+ public string? Description { get; set; }
+
+ ///
+ /// Список лекарств для процедуры
+ ///
+ public Dictionary ProcedureMedicines
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/Hospital/HospitalContracts/BindingModels/RecipeBindingModel.cs b/Hospital/HospitalContracts/BindingModels/RecipeBindingModel.cs
new file mode 100644
index 0000000..28e58eb
--- /dev/null
+++ b/Hospital/HospitalContracts/BindingModels/RecipeBindingModel.cs
@@ -0,0 +1,39 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BindingModels
+{
+ ///
+ /// Модель привязки для сущности "Рецепт"
+ ///
+ public class RecipeBindingModel : IRecipeModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Дата выписки рецепта
+ ///
+ public DateTime IssueDate { get; set; }
+
+ ///
+ /// Идентификатор доктора
+ ///
+ public int DoctorId { get; set; }
+
+ ///
+ /// Список лекарств в рецепте
+ ///
+ public Dictionary RecipeMedicines
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IDiseaseLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IDiseaseLogic.cs
new file mode 100644
index 0000000..eb33c94
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IDiseaseLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Болезнь"
+ ///
+ public interface IDiseaseLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(DiseaseSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ DiseaseViewModel? ReadElement(DiseaseSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(DiseaseBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(DiseaseBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(DiseaseBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IDoctorLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IDoctorLogic.cs
new file mode 100644
index 0000000..670fec5
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IDoctorLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Доктор"
+ ///
+ public interface IDoctorLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(DoctorSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ DoctorViewModel? ReadElement(DoctorSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(DoctorBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(DoctorBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(DoctorBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IMedicineLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IMedicineLogic.cs
new file mode 100644
index 0000000..0887c97
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IMedicineLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Лекарство"
+ ///
+ public interface IMedicineLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(MedicineSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ MedicineViewModel? ReadElement(MedicineSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(MedicineBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(MedicineBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(MedicineBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IPatientLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IPatientLogic.cs
new file mode 100644
index 0000000..9f0ba6a
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IPatientLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Пациент"
+ ///
+ public interface IPatientLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(PatientSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ PatientViewModel? ReadElement(PatientSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(PatientBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(PatientBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(PatientBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IProcedureLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IProcedureLogic.cs
new file mode 100644
index 0000000..0c6976d
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IProcedureLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Процедура"
+ ///
+ public interface IProcedureLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(ProcedureSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ ProcedureViewModel? ReadElement(ProcedureSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(ProcedureBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(ProcedureBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(ProcedureBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/BusinessLogicsContracts/IRecipeLogic.cs b/Hospital/HospitalContracts/BusinessLogicsContracts/IRecipeLogic.cs
new file mode 100644
index 0000000..9b19292
--- /dev/null
+++ b/Hospital/HospitalContracts/BusinessLogicsContracts/IRecipeLogic.cs
@@ -0,0 +1,52 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.BusinessLogicsContracts
+{
+ ///
+ /// Интерфейс для описания работы бизнес-логики для сущности "Рецепт"
+ ///
+ public interface IRecipeLogic
+ {
+ ///
+ /// Получение списка
+ ///
+ ///
+ ///
+ List? ReadList(RecipeSearchModel? model);
+
+ ///
+ /// Получение отдельной записи
+ ///
+ ///
+ ///
+ RecipeViewModel? ReadElement(RecipeSearchModel model);
+
+ ///
+ /// Создание записи
+ ///
+ ///
+ ///
+ bool Create(RecipeBindingModel model);
+
+ ///
+ /// Изменение записи
+ ///
+ ///
+ ///
+ bool Update(RecipeBindingModel model);
+
+ ///
+ /// Удаление записи
+ ///
+ ///
+ ///
+ bool Delete(RecipeBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/HospitalContracts.csproj b/Hospital/HospitalContracts/HospitalContracts.csproj
new file mode 100644
index 0000000..a2f8c75
--- /dev/null
+++ b/Hospital/HospitalContracts/HospitalContracts.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/Hospital/HospitalContracts/SearchModels/DiseaseSearchModel.cs b/Hospital/HospitalContracts/SearchModels/DiseaseSearchModel.cs
new file mode 100644
index 0000000..7a78e93
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/DiseaseSearchModel.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Болезнь"
+ ///
+ public class DiseaseSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// Название болезни
+ ///
+ public string? Name { get; set; }
+
+ ///
+ /// Идентификатор рецепта
+ ///
+ public int? RecipeId { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/SearchModels/DoctorSearchModel.cs b/Hospital/HospitalContracts/SearchModels/DoctorSearchModel.cs
new file mode 100644
index 0000000..8c1e0e4
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/DoctorSearchModel.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Доктор"
+ ///
+ public class DoctorSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// ФИО доктора
+ ///
+ public string? FullName { get; set; }
+
+ ///
+ /// Логин (электронная почта)
+ ///
+ public string? Email { get; set; }
+
+ ///
+ /// Пароль
+ ///
+ public string? Password { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/SearchModels/MedicineSearchModel.cs b/Hospital/HospitalContracts/SearchModels/MedicineSearchModel.cs
new file mode 100644
index 0000000..0af7887
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/MedicineSearchModel.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Лекарство"
+ ///
+ public class MedicineSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// Название лекарства
+ ///
+ public string? Name { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/SearchModels/PatientSearchModel.cs b/Hospital/HospitalContracts/SearchModels/PatientSearchModel.cs
new file mode 100644
index 0000000..0cd6bf0
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/PatientSearchModel.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Пациент"
+ ///
+ public class PatientSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// ФИО пациента
+ ///
+ public string? FullName { get; set; }
+
+ ///
+ /// Номер телефона пациента
+ ///
+ public string? Phone { get; set; }
+
+ ///
+ /// Идентификатор лечащего врача
+ ///
+ public int? DoctorId { get; set; }
+
+ ///
+ /// Начало периода выборки данных для отчета
+ ///
+ public DateTime? DateFrom { get; set; }
+
+ ///
+ /// Конец периода выборки данных для отчета
+ ///
+ public DateTime? DateTo { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/SearchModels/ProcedureSearchModel.cs b/Hospital/HospitalContracts/SearchModels/ProcedureSearchModel.cs
new file mode 100644
index 0000000..55df6e4
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/ProcedureSearchModel.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Процедура"
+ ///
+ public class ProcedureSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// Название процедуры
+ ///
+ public string? Name { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/SearchModels/RecipeSearchModel.cs b/Hospital/HospitalContracts/SearchModels/RecipeSearchModel.cs
new file mode 100644
index 0000000..b13d68b
--- /dev/null
+++ b/Hospital/HospitalContracts/SearchModels/RecipeSearchModel.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.SearchModels
+{
+ ///
+ /// Модель поиска для сущности "Рецепт"
+ ///
+ public class RecipeSearchModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int? Id { get; set; }
+
+ ///
+ /// Идентификатор доктора
+ ///
+ public int? DoctorId { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IDiseaseStorage.cs b/Hospital/HospitalContracts/StoragesContracts/IDiseaseStorage.cs
new file mode 100644
index 0000000..0ef0947
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IDiseaseStorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Болезнь"
+ ///
+ public interface IDiseaseStorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(DiseaseSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ DiseaseViewModel? GetElement(DiseaseSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ DiseaseViewModel? Insert(DiseaseBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ DiseaseViewModel? Update(DiseaseBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ DiseaseViewModel? Delete(DiseaseBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IDoctorStorage.cs b/Hospital/HospitalContracts/StoragesContracts/IDoctorStorage.cs
new file mode 100644
index 0000000..6ffa758
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IDoctorStorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Доктор"
+ ///
+ public interface IDoctorStorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(DoctorSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ DoctorViewModel? GetElement(DoctorSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ DoctorViewModel? Insert(DoctorBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ DoctorViewModel? Update(DoctorBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ DoctorViewModel? Delete(DoctorBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IMedicineStorage.cs b/Hospital/HospitalContracts/StoragesContracts/IMedicineStorage.cs
new file mode 100644
index 0000000..689d69b
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IMedicineStorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Лекарство"
+ ///
+ public interface IMedicineStorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(MedicineSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ MedicineViewModel? GetElement(MedicineSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ MedicineViewModel? Insert(MedicineBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ MedicineViewModel? Update(MedicineBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ MedicineViewModel? Delete(MedicineBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IPatientStorage.cs b/Hospital/HospitalContracts/StoragesContracts/IPatientStorage.cs
new file mode 100644
index 0000000..9bd288e
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IPatientStorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Пациент"
+ ///
+ public interface IPatientStorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(PatientSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ PatientViewModel? GetElement(PatientSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ PatientViewModel? Insert(PatientBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ PatientViewModel? Update(PatientBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ PatientViewModel? Delete(PatientBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IProcedureStrorage.cs b/Hospital/HospitalContracts/StoragesContracts/IProcedureStrorage.cs
new file mode 100644
index 0000000..1736780
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IProcedureStrorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Процедура"
+ ///
+ public interface IProcedureStrorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(ProcedureSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ ProcedureViewModel? GetElement(ProcedureSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ ProcedureViewModel? Insert(ProcedureBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ ProcedureViewModel? Update(ProcedureBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ ProcedureViewModel? Delete(ProcedureBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/StoragesContracts/IRecipeStorage.cs b/Hospital/HospitalContracts/StoragesContracts/IRecipeStorage.cs
new file mode 100644
index 0000000..b4db17d
--- /dev/null
+++ b/Hospital/HospitalContracts/StoragesContracts/IRecipeStorage.cs
@@ -0,0 +1,58 @@
+using HospitalContracts.BindingModels;
+using HospitalContracts.SearchModels;
+using HospitalContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.StoragesContracts
+{
+ ///
+ /// Интерфейс для описания работы с хранилищем для сущности "Рецепт"
+ ///
+ public interface IRecipeStorage
+ {
+ ///
+ /// Получение полного списка
+ ///
+ ///
+ List GetFullList();
+
+ ///
+ /// Получение фильтрованного списка
+ ///
+ ///
+ ///
+ List GetFilteredList(RecipeSearchModel model);
+
+ ///
+ /// Получение элемента
+ ///
+ ///
+ ///
+ RecipeViewModel? GetElement(RecipeSearchModel model);
+
+ ///
+ /// Добавление элемента
+ ///
+ ///
+ ///
+ RecipeViewModel? Insert(RecipeBindingModel model);
+
+ ///
+ /// Редактирование элемента
+ ///
+ ///
+ ///
+ RecipeViewModel? Update(RecipeBindingModel model);
+
+ ///
+ /// Удаление элемента
+ ///
+ ///
+ ///
+ RecipeViewModel? Delete(RecipeBindingModel model);
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/DiseaseViewModel.cs b/Hospital/HospitalContracts/ViewModels/DiseaseViewModel.cs
new file mode 100644
index 0000000..b770d88
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/DiseaseViewModel.cs
@@ -0,0 +1,38 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Болезнь"
+ ///
+ public class DiseaseViewModel : IDiseaseModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название болезни
+ ///
+ [DisplayName("Название болезни")]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Симптомы заболевания
+ ///
+ [DisplayName("Симптомы")]
+ public string? Symptoms { get; set; }
+
+ ///
+ /// Идентификатор рецепта
+ ///
+ public int RecipeId { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs b/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs
new file mode 100644
index 0000000..4b25cfa
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs
@@ -0,0 +1,46 @@
+using HospitalDataModels.Enums;
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Доктор"
+ ///
+ public class DoctorViewModel : IDoctorModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// ФИО доктора
+ ///
+ [DisplayName("ФИО доктора")]
+ public string FullName { get; set; } = string.Empty;
+
+ ///
+ /// Должность доктора
+ ///
+ [DisplayName("Должность")]
+ public DoctorPost Post { get; set; }
+
+ ///
+ /// Логин (электронная почта)
+ ///
+ [DisplayName("Логин")]
+ public string Email { get; set; } = string.Empty;
+
+ ///
+ /// Пароль
+ ///
+ [DisplayName("Пароль")]
+ public string Password { get; set; } = string.Empty;
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/MedicineViewModel.cs b/Hospital/HospitalContracts/ViewModels/MedicineViewModel.cs
new file mode 100644
index 0000000..a2c98ee
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/MedicineViewModel.cs
@@ -0,0 +1,33 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Лекарство"
+ ///
+ public class MedicineViewModel : IMedicineModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название лекарства
+ ///
+ [DisplayName("Название лекарства")]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Описание лекарства
+ ///
+ [DisplayName("Описание лекарства")]
+ public string? Description { get; set; }
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs b/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs
new file mode 100644
index 0000000..c758672
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs
@@ -0,0 +1,68 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Пациент"
+ ///
+ public class PatientViewModel : IPatientModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// ФИО пациента
+ ///
+ [DisplayName("ФИО пациента")]
+ public string FullName { get; set; } = string.Empty;
+
+ ///
+ /// Дата рождения пациента
+ ///
+ [DisplayName("Дата рождения")]
+ public DateTime BirthDate { get; set; }
+
+ ///
+ /// Номер телефона пациента
+ ///
+ [DisplayName("Номер телефона")]
+ public string Phone { get; set; } = string.Empty;
+
+ ///
+ /// Идентификатор лечащего врача
+ ///
+ public int DoctorId { get; set; }
+
+ ///
+ /// ФИО лечащего врача
+ ///
+ [DisplayName("ФИО лечащего врача")]
+ public string DoctorFullName { get; set; } = string.Empty;
+
+ ///
+ /// Список рецептов пациента
+ ///
+ public Dictionary PatientRecipes
+ {
+ get;
+ set;
+ } = new();
+
+ ///
+ /// Список процедур пациента
+ ///
+ public Dictionary PatientProcedures
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/ProcedureViewModel.cs b/Hospital/HospitalContracts/ViewModels/ProcedureViewModel.cs
new file mode 100644
index 0000000..0443f98
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/ProcedureViewModel.cs
@@ -0,0 +1,42 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Процедура"
+ ///
+ public class ProcedureViewModel : IProcedureModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Название процедуры
+ ///
+ [DisplayName("Название процедуры")]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// Описание процедуры
+ ///
+ [DisplayName("Описание процедуры")]
+ public string? Description { get; set; }
+
+ ///
+ /// Список лекарств для процедуры
+ ///
+ public Dictionary ProcedureMedicines
+ {
+ get;
+ set;
+ } = new();
+ }
+}
diff --git a/Hospital/HospitalContracts/ViewModels/RecipeViewModel.cs b/Hospital/HospitalContracts/ViewModels/RecipeViewModel.cs
new file mode 100644
index 0000000..61229f7
--- /dev/null
+++ b/Hospital/HospitalContracts/ViewModels/RecipeViewModel.cs
@@ -0,0 +1,47 @@
+using HospitalDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HospitalContracts.ViewModels
+{
+ ///
+ /// Модель представления для сущности "Рецепт"
+ ///
+ public class RecipeViewModel : IRecipeModel
+ {
+ ///
+ /// Идентификатор
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// Дата выписки рецепта
+ ///
+ [DisplayName("Дата выписки рецепта")]
+ public DateTime IssueDate { get; set; }
+
+ ///
+ /// Идентификатор доктора
+ ///
+ public int DoctorId { get; set; }
+
+ ///
+ /// ФИО доктора
+ ///
+ [DisplayName("ФИО доктора")]
+ public string DoctorFullName { get; set; } = string.Empty;
+
+ ///
+ /// Список лекарств в рецепте
+ ///
+ public Dictionary RecipeMedicines
+ {
+ get;
+ set;
+ } = new();
+ }
+}