Browse Source

申请单

master
wxd 4 weeks ago
parent
commit
e8343532a1
  1. 24
      src/Shentun.Peis.Application.Contracts/LisRequests/GetRequestAsbitemByLisRequestIdListDto.cs
  2. 30
      src/Shentun.Peis.Application.Contracts/LisRequests/GetSendLisRequestListDto.cs
  3. 20
      src/Shentun.Peis.Application.Contracts/LisRequests/GetSendLisRequestListInputDto.cs
  4. 20
      src/Shentun.Peis.Application.Contracts/RegisterChecks/GetPacsRequestListByPatientRegisterIdInputDto.cs
  5. 79
      src/Shentun.Peis.Application/LisRequests/LisRequestAppService.cs
  6. 8
      src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs

24
src/Shentun.Peis.Application.Contracts/LisRequests/GetRequestAsbitemByLisRequestIdListDto.cs

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace Shentun.Peis.LisRequests
{
public class GetRequestAsbitemByLisRequestIdListDto
{
public string AsbitemName { get; set; }
public short Amount { get; set; }
/// <summary>
/// 标准价格
/// </summary>
public decimal StandardPrice { get; set; }
/// <summary>
/// 实收价格
/// </summary>
public decimal ChargePrice { get; set; }
}
}

30
src/Shentun.Peis.Application.Contracts/LisRequests/GetSendLisRequestListDto.cs

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.LisRequests
{
public class GetSendLisRequestListDto
{
/// <summary>
/// 申请Id
/// </summary>
public Guid LisRequestId { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 申请单号
/// </summary>
public string LisRequestNo { get; set; }
/// <summary>
/// 申请时间
/// </summary>
public string RequestDate { get; set; }
}
}

20
src/Shentun.Peis.Application.Contracts/LisRequests/GetSendLisRequestListInputDto.cs

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.LisRequests
{
public class GetSendLisRequestListInputDto
{
/// <summary>
/// 人员id
/// </summary>
public Guid PatientRegisterId { get; set; }
/// <summary>
/// 执行状态 0-未发送 1-已发送 2-已签收 3-已接收结果
/// 暂时只启用0 1
/// </summary>
public char ExecFlag { get; set; }
}
}

20
src/Shentun.Peis.Application.Contracts/RegisterChecks/GetPacsRequestListByPatientRegisterIdInputDto.cs

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.RegisterChecks
{
public class GetPacsRequestListByPatientRegisterIdInputDto
{
/// <summary>
/// 人员id
/// </summary>
public Guid PatientRegisterId { get; set; }
/// <summary>
/// 执行状态 0-未发送 1-已发送 2-已签收 3-已接收结果
/// 暂时只启用0 1
/// </summary>
public char ExecFlag { get; set; }
}
}

79
src/Shentun.Peis.Application/LisRequests/LisRequestAppService.cs

@ -841,6 +841,85 @@ namespace Shentun.Peis.LisRequests
#region 申请单操作
/// <summary>
/// lis申请单记录 未发生 已发送 都能查
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/LisRequest/GetSendLisRequestList")]
public async Task<List<GetSendLisRequestListDto>> GetSendLisRequestListAsync(GetSendLisRequestListInputDto input)
{
var query = from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on registerCheck.Id equals registerCheckAsbitem.RegisterCheckId
join lisRequest in await _lisRequestRepository.GetQueryableAsync() on registerCheckAsbitem.LisRequestId equals lisRequest.Id
where patientRegister.Id == input.PatientRegisterId
&& lisRequest.ExecFlag == input.ExecFlag
select new
{
patientRegister = new
{
patientRegister.PatientName
},
lisRequest
};
var entListDto = query.ToList().Select(s => new GetSendLisRequestListDto
{
LisRequestId = s.lisRequest.Id,
LisRequestNo = s.lisRequest.LisRequestNo,
PatientName = s.patientRegister.PatientName,
RequestDate = DataHelper.ConversionDateToString(s.lisRequest.CreationTime)
}).ToList();
return entListDto;
}
/// <summary>
/// 根据lis申请单获取申请单的项目
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/LisRequest/GetRequestAsbitemByLisRequestIdList")]
public async Task<List<GetRequestAsbitemByLisRequestIdListDto>> GetRequestAsbitemByLisRequestIdListAsync(LisRequestIdInputDto input)
{
var query = from lisRequest in await _lisRequestRepository.GetQueryableAsync()
join registerCheckAsbitem in await _registerCheckAsbitemRepository.GetQueryableAsync() on lisRequest.Id equals registerCheckAsbitem.LisRequestId
join asbitem in await _asbitemRepository.GetQueryableAsync() on registerCheckAsbitem.AsbitemId equals asbitem.Id
where lisRequest.Id == input.LisRequestId
select new
{
registerCheckAsbitem,
asbitem
};
var entListDto = query.ToList().Select(s => new GetRequestAsbitemByLisRequestIdListDto
{
AsbitemName = s.asbitem.DisplayName,
ChargePrice = s.registerCheckAsbitem.ChargePrice,
Amount = s.registerCheckAsbitem.Amount,
StandardPrice = s.registerCheckAsbitem.StandardPrice
}).ToList();
return entListDto;
}
/// <summary>
/// 创建申请单,根据人员id
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/LisRequest/CreateLisRequestByPatientRegisterId")]
public async Task CreateLisRequestByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
{
//生成LIS条码
await _lisRequestManager.SetLisRequestAsync(input.PatientRegisterId);
}
/// <summary>

8
src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs

@ -1101,8 +1101,13 @@ namespace Shentun.Peis.RegisterChecks
#region 申请单操作
/// <summary>
/// 根据人员id获取 pacs申请单记录
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/RegisterCheck/GetPacsRequestListByPatientRegisterId")]
public async Task<List<GetPacsRequestListByPatientRegisterIdDto>> GetPacsRequestListByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
public async Task<List<GetPacsRequestListByPatientRegisterIdDto>> GetPacsRequestListByPatientRegisterIdAsync(GetPacsRequestListByPatientRegisterIdInputDto input)
{
var query = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join registerCheck in await _registerCheckRepository.GetQueryableAsync() on patientRegister.Id equals registerCheck.PatientRegisterId
@ -1115,6 +1120,7 @@ namespace Shentun.Peis.RegisterChecks
&& asbitem.BarcodeMode == '0'
&& asbitem.IsCheck == 'Y'
&& itemType.IsCheckRequest == 'Y'
&& registerCheck.ExecFlag == input.ExecFlag
select new
{
patientRegister = new

Loading…
Cancel
Save