Browse Source

条码

bjmzak
wxd 1 year ago
parent
commit
ed5afb65ae
  1. 13
      src/Shentun.Peis.Application.Contracts/PrintReports/PacsNoReportInputDto.cs
  2. 12
      src/Shentun.Peis.Application.Contracts/PrintReports/RegisterCheckIdsInputDto.cs
  3. 2
      src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs
  4. 44
      src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
  5. 2
      src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs
  6. 5
      src/Shentun.Peis.Domain/PrintReports/PacsNoReportDto.cs
  7. 13
      src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs

13
src/Shentun.Peis.Application.Contracts/PrintReports/PacsNoReportInputDto.cs

@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.PrintReports
{
public class PacsNoReportInputDto
{
public Guid PatientRegisterId { get; set; }
public List<string> CheckRequestNos { get; set; }
}
}

12
src/Shentun.Peis.Application.Contracts/PrintReports/RegisterCheckIdsInputDto.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.PrintReports
{
public class RegisterCheckIdsInputDto
{
public List<Guid> RegisterCheckIds { get; set; }
}
}

2
src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs

@ -293,7 +293,7 @@ namespace Shentun.Peis.PeisReports
IsReportPrint = s.a.ReportPrintTimes > 0 ? 'Y' : 'N',
MedicalPackageName = s.ad.DisplayName,
MedicalTypeName = s.ae.DisplayName,
MobileTelephone = s.ab.DisplayName,
MobileTelephone = s.ab.MobileTelephone,
PatientNo = s.ab.PatientNo,
PatientRegisterNo = s.a.PatientRegisterNo,
PersonnelTypeName = s.af.DisplayName,

44
src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs

@ -220,7 +220,7 @@ namespace Shentun.Peis.PrintReports
MedicalStartDate = Convert.ToDateTime(a.MedicalStartDate.ToString()).ToString("yyyy-MM-dd"),
OrganizationUnitId = a.MedicalCenterId,
OrganizationUnitName = ag.DisplayName,
Detail = PatientRegisterGuideAsbitem(a.Id, medicalCenterId, a.SexId),
Detail = PatientRegisterGuideAsbitem(a.Id, a.PatientRegisterNo, medicalCenterId, a.SexId),
HisPatientId = a.HisPatientId
};
@ -488,6 +488,7 @@ namespace Shentun.Peis.PrintReports
Age = patientRegister.Age,
AsbitemName = asbitemHaveEmpty.DisplayName,
CheckRequestNo = registerCheck.CheckRequestNo,
RegisterCheckId = registerCheck.Id,
PatientName = patientRegister.PatientName,
PatientRegisterNo = patientRegister.PatientRegisterNo,
SexName = _cacheService.GetSexNameAsync(patientRegister.SexId).Result,
@ -512,6 +513,7 @@ namespace Shentun.Peis.PrintReports
Age = s.FirstOrDefault().Age,
AsbitemName = string.Join(',', s.Select(s => s.AsbitemName)),
CheckRequestNo = s.FirstOrDefault().CheckRequestNo,
RegisterCheckId = s.FirstOrDefault().RegisterCheckId,
PatientName = s.FirstOrDefault().PatientName,
PatientRegisterNo = s.FirstOrDefault().PatientRegisterNo,
SexName = s.FirstOrDefault().SexName,
@ -526,6 +528,7 @@ namespace Shentun.Peis.PrintReports
Age = s.FirstOrDefault().Age,
AsbitemName = string.Join(',', s.Select(s => s.AsbitemName)),
CheckRequestNo = s.FirstOrDefault().PatientRegisterNo,
RegisterCheckId = s.FirstOrDefault().RegisterCheckId,
PatientName = s.FirstOrDefault().PatientName,
PatientRegisterNo = s.FirstOrDefault().PatientRegisterNo,
SexName = s.FirstOrDefault().SexName,
@ -548,12 +551,12 @@ namespace Shentun.Peis.PrintReports
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PrintReport/GetPacsNoReportByCheckRequestNo")]
public async Task<List<PacsNoReportDto>> GetPacsNoReportByCheckRequestNoAsync(PacsNoReportInputDto input)
public async Task<List<PacsNoReportDto>> GetPacsNoReportByCheckRequestNoAsync(RegisterCheckIdsInputDto input)
{
List<PacsNoReportDto> pacsNoReportDtos = new List<PacsNoReportDto>();
if (input.CheckRequestNos.Count > 0)
if (input.RegisterCheckIds.Count > 0)
{
var query = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
@ -562,7 +565,7 @@ namespace Shentun.Peis.PrintReports
from asbitemHaveEmpty in asbitemTemp.DefaultIfEmpty()
join itemType in await _itemTypeRepository.GetQueryableAsync() on asbitemHaveEmpty.ItemTypeId equals itemType.Id into itemTypeTemp
from itemTypeHaveEmpty in itemTypeTemp.DefaultIfEmpty()
where (patientRegister.Id == input.PatientRegisterId
where (input.RegisterCheckIds.Contains(registerCheck.Id)
&& !string.IsNullOrEmpty(registerCheck.CheckRequestNo)
&& asbitemHaveEmpty.BarcodeMode != '2'
)
@ -582,7 +585,7 @@ namespace Shentun.Peis.PrintReports
var queryGroup = query.GroupBy(g => g.CheckRequestNo);
foreach (var s in queryGroup)
{
if (s.Where(m => m.BarcodeMode == '0' && m.IsCheckRequest == 'Y').Count() > 0)
@ -615,8 +618,8 @@ namespace Shentun.Peis.PrintReports
}
}
pacsNoReportDtos = pacsNoReportDtos.Where(m => input.CheckRequestNos.Contains(m.CheckRequestNo)).ToList();
}
return pacsNoReportDtos;
}
@ -777,7 +780,7 @@ namespace Shentun.Peis.PrintReports
SuggestionFlag = s.SuggestionFlag,
DisplayOrder = s.DisplayOrder,
MedicalInterpretations = s.SumSuggestionContents.
Where(o => o.SuggestionType == SuggestionTypeFlag.MedicalInterpretation&&!string.IsNullOrWhiteSpace( o.SuggestionContent))
Where(o => o.SuggestionType == SuggestionTypeFlag.MedicalInterpretation && !string.IsNullOrWhiteSpace(o.SuggestionContent))
.OrderBy(o => o.DisplayOrder)
.Select(sa => new MedicalReportSumSuggestionContentDto
{
@ -987,11 +990,12 @@ namespace Shentun.Peis.PrintReports
return MedicalReportMedicalReportTypeDtos;
}
private static List<PatientRegisterGuideReport_Detail> PatientRegisterGuideAsbitem(Guid PatientRegisterId, Guid medicalCenterId, char SexId)
private static List<PatientRegisterGuideReport_Detail> PatientRegisterGuideAsbitem(Guid PatientRegisterId, string PatientRegisterNo, Guid medicalCenterId, char SexId)
{
var entlist = _registerCheckAsbitemStaticRepository.GetQueryableAsync().Result
.Include(x => x.Asbitem.ItemType)
.Include(x => x.Asbitem.ItemType.GuidType)
.Include(x => x.RegisterCheck)
.Where(m => m.PatientRegisterId == PatientRegisterId && m.Asbitem.IsCheck == 'Y')
.Select(s => new PatientRegisterGuideReport_Asbitem_Temp
{
@ -1000,7 +1004,8 @@ namespace Shentun.Peis.PrintReports
AsbitemDisplayOrder = s.Asbitem.DisplayOrder,
ItemTypeDisplayOrder = s.Asbitem.ItemType.DisplayOrder,
GuideDisplayOrder = s.Asbitem.ItemType.GuidType.DisplayOrder,
GuideName = s.Asbitem.ItemType.GuidType.DisplayName
GuideName = s.Asbitem.ItemType.GuidType.DisplayName,
CheckRequestNo = GetCheckRequestNobyAsbitem(s.Asbitem, PatientRegisterNo, s.RegisterCheck.CheckRequestNo, s.Asbitem.ItemType.IsCheckRequest)
})
.OrderBy(o => o.GuideDisplayOrder)
.GroupBy(g => new { g.GuideName, g.GuideDisplayOrder })
@ -1013,7 +1018,8 @@ namespace Shentun.Peis.PrintReports
{
AsbitemName = ss.AsbitemName,
AsbitemGuide = ss.AsbitemGuide,
DisplayOrder = (ss.ItemTypeDisplayOrder * 3000) + ss.AsbitemDisplayOrder
DisplayOrder = (ss.ItemTypeDisplayOrder * 3000) + ss.AsbitemDisplayOrder,
CheckRequestNo = ss.CheckRequestNo
}).OrderBy(o => o.DisplayOrder).ToList()
}).OrderBy(o => o.DisplayOrder).ToList();
@ -1023,5 +1029,23 @@ namespace Shentun.Peis.PrintReports
return entlist;
}
/// <summary>
/// 获取检查单号
/// </summary>
/// <returns></returns>
private static string GetCheckRequestNobyAsbitem(Asbitem asbitem, string PatientRegisterNo, string CheckRequestNo, char IsCheckRequest)
{
string result = "";
if (asbitem.BarcodeMode == BarcodeModeFlag.UsingItemType && IsCheckRequest == 'Y')
{
result = CheckRequestNo;
}
else if (asbitem.BarcodeMode == BarcodeModeFlag.PrintPatientRegisterNumber)
{
result = PatientRegisterNo;
}
return result;
}
}
}

2
src/Shentun.Peis.Domain/LisRequests/LisRequestManager.cs

@ -144,7 +144,7 @@ namespace Shentun.Peis.LisRequests
continue;
}
var haveRegisterCheckAsbitemLis = registerCheckAsbitemLisList.Where(o => o.SampleGroupId == registerCheckAsbitemLis.SampleGroupId
&& o.LisRequestId != null && o.LisRequestId != Guid.Empty).SingleOrDefault();
&& o.LisRequestId != null && o.LisRequestId != Guid.Empty).FirstOrDefault();
if (haveRegisterCheckAsbitemLis != null)
{
registerCheckAsbitem.LisRequestId = haveRegisterCheckAsbitemLis.LisRequestId;

5
src/Shentun.Peis.Domain/PrintReports/PacsNoReportDto.cs

@ -23,7 +23,10 @@ namespace Shentun.Peis.PrintReports
/// </summary>
public short? Age { get; set; }
/// <summary>
/// RegisterCheckId
/// </summary>
public Guid RegisterCheckId { get; set; }
/// <summary>
/// Pacs申请号

13
src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs

@ -178,6 +178,12 @@ namespace Shentun.Peis.PrintReports
/// 指引单提示信息
/// </summary>
public string AsbitemGuide { get; set; }
/// <summary>
/// 检查条码
/// </summary>
public string CheckRequestNo { get; set; }
public int DisplayOrder { get; set; }
}
@ -193,6 +199,13 @@ namespace Shentun.Peis.PrintReports
public int AsbitemDisplayOrder { get; set; }
public int ItemTypeDisplayOrder { get; set; }
/// <summary>
/// 检查条码
/// </summary>
public string CheckRequestNo { get; set; }
/// <summary>
/// 指引名称
/// </summary>

Loading…
Cancel
Save