Browse Source

导入结果

bjmzak
DESKTOP-G961P6V\Zhh 1 year ago
parent
commit
23b5991916
  1. 3
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPacsResultPlugInsGemTest.cs
  2. 2
      src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs
  3. 2
      src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs
  4. 2
      src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs
  5. 2
      src/Shentun.Peis.Application.Contracts/ImportPacsResults/CreateImportPacsResultDto.cs
  6. 19
      src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs
  7. 7
      test/Shentun.Peis.Application.Tests/ImportPacsResultAppServiceTest.cs

3
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPacsResultPlugInsGemTest.cs

@ -25,10 +25,11 @@ namespace Shentun.Peis.PlugIns.Gem.Test
configParm = File.ReadAllText(filePath);
var input = new ImportPacsResultPlugInsGem(configParm);
var loginResult = input.LoginAsync().Result;
var item = await input.ImportResultAsync(
new ImportPacsResultPlugInsInput()
{
PatientRegisterId = new Guid("3a128200-3d63-95cd-f870-635df8e999f2")
PatientRegisterId = new Guid("3a127c60-cadf-0308-04c7-8f32a50181d8")
});

2
src/Shentun.ColumnReferencePlugIns/ImportLisResultPlugInsBase.cs

@ -59,7 +59,7 @@ namespace Shentun.Peis.PlugIns
WHERE lis_request.id = register_check_asbitem.lis_request_id and
register_check_asbitem.register_check_id = register_check.id and
register_check.patient_register_id = patient_register.id and
(patient_register.complete_flag = '0' or
(
patient_register.complete_flag = '1' or
patient_register.complete_flag = '2') and
lis_request.creation_time > @StartDate

2
src/Shentun.ColumnReferencePlugIns/ImportPacsResultPlugInsBase.cs

@ -62,7 +62,7 @@ JOIN asbitem on register_check_asbitem.asbitem_id = asbitem.id
JOIN item_type on asbitem.item_type_id = item_type.id
where
item_type.is_check_request = 'Y' and
(patient_register.complete_flag = '0' or
(
patient_register.complete_flag = '1' or
patient_register.complete_flag = '2') and
patient_register.medical_start_date >@StartDate and

2
src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs

@ -197,7 +197,7 @@ namespace Shentun.Peis.PlugIns
return Task.CompletedTask;
}
protected async virtual Task<LoginOutDto> LoginAsync()
public async virtual Task<LoginOutDto> LoginAsync()
{
var relult = await LoginAsync(SelfUser, SelfPassword);
return relult;

2
src/Shentun.Peis.Application.Contracts/ImportPacsResults/CreateImportPacsResultDto.cs

@ -71,7 +71,7 @@ namespace Shentun.Peis.ImportPacsResults
/// 0-json,1-url
/// </summary>
public string FileTransMode { get; set; }
public string FileTransMode { get; set; }
/// <summary>
/// 文件名
/// </summary>

19
src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs

@ -16,6 +16,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.Xml;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
@ -28,7 +29,7 @@ using Volo.Abp.Users;
namespace Shentun.Peis.ImportPacsResults
{
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
//[Authorize]
public class ImportPacsResultAppService : ApplicationService
{
private readonly IRepository<RegisterCheckItem> _registerCheckItemRepository;
@ -190,6 +191,22 @@ namespace Shentun.Peis.ImportPacsResults
string pictureUrl;
foreach (var file in input.Files)
{
if(string.IsNullOrWhiteSpace(file.FileTransMode))
{
throw new UserFriendlyException("文件传输模式不能为空");
}
if (string.IsNullOrWhiteSpace(file.FileFormat))
{
throw new UserFriendlyException("文件格式不能为空");
}
if(file.FileTransMode != "0" && file.FileTransMode != "1")
{
throw new UserFriendlyException("文件传输模式不正确");
}
if (file.FileFormat != "0" && file.FileFormat != "1")
{
throw new UserFriendlyException("文件格式不正确");
}
string fileName;
if (string.IsNullOrWhiteSpace(file.FileName))
{

7
test/Shentun.Peis.Application.Tests/ImportPacsResultAppServiceTest.cs

@ -35,8 +35,8 @@ namespace Shentun.Peis
var entity = new CreateImportPacsResultDto()
{
CheckRequestNo = "2405112185",
PatientName = "测试pacs",
CheckRequestNo = "2405140365",
PatientName = "李湘",
Result = "Pacs检查所见",
Summary = "Pacs结论",
Suggestion = "Pacs建议",
@ -62,8 +62,9 @@ namespace Shentun.Peis
{
IsPrint = 'Y',
FileFormat = "1",
FileTransMode = "0",
FileName = Guid.NewGuid().ToString(),
FileBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\doc\\体检中心排队系统.pdf")
FileBase64 = Shentun.Utilities.FileHelper.ToBase64("http://10.1.13.18:8380//image/66389af146ac4b27f4da93ff/risPdf/3135.pdf")
},
}
};

Loading…
Cancel
Save