WIP: PIBD-24_Khalikova.A.R_Polyclinic_LabWork_1 #1

Draft
Adelina wants to merge 3 commits from LabWork_1 into main
9 changed files with 197 additions and 0 deletions
Showing only changes of commit f1c0b4e0ff - Show all commits

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

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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

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

View File

@ -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
{
}

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

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