From a071f504d24352edd7f752e7f1803fbc78722334 Mon Sep 17 00:00:00 2001 From: ValAn Date: Fri, 12 Apr 2024 23:47:48 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B5=D0=B4=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HospitalContracts.csproj | 4 +++ .../ViewModels/DoctorViewModel.cs | 2 +- .../ViewModels/PatientViewModel.cs | 31 +++++++++++++++++++ .../Models/IMedicineModel.cs | 2 +- .../Models/IPatientModel.cs | 2 +- .../Models/IProcedureModel.cs | 2 +- .../HospitalDataModels/Models/IRecipeModel.cs | 2 +- 7 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 Hospital/HospitalContracts/ViewModels/PatientViewModel.cs diff --git a/Hospital/HospitalContracts/HospitalContracts.csproj b/Hospital/HospitalContracts/HospitalContracts.csproj index 27ac386..21cb129 100644 --- a/Hospital/HospitalContracts/HospitalContracts.csproj +++ b/Hospital/HospitalContracts/HospitalContracts.csproj @@ -6,4 +6,8 @@ enable + + + + diff --git a/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs b/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs index d1bdf2e..d895a23 100644 --- a/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs +++ b/Hospital/HospitalContracts/ViewModels/DoctorViewModel.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace HospitalContracts.ViewModels { - internal class DoctorViewModel + public class DoctorViewModel { public int Id { get; set; } diff --git a/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs b/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs new file mode 100644 index 0000000..4e8db23 --- /dev/null +++ b/Hospital/HospitalContracts/ViewModels/PatientViewModel.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using HospitalDataModels.Models; + +namespace HospitalContracts.ViewModels +{ + public class PatientViewModel + { + public int Id { get; set; } + + [DisplayName("ФИО")] + string FIO { get; } + + [DisplayName("Дата рождения")] + DateOnly BirthDate { get; } + + [DisplayName("Адрес")] + string Adress { get; } + + public int DoctorId { get; set; } + + public Dictionary PatientProcedures { get; set; } = new(); + + public Dictionary PatientRecipes { get; set; } = new(); + + } +} diff --git a/Hospital/HospitalDataModels/Models/IMedicineModel.cs b/Hospital/HospitalDataModels/Models/IMedicineModel.cs index 7378e05..4bd9786 100644 --- a/Hospital/HospitalDataModels/Models/IMedicineModel.cs +++ b/Hospital/HospitalDataModels/Models/IMedicineModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace HospitalDataModels.Models { - internal interface IMedicineModel : IId + public interface IMedicineModel : IId { } } diff --git a/Hospital/HospitalDataModels/Models/IPatientModel.cs b/Hospital/HospitalDataModels/Models/IPatientModel.cs index db6de9f..e9fecb2 100644 --- a/Hospital/HospitalDataModels/Models/IPatientModel.cs +++ b/Hospital/HospitalDataModels/Models/IPatientModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace HospitalDataModels.Models { - internal interface IPatientModel : IId + public interface IPatientModel : IId { string FIO { get; } DateOnly BirthDate { get; } diff --git a/Hospital/HospitalDataModels/Models/IProcedureModel.cs b/Hospital/HospitalDataModels/Models/IProcedureModel.cs index 1fe5dcd..9df8da9 100644 --- a/Hospital/HospitalDataModels/Models/IProcedureModel.cs +++ b/Hospital/HospitalDataModels/Models/IProcedureModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace HospitalDataModels.Models { - internal interface IProcedureModel : IId + public interface IProcedureModel : IId { } } diff --git a/Hospital/HospitalDataModels/Models/IRecipeModel.cs b/Hospital/HospitalDataModels/Models/IRecipeModel.cs index 16ac068..fbffe3b 100644 --- a/Hospital/HospitalDataModels/Models/IRecipeModel.cs +++ b/Hospital/HospitalDataModels/Models/IRecipeModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace HospitalDataModels.Models { - internal interface IRecipeModel : IId + public interface IRecipeModel : IId { string Description { get; } DateTime IssueDate { get; }