Начало, создала сущности, перечисления. не до конца
This commit is contained in:
parent
a6c20c9b07
commit
f1c0b4e0ff
25
ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs
Normal file
25
ProjectPolyclinic/ProjectPolyclinic/Entities/Diagnosis.cs
Normal file
@ -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
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
26
ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs
Normal file
26
ProjectPolyclinic/ProjectPolyclinic/Entities/Doctor.cs
Normal file
@ -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
|
||||
};
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
24
ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs
Normal file
24
ProjectPolyclinic/ProjectPolyclinic/Entities/Medicines.cs
Normal file
@ -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
|
||||
};
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
|
||||
}
|
26
ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs
Normal file
26
ProjectPolyclinic/ProjectPolyclinic/Entities/Patient.cs
Normal file
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
27
ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs
Normal file
27
ProjectPolyclinic/ProjectPolyclinic/Entities/Visiting.cs
Normal file
@ -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
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user