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 + }; + } +}