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.
61 lines
2.4 KiB
61 lines
2.4 KiB
using Shentun.Peis.Models;
|
|
using Shentun.Peis.SumSuggestionHeaders;
|
|
using Shentun.Peis.SumSummaryHeaders;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Domain.Repositories;
|
|
using Volo.Abp.Uow;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Shentun.Peis
|
|
{
|
|
public class SumSuggestionHeaderAppServiceTest : PeisApplicationTestBase
|
|
{
|
|
private readonly IRepository<SumSuggestionHeader, Guid> _repository;
|
|
private readonly SumSuggestionHeaderAppService _appService;
|
|
private readonly ITestOutputHelper _output;
|
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
|
public SumSuggestionHeaderAppServiceTest(ITestOutputHelper testOutputHelper)
|
|
{
|
|
_output = testOutputHelper;
|
|
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
|
|
_repository = GetRequiredService<IRepository<SumSuggestionHeader, Guid>>();
|
|
_appService = GetRequiredService<SumSuggestionHeaderAppService>();
|
|
}
|
|
|
|
[Fact]
|
|
public async Task GetSumSuggestionListAsync()
|
|
{
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
|
|
{
|
|
|
|
var result = await _appService.GetSumSuggestionListAsync(new PatientRegisters.PatientRegisterSumInputDto()
|
|
{ PatientRegisterId = new Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6") });
|
|
foreach (var item in result)
|
|
{
|
|
_output.WriteLine("标题:" + item.SuggestionTitle);
|
|
foreach(var item2 in item.DiagnosisIds)
|
|
{
|
|
_output.WriteLine("诊断:" + item2.ToString() );
|
|
}
|
|
foreach (var item2 in item.MedicalInterpretations)
|
|
{
|
|
_output.WriteLine("医学解释:" + item2.SuggestionContent);
|
|
}
|
|
foreach (var item2 in item.CommonReasons)
|
|
{
|
|
_output.WriteLine("常见原因:" + item2.SuggestionContent);
|
|
}
|
|
foreach (var item2 in item.HealthGuidances)
|
|
{
|
|
_output.WriteLine("健康指导:" + item2.SuggestionContent);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|