|
|
@ -15,6 +15,7 @@ using System.Threading.Tasks; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp.Application.Services; |
|
|
using Volo.Abp.Application.Services; |
|
|
using Volo.Abp.Domain.Repositories; |
|
|
using Volo.Abp.Domain.Repositories; |
|
|
|
|
|
using Volo.Abp.EntityFrameworkCore.PostgreSql; |
|
|
using Volo.Abp.Identity; |
|
|
using Volo.Abp.Identity; |
|
|
using Volo.Abp.ObjectMapping; |
|
|
using Volo.Abp.ObjectMapping; |
|
|
|
|
|
|
|
|
@ -35,7 +36,7 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
private readonly IRepository<PatientPastMedicalHistory, Guid> _patientPastMedicalHistoryRepository; |
|
|
private readonly IRepository<PatientPastMedicalHistory, Guid> _patientPastMedicalHistoryRepository; |
|
|
private readonly PatientOccupationalDiseaseManager _patientOccupationalDiseaseManager; |
|
|
private readonly PatientOccupationalDiseaseManager _patientOccupationalDiseaseManager; |
|
|
private readonly CacheService _cacheService; |
|
|
private readonly CacheService _cacheService; |
|
|
|
|
|
|
|
|
|
|
|
private readonly IRepository<Symptom, Guid> _symptomRepository; |
|
|
|
|
|
|
|
|
private readonly IRepository<Patient, Guid> _patientRepository; |
|
|
private readonly IRepository<Patient, Guid> _patientRepository; |
|
|
private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository; |
|
|
private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository; |
|
|
@ -327,7 +328,7 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
LastModifierId = s.LastModifierId, |
|
|
LastModifierId = s.LastModifierId, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
}).OrderBy(o => o.CreationTime).ToList(); |
|
|
|
|
|
|
|
|
result.PatientPoisonDtos = patientPoisonDtos; |
|
|
result.PatientPoisonDtos = patientPoisonDtos; |
|
|
|
|
|
|
|
|
@ -352,7 +353,7 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
LastModifierId = s.LastModifierId, |
|
|
LastModifierId = s.LastModifierId, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
}).OrderBy(o => o.CreationTime).ToList(); |
|
|
|
|
|
|
|
|
result.PatientOccupationalMedicalHistoryDtos = patientOccupationalMedicalHistoryDtos; |
|
|
result.PatientOccupationalMedicalHistoryDtos = patientOccupationalMedicalHistoryDtos; |
|
|
|
|
|
|
|
|
@ -377,7 +378,7 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
LastModifierId = s.LastModifierId, |
|
|
LastModifierId = s.LastModifierId, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
}).OrderBy(o => o.CreationTime).ToList(); |
|
|
|
|
|
|
|
|
result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryDtos; |
|
|
result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryDtos; |
|
|
|
|
|
|
|
|
@ -385,20 +386,31 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
|
|
|
|
|
|
#region 症状
|
|
|
#region 症状
|
|
|
|
|
|
|
|
|
var patientSymptomList = await _patientSymptomRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId); |
|
|
|
|
|
|
|
|
// var patientSymptomList = await _patientSymptomRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId);
|
|
|
|
|
|
var patientSymptomList = from patientSymptom in await _patientSymptomRepository.GetQueryableAsync() |
|
|
|
|
|
join symptom in await _symptomRepository.GetQueryableAsync() on patientSymptom.SymptomId equals symptom.Id into symptomTemp |
|
|
|
|
|
from symptomHaveEmpty in symptomTemp.DefaultIfEmpty() |
|
|
|
|
|
where patientSymptom.PatientRegisterId == input.PatientRegisterId |
|
|
|
|
|
select new |
|
|
|
|
|
{ |
|
|
|
|
|
patientSymptom, |
|
|
|
|
|
symptomName = symptomHaveEmpty != null ? symptomHaveEmpty.DisplayName : "" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PatientSymptomDto> patientSymptomDtos = patientSymptomList.Select(s => new PatientSymptomDto |
|
|
List<PatientSymptomDto> patientSymptomDtos = patientSymptomList.Select(s => new PatientSymptomDto |
|
|
{ |
|
|
{ |
|
|
Degree = s.Degree, |
|
|
|
|
|
SymptomId = s.SymptomId, |
|
|
|
|
|
TimeLength = s.TimeLength, |
|
|
|
|
|
CreationTime = s.CreationTime, |
|
|
|
|
|
CreatorId = s.CreatorId, |
|
|
|
|
|
LastModificationTime = s.LastModificationTime, |
|
|
|
|
|
LastModifierId = s.LastModifierId, |
|
|
|
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
|
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
Degree = s.patientSymptom.Degree, |
|
|
|
|
|
SymptomId = s.patientSymptom.SymptomId, |
|
|
|
|
|
TimeLength = s.patientSymptom.TimeLength, |
|
|
|
|
|
SymptomName = s.symptomName, |
|
|
|
|
|
CreationTime = s.patientSymptom.CreationTime, |
|
|
|
|
|
CreatorId = s.patientSymptom.CreatorId, |
|
|
|
|
|
LastModificationTime = s.patientSymptom.LastModificationTime, |
|
|
|
|
|
LastModifierId = s.patientSymptom.LastModifierId, |
|
|
|
|
|
CreatorName = _cacheService.GetSurnameAsync(s.patientSymptom.CreatorId).Result, |
|
|
|
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.patientSymptom.LastModifierId).Result |
|
|
|
|
|
}).OrderBy(o => o.CreationTime).ToList(); |
|
|
|
|
|
|
|
|
result.PatientSymptomDtos = patientSymptomDtos; |
|
|
result.PatientSymptomDtos = patientSymptomDtos; |
|
|
|
|
|
|
|
|
@ -425,7 +437,7 @@ namespace Shentun.Peis.OccupationalDiseases |
|
|
LastModificationTime = s.LastModificationTime, |
|
|
LastModificationTime = s.LastModificationTime, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result |
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
}).OrderBy(o => o.CreationTime).ToList(); |
|
|
|
|
|
|
|
|
result.PatientOccupationalHistoryDtos = patientOccupationalHistoryDtos; |
|
|
result.PatientOccupationalHistoryDtos = patientOccupationalHistoryDtos; |
|
|
|
|
|
|
|
|
|