Commit cb8fa36f authored by Almouhannad's avatar Almouhannad

(B) Add visit related entities

parent ef4807f3
using Domain.Entities.Medicals.MedicalImages;
using Domain.Primitives;
namespace Domain.Entities.Visits.Relations.VisitMedicalImages;
// TODO: Convert result to a value object
public sealed class VisitMedicalImage(int id) : Entity(id)
{
#region Properties
#region Visit
public int VisitId { get; set; }
public Visit Visit { get; set; } = null!;
#endregion
#region Medical image
public int MedicalImageId { get; set; }
public MedicalImage MedicalImage { get; set; } = null!;
#endregion
#region Additional
public string? Result { get; set; }
#endregion
#endregion
}
using Domain.Entities.Medicals.MedicalTests;
using Domain.Primitives;
namespace Domain.Entities.Visits.Relations.VisitMedicalTests;
// TODO: Convert result to a value object
public sealed class VisitMedicalTest(int id) : Entity(id)
{
#region Properties
#region Visit
public int VisitId { get; set; }
public Visit Visit { get; set; } = null!;
#endregion
#region Medical test
public int MedicalTestId { get; set; }
public MedicalTest MedicalTest { get; set; } = null!;
#endregion
#region Additional
public string? Result { get; set; }
#endregion
#endregion
}
using Domain.Entities.Medicals.Medicines;
using Domain.Primitives;
namespace Domain.Entities.Visits.Relations.VisitMedicines;
public sealed class VisitMedicine(int id) : Entity(id)
{
#region Properties
#region Visit
public int VisitId { get; set; }
public Visit Visit { get; set; } = null!;
#endregion
#region Medicine
public int MedicineId { get; set; }
public Medicine Medicine { get; set; } = null!;
#endregion
#region Additional
public int Number { get; set; }
#endregion
#endregion
}
using Domain.Entities.Medicals.Hospitals;
using Domain.Entities.People.Doctors;
using Domain.Entities.People.Patients;
using Domain.Entities.Visits.Relations.VisitMedicalImages;
using Domain.Entities.Visits.Relations.VisitMedicalTests;
using Domain.Entities.Visits.Relations.VisitMedicines;
using Domain.Primitives;
namespace Domain.Entities.Visits;
public sealed class Visit(int id) : Entity(id)
{
#region Properties
public Patient Patient { get; set; } = null!;
public Doctor Doctor { get; set; } = null!;
public Hospital? Hospital { get; set; }
public DateOnly Date { get; set; }
public string Diagnosis { get; set; } = null!;
#region Navigations
public ICollection<VisitMedicalImage> MedicalImages { get; set; } = [];
public ICollection<VisitMedicalTest> MedicalTests { get; set; } = [];
public ICollection<VisitMedicine> Medicines { get; set; } = [];
#endregion
#endregion
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment