From f1c0b4e0ffaff97534e6b822c7e8159ef59588ee Mon Sep 17 00:00:00 2001 From: Adelina888 Date: Thu, 14 Nov 2024 23:14:52 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D0=BE,=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=D0=B0=20=D1=81=D1=83=D1=89=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8,=20=D0=BF=D0=B5=D1=80=D0=B5=D1=87?= =?UTF-8?q?=D0=B8=D1=81=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F.=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=B4=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=86=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectPolyclinic/Entities/Diagnosis.cs | 25 +++++++++++++++++ .../ProjectPolyclinic/Entities/Doctor.cs | 26 ++++++++++++++++++ .../Entities/Enums/DiagnosisName.cs | 17 ++++++++++++ .../Entities/Enums/MedicinesType.cs | 23 ++++++++++++++++ .../Entities/Enums/Specialization.cs | 17 ++++++++++++ .../ProjectPolyclinic/Entities/Medicines.cs | 24 +++++++++++++++++ .../Entities/Medicines_Visiting.cs | 12 +++++++++ .../ProjectPolyclinic/Entities/Patient.cs | 26 ++++++++++++++++++ .../ProjectPolyclinic/Entities/Visiting.cs | 27 +++++++++++++++++++ 9 files changed, 197 insertions(+) create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/DiagnosisName.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/MedicinesType.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/Specialization.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines_Visiting.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs create mode 100644 ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs new file mode 100644 index 0000000..d710b53 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs @@ -0,0 +1,25 @@ +using ProjectPolyclinic.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities +{ + public class Diagnosis + { + public int Id { get; private set; } + public DiagnosisName DiagnosisName { get; private set; } + public static Diagnosis CreateEntity(int id, DiagnosisName diagnosisName) + { + return new Diagnosis + { + Id = id, + DiagnosisName = diagnosisName + + }; + } + + } +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs new file mode 100644 index 0000000..f482273 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs @@ -0,0 +1,26 @@ +using ProjectPolyclinic.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities; + +public class Doctor +{ + public int Id { get; private set; } + public string First_Name { get; private set; } = string.Empty; + public string Last_Name { get; private set; } = string.Empty; + public Specialization Specialization { get; private set; } + public static Doctor CreateEntity(int id, string first_Name, string last_Name, Specialization specialization) + { + return new Doctor + { + Id = id, + First_Name = first_Name ?? string.Empty, + Last_Name = last_Name ?? string.Empty, + Specialization = specialization + }; + } +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/DiagnosisName.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/DiagnosisName.cs new file mode 100644 index 0000000..f2f669e --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/DiagnosisName.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities.Enums; + +public enum DiagnosisName +{ + None = 0, + Flu = 1, + Fracture = 2, + Asthma = 3, + SkinInfection = 4, + HeartDisease = 5 +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/MedicinesType.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/MedicinesType.cs new file mode 100644 index 0000000..7c4b994 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/MedicinesType.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities.Enums; + +[Flags] +public enum MedicinesType +{ + None = 0, + + Aspirin = 1, + + Ibuprofen = 2, + + Synopret = 4, + + Pentalginum = 8, + + Paracetamol= 16 +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/Specialization.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/Specialization.cs new file mode 100644 index 0000000..6ed854a --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Enums/Specialization.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities.Enums; + +public enum Specialization +{ + None = 0, + GeneralPractitioner = 1, // Терапевт - Грипп + Surgeon = 2, // Хирург - Перелом + Pediatrician = 3, // Педиатр - Астма + Dermatologist = 4, // Дерматолог - Кожная инфекция + Cardiologist = 5 +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs new file mode 100644 index 0000000..fb02358 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs @@ -0,0 +1,24 @@ +using ProjectPolyclinic.Entities.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities; + +public class Medicines +{ + public int Id { get; private set; } + public MedicinesType MedicinesType { get; private set; } + public int Dosing { get; private set; } + public static Medicines CreateElement(int id,MedicinesType medicinesType,int dosing) + { + return new Medicines + { + Id = id, + MedicinesType = medicinesType, + Dosing = dosing + }; + } +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines_Visiting.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines_Visiting.cs new file mode 100644 index 0000000..d3b7890 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines_Visiting.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities; + +public class Medicines_Visiting +{ + +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs new file mode 100644 index 0000000..2bf3885 --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities +{ + public class Patient + { + public int Id { get;private set; } + public string First_Name { get; private set; } = string.Empty; + public string Last_Name { get; private set; } = string.Empty; + public DateTime Date_Of_Birth { get; private set; } + public static Patient CreateEntity(int id, string first_Name, string last_Name, DateTime date_of_birth) + { + return new Patient + { + Id = id, + First_Name = first_Name, + Last_Name = last_Name, + Date_Of_Birth = date_of_birth + }; + } + } +} diff --git a/ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs b/ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs new file mode 100644 index 0000000..3620f3e --- /dev/null +++ b/ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectPolyclinic.Entities; + +public class Visiting +{ + public int Id { get; private set; } + public int DoctorId { get; private set; } + public int PatientId { get; private set; } + public int DiagnosisId { get; private set; } + public DateTime VisitingTime { get; private set; } + public static Visiting CreateOperation(int id, int doctorId, int patientId, int diagnosisId, DateTime visitingTime) + { + return new Visiting + { + Id = id, + DoctorId = doctorId, + PatientId = patientId, + DiagnosisId = diagnosisId, + VisitingTime = visitingTime + }; + } +}