namespace DocuMed.Domain.Entities.MedicalHistory;

[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
[GenerateMapper]

public partial class MedicalHistory : ApiEntity
{
    public MedicalHistory()
    {
        
    }
    public MedicalHistory(
        string presentIllnessDetail,
        string pastDiseasesHistoryDetail,
        string pastSurgeryHistoryDetail,
        string familyHistoryDetail,
        string allergyDetail,
        string drugHistoryDetail,
        string addictionHistoryDetail,
        string systemReviewDetail,
        string vitalSignDetail,
        string generalAppearanceDetail,
        string chiefComplaint,
        Guid sectionId,
        string firstName,
        string lastName,
        string fatherName,
        string nationalId,
        int age,
        DateTime birthDate,
        int systolicBloodPressure,
        int diastolicBloodPressure,
        int pulseRate,
        int spo2,
        int temperature,
        Guid applicationUserId,
        Guid medicalHistoryTemplateId)
    {
        PresentIllnessDetail = presentIllnessDetail;
        PastDiseasesHistoryDetail = pastDiseasesHistoryDetail;
        PastSurgeryHistoryDetail = pastSurgeryHistoryDetail;
        FamilyHistoryDetail = familyHistoryDetail;
        AllergyDetail = allergyDetail;
        DrugHistoryDetail = drugHistoryDetail;
        AddictionHistoryDetail = addictionHistoryDetail;
        SystemReviewDetail = systemReviewDetail;
        VitalSignDetail = vitalSignDetail;
        GeneralAppearanceDetail = generalAppearanceDetail;
        ChiefComplaint = chiefComplaint;
        SectionId = sectionId;
        FirstName = firstName;
        LastName = lastName;
        FatherName = fatherName;
        NationalId = nationalId;
        Age = age;
        BirthDate = birthDate;
        SystolicBloodPressure = systolicBloodPressure;
        DiastolicBloodPressure = diastolicBloodPressure;
        PulseRate = pulseRate;
        SPO2 = spo2;
        Temperature = temperature;
        ApplicationUserId = applicationUserId;
        MedicalHistoryTemplateId = medicalHistoryTemplateId;
    }
    public string ChiefComplaint { get; internal set; } = string.Empty;
    public Guid SectionId { get; internal set; }
    public Section? Section { get; internal set; }

    public string FirstName { get; internal set; } = string.Empty;
    public string LastName { get; internal set; } = string.Empty;
    public string FatherName { get; internal set; } = string.Empty;
    public string NationalId { get; internal set; } = string.Empty;
    public int Age { get; internal set; }
    public DateTime BirthDate { get; internal set; }

    public string PresentIllnessDetail { get; internal set; } = string.Empty;
    public string PastDiseasesHistoryDetail { get; internal set; } = string.Empty;
    public string PastSurgeryHistoryDetail { get; internal set; } = string.Empty;
    public string FamilyHistoryDetail { get; internal set; } = string.Empty;
    public string AllergyDetail { get; internal set; } = string.Empty;
    public string DrugHistoryDetail { get; internal set; } = string.Empty;
    public string AddictionHistoryDetail { get; internal set; } = string.Empty;
    public string SystemReviewDetail { get; internal set; } = string.Empty;
    public string VitalSignDetail { get; internal set; } = string.Empty;
    public string GeneralAppearanceDetail { get; internal set; } = string.Empty;


    public int SystolicBloodPressure { get; internal set; }
    public int DiastolicBloodPressure { get; internal set; }
    public int PulseRate { get; internal set; }
    public int SPO2 { get; internal set; }
    public int Temperature { get; internal set; }

    public Guid MedicalHistoryTemplateId { get; internal set; }
    public Guid ApplicationUserId { get; internal set; }
    public ApplicationUser? ApplicationUser { get; internal set; }

    public List<MedicalHistoryAnswer> Answers { get; internal set; } = new();
}