wxd 4 weeks ago
parent
commit
4e3be40cc4
  1. 4
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportLisResults/AiDiKang/ImportLisResultPlugInsAiDiKang.cs
  2. 7
      src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs
  3. 3
      src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs
  4. 31
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  5. 3
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  6. 8
      src/Shentun.Peis.Domain/DataHelper.cs

4
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportLisResults/AiDiKang/ImportLisResultPlugInsAiDiKang.cs

@ -133,7 +133,9 @@ namespace Shentun.Peis.PlugIns.Extensions.ImportLisResults.AiDiKang
{
//检查完
var sdsd = client.GetJSONReportItemListByCustomerBarocdeAsync(barCode, aiDiKangKeyValue);
var sdsd = await client.GetJSONReportItemListByCustomerBarocdeAsync(barCode, aiDiKangKeyValue);
var sdsd2 = await client.GetReportItemListByCustomerBarocdeAsync(aiDiKangKeyValue, barCode, "常规报告");
}
////病理结果

7
src/Shentun.Peis.Application/CustomerReports/CustomerReportAppService.cs

@ -228,7 +228,7 @@ namespace Shentun.Peis.CustomerReports
PatientName = s.Key.PatientName,
Age = s.Key.Age,
PatientNo = s.FirstOrDefault().patient.PatientNo,
DiagnosisNames = string.Join(",", s.Where(m => m.diagnosisEmptyHave != null).Select(sa => sa.diagnosisEmptyHave.DisplayName)),
DiagnosisNames = string.Join(";", s.Where(m => m.diagnosisEmptyHave != null).Select((sa, index) => $"{(index + 1).ToCircledNumber()}.{sa.diagnosisEmptyHave.DisplayName}")),
SexName = _cacheService.GetSexNameAsync(s.Key.SexId).GetAwaiter().GetResult(),
MedicalTimes = s.Key.MedicalTimes,
MobileTelephone = s.FirstOrDefault().patient.MobileTelephone,
@ -450,8 +450,11 @@ namespace Shentun.Peis.CustomerReports
if (diagnosisNameDetail.Count > 0)
{
//诊断数据
patientRegisterTemp.DiagnosisNames = string.Join(",", diagnosisNameDetail);
// patientRegisterTemp.DiagnosisNames = string.Join(",", diagnosisNameDetail);
patientRegisterTemp.DiagnosisNames = string.Join(";", diagnosisNameDetail.Select((sa, index) => $"{(index + 1).ToCircledNumber()}.{sa}"));
if (input.IsSumSummary == 'Y')
{
//处理综述

3
src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs

@ -333,12 +333,11 @@ namespace Shentun.Peis.ImportLisResults
/// <summary>
/// 导入迪安结果 外检
/// 导入迪安、艾迪康结果 外检
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/ImportLisResult/ImportDianResultByPatientRegisterId")]
[AllowAnonymous]
public async Task ImportDianResultByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
{
var patientRegister = await _patientRegisterRepository.GetAsync(input.PatientRegisterId);

31
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -2370,8 +2370,8 @@ namespace Shentun.Peis.PatientRegisters
ReportPrintTimes = patientRegisterFirst.ReportPrintTimes,
Salesman = patientRegisterFirst.Salesman,
SexHormoneTermId = patientRegisterFirst.SexHormoneTermId,
CreatorName = "",
LastModifierName = "",
CreatorName = _cacheService.GetSurnameAsync(patientRegisterFirst.CreatorId).GetAwaiter().GetResult(),
LastModifierName = _cacheService.GetSurnameAsync(patientRegisterFirst.LastModifierId).GetAwaiter().GetResult(),
Address = patientFirst.Address, //档案表信息
BirthPlaceId = patientFirst.BirthPlaceId,
DisplayName = patientFirst.DisplayName,
@ -2391,7 +2391,9 @@ namespace Shentun.Peis.PatientRegisters
PersonnelTypeName = _cacheService.GetPersonnelTypeNameAsync(patientRegisterFirst.PersonnelTypeId).GetAwaiter().GetResult(),
MaritalStatusName = _cacheService.GetMaritalStatusNameAsync(patientRegisterFirst.MaritalStatusId).GetAwaiter().GetResult(),
MedicalTypeName = _cacheService.GetMedicalTypeNameAsync(patientRegisterFirst.MedicalTypeId).GetAwaiter().GetResult(),
SexName = _cacheService.GetSexNameAsync(patientRegisterFirst.SexId).GetAwaiter().GetResult()
SexName = _cacheService.GetSexNameAsync(patientRegisterFirst.SexId).GetAwaiter().GetResult(),
SummaryDoctorName = _cacheService.GetSurnameAsync(patientRegisterFirst.SummaryDoctorId).GetAwaiter().GetResult(),
AuditDoctorName = _cacheService.GetSurnameAsync(patientRegisterFirst.AuditDoctorId).GetAwaiter().GetResult()
});
}
@ -2666,8 +2668,8 @@ namespace Shentun.Peis.PatientRegisters
ReportPrintTimes = s.FirstOrDefault().a.ReportPrintTimes,
Salesman = s.FirstOrDefault().a.Salesman,
SexHormoneTermId = s.FirstOrDefault().a.SexHormoneTermId,
CreatorName = "",
LastModifierName = "",
CreatorName = _cacheService.GetSurnameAsync(s.FirstOrDefault().a.CreatorId).GetAwaiter().GetResult(),
LastModifierName = _cacheService.GetSurnameAsync(s.FirstOrDefault().a.LastModifierId).GetAwaiter().GetResult(),
Address = s.FirstOrDefault().ab.Address, //档案表信息
BirthPlaceId = s.FirstOrDefault().ab.BirthPlaceId,
DisplayName = s.FirstOrDefault().ab.DisplayName,
@ -3462,10 +3464,26 @@ namespace Shentun.Peis.PatientRegisters
if (patientList.Where(m => m.DisplayName == input.PatientName).Count() == 0)
throw new UserFriendlyException("系统中已有该身份证号的不同姓名人员");
else
{
patientList = patientList.Where(m => m.DisplayName == input.PatientName).ToList();
if (patientList.Count > 1)
{
var tPatientRegisterList = await _repository.GetListAsync(m => patientList.Select(s => s.Id).Contains(m.PatientId));
if (tPatientRegisterList.Count > 0)
{
patient = patientList.FirstOrDefault(f => f.Id == tPatientRegisterList.OrderByDescending(o => o.MedicalTimes).Select(s => s.PatientId).FirstOrDefault());
}
else
{
patient = patientList.FirstOrDefault(f => f.DisplayName == input.PatientName);
}
}
else
{
patient = patientList.FirstOrDefault(f => f.DisplayName == input.PatientName);
}
}
}
}
if (!string.IsNullOrWhiteSpace(input.PatientNo))
@ -3538,9 +3556,12 @@ namespace Shentun.Peis.PatientRegisters
}
#endregion
if (newUpdatePatientEntity != patient)
{
await _patientManager.UpdateAsync(newUpdatePatientEntity, patient);
await _patientRepository.UpdateAsync(patient, true);
}
}
Guid? customerOrgId = await GetCustomerOrgIdByName(input.CustomerOrgId, input.DepartmentName, input.IsAutoCreateDepartment);
if (customerOrgId == null)
{

3
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -472,7 +472,8 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<UpdateCardTypeDto, CardType>();
CreateMap<CardRegister, CardRegisterDto>();
//CreateMap<CardRegister, CardRegisterDto>();
CreateMap<CardRegister, CardRegisterDto>().ForMember(d => d.ExpiryDate, opt => opt.MapFrom(src => DataHelper.ConversionDateToString(src.ExpiryDate)));
CreateMap<CreateCardRegisterDto, CardRegister>().ForMember(d => d.ExpiryDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.ExpiryDate)));
CreateMap<UpdateCardRegisterDto, CardRegister>().ForMember(d => d.ExpiryDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.ExpiryDate)));

8
src/Shentun.Peis.Domain/DataHelper.cs

@ -777,5 +777,13 @@ namespace Shentun.Peis
}
public static string ToCircledNumber(this int number)
{
if (number < 1 || number > 20) return number.ToString();
// ① 到 ⑳ 的 Unicode 编码范围是 9312 到 9331
char circledNumber = (char)(9311 + number);
return circledNumber.ToString();
}
}
}
Loading…
Cancel
Save