You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
4.2 KiB
109 lines
4.2 KiB
using Shentun.Peis.ImportPacsResults;
|
|
using Shentun.Utilities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Shentun.Peis.PlugIns.Gem.Test
|
|
{
|
|
public class ImportPacsResultPlugInsGemTest
|
|
{
|
|
private readonly ITestOutputHelper _output;
|
|
public ImportPacsResultPlugInsGemTest(ITestOutputHelper testOutputHelper)
|
|
{
|
|
_output = testOutputHelper;
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public async Task ImportResultAsync()
|
|
{
|
|
string configParm;
|
|
string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
|
|
configParm = File.ReadAllText(filePath);
|
|
|
|
var input = new ImportPacsResultPlugInsGem(configParm);
|
|
var loginResult = input.LoginAsync().Result;
|
|
var item = await input.ImportResultByPatientRegisterIdAsync(new Guid("3a127c60-cadf-0308-04c7-8f32a50181d8"));
|
|
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public async Task ImportResultCallAppServiceAsync()
|
|
{
|
|
string configParm;
|
|
string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
|
|
configParm = File.ReadAllText(filePath);
|
|
|
|
var input = new ImportPacsResultPlugInsGem(configParm);
|
|
var loginResult = input.LoginAsync().Result;
|
|
var createImportPacsResultDto = new CreateImportPacsResultDto()
|
|
{
|
|
CheckRequestNo = "2405140365",
|
|
PatientName = "李湘",
|
|
Result = "Pacs检查所见",
|
|
Summary = "Pacs结论",
|
|
Suggestion = "Pacs建议",
|
|
CheckDate = DateTime.Now,
|
|
CheckDoctorName = "张医生",
|
|
Files = new List<CreateImportPacsResultPictureDto>()
|
|
{
|
|
new CreateImportPacsResultPictureDto()
|
|
{
|
|
IsPrint = 'Y',
|
|
FileName = Guid.NewGuid().ToString(),
|
|
FileFormat = "0",
|
|
FileTransMode = "0",
|
|
FileBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\prog20220722\\pic\\login.png")
|
|
},
|
|
new CreateImportPacsResultPictureDto()
|
|
{
|
|
IsPrint = 'Y',
|
|
FileFormat = "0",
|
|
FileTransMode = "0",
|
|
FileName = Guid.NewGuid().ToString(),
|
|
FileBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\prog20220722\\pic\\首页背景图.jpg")
|
|
},
|
|
// new CreateImportPacsResultPictureDto()
|
|
//{
|
|
// IsPrint = 'Y',
|
|
// FileFormat = "1",
|
|
// FileTransMode = "0",
|
|
|
|
// FileName = "http://10.1.13.18:8380//image/66389af146ac4b27f4da93ff/risPdf/3135.pdf",
|
|
// FileUrl = "http://10.1.13.18:8380//image/66389af146ac4b27f4da93ff/risPdf/3135.pdf",
|
|
// FileBase64 = Shentun.Utilities.FileHelper.ToBase64("http://10.1.13.18:8380//image/66389af146ac4b27f4da93ff/risPdf/3135.pdf")
|
|
//},
|
|
}
|
|
};
|
|
|
|
var callResult = await input.CallAppServiceAsync<CreateImportPacsResultDto, object>("api/app/ImportPacsResult/ImportResult", createImportPacsResultDto);
|
|
|
|
//var item = await input.ImportResultAsync(
|
|
// new ImportPacsResultPlugInsInput()
|
|
// {
|
|
// PatientRegisterId = new Guid("3a127c60-cadf-0308-04c7-8f32a50181d8")
|
|
// });
|
|
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public async Task DoWorkAsync()
|
|
{
|
|
string configParm;
|
|
string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json";
|
|
configParm = File.ReadAllText(filePath);
|
|
|
|
var input = new ImportPacsResultPlugInsGem(new Guid("a3c68a4f-d3a8-463c-b671-389f1fb8d7d8"));
|
|
await input.DoWork();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|