sum gender ขร3
This commit is contained in:
parent
fa8dfc51e4
commit
6242003091
1 changed files with 19 additions and 0 deletions
|
|
@ -37,6 +37,17 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
#endregion
|
||||
|
||||
#region " Methods "
|
||||
// public async Task<dynamic> GetOcInsigniaPeriod(Guid id)
|
||||
// {
|
||||
// var period = await _dbContext.Set<InsigniaPeriod>()
|
||||
// .FirstOrDefaultAsync(x => x.Id == id);
|
||||
// if (period == null)
|
||||
// throw new Exception(GlobalMessages.InsigniaPeriodNotFound);
|
||||
// period.
|
||||
// var OCName = r.OcId == null ? "-" : _organizationCommonRepository.GetOrganizationNameFullPath(r.OcId.Value, false, false);
|
||||
// return OCName;
|
||||
// }
|
||||
|
||||
public async Task<dynamic> GetYearInsigniaPeriod(Guid id)
|
||||
{
|
||||
var period = await _dbContext.Set<InsigniaPeriod>()
|
||||
|
|
@ -348,6 +359,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
ProfileId = r.Profile.Id,
|
||||
FullName = $"{r.Profile.Prefix?.Name}{r.Profile.FirstName} {r.Profile.LastName}",
|
||||
Gender = r.Profile.Gender == null ? null : r.Profile.Gender.Name,
|
||||
Male = r.Profile.Gender == null ? 0 : (r.Profile.Gender.Name == "ชาย" ? 1 : 0),
|
||||
Female = r.Profile.Gender == null ? 0 : (r.Profile.Gender.Name == "หญิง" ? 1 : 0),
|
||||
InsigniaId = r.RequestInsignia.Id,
|
||||
OCName = _organizationCommonRepository.GetOrganizationNameFullPath(r.Request.Organization.Id, false, false)
|
||||
})
|
||||
|
|
@ -371,6 +384,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
ProfileId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
|
||||
FullName = "",
|
||||
Gender = "",
|
||||
Male = 0,
|
||||
Female = 0,
|
||||
InsigniaId = ins.InsigniaId,
|
||||
OCName = ""
|
||||
};
|
||||
|
|
@ -590,6 +605,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
ProfileId = r.Profile.Id,
|
||||
FullName = $"{r.Profile.Prefix?.Name}{r.Profile.FirstName} {r.Profile.LastName}",
|
||||
Gender = r.Profile.Gender == null ? null : r.Profile.Gender.Name,
|
||||
Male = r.Profile.Gender == null ? 0 : (r.Profile.Gender.Name == "ชาย" ? 1 : 0),
|
||||
Female = r.Profile.Gender == null ? 0 : (r.Profile.Gender.Name == "หญิง" ? 1 : 0),
|
||||
InsigniaId = r.RequestInsignia.Id,
|
||||
OCName = _organizationCommonRepository.GetOrganizationNameFullPath(r.Request.Organization.Id, false, false)
|
||||
})
|
||||
|
|
@ -613,6 +630,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
ProfileId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
|
||||
FullName = "",
|
||||
Gender = "",
|
||||
Male = 0,
|
||||
Female = 0,
|
||||
InsigniaId = ins.InsigniaId,
|
||||
OCName = ""
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue