add version 1.2.1.0
add healthcontroller , fix doci bugs , fix edit medical history , add day filter in home pagemaster
parent
466f41e6a9
commit
e9ff13793d
|
@ -6,6 +6,10 @@ public class CityController : ICarterModule
|
|||
{
|
||||
var group = app.NewVersionedApi("City").MapGroup($"api/city");
|
||||
|
||||
group.MapGet("university/{cityId}", GetAllCityUniversityAsync)
|
||||
.WithDisplayName("GetAllCityUniversity")
|
||||
.HasApiVersion(1.0);
|
||||
|
||||
group.MapGet("", GetAllAsync)
|
||||
.WithDisplayName("GetAll")
|
||||
.HasApiVersion(1.0);
|
||||
|
@ -24,6 +28,11 @@ public class CityController : ICarterModule
|
|||
.HasApiVersion(1.0);
|
||||
}
|
||||
|
||||
public virtual async Task<IResult> GetAllCityUniversityAsync(Guid cityId, IRepositoryWrapper repositoryWrapper, CancellationToken cancellationToken)
|
||||
=> TypedResults.Ok(await repositoryWrapper.SetRepository<University>().TableNoTracking
|
||||
.Where(c=>c.CityId==cityId)
|
||||
.Select(UniversityMapper.ProjectToSDto)
|
||||
.ToListAsync(cancellationToken));
|
||||
|
||||
// GET:Get All Entity
|
||||
public virtual async Task<IResult> GetAllAsync([FromQuery] int page, IRepositoryWrapper repositoryWrapper, CancellationToken cancellationToken)
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
using MD.PersianDateTime.Standard;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace DocuMed.Api.Controllers;
|
||||
|
||||
public class HealthController : ICarterModule
|
||||
{
|
||||
public void AddRoutes(IEndpointRouteBuilder app)
|
||||
{
|
||||
var group = app.NewVersionedApi("Health")
|
||||
.MapGroup($"health");
|
||||
|
||||
group.MapGet("", GetHealth)
|
||||
.WithDisplayName("CheckHealth")
|
||||
.HasApiVersion(1.0);
|
||||
}
|
||||
public IResult GetHealth()
|
||||
{
|
||||
var version = typeof(Program)?.Assembly.GetName()?.Version?.ToString();
|
||||
var check = new HealthCheck
|
||||
{
|
||||
Health = true,
|
||||
Version = version ?? string.Empty,
|
||||
StartAt = System.Diagnostics.Process.GetCurrentProcess().StartTime.ToString("F"),
|
||||
StartAtPersian = new PersianDateTime(System.Diagnostics.Process.GetCurrentProcess().StartTime).ToLongDateTimeString(),
|
||||
MachineName = Environment.MachineName
|
||||
};
|
||||
var process = Process.GetCurrentProcess();
|
||||
check.TotalMemory = process.PrivateMemorySize64.ToString();
|
||||
|
||||
return TypedResults.Ok(check);
|
||||
}
|
||||
}
|
|
@ -12,6 +12,10 @@ public class MedicalHistoryController : ICarterModule
|
|||
.WithDisplayName("GetAll")
|
||||
.HasApiVersion(1.0);
|
||||
|
||||
group.MapGet("/filter", GetAllByFilterAsync)
|
||||
.WithDisplayName("GetAllByFilter")
|
||||
.HasApiVersion(1.0);
|
||||
|
||||
group.MapGet("{id}", GetAsync)
|
||||
.WithDisplayName("GetOne")
|
||||
.HasApiVersion(1.0);
|
||||
|
@ -27,6 +31,13 @@ public class MedicalHistoryController : ICarterModule
|
|||
}
|
||||
|
||||
|
||||
|
||||
// GET:Get All Entity
|
||||
public virtual async Task<IResult> GetAllByFilterAsync([FromQuery]DayQueryFilter dayQuery,[FromQuery] int page, IMedicalHistoryRepository repository, CancellationToken cancellationToken)
|
||||
{
|
||||
return TypedResults.Ok(await repository.GetMedicalHistoriesByFilterAsync(dayQuery , page, cancellationToken));
|
||||
}
|
||||
|
||||
// GET:Get All Entity
|
||||
public virtual async Task<IResult> GetAllAsync([FromQuery] int page, IMedicalHistoryRepository repository, CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,8 @@ public class UniversityController : ICarterModule
|
|||
|
||||
// GET:Get All Entity
|
||||
public virtual async Task<IResult> GetAllAsync([FromQuery] int page, IRepositoryWrapper repositoryWrapper, CancellationToken cancellationToken)
|
||||
=> TypedResults.Ok(await repositoryWrapper.SetRepository<University>().TableNoTracking
|
||||
=> TypedResults.Ok(await repositoryWrapper.SetRepository<University>()
|
||||
.TableNoTracking
|
||||
.Select(UniversityMapper.ProjectToSDto).ToListAsync(cancellationToken));
|
||||
|
||||
// GET:Get An Entity By Id
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<AssemblyVersion>0.1.0.3</AssemblyVersion>
|
||||
<FileVersion>0.1.0.3</FileVersion>
|
||||
<AssemblyVersion>1.2.1.0</AssemblyVersion>
|
||||
<FileVersion>1.2.1.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -79,6 +79,7 @@
|
|||
<Using Include="DocuMed.Domain.Entities.City" />
|
||||
<Using Include="DocuMed.Domain.Entities.MedicalHistoryTemplate" />
|
||||
<Using Include="DocuMed.Domain.Entities.User" />
|
||||
<Using Include="DocuMed.Domain.Enums.QueryFilters" />
|
||||
<Using Include="DocuMed.Domain.Mappers" />
|
||||
<Using Include="DocuMed.Domain.Models.Settings" />
|
||||
<Using Include="DocuMed.Infrastructure" />
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
public class HealthCheck
|
||||
{
|
||||
public bool Health { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string TotalMemory { get; set; }
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string TotalMemory { get; set; } = string.Empty;
|
||||
public string StartAt { get; set; } = string.Empty;
|
||||
public string StartAtPersian { get; set; } = string.Empty;
|
||||
public string MachineName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
|
@ -28,6 +28,7 @@ public class MedicalHistoryService : IMedicalHistoryService
|
|||
template.SystolicBloodPressure, template.DiastolicBloodPressure, template.PulseRate, template.SPO2,
|
||||
template.Temperature, template.ApplicationUserId, template.MedicalHistoryTemplateId);
|
||||
ent.Id = template.Id;
|
||||
ent.CreatedAt = template.CreatedAt;
|
||||
|
||||
|
||||
foreach (var answer in template.Answers.Where(a=>a.Id == Guid.Empty))
|
||||
|
@ -38,7 +39,7 @@ public class MedicalHistoryService : IMedicalHistoryService
|
|||
{
|
||||
var dbAnswer = await _repositoryWrapper.SetRepository<MedicalHistoryAnswer>().TableNoTracking
|
||||
.FirstOrDefaultAsync(a => a.Id == answer.Id, cancellationToken);
|
||||
if (dbAnswer != null && dbAnswer.Answer != answer.Answer)
|
||||
if (dbAnswer != null && dbAnswer.Answer != answer.Answer && answer.Answer != null)
|
||||
{
|
||||
dbAnswer = MedicalHistoryAnswer.Create(answer.Answer, answer.Question, answer.Part, answer.QuestionType,
|
||||
dbAnswer.MedicalHistoryId);
|
||||
|
|
|
@ -60,7 +60,9 @@
|
|||
<Using Include="DocuMed.Domain.Entities.User" />
|
||||
<Using Include="DocuMed.Domain.Enums" />
|
||||
<Using Include="Mapster" />
|
||||
<Using Include="MD.PersianDateTime.Standard" />
|
||||
<Using Include="Microsoft.AspNetCore.Identity" />
|
||||
<Using Include="Newtonsoft.Json" />
|
||||
<Using Include="System.ComponentModel.DataAnnotations" />
|
||||
<Using Include="System.Numerics" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -9,7 +9,7 @@ public class MedicalHistoryLDto : BaseDto<MedicalHistoryLDto,MedicalHistory>
|
|||
public string LastName { get; set; } = string.Empty;
|
||||
public string FatherName { get; set; } = string.Empty;
|
||||
public string NationalId { get; set; } = string.Empty;
|
||||
public int Age { get; set; }
|
||||
public int Age { get; set; } = 30;
|
||||
public DateTime BirthDate { get; set; }
|
||||
|
||||
public SectionSDto Section { get; set; } = new();
|
||||
|
@ -26,12 +26,13 @@ public class MedicalHistoryLDto : BaseDto<MedicalHistoryLDto,MedicalHistory>
|
|||
public string GeneralAppearanceDetail { get; set; } = string.Empty;
|
||||
|
||||
public Guid MedicalHistoryTemplateId { get; set; }
|
||||
public int SystolicBloodPressure { get; set; }
|
||||
public int DiastolicBloodPressure { get; set; }
|
||||
public int PulseRate { get; set; }
|
||||
public int SPO2 { get; set; }
|
||||
public int Temperature { get; set; }
|
||||
public double SystolicBloodPressure { get; set; } = 120;
|
||||
public double DiastolicBloodPressure { get; set; } = 80;
|
||||
public double PulseRate { get; set; } = 70;
|
||||
public double SPO2 { get; set; } = 99;
|
||||
public double Temperature { get; set; } = 37;
|
||||
public Guid ApplicationUserId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public List<MedicalHistoryAnswerSDto> Answers { get; set; } = new();
|
||||
}
|
|
@ -7,5 +7,6 @@ public class MedicalHistoryTemplateLDto : BaseDto<MedicalHistoryTemplateLDto,Med
|
|||
public Guid SectionId { get; set; }
|
||||
public SectionSDto Section { get; set; } = new();
|
||||
public Guid ApplicationUserId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public List<MedicalHistoryQuestionSDto> Questions { get; set; } = new();
|
||||
}
|
|
@ -26,11 +26,12 @@ public class MedicalHistorySDto : BaseDto<MedicalHistorySDto,MedicalHistory>
|
|||
public string GeneralAppearanceDetail { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public int SystolicBloodPressure { get; set; }
|
||||
public int DiastolicBloodPressure { get; set; }
|
||||
public int PulseRate { get; set; }
|
||||
public int SPO2 { get; set; }
|
||||
public int Temperature { get; set; }
|
||||
public double SystolicBloodPressure { get; set; }
|
||||
public double DiastolicBloodPressure { get; set; }
|
||||
public double PulseRate { get; set; }
|
||||
public double SPO2 { get; set; }
|
||||
public double Temperature { get; set; }
|
||||
public string FullName => FirstName + " " + LastName;
|
||||
public Guid ApplicationUserId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
|
@ -6,4 +6,5 @@ public class MedicalHistoryTemplateSDto : BaseDto<MedicalHistoryTemplateSDto,Med
|
|||
public string SectionName { get; set; } = string.Empty;
|
||||
public Guid SectionId { get; set; }
|
||||
public Guid ApplicationUserId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
|
@ -40,11 +40,11 @@ public partial class MedicalHistory
|
|||
string systemReviewDetail,
|
||||
string vitalSignDetail,
|
||||
string generalAppearanceDetail,
|
||||
int systolicBloodPressure,
|
||||
int diastolicBloodPressure,
|
||||
int pulseRate,
|
||||
int sPO2,
|
||||
int temperature,
|
||||
double systolicBloodPressure,
|
||||
double diastolicBloodPressure,
|
||||
double pulseRate,
|
||||
double sPO2,
|
||||
double temperature,
|
||||
Guid applicationUserId,
|
||||
Guid medicalHistoryTemplateId)
|
||||
{
|
||||
|
|
|
@ -29,11 +29,11 @@ public partial class MedicalHistory : ApiEntity
|
|||
string nationalId,
|
||||
int age,
|
||||
DateTime birthDate,
|
||||
int systolicBloodPressure,
|
||||
int diastolicBloodPressure,
|
||||
int pulseRate,
|
||||
int spo2,
|
||||
int temperature,
|
||||
double systolicBloodPressure,
|
||||
double diastolicBloodPressure,
|
||||
double pulseRate,
|
||||
double spo2,
|
||||
double temperature,
|
||||
Guid applicationUserId,
|
||||
Guid medicalHistoryTemplateId)
|
||||
{
|
||||
|
@ -86,11 +86,11 @@ public partial class MedicalHistory : ApiEntity
|
|||
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 double SystolicBloodPressure { get; internal set; }
|
||||
public double DiastolicBloodPressure { get; internal set; }
|
||||
public double PulseRate { get; internal set; }
|
||||
public double SPO2 { get; internal set; }
|
||||
public double Temperature { get; internal set; }
|
||||
|
||||
public Guid MedicalHistoryTemplateId { get; internal set; }
|
||||
public Guid ApplicationUserId { get; internal set; }
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
namespace DocuMed.Domain.Enums.QueryFilters;
|
||||
|
||||
public enum DayQueryFilter
|
||||
{
|
||||
[Display(Name = "امروز")]
|
||||
Today=0,
|
||||
[Display(Name = "دیروز")]
|
||||
Yesterday =1,
|
||||
[Display(Name = "هفته اخیر")]
|
||||
Week =2
|
||||
}
|
|
@ -48,7 +48,8 @@ namespace DocuMed.Domain.Mappers
|
|||
MedicalHistoryTemplateId = p1.MedicalHistoryTemplateId,
|
||||
ApplicationUserId = p1.ApplicationUserId,
|
||||
ApplicationUser = new ApplicationUser() {Id = p1.ApplicationUserId},
|
||||
Id = p1.Id
|
||||
Id = p1.Id,
|
||||
CreatedAt = p1.CreatedAt
|
||||
};
|
||||
}
|
||||
public static MedicalHistory AdaptTo(this MedicalHistorySDto p2, MedicalHistory p3)
|
||||
|
@ -87,6 +88,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.ApplicationUserId = p2.ApplicationUserId;
|
||||
result.ApplicationUser = funcMain2(new Never(), result.ApplicationUser, p2);
|
||||
result.Id = p2.Id;
|
||||
result.CreatedAt = p2.CreatedAt;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -123,7 +125,8 @@ namespace DocuMed.Domain.Mappers
|
|||
MedicalHistoryTemplateId = p8.MedicalHistoryTemplateId,
|
||||
ApplicationUserId = p8.ApplicationUserId,
|
||||
ApplicationUser = new ApplicationUser() {Id = p8.ApplicationUserId},
|
||||
Id = p8.Id
|
||||
Id = p8.Id,
|
||||
CreatedAt = p8.CreatedAt
|
||||
};
|
||||
public static MedicalHistorySDto AdaptToSDto(this MedicalHistory p9)
|
||||
{
|
||||
|
@ -155,6 +158,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SPO2 = p9.SPO2,
|
||||
Temperature = p9.Temperature,
|
||||
ApplicationUserId = p9.ApplicationUserId,
|
||||
CreatedAt = p9.CreatedAt,
|
||||
Id = p9.Id
|
||||
};
|
||||
}
|
||||
|
@ -192,6 +196,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.SPO2 = p10.SPO2;
|
||||
result.Temperature = p10.Temperature;
|
||||
result.ApplicationUserId = p10.ApplicationUserId;
|
||||
result.CreatedAt = p10.CreatedAt;
|
||||
result.Id = p10.Id;
|
||||
return result;
|
||||
|
||||
|
@ -224,6 +229,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SPO2 = p12.SPO2,
|
||||
Temperature = p12.Temperature,
|
||||
ApplicationUserId = p12.ApplicationUserId,
|
||||
CreatedAt = p12.CreatedAt,
|
||||
Id = p12.Id
|
||||
};
|
||||
public static MedicalHistory AdaptToMedicalHistory(this MedicalHistoryLDto p13)
|
||||
|
@ -263,7 +269,8 @@ namespace DocuMed.Domain.Mappers
|
|||
MedicalHistoryTemplateId = p13.MedicalHistoryTemplateId,
|
||||
ApplicationUserId = p13.ApplicationUserId,
|
||||
Answers = funcMain3(p13.Answers),
|
||||
Id = p13.Id
|
||||
Id = p13.Id,
|
||||
CreatedAt = p13.CreatedAt
|
||||
};
|
||||
}
|
||||
public static MedicalHistory AdaptTo(this MedicalHistoryLDto p15, MedicalHistory p16)
|
||||
|
@ -302,6 +309,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.ApplicationUserId = p15.ApplicationUserId;
|
||||
result.Answers = funcMain5(p15.Answers, result.Answers);
|
||||
result.Id = p15.Id;
|
||||
result.CreatedAt = p15.CreatedAt;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -348,7 +356,8 @@ namespace DocuMed.Domain.Mappers
|
|||
MedicalHistoryId = p22.MedicalHistoryId,
|
||||
Id = p22.Id
|
||||
}).ToList<MedicalHistoryAnswer>(),
|
||||
Id = p21.Id
|
||||
Id = p21.Id,
|
||||
CreatedAt = p21.CreatedAt
|
||||
};
|
||||
public static MedicalHistoryLDto AdaptToLDto(this MedicalHistory p23)
|
||||
{
|
||||
|
@ -386,6 +395,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SPO2 = p23.SPO2,
|
||||
Temperature = p23.Temperature,
|
||||
ApplicationUserId = p23.ApplicationUserId,
|
||||
CreatedAt = p23.CreatedAt,
|
||||
Answers = funcMain6(p23.Answers),
|
||||
Id = p23.Id
|
||||
};
|
||||
|
@ -424,6 +434,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.SPO2 = p25.SPO2;
|
||||
result.Temperature = p25.Temperature;
|
||||
result.ApplicationUserId = p25.ApplicationUserId;
|
||||
result.CreatedAt = p25.CreatedAt;
|
||||
result.Answers = funcMain8(p25.Answers, result.Answers);
|
||||
result.Id = p25.Id;
|
||||
return result;
|
||||
|
@ -463,6 +474,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SPO2 = p31.SPO2,
|
||||
Temperature = p31.Temperature,
|
||||
ApplicationUserId = p31.ApplicationUserId,
|
||||
CreatedAt = p31.CreatedAt,
|
||||
Answers = p31.Answers.Select<MedicalHistoryAnswer, MedicalHistoryAnswerSDto>(p32 => new MedicalHistoryAnswerSDto()
|
||||
{
|
||||
Answer = p32.Answer,
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace DocuMed.Domain.Mappers
|
|||
ChiefComplaint = p1.ChiefComplaint,
|
||||
SectionId = p1.SectionId,
|
||||
ApplicationUserId = p1.ApplicationUserId,
|
||||
Id = p1.Id
|
||||
Id = p1.Id,
|
||||
CreatedAt = p1.CreatedAt
|
||||
};
|
||||
}
|
||||
public static MedicalHistoryTemplate AdaptTo(this MedicalHistoryTemplateSDto p2, MedicalHistoryTemplate p3)
|
||||
|
@ -33,6 +34,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.SectionId = p2.SectionId;
|
||||
result.ApplicationUserId = p2.ApplicationUserId;
|
||||
result.Id = p2.Id;
|
||||
result.CreatedAt = p2.CreatedAt;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -41,7 +43,8 @@ namespace DocuMed.Domain.Mappers
|
|||
ChiefComplaint = p4.ChiefComplaint,
|
||||
SectionId = p4.SectionId,
|
||||
ApplicationUserId = p4.ApplicationUserId,
|
||||
Id = p4.Id
|
||||
Id = p4.Id,
|
||||
CreatedAt = p4.CreatedAt
|
||||
};
|
||||
public static MedicalHistoryTemplateSDto AdaptToSDto(this MedicalHistoryTemplate p5)
|
||||
{
|
||||
|
@ -51,6 +54,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SectionName = p5.Section == null ? null : p5.Section.Name,
|
||||
SectionId = p5.SectionId,
|
||||
ApplicationUserId = p5.ApplicationUserId,
|
||||
CreatedAt = p5.CreatedAt,
|
||||
Id = p5.Id
|
||||
};
|
||||
}
|
||||
|
@ -66,6 +70,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.SectionName = p6.Section == null ? null : p6.Section.Name;
|
||||
result.SectionId = p6.SectionId;
|
||||
result.ApplicationUserId = p6.ApplicationUserId;
|
||||
result.CreatedAt = p6.CreatedAt;
|
||||
result.Id = p6.Id;
|
||||
return result;
|
||||
|
||||
|
@ -76,6 +81,7 @@ namespace DocuMed.Domain.Mappers
|
|||
SectionName = p8.Section.Name,
|
||||
SectionId = p8.SectionId,
|
||||
ApplicationUserId = p8.ApplicationUserId,
|
||||
CreatedAt = p8.CreatedAt,
|
||||
Id = p8.Id
|
||||
};
|
||||
public static MedicalHistoryTemplate AdaptToMedicalHistoryTemplate(this MedicalHistoryTemplateLDto p9)
|
||||
|
@ -93,7 +99,8 @@ namespace DocuMed.Domain.Mappers
|
|||
},
|
||||
ApplicationUserId = p9.ApplicationUserId,
|
||||
Questions = funcMain1(p9.Questions),
|
||||
Id = p9.Id
|
||||
Id = p9.Id,
|
||||
CreatedAt = p9.CreatedAt
|
||||
};
|
||||
}
|
||||
public static MedicalHistoryTemplate AdaptTo(this MedicalHistoryTemplateLDto p11, MedicalHistoryTemplate p12)
|
||||
|
@ -110,6 +117,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.ApplicationUserId = p11.ApplicationUserId;
|
||||
result.Questions = funcMain3(p11.Questions, result.Questions);
|
||||
result.Id = p11.Id;
|
||||
result.CreatedAt = p11.CreatedAt;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
@ -136,7 +144,8 @@ namespace DocuMed.Domain.Mappers
|
|||
MedicalHistoryTemplateId = p18.MedicalHistoryTemplateId,
|
||||
Id = p18.Id
|
||||
}).ToList<MedicalHistoryQuestion>(),
|
||||
Id = p17.Id
|
||||
Id = p17.Id,
|
||||
CreatedAt = p17.CreatedAt
|
||||
};
|
||||
public static MedicalHistoryTemplateLDto AdaptToLDto(this MedicalHistoryTemplate p19)
|
||||
{
|
||||
|
@ -152,6 +161,7 @@ namespace DocuMed.Domain.Mappers
|
|||
Id = p19.Section.Id
|
||||
},
|
||||
ApplicationUserId = p19.ApplicationUserId,
|
||||
CreatedAt = p19.CreatedAt,
|
||||
Questions = funcMain4(p19.Questions),
|
||||
Id = p19.Id
|
||||
};
|
||||
|
@ -168,6 +178,7 @@ namespace DocuMed.Domain.Mappers
|
|||
result.SectionId = p21.SectionId;
|
||||
result.Section = funcMain5(p21.Section, result.Section);
|
||||
result.ApplicationUserId = p21.ApplicationUserId;
|
||||
result.CreatedAt = p21.CreatedAt;
|
||||
result.Questions = funcMain6(p21.Questions, result.Questions);
|
||||
result.Id = p21.Id;
|
||||
return result;
|
||||
|
@ -185,6 +196,7 @@ namespace DocuMed.Domain.Mappers
|
|||
Id = p27.Section.Id
|
||||
},
|
||||
ApplicationUserId = p27.ApplicationUserId,
|
||||
CreatedAt = p27.CreatedAt,
|
||||
Questions = p27.Questions.Select<MedicalHistoryQuestion, MedicalHistoryQuestionSDto>(p28 => new MedicalHistoryQuestionSDto()
|
||||
{
|
||||
Question = p28.Question,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
|
||||
<AssemblyVersion>1.0.0.3</AssemblyVersion>
|
||||
<FileVersion>1.0.0.3</FileVersion>
|
||||
<AssemblyVersion>1.2.1.0</AssemblyVersion>
|
||||
<FileVersion>1.2.1.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -49,6 +49,7 @@
|
|||
<Using Include="DocuMed.Domain.Entities.MedicalHistory" />
|
||||
<Using Include="DocuMed.Domain.Entities.MedicalHistoryTemplate" />
|
||||
<Using Include="DocuMed.Domain.Enums" />
|
||||
<Using Include="DocuMed.Domain.Enums.QueryFilters" />
|
||||
<Using Include="DocuMed.Domain.Models" />
|
||||
<Using Include="DocuMed.PWA" />
|
||||
<Using Include="DocuMed.PWA.Models" />
|
||||
|
|
|
@ -4,6 +4,7 @@ public static class Address
|
|||
{
|
||||
#if DEBUG
|
||||
public static string BaseAddress = "http://localhost:32770/api";
|
||||
//public static string BaseAddress = "https://api.documed.ir/api";
|
||||
#else
|
||||
public static string BaseAddress = "https://api.documed.ir/api";
|
||||
#endif
|
||||
|
|
|
@ -24,11 +24,24 @@
|
|||
<MudStack class="pb-20 bg-[#EEEEEE] rounded-t-xl">
|
||||
<div class="flex flex-row mx-5 mt-5">
|
||||
<div>
|
||||
<p class="font-extrabold text-[#356859]">شرح حال های امروز شما</p>
|
||||
<p class="text-xs font-light ">لیست شرح حال های انجام شده در امروز</p>
|
||||
<p class="font-extrabold text-[#356859]">شرح حال های شما</p>
|
||||
<p class="text-xs font-light ">لیست شرح حال های</p>
|
||||
</div>
|
||||
<MudButton DisableElevation="false" @onclick="CreateMedicalHistoryClicked" class="text-[#356859] my-auto mr-auto font-extrabold bg-white rounded-lg drop-shadow-md">+ افزودن</MudButton>
|
||||
|
||||
<MudButton DisableElevation="false" @onclick="CreateMedicalHistoryClicked"
|
||||
class="text-[#356859] my-auto mr-auto font-extrabold bg-white rounded-lg drop-shadow-md">+ افزودن</MudButton>
|
||||
</div>
|
||||
<MudSelect T="DayQueryFilter" ToStringFunc="filter => filter.ToDisplay()"
|
||||
Value="@ViewModel.SelectedDayFilter"
|
||||
ValueChanged="async (day) => { await ViewModel.SelectDayFilter(day);}"
|
||||
Margin="Margin.Dense"
|
||||
Variant="Variant.Outlined" AnchorOrigin="Origin.BottomCenter"
|
||||
class="text-[#356859] mx-5 font-extrabold rounded-lg">
|
||||
<MudSelectItem T="DayQueryFilter" Value="DayQueryFilter.Today" ><p>امروز</p></MudSelectItem>
|
||||
<MudSelectItem T="DayQueryFilter" Value="DayQueryFilter.Yesterday"><p>دیروز</p></MudSelectItem>
|
||||
<MudSelectItem T="DayQueryFilter" Value="DayQueryFilter.Week"><p>یک هفته اخیر</p></MudSelectItem>
|
||||
</MudSelect>
|
||||
|
||||
@if (@ViewModel.IsProcessing)
|
||||
{
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using DocuMed.Common.Models.Mapper;
|
||||
using DocuMed.Domain.Enums.QueryFilters;
|
||||
|
||||
namespace DocuMed.PWA.Pages;
|
||||
|
||||
|
@ -7,6 +8,7 @@ public class HomePageViewModel : BaseViewModel<List<MedicalHistorySDto>>
|
|||
private readonly IUserUtility _userUtility;
|
||||
private readonly IRestWrapper _restWrapper;
|
||||
private readonly ISnackbar _snackbar;
|
||||
public DayQueryFilter SelectedDayFilter { get; set; } = DayQueryFilter.Today;
|
||||
|
||||
public HomePageViewModel(IUserUtility userUtility,IRestWrapper restWrapper,ISnackbar snackbar)
|
||||
{
|
||||
|
@ -28,8 +30,8 @@ public class HomePageViewModel : BaseViewModel<List<MedicalHistorySDto>>
|
|||
User = await _userUtility.GetUserAsync();
|
||||
var token = await _userUtility.GetBearerTokenAsync();
|
||||
var list = await _restWrapper
|
||||
.CrudDtoApiRest<MedicalHistoryLDto, MedicalHistorySDto, Guid>(Address.MedicalHistoryController)
|
||||
.ReadAll(0, token);
|
||||
.MedicalHistoryRestApi
|
||||
.GetAllByFilterAsync(SelectedDayFilter, 0, token);
|
||||
PageDto = list;
|
||||
|
||||
}
|
||||
|
@ -51,4 +53,10 @@ public class HomePageViewModel : BaseViewModel<List<MedicalHistorySDto>>
|
|||
await base.InitializeAsync();
|
||||
|
||||
}
|
||||
|
||||
public async Task SelectDayFilter(DayQueryFilter day)
|
||||
{
|
||||
SelectedDayFilter = day;
|
||||
await InitializeAsync();
|
||||
}
|
||||
}
|
|
@ -11,9 +11,9 @@
|
|||
}
|
||||
|
||||
/* .secondary-border>.mud-input-control-input-container>.mud-input.mud-input-outlined>input:focus~.mud-input-outlined-border {
|
||||
border-color: #FD5523;
|
||||
color: white;
|
||||
} */
|
||||
border-color: #FD5523;
|
||||
color: white;
|
||||
} */
|
||||
</style>
|
||||
<div class="flex flex-col w-screen h-screen">
|
||||
<div class="w-full overflow-hidden basis-2/4">
|
||||
|
@ -150,46 +150,48 @@
|
|||
</p>
|
||||
|
||||
<MudForm @ref="_confirmSignUpForm">
|
||||
<MudTextField Required="true" RequiredError="نام خود را وارد کنید" @bind-Value="@_signUpRequest.FirstName" class="text-sm my-5" T="string" Label="نام" Variant="Variant.Outlined" />
|
||||
<MudTextField Required="true" RequiredError="نام خانوادگی خود را وارد کنید" @bind-Value="@_signUpRequest.LastName" class="text-sm my-5" T="string" Label="نام خانوادگی" Variant="Variant.Outlined" />
|
||||
<MudTextField class="text-sm my-5" T="string" @bind-Value="@_phoneNumber" Label="شماره تلفن همراه"
|
||||
Variant="Variant.Outlined" />
|
||||
<MudFocusTrap>
|
||||
<MudTextField Required="true" RequiredError="نام خود را وارد کنید" @bind-Value="@_signUpRequest.FirstName" class="text-sm my-5" T="string" Label="نام" Variant="Variant.Outlined" />
|
||||
<MudTextField Required="true" RequiredError="نام خانوادگی خود را وارد کنید" @bind-Value="@_signUpRequest.LastName" class="text-sm my-5" T="string" Label="نام خانوادگی" Variant="Variant.Outlined" />
|
||||
<MudTextField class="text-sm my-5" T="string" @bind-Value="@_phoneNumber" Label="شماره تلفن همراه"
|
||||
Variant="Variant.Outlined" />
|
||||
|
||||
<MudAutocomplete ToStringFunc="dto => dto.Name" class="my-5" @bind-Value="@_selectedCity"
|
||||
SearchFunc="SearchCity"
|
||||
T="CitySDto"
|
||||
Label="شهر شما"
|
||||
Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
<MudAutocomplete Required="true" ToStringFunc="dto => dto.Name" class="my-5" @bind-Value="@_selectedCity"
|
||||
SearchFunc="SearchCity"
|
||||
T="CitySDto"
|
||||
Label="شهر شما"
|
||||
Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
|
||||
<MudAutocomplete ToStringFunc="dto => dto.Name" class="my-5" @bind-Value="@_selectedUni" SearchFunc="SearchUniversity" T="UniversitySDto" Label="دانشگاه" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
<MudAutocomplete Required="true" ToStringFunc="dto => dto.Name" class="my-5" @bind-Value="@_selectedUni" SearchFunc="SearchUniversity" T="UniversitySDto" Label="دانشگاه" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
</MudFocusTrap>
|
||||
</MudForm>
|
||||
|
||||
<BaseButtonUi IsProcessing="_isProcessing" OnClickCallback="ConfirmSignUp" Content="تکمیل ثبت نام"
|
||||
|
@ -211,8 +213,8 @@
|
|||
private int _currentSignOnStep = 0;
|
||||
private MudForm? _confirmPhoneNumberForm;
|
||||
private MudForm? _confirmSignUpForm;
|
||||
private CitySDto _selectedCity;
|
||||
private UniversitySDto _selectedUni;
|
||||
private CitySDto? _selectedCity;
|
||||
private UniversitySDto? _selectedUni;
|
||||
private string _phoneNumber = string.Empty;
|
||||
private string _verifyCode = string.Empty;
|
||||
private bool _isProcessing = false;
|
||||
|
@ -226,7 +228,7 @@
|
|||
var user = await UserUtility.GetUserAsync();
|
||||
if (user.SignUpStatus == SignUpStatus.SignUpCompleted)
|
||||
NavigationManager.NavigateTo("HomePage");
|
||||
if(user.SignUpStatus==SignUpStatus.PhoneNumberVerified)
|
||||
if (user.SignUpStatus == SignUpStatus.PhoneNumberVerified)
|
||||
{
|
||||
_phoneNumber = user.PhoneNumber;
|
||||
_currentSignOnStep = 2;
|
||||
|
@ -365,13 +367,14 @@
|
|||
{
|
||||
try
|
||||
{
|
||||
if (_universities.Count == 0)
|
||||
uni = uni == null ? string.Empty : uni;
|
||||
if (_selectedCity == null)
|
||||
{
|
||||
var token = await UserUtility.GetBearerTokenAsync();
|
||||
_universities = await RestWrapper.CrudDtoApiRest<University, UniversitySDto, Guid>(Address.UniversityController).ReadAll(0, token);
|
||||
}
|
||||
if (uni.IsNullOrEmpty())
|
||||
await _confirmSignUpForm!.Validate();
|
||||
return _universities;
|
||||
}
|
||||
var token = await UserUtility.GetBearerTokenAsync();
|
||||
_universities = await RestWrapper.CityRestApi.GetUniversitiesAsync(_selectedCity.Id, token);
|
||||
return _universities.Where(c => c.Name.Contains(uni));
|
||||
}
|
||||
catch (ApiException ex)
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryActionStep6 SubmittedOnClick="@ViewModel.CompleteCreateMedicalHistory" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
|
@ -84,7 +84,7 @@
|
|||
{
|
||||
<MudButton @onclick="@ViewModel.CompleteStepClicked" Variant="Variant.Filled"
|
||||
IconSize="Size.Large" StartIcon="@Icons.Material.Filled.ChevronRight"
|
||||
class="font-extrabold rounded-full bg-[--color-primary]">ویرایش</MudButton>
|
||||
class="font-extrabold rounded-full text-white bg-[--color-primary]">ویرایش</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -36,7 +36,17 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
IsEditing = true;
|
||||
}
|
||||
|
||||
public MedicalHistoryTemplateSDto SelectedTemplate { get; set; } = new();
|
||||
private MedicalHistoryTemplateSDto _selectedTemplate = new();
|
||||
|
||||
public MedicalHistoryTemplateSDto SelectedTemplate
|
||||
{
|
||||
get => _selectedTemplate;
|
||||
set
|
||||
{
|
||||
_selectedTemplate = value;
|
||||
PageDto.ChiefComplaint = _selectedTemplate.ChiefComplaint;
|
||||
}
|
||||
}
|
||||
public MedicalHistoryTemplateLDto SelectedTemplateLDto { get; set; } = new();
|
||||
|
||||
public bool IsEditing { get; set; } = false;
|
||||
|
@ -97,6 +107,18 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
IsProcessing = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var user = await _userUtility.GetUserAsync();
|
||||
|
||||
if (user.SectionId != Guid.Empty)
|
||||
{
|
||||
var token = await _userUtility.GetBearerTokenAsync();
|
||||
var section = await _restWrapper.CrudDtoApiRest<Section, SectionSDto, Guid>(Address.SectionController)
|
||||
.ReadOne(user.SectionId, token);
|
||||
SelectedSelection = section;
|
||||
}
|
||||
}
|
||||
await base.InitializeAsync();
|
||||
}
|
||||
|
||||
|
@ -105,7 +127,26 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
CurrentStep++;
|
||||
StepCounter = $"{CurrentStep + 1} / 5";
|
||||
if (CurrentStep == 1)
|
||||
await SelectTemplateAsync();
|
||||
{
|
||||
try
|
||||
{
|
||||
if (PageDto.FirstName.IsNullOrEmpty())
|
||||
throw new Exception("نام بیمار را وارد کنید");
|
||||
if (PageDto.LastName.IsNullOrEmpty())
|
||||
throw new Exception("نام خانوادگی بیمار را وارد کنید");
|
||||
if (SelectedSelection == null)
|
||||
throw new Exception("بخش بیمار را وارد کنید");
|
||||
if (PageDto.ChiefComplaint.IsNullOrEmpty())
|
||||
throw new Exception("شکایت اصلی بیمار را وارد کنید");
|
||||
|
||||
await SelectTemplateAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_snackbar.Add(e.Message, Severity.Error);
|
||||
CurrentStep--;
|
||||
}
|
||||
}
|
||||
if (CurrentStep == 5)
|
||||
{
|
||||
if (IsEditing)
|
||||
|
@ -131,6 +172,7 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
|
||||
SelectedTemplateLDto = dto;
|
||||
SelectedTemplate = dto.Adapt<MedicalHistoryTemplateSDto>();
|
||||
PageDto.ChiefComplaint = dto.ChiefComplaint;
|
||||
}
|
||||
catch (ApiException ex)
|
||||
{
|
||||
|
@ -157,6 +199,7 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
if (SelectedSelection == null)
|
||||
throw new Exception("لطفا بخش مورد نظر را انتخاب نمایید");
|
||||
PageDto.SectionId = SelectedSelection.Id;
|
||||
PageDto.MedicalHistoryTemplateId = SelectedTemplate.Id;
|
||||
var token = await _userUtility.GetBearerTokenAsync();
|
||||
PageDto.Answers.AddRange(PiAnswers);
|
||||
PageDto.Answers.AddRange(PdhAnswers);
|
||||
|
@ -226,6 +269,8 @@ public class MedicalHistoryActionPageViewModel : BaseViewModel<MedicalHistoryLDt
|
|||
|
||||
public void RollBackStepClicked()
|
||||
{
|
||||
if(CurrentStep==0)
|
||||
return;
|
||||
Carousel?.MoveTo(--CurrentStep);
|
||||
StepCounter = $"{CurrentStep + 1} / 5";
|
||||
}
|
||||
|
|
|
@ -9,50 +9,65 @@
|
|||
</p>
|
||||
<BasePartDivider Index="1" Title="شکایت اصلی بیمار" />
|
||||
|
||||
<MudTextField Value="@PatientFirstName" ValueChanged="async detail => { PatientFirstName = detail; await PatientFirstNameChanged.InvokeAsync(detail); }"
|
||||
T="string" Label="نام بیمار" Variant="Variant.Outlined" />
|
||||
<MudTextField Value="@PatientLastName" ValueChanged="async detail => { PatientLastName = detail; await PatientLastNameChanged.InvokeAsync(detail); }"
|
||||
T="string" Label="نام خانوادگی بیمار" Variant="Variant.Outlined" />
|
||||
<MudTextField Value="@PatientAge" ValueChanged="async detail => { PatientAge = detail; await PatientAgeChanged.InvokeAsync(detail); }"
|
||||
T="int" Label="سن بیمار" Variant="Variant.Outlined" />
|
||||
<MudAutocomplete Value="@SelectedTemplate"
|
||||
ToStringFunc="dto => dto.ChiefComplaint"
|
||||
SearchFunc="@SearchTemplates"
|
||||
ValueChanged="async dto => { SelectedTemplate = dto; await SelectedTemplateChanged.InvokeAsync(SelectedTemplate); }"
|
||||
T="MedicalHistoryTemplateSDto" Label="شکایت اصلی بیمار ( CC )" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.ChiefComplaint</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
<MudForm>
|
||||
<MudFocusTrap>
|
||||
<MudTextField Required="true" RequiredError="نام بیمار خود را وارد کنید" Value="@PatientFirstName" ValueChanged="async detail => { PatientFirstName = detail; await PatientFirstNameChanged.InvokeAsync(detail); }"
|
||||
T="string" Label="نام بیمار" Variant="Variant.Outlined" class="text-sm my-5" />
|
||||
<MudTextField Required="true" RequiredError="نام خانوادگی بیمار خود را وارد کنید" Value="@PatientLastName" ValueChanged="async detail => { PatientLastName = detail; await PatientLastNameChanged.InvokeAsync(detail); }"
|
||||
T="string" Label="نام خانوادگی بیمار" Variant="Variant.Outlined" class="text-sm my-5" />
|
||||
<MudNumericField Required="true" RequiredError="سن بیمار خود را وارد کنید" Value="@PatientAge"
|
||||
ValueChanged="async detail => { PatientAge = detail; await PatientAgeChanged.InvokeAsync(detail); }"
|
||||
T="int" Label="سن بیمار" Variant="Variant.Outlined" />
|
||||
|
||||
<MudAutocomplete Value="@SelectedSection" ToStringFunc="dto => dto.Name"
|
||||
SearchFunc="@SearchSection"
|
||||
ValueChanged="async dto => { SelectedSection = dto; await SelectedSectionChanged.InvokeAsync(SelectedSection); }"
|
||||
T="SectionSDto" Label="بخش بیمار" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
|
||||
|
||||
<MudAutocomplete Required="true" RequiredError="بخش بیمار خود را وارد کنید" Value="@SelectedSection" ToStringFunc="dto => dto.Name"
|
||||
SearchFunc="@SearchSection"
|
||||
class="text-sm my-5"
|
||||
ValueChanged="async dto => { SelectedSection = dto; await SelectedSectionChanged.InvokeAsync(SelectedSection); }"
|
||||
T="SectionSDto" Label="بخش بیمار" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.Name</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
|
||||
<MudTextField Required="true" RequiredError="شکایت اصلی بیمار را وارد کنید" Value="@ChiefComplaint" ValueChanged="async detail => { ChiefComplaint = detail; await ChiefComplaintChanged.InvokeAsync(detail); }"
|
||||
T="string" Label="شکایت اصلی بیمار" Variant="Variant.Outlined" class="text-sm my-5" />
|
||||
|
||||
<MudAutocomplete Value="@SelectedTemplate"
|
||||
CoerceValue="true"
|
||||
class="text-sm my-5"
|
||||
ToStringFunc="dto => dto.ChiefComplaint"
|
||||
SearchFunc="@SearchTemplates"
|
||||
ValueChanged="async dto => { SelectedTemplate = dto; await SelectedTemplateChanged.InvokeAsync(SelectedTemplate); }"
|
||||
T="MedicalHistoryTemplateSDto" Label="انتخاب از پیش نویس ها" Variant="Variant.Outlined">
|
||||
<ProgressIndicatorInPopoverTemplate>
|
||||
<MudList Clickable="false">
|
||||
<MudListItem>
|
||||
<div class="flex flex-row w-full mx-auto">
|
||||
<MudProgressCircular class="my-auto mr-1 -ml-4" Size="Size.Small" Indeterminate="true" />
|
||||
<p class="font-bold my-1 mx-auto text-md">منتظر بمانید</p>
|
||||
</div>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ProgressIndicatorInPopoverTemplate>
|
||||
<ItemTemplate Context="e">
|
||||
<p>@e.ChiefComplaint</p>
|
||||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
</MudFocusTrap>
|
||||
|
||||
</MudForm>
|
||||
</MudStack>
|
||||
|
||||
@code
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
@foreach (var question in PiQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="AnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="AnswerChanged" />
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
@foreach (var question in PdhQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="PdhAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="PdhAnswerChanged" />
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
@foreach (var question in PshQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="PshAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="PshAnswerChanged" />
|
||||
}
|
||||
|
||||
<MudTextField Margin="Margin.Dense"
|
||||
|
@ -85,10 +85,10 @@
|
|||
|
||||
private void PshAnswerChanged(MedicalHistoryAnswerSDto dto)
|
||||
{
|
||||
var findAnswer = PdhAnswers.FirstOrDefault(pi => pi.Question == dto.Question && pi.Part == dto.Part);
|
||||
var findAnswer = PshAnswers.FirstOrDefault(pi => pi.Question == dto.Question && pi.Part == dto.Part);
|
||||
if (findAnswer != null)
|
||||
findAnswer.Answer = dto.Answer;
|
||||
else
|
||||
PdhAnswers.Add(dto);
|
||||
PshAnswers.Add(dto);
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
<div class="grid grid-cols-2 gap-1 md:grid-cols-4 sm:grid-cols-2">
|
||||
@foreach (var question in DhQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="DhAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="DhAnswerChanged" />
|
||||
}
|
||||
</div>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
<div class="grid grid-cols-2 gap-1 md:grid-cols-4 sm:grid-cols-2">
|
||||
@foreach (var question in HhQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="HhAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="HhAnswerChanged" />
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="grid grid-cols-2 gap-1 md:grid-cols-4 sm:grid-cols-2">
|
||||
@foreach (var question in GaQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="GaAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="GaAnswerChanged" />
|
||||
}
|
||||
|
||||
</div>
|
||||
|
@ -14,40 +14,47 @@
|
|||
|
||||
|
||||
<BasePartDivider Index="10" Title="علائم حیاتی ( VS )" />
|
||||
<div class="flex flex-row">
|
||||
<p class="my-auto mr-5 font-extrabold text-md grow">فشــــار خون</p>
|
||||
<MudTextField InputType="InputType.Number"
|
||||
Value="@SystolicBloodPressure" ValueChanged="async detail => { SystolicBloodPressure = detail; await SystolicBloodPressureChanged.InvokeAsync(detail); }"
|
||||
Label="سیستولیک"
|
||||
Margin="Margin.Dense"
|
||||
class="mx-3 my-auto basis-1/12" T="int" Variant="Variant.Outlined" />
|
||||
<MudTextField InputType="InputType.Number"
|
||||
Value="@DiastolicBloodPressure" ValueChanged="async detail => { DiastolicBloodPressure = detail; await DiastolicBloodPressureChanged.InvokeAsync(detail); }"
|
||||
Label="دیاستولیک"
|
||||
Margin="Margin.Dense"
|
||||
class="my-auto basis-1/12" T="int" Variant="Variant.Outlined" />
|
||||
<MudFocusTrap>
|
||||
<div class="flex flex-row">
|
||||
<p class="my-auto mr-5 font-extrabold text-md grow">فشــــار خون</p>
|
||||
<MudNumericField Value="@SystolicBloodPressure" ValueChanged="async detail => { SystolicBloodPressure = detail; await SystolicBloodPressureChanged.InvokeAsync(detail); }"
|
||||
Label="سیستولیک"
|
||||
Step=".5"
|
||||
Min="0.0"
|
||||
Margin="Margin.Dense"
|
||||
class="mx-3 my-3 basis-1/12" T="double" Variant="Variant.Outlined" />
|
||||
<MudNumericField Value="@DiastolicBloodPressure" ValueChanged="async detail => { DiastolicBloodPressure = detail; await DiastolicBloodPressureChanged.InvokeAsync(detail); }"
|
||||
Label="دیاستولیک"
|
||||
Step=".5"
|
||||
Min="0.0"
|
||||
Margin="Margin.Dense"
|
||||
class="my-3 basis-1/12" T="double" Variant="Variant.Outlined" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="grid grid-cols-3">
|
||||
|
||||
|
||||
<MudTextField Value="@PulseRate" ValueChanged="async detail => { PulseRate = detail; await PulseRateChanged.InvokeAsync(detail); }"
|
||||
InputType="InputType.Number" Margin="Margin.Dense" Label="نبض" T="int" Variant="Variant.Outlined" />
|
||||
|
||||
<MudTextField Value="@SPO2" ValueChanged="async detail => { SPO2 = detail; await SPO2Changed.InvokeAsync(detail); }"
|
||||
InputType="InputType.Number" class="mx-2" Margin="Margin.Dense" Label="اکسیژن" T="int" Variant="Variant.Outlined" />
|
||||
|
||||
<MudTextField Value="@Temperature" ValueChanged="async detail => { Temperature = detail; await TemperatureChanged.InvokeAsync(detail); }"
|
||||
InputType="InputType.Number" Margin="Margin.Dense" Label="دمای بدن" T="int" Variant="Variant.Outlined" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-3">
|
||||
|
||||
|
||||
<MudNumericField Min="0"
|
||||
Value="@PulseRate" ValueChanged="async detail => { PulseRate = detail; await PulseRateChanged.InvokeAsync(detail); }"
|
||||
Margin="Margin.Dense" class="my-3" Label="نبض" T="double" Variant="Variant.Outlined" />
|
||||
|
||||
<MudNumericField Min="0"
|
||||
Value="@SPO2" ValueChanged="async detail => { SPO2 = detail; await SPO2Changed.InvokeAsync(detail); }"
|
||||
class="mx-2 my-3" Margin="Margin.Dense" Label="اکسیژن" T="double" Variant="Variant.Outlined" />
|
||||
|
||||
<MudNumericField Value="@Temperature"
|
||||
ValueChanged="async detail => { Temperature = detail; await TemperatureChanged.InvokeAsync(detail); }"
|
||||
Margin="Margin.Dense" class="my-3" Format="F1" Min="0.0" Label="دمای بدن" T="double" Variant="Variant.Outlined" />
|
||||
</div>
|
||||
</MudFocusTrap>
|
||||
|
||||
|
||||
<BasePartDivider Index="11" Title="بررسی سیستماتیک ( ROS )" />
|
||||
<div class="grid grid-cols-2 gap-1 md:grid-cols-4 sm:grid-cols-2">
|
||||
<div class="grid gap-1 md:grid-cols-2">
|
||||
@foreach (var question in RosQuestions)
|
||||
{
|
||||
<BaseMedicalQuestionTemplate Question="@question" Answer="@question.Answer" AnswerChanged="RosAnswerChanged" />
|
||||
<BaseMedicalQuestionTemplate Question="@question" OldAnswer="@question.Answer" AnswerChanged="RosAnswerChanged" />
|
||||
}
|
||||
|
||||
</div>
|
||||
|
@ -122,38 +129,38 @@
|
|||
RosAnswers.Add(dto);
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public int SystolicBloodPressure { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> SystolicBloodPressureChanged { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public int DiastolicBloodPressure { get; set; }
|
||||
public double SystolicBloodPressure { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DiastolicBloodPressureChanged { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public int PulseRate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> PulseRateChanged { get; set; }
|
||||
public EventCallback<double> SystolicBloodPressureChanged { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public int SPO2 { get; set; }
|
||||
public double DiastolicBloodPressure { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> SPO2Changed { get; set; }
|
||||
public EventCallback<double> DiastolicBloodPressureChanged { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public int Temperature { get; set; }
|
||||
public double PulseRate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> TemperatureChanged { get; set; }
|
||||
public EventCallback<double> PulseRateChanged { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public double SPO2 { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<double> SPO2Changed { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public double Temperature { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<double> TemperatureChanged { get; set; }
|
||||
}
|
|
@ -5,41 +5,41 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<BasePageUi Title="افزودن یک شرحال جدید" Description="لطفا اطلاعات بیمار را با دقت کامل وارد کنید">
|
||||
<BasePageUi Title="افزودن یک پیش نویس جدید" Description="لطفا اطلاعات بیمار را با دقت کامل وارد کنید">
|
||||
|
||||
<div class="flex flex-col w-full h-full rounded-t-xl">
|
||||
<div class="flex flex-col w-full h-full rounded-t-xl p-1">
|
||||
|
||||
<MudCarousel class="w-full h-full overflow-x-hidden overflow-y-scroll" @ref="@ViewModel.Carousel" ShowArrows="false"
|
||||
ShowBullets="false" EnableSwipeGesture="false" AutoCycle="false" TData="object">
|
||||
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col w-full h-full">
|
||||
<div class="flex flex-col w-full h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep1 @bind-ChiefComplaint="@ViewModel.PageDto.ChiefComplaint" @bind-SelectedSection="@ViewModel.SelectedSelection" />
|
||||
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep2 PiQuestions="@ViewModel.PiQuestions" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep3 PdhQuestions="@ViewModel.PdhQuestions" PshQuestions="@ViewModel.PshQuestions" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep4 FamilyHistories="@ViewModel.FhQuestions" DrugHistories="@ViewModel.DhQuestions" AhMedicines="@ViewModel.AhQuestions" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep5 ReviewOfSystems="@ViewModel.RosQuestions" GeneralAppearance="@ViewModel.GaQuestions" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
<MudCarouselItem>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col h-full p-4">
|
||||
<MedicalHistoryTemplateActionStep6 SubmittedOnClick="@ViewModel.SubmitCreateTemplateAsync" />
|
||||
</div>
|
||||
</MudCarouselItem>
|
||||
|
|
|
@ -187,6 +187,8 @@ public class MedicalHistoryTemplateActionPageViewModel : BaseViewModel<MedicalHi
|
|||
}
|
||||
public void RollBackStepClicked()
|
||||
{
|
||||
if(CurrentStep==0)
|
||||
return;
|
||||
Carousel?.MoveTo(--CurrentStep);
|
||||
StepCounter = $"{CurrentStep + 1} / 5";
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@using DocuMed.Domain.Entities.MedicalHistoryTemplate
|
||||
|
||||
<MudStack class="pb-20 font-iranyekan">
|
||||
<BasePartDivider Index="3" Title="تاریخچه بیماری قبلی ( PI )" />
|
||||
<BasePartDivider Index="3" Title="تاریخچه بیماری قبلی ( PMH )" />
|
||||
|
||||
@foreach (var item in PdhQuestions)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex flex-row">
|
||||
<MudTextField @bind-Value="@_hhName" class="grow" T="string" Label="نام دارو مورد نظر" Variant="Variant.Outlined" />
|
||||
<MudTextField @bind-Value="@_hhName" class="grow" T="string" Label="نام ماده مخدر مورد نظر" Variant="Variant.Outlined" />
|
||||
|
||||
<MudButton Variant="Variant.Outlined" @onclick="AddHhMedicine" Color="Color.Info" IconSize="Size.Large" DisableElevation="false" class="mx-2 mt-1.5 mb-0.5 pt-2 text-4xl rounded-md">
|
||||
+
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex flex-row">
|
||||
<MudTextField @bind-Value="@_generalAppearance" class="grow" T="string" Label="نام دارو مورد نظر" Variant="Variant.Outlined" />
|
||||
<MudTextField @bind-Value="@_generalAppearance" class="grow" T="string" Label="عنوان بررسی مورد نظر" Variant="Variant.Outlined" />
|
||||
|
||||
<MudButton Variant="Variant.Outlined" @onclick="AddGeneralAppearance" Color="Color.Info" IconSize="Size.Large" DisableElevation="false" class="mx-2 mt-1.5 mb-0.5 pt-2 text-4xl rounded-md">
|
||||
+
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
|
||||
<BasePageUi Title="پیش نویس های" Description="پیش نویس های شرح های سرعت و دقت شما را افزایش میدهد">
|
||||
<MudStack>
|
||||
<MudStack class="p-5">
|
||||
<div class="flex flex-row mr-1 mt-5">
|
||||
<div>
|
||||
<p class="font-extrabold text-[#356859]">تمامی پیش نویس های شما</p>
|
||||
|
|
|
@ -68,6 +68,7 @@ public class ProfilePageViewModel : BaseViewModel
|
|||
{
|
||||
request.SectionId = SelectedSection.Id;
|
||||
User.SectionId = SelectedSection.Id;
|
||||
User.SectionName = SelectedSection.Name;
|
||||
}
|
||||
await RestWrapper.UserRestApi.UpdateUserAsync(request, token);
|
||||
await UserUtility.SetUserAsync(User);
|
||||
|
|
|
@ -7,7 +7,7 @@ builder.Services.AddMudServices(config =>
|
|||
config.SnackbarConfiguration.HideTransitionDuration = 200;
|
||||
config.SnackbarConfiguration.ShowTransitionDuration = 200;
|
||||
config.SnackbarConfiguration.SnackbarVariant = Variant.Filled;
|
||||
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomRight;
|
||||
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
|
||||
});
|
||||
builder.Services.AddScoped<IRestWrapper, RestWrapper>();
|
||||
builder.Services.AddScoped<IUserUtility, UserUtility>();
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
namespace DocuMed.PWA.Services.RestServices;
|
||||
|
||||
public interface ICityRestApi
|
||||
{
|
||||
|
||||
[Get("/university/{cityId}")]
|
||||
Task<List<UniversitySDto>> GetUniversitiesAsync(Guid cityId, [Header("Authorization")] string authorization);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace DocuMed.PWA.Services.RestServices;
|
||||
|
||||
public interface IMedicalHistoryRestApi
|
||||
{
|
||||
|
||||
[Get("/filter")]
|
||||
Task<List<MedicalHistorySDto>> GetAllByFilterAsync([Query] DayQueryFilter dayQuery, [Query] int page, [Header("Authorization")] string authorization);
|
||||
}
|
|
@ -8,5 +8,7 @@ public interface IRestWrapper
|
|||
|
||||
public IAuthRestApi AuthRestApi { get; }
|
||||
public ISectionRestApi SectionRestApi { get; }
|
||||
public ICityRestApi CityRestApi { get; }
|
||||
public IUserRestApi UserRestApi { get; }
|
||||
public IMedicalHistoryRestApi MedicalHistoryRestApi { get; }
|
||||
}
|
|
@ -22,5 +22,7 @@ public class RestWrapper : IRestWrapper
|
|||
}
|
||||
public IAuthRestApi AuthRestApi => RestService.For<IAuthRestApi>(Address.AuthController, setting);
|
||||
public ISectionRestApi SectionRestApi => RestService.For<ISectionRestApi>(Address.SectionController, setting);
|
||||
public ICityRestApi CityRestApi => RestService.For<ICityRestApi>(Address.CityController, setting);
|
||||
public IUserRestApi UserRestApi => RestService.For<IUserRestApi>(Address.UserController, setting);
|
||||
public IMedicalHistoryRestApi MedicalHistoryRestApi => RestService.For<IMedicalHistoryRestApi>(Address.MedicalHistoryController);
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
@using DocuMed.Domain.Dtos.SmallDtos
|
||||
@using MD.PersianDateTime.Standard
|
||||
<MudCard @onclick="async ()=> await Clicked.InvokeAsync(MedicalHistory)" Class="mx-3 my-1 rounded-md" Elevation="2">
|
||||
<div class="flex flex-row">
|
||||
<div class="bg-[--color-primary] rounded-r-lg w-2"></div>
|
||||
|
@ -11,17 +12,22 @@
|
|||
</div>
|
||||
<MudGrid Row="true" Class="items-center justify-stretch">
|
||||
|
||||
<MudItem xs="6">
|
||||
<MudItem xs="4">
|
||||
<MudPaper Elevation="0"
|
||||
class="bg-[#FFDACF] text-[#D03405] rounded-full text-center py-0.5 px-3 text-xs font-iranyekan">
|
||||
<p>شکایت اصلی : @MedicalHistory.ChiefComplaint</p>
|
||||
<p>@MedicalHistory.ChiefComplaint</p>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="6">
|
||||
<MudItem xs="4">
|
||||
<MudPaper Elevation="0" Class="bg-gray-200 text-center rounded-full py-0.5 px-3 text-gray-700 text-xs">
|
||||
بخش @MedicalHistory.SectionName
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="4">
|
||||
<MudPaper Elevation="0" Class="bg-gray-200 text-center rounded-full py-0.5 px-3 text-gray-700 text-xs">
|
||||
@MedicalHistory.CreatedAt.ToPersianDateTime().ToShortDateString()
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudStack>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,29 @@
|
|||
@using Toolbelt.Blazor.PWA.Updater
|
||||
@using Toolbelt.Blazor.PWA.Updater.Service
|
||||
@inherits LayoutComponentBase
|
||||
@inject IPWAUpdaterService PwaUpdaterService
|
||||
<style>
|
||||
body .pwa-updater[b-pwa-updater] {
|
||||
--pwa-updater-bar-height: 40px;
|
||||
--pwa-updater-font-size: 16px;
|
||||
--pwa-updater-bar-color: rgba(253, 216, 53, 1);
|
||||
--pwa-updater-bar-backcolor: #444;
|
||||
padding-top: 35px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 35px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
body .pwa-updater-updatenow-button {
|
||||
border: dashed 2px rgba(253, 216, 53, 1) !important;
|
||||
font-family: iranyekan !important;
|
||||
font-weight:800 !important;
|
||||
}
|
||||
|
||||
body .pwa-updater-close-button {
|
||||
color:#fff !important;
|
||||
}
|
||||
</style>
|
||||
<MudRTLProvider RightToLeft="true">
|
||||
<MudThemeProvider Theme="MyCustomTheme" />
|
||||
<MudDialogProvider />
|
||||
|
@ -9,7 +32,9 @@
|
|||
<MudLayout>
|
||||
<div>
|
||||
@Body
|
||||
<PWAUpdater />
|
||||
<div dir="ltr">
|
||||
<PWAUpdater Text="@_updateText" ButtonCaption="اپدیت کنید" />
|
||||
</div>
|
||||
</div>
|
||||
</MudLayout>
|
||||
</MudRTLProvider>
|
||||
|
@ -28,8 +53,14 @@
|
|||
Secondary = "#FD5523",
|
||||
}
|
||||
};
|
||||
|
||||
private string _updateText = "! نسخه جدید داکیومد رسید";
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
string? version = typeof(Program)?.Assembly.GetName()?.Version?.ToString();
|
||||
if (version != null)
|
||||
_updateText = $"نسخه جدید داکیومد رسید - {version}";
|
||||
|
||||
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
@switch (Question.QuestionType)
|
||||
{
|
||||
case MedicalHistoryQuestionType.Selective:
|
||||
<SelectiveMedicalQuestionTemplate Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<SelectiveMedicalQuestionTemplate Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
case MedicalHistoryQuestionType.Hourly:
|
||||
<HourMedicalQuestionTemplate Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<HourMedicalQuestionTemplate Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
case MedicalHistoryQuestionType.Interrogatively:
|
||||
<InterrogativelyMedicalQuestionTemplate Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<InterrogativelyMedicalQuestionTemplate Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
case MedicalHistoryQuestionType.YesOrNo:
|
||||
<YesOrNoMedicalQuestionTemplate Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<YesOrNoMedicalQuestionTemplate Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
case MedicalHistoryQuestionType.RosSelective:
|
||||
<RosSelectiveMedicalQuestionTemplate IsSymptom="@Question.IsSymptom" IsSign="@Question.IsSign" BodySystem="@Question.BodySystem" Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<RosSelectiveMedicalQuestionTemplate IsSymptom="@Question.IsSymptom" IsSign="@Question.IsSign" BodySystem="@Question.BodySystem" Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
default:
|
||||
<InterrogativelyMedicalQuestionTemplate Question="@Question.Question" Answer="@Answer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
<InterrogativelyMedicalQuestionTemplate Question="@Question.Question" OldAnswer="@OldAnswer.Answer" AnswerChanged="async answer => await AnswerChanging(answer) " />
|
||||
break;
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public MedicalHistoryQuestionSDto Question { get; set; } = new();
|
||||
|
||||
[Parameter]
|
||||
public MedicalHistoryAnswerSDto OldAnswer { get; set; } = new();
|
||||
|
||||
[Parameter]
|
||||
public MedicalHistoryAnswerSDto Answer { get; set; } = new();
|
||||
|
||||
|
@ -39,6 +43,8 @@
|
|||
Answer = answer,
|
||||
Part = Question.Part
|
||||
};
|
||||
if (OldAnswer.Id != Guid.Empty)
|
||||
Answer.Id = OldAnswer.Id;
|
||||
await AnswerChanged.InvokeAsync(Answer);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,12 +14,16 @@
|
|||
@code
|
||||
{
|
||||
|
||||
protected override void OnParametersSet()
|
||||
public override async Task SetParametersAsync(ParameterView parameters)
|
||||
{
|
||||
base.OnParametersSet();
|
||||
if (!Answer.IsNullOrEmpty() && int.TryParse(Answer, out int hCounter))
|
||||
await base.SetParametersAsync(parameters);
|
||||
if (!OldAnswer.IsNullOrEmpty() && int.TryParse(OldAnswer, out int hCounter))
|
||||
{
|
||||
if (_hourCounter == hCounter)
|
||||
return;
|
||||
_hourCounter = hCounter;
|
||||
Answer = _hourCounter.ToString();
|
||||
await AnswerChanged.InvokeAsync(Answer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +32,9 @@
|
|||
[Parameter]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string OldAnswer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> AnswerChanged { get; set; }
|
||||
|
||||
|
@ -43,6 +50,8 @@
|
|||
|
||||
private async Task DecreaseHour()
|
||||
{
|
||||
if(_hourCounter==0)
|
||||
return;
|
||||
_hourCounter--;
|
||||
Answer = _hourCounter.ToString();
|
||||
await AnswerChanged.InvokeAsync(Answer);
|
||||
|
|
|
@ -7,6 +7,23 @@
|
|||
Variant="Variant.Outlined" />
|
||||
|
||||
@code {
|
||||
|
||||
public override async Task SetParametersAsync(ParameterView parameters)
|
||||
{
|
||||
|
||||
await base.SetParametersAsync(parameters);
|
||||
if (!OldAnswer.IsNullOrEmpty())
|
||||
{
|
||||
if(Answer==OldAnswer)
|
||||
return;
|
||||
Answer = OldAnswer;
|
||||
await AnswerChanged.InvokeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string OldAnswer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -51,15 +51,22 @@ else
|
|||
|
||||
@code
|
||||
{
|
||||
protected override void OnParametersSet()
|
||||
|
||||
public override async Task SetParametersAsync(ParameterView parameters)
|
||||
{
|
||||
base.OnParametersSet();
|
||||
if (!Answer.IsNullOrEmpty())
|
||||
await base.SetParametersAsync(parameters);
|
||||
if (!OldAnswer.IsNullOrEmpty())
|
||||
{
|
||||
_isSelected = Answer == Question;
|
||||
if(Answer == OldAnswer)
|
||||
return;
|
||||
_isSelected = OldAnswer != Question;
|
||||
await SelectChanged();
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string OldAnswer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -17,18 +17,26 @@ else
|
|||
|
||||
@code
|
||||
{
|
||||
protected override void OnParametersSet()
|
||||
public override async Task SetParametersAsync(ParameterView parameters)
|
||||
{
|
||||
base.OnParametersSet();
|
||||
if (!Answer.IsNullOrEmpty())
|
||||
await base.SetParametersAsync(parameters);
|
||||
|
||||
if (!OldAnswer.IsNullOrEmpty())
|
||||
{
|
||||
_isSelected = Answer == Question;
|
||||
if(Answer == OldAnswer)
|
||||
return;
|
||||
_isSelected = OldAnswer != Question;
|
||||
await SelectChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string OldAnswer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> AnswerChanged { get; set; }
|
||||
|
||||
|
|
|
@ -42,23 +42,34 @@
|
|||
|
||||
@code
|
||||
{
|
||||
protected override void OnParametersSet()
|
||||
|
||||
public override async Task SetParametersAsync(ParameterView parameters)
|
||||
{
|
||||
base.OnParametersSet();
|
||||
if (!Answer.IsNullOrEmpty())
|
||||
await base.SetParametersAsync(parameters);
|
||||
|
||||
if (!OldAnswer.IsNullOrEmpty())
|
||||
{
|
||||
if (Answer == "بله")
|
||||
if(Answer == OldAnswer)
|
||||
return;
|
||||
if (OldAnswer == "بله")
|
||||
{
|
||||
Answer = "بله";
|
||||
_isNoSelected = false;
|
||||
_isYesSelected = true;
|
||||
}
|
||||
else if (Answer == "خیر")
|
||||
else if (OldAnswer == "خیر")
|
||||
{
|
||||
Answer = "خیر";
|
||||
_isNoSelected = true;
|
||||
_isYesSelected = false;
|
||||
}
|
||||
await AnswerChanged.InvokeAsync(Answer);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string OldAnswer { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
"autoprefixer": "^10.4.16",
|
||||
"postcss": "^8.4.30",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"tailwindcss": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"tailwindcss": "^3.3.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
"version": "5.2.0",
|
||||
|
@ -1212,19 +1211,19 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
|
||||
"integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
|
||||
"version": "3.3.5",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
|
||||
"integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
"arg": "^5.0.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"didyoumean": "^1.2.2",
|
||||
"dlv": "^1.1.3",
|
||||
"fast-glob": "^3.2.12",
|
||||
"fast-glob": "^3.3.0",
|
||||
"glob-parent": "^6.0.2",
|
||||
"is-glob": "^4.0.3",
|
||||
"jiti": "^1.18.2",
|
||||
"jiti": "^1.19.1",
|
||||
"lilconfig": "^2.1.0",
|
||||
"micromatch": "^4.0.5",
|
||||
"normalize-path": "^3.0.0",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"autoprefixer": "^10.4.16",
|
||||
"postcss": "^8.4.30",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"tailwindcss": "^3.3.3"
|
||||
"tailwindcss": "^3.3.5"
|
||||
},
|
||||
"name": "documed.pwa",
|
||||
"version": "1.0.0",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"ConfigurationFile":"tailwind.config.js","InputCssFile":null,"OutputCssFile":null}
|
|
@ -93,8 +93,11 @@
|
|||
--color-medicalhistory: rgba(253, 216, 53, 1);
|
||||
--color-medicalhistory-template: rgba(41, 187, 189, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
|
||||
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
|
||||
*//*
|
||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
||||
|
@ -561,6 +561,10 @@ video {
|
|||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.my-3 {
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.my-4 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
|
@ -856,6 +860,9 @@ video {
|
|||
border-top-left-radius: 0.75rem;
|
||||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
.border {
|
||||
border-width: 1px;
|
||||
}
|
||||
.border-\[--color-medicalhistory\] {
|
||||
border-color: var(--color-medicalhistory);
|
||||
}
|
||||
|
@ -1062,6 +1069,9 @@ video {
|
|||
.drop-shadow-md {
|
||||
--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
|
||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||
}
|
||||
.filter {
|
||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
@ -1144,6 +1154,8 @@ video {
|
|||
url('../assets/fonts/ttf/iranyekanwebextrablackfanum.ttf') format('truetype');
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
|
||||
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -629,6 +629,11 @@ video {
|
|||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.my-3 {
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.my-4 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
|
@ -1020,6 +1025,10 @@ video {
|
|||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
|
||||
.border {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.border-\[--color-medicalhistory\] {
|
||||
border-color: var(--color-medicalhistory);
|
||||
}
|
||||
|
@ -1286,6 +1295,10 @@ video {
|
|||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||
}
|
||||
|
||||
.filter {
|
||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: iranyekan;
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<Using Include="DocuMed.Domain.Entities.MedicalHistoryTemplate" />
|
||||
<Using Include="DocuMed.Domain.Entities.User" />
|
||||
<Using Include="DocuMed.Domain.Enums" />
|
||||
<Using Include="DocuMed.Domain.Enums.QueryFilters" />
|
||||
<Using Include="DocuMed.Domain.Mappers" />
|
||||
<Using Include="DocuMed.Domain.Models.Settings" />
|
||||
<Using Include="DocuMed.Repository.Abstracts" />
|
||||
|
|
|
@ -0,0 +1,867 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using DocuMed.Repository.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DocuMed.Repository.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationContext))]
|
||||
[Migration("20231112120230_editMHAddDouble")]
|
||||
partial class editMHAddDouble
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasDefaultSchema("public")
|
||||
.HasAnnotation("ProductVersion", "7.0.11")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cities", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.Section", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("UniversityId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UniversityId");
|
||||
|
||||
b.ToTable("Sections", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("CityId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CityId");
|
||||
|
||||
b.ToTable("Universities", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("AddictionHistoryDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Age")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("AllergyDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("ApplicationUserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("BirthDate")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ChiefComplaint")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<double>("DiastolicBloodPressure")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("DrugHistoryDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FamilyHistoryDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FatherName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("GeneralAppearanceDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("MedicalHistoryTemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NationalId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PastDiseasesHistoryDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PastSurgeryHistoryDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PresentIllnessDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<double>("PulseRate")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<double>("SPO2")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<Guid>("SectionId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("SystemReviewDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<double>("SystolicBloodPressure")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<double>("Temperature")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("VitalSignDetail")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ApplicationUserId");
|
||||
|
||||
b.HasIndex("SectionId");
|
||||
|
||||
b.ToTable("MedicalHistories", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Answer")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<Guid>("MedicalHistoryId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Part")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Question")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("QuestionType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MedicalHistoryId");
|
||||
|
||||
b.ToTable("MedicalHistoryAnswers", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("BodySystem")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsSign")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsSymptom")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<Guid>("MedicalHistoryTemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Part")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Question")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("QuestionType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MedicalHistoryTemplateId");
|
||||
|
||||
b.ToTable("MedicalHistoryQuestions", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ApplicationUserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("ChiefComplaint")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsRemoved")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("ModifiedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ModifiedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("RemovedBy")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("SectionId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ApplicationUserId");
|
||||
|
||||
b.HasIndex("SectionId");
|
||||
|
||||
b.ToTable("MedicalHistoryTemplates", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationRole", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EnglishName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<string>("PersianName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("RoleNameIndex");
|
||||
|
||||
b.ToTable("Roles", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("BirthDate")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Gender")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("NationalId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<Guid?>("SectionId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SignUpStatus")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("StudentId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<Guid?>("UniversityId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasDatabaseName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UserNameIndex");
|
||||
|
||||
b.HasIndex("SectionId");
|
||||
|
||||
b.HasIndex("UniversityId");
|
||||
|
||||
b.ToTable("Users", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("RoleId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("RoleClaims", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Claims", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ProviderDisplayName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Logins", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
||||
{
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("RoleId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("UserRoles", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
||||
{
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("LoginProvider")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("Tokens", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.Section", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.City.University", "University")
|
||||
.WithMany("Sections")
|
||||
.HasForeignKey("UniversityId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("University");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.City.City", "City")
|
||||
.WithMany("Universities")
|
||||
.HasForeignKey("CityId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("City");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("DocuMed.Domain.Entities.City.Section", "Section")
|
||||
.WithMany()
|
||||
.HasForeignKey("SectionId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicationUser");
|
||||
|
||||
b.Navigation("Section");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistoryAnswer", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", "MedicalHistory")
|
||||
.WithMany("Answers")
|
||||
.HasForeignKey("MedicalHistoryId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MedicalHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryQuestion", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", "MedicalHistoryTemplate")
|
||||
.WithMany("Questions")
|
||||
.HasForeignKey("MedicalHistoryTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MedicalHistoryTemplate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", "ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("DocuMed.Domain.Entities.City.Section", "Section")
|
||||
.WithMany()
|
||||
.HasForeignKey("SectionId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicationUser");
|
||||
|
||||
b.Navigation("Section");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.User.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.City.Section", "Section")
|
||||
.WithMany()
|
||||
.HasForeignKey("SectionId");
|
||||
|
||||
b.HasOne("DocuMed.Domain.Entities.City.University", "University")
|
||||
.WithMany()
|
||||
.HasForeignKey("UniversityId");
|
||||
|
||||
b.Navigation("Section");
|
||||
|
||||
b.Navigation("University");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
||||
{
|
||||
b.HasOne("DocuMed.Domain.Entities.User.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.City", b =>
|
||||
{
|
||||
b.Navigation("Universities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.City.University", b =>
|
||||
{
|
||||
b.Navigation("Sections");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistory.MedicalHistory", b =>
|
||||
{
|
||||
b.Navigation("Answers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DocuMed.Domain.Entities.MedicalHistoryTemplate.MedicalHistoryTemplate", b =>
|
||||
{
|
||||
b.Navigation("Questions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DocuMed.Repository.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class editMHAddDouble : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "Temperature",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "SystolicBloodPressure",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "SPO2",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "PulseRate",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "DiastolicBloodPressure",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Temperature",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "SystolicBloodPressure",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "SPO2",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "PulseRate",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "DiastolicBloodPressure",
|
||||
schema: "public",
|
||||
table: "MedicalHistories",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double precision");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -192,8 +192,8 @@ namespace DocuMed.Repository.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("DiastolicBloodPressure")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("DiastolicBloodPressure")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("DrugHistoryDetail")
|
||||
.IsRequired()
|
||||
|
@ -248,8 +248,8 @@ namespace DocuMed.Repository.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("PulseRate")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("PulseRate")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("RemovedAt")
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
@ -258,8 +258,8 @@ namespace DocuMed.Repository.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SPO2")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("SPO2")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<Guid>("SectionId")
|
||||
.HasColumnType("uuid");
|
||||
|
@ -268,11 +268,11 @@ namespace DocuMed.Repository.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SystolicBloodPressure")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("SystolicBloodPressure")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("Temperature")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("Temperature")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("VitalSignDetail")
|
||||
.IsRequired()
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
public interface IMedicalHistoryRepository : IBaseRepository<MedicalHistory>, IScopedDependency
|
||||
{
|
||||
public Task<List<MedicalHistorySDto>> GetMedicalHistoriesAsync(int page = 0, CancellationToken cancellationToken = default);
|
||||
public Task<List<MedicalHistorySDto>> GetMedicalHistoriesByFilterAsync(DayQueryFilter dayQuery,int page = 0, CancellationToken cancellationToken = default);
|
||||
public Task<MedicalHistoryLDto> GetMedicalHistoryAsync(Guid id, CancellationToken cancellationToken = default);
|
||||
}
|
|
@ -20,6 +20,46 @@ public class MedicalHistoryRepository : BaseRepository<MedicalHistory>,IMedicalH
|
|||
return list;
|
||||
}
|
||||
|
||||
public async Task<List<MedicalHistorySDto>> GetMedicalHistoriesByFilterAsync(DayQueryFilter dayQuery, int page = 0, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (!Guid.TryParse(CurrentUserService.UserId, out Guid userId))
|
||||
throw new AppException("توکن غیرمجاز", ApiResultStatusCode.UnAuthorized);
|
||||
var list = new List<MedicalHistorySDto>();
|
||||
switch (dayQuery)
|
||||
{
|
||||
case DayQueryFilter.Today:
|
||||
list = await TableNoTracking
|
||||
.Where(t => t.ApplicationUserId == userId && t.CreatedAt.Date == DateTime.Today)
|
||||
.OrderByDescending(t => t.CreatedAt)
|
||||
.Skip(page * 15)
|
||||
.Take(15)
|
||||
.Select(MedicalHistoryMapper.ProjectToSDto)
|
||||
.ToListAsync(cancellationToken);
|
||||
break;
|
||||
case DayQueryFilter.Yesterday:
|
||||
list = await TableNoTracking
|
||||
.Where(t => t.ApplicationUserId == userId && t.CreatedAt.Date == DateTime.Today.AddDays(-1))
|
||||
.OrderByDescending(t => t.CreatedAt)
|
||||
.Skip(page * 15)
|
||||
.Take(15)
|
||||
.Select(MedicalHistoryMapper.ProjectToSDto)
|
||||
.ToListAsync(cancellationToken);
|
||||
break;
|
||||
case DayQueryFilter.Week:
|
||||
list = await TableNoTracking
|
||||
.Where(t => t.ApplicationUserId == userId && t.CreatedAt.Date >= DateTime.Today.AddDays(-7) )
|
||||
.OrderByDescending(t => t.CreatedAt)
|
||||
.Skip(page * 15)
|
||||
.Take(15)
|
||||
.Select(MedicalHistoryMapper.ProjectToSDto)
|
||||
.ToListAsync(cancellationToken);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(dayQuery), dayQuery, null);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public async Task<MedicalHistoryLDto> GetMedicalHistoryAsync(Guid id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var dto = await TableNoTracking.Where(t => t.Id == id)
|
||||
|
|
Loading…
Reference in New Issue