fix download report error

This commit is contained in:
harid 2025-10-27 11:24:40 +07:00
parent c0c75e7dcb
commit 3b46a1bcde
4 changed files with 14 additions and 10 deletions

View file

@ -230,7 +230,9 @@ namespace BMA.EHR.Report.Service.Controllers
CitizenId = p.CitizenId == null ? "-" : (p.CitizenId),
p.Prefix,
FullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
DateOfBirth = (p.DateOfBirth.ToThaiShortDate()),
DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue
? p.DateOfBirth.Value.ToThaiShortDate()
: "",
Gender = p.Gendor,
Degree = p.Educations.First().Degree,
Major = p.Educations.First().Major,

View file

@ -192,7 +192,9 @@ namespace BMA.EHR.Report.Service.Controllers
CitizenId = p.CitizenId,
p.Prefix,
FullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
DateOfBirth = p.DateOfBirth.ToThaiShortDate(),
DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue
? p.DateOfBirth.Value.ToThaiShortDate()
: "",
Gender = p.Gendor,
Degree = p.Educations.First().Degree,
Major = p.Educations.First().Major,