10 changed files with 538 additions and 204 deletions
-
51src/Shentun.Peis.Application.Contracts/SumSuggestionHeaders/SumSuggestionDto.cs
-
32src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
-
5src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs
-
157src/Shentun.Peis.Application/SumSuggestionHeaders/SumSuggestionHeaderAppService.cs
-
38src/Shentun.Peis.Application/SumSummaryHeaders/SumSummaryHeaderAppService.cs
-
10src/Shentun.Peis.Domain.Shared/Enums/SuggestionTypeFlag.cs
-
78src/Shentun.Peis.Domain/SumSummaryHeaders/SumSummaryHeaderManager.cs
-
133test/Shentun.Peis.Application.Tests/PatientRegisterAppServiceTest.cs
-
44test/Shentun.Peis.Application.Tests/SumSuggestionHeaderAppServiceTest.cs
-
44test/Shentun.Peis.Application.Tests/SumSummaryHeaderAppServiceTest.cs
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.SumSuggestionHeaders |
|||
{ |
|||
public class SumSuggestionDto |
|||
{ |
|||
/// <summary>
|
|||
/// 建议标题
|
|||
/// </summary>
|
|||
public string SuggestionTitle { get; set; } |
|||
/// <summary>
|
|||
/// 建议标志
|
|||
/// </summary>
|
|||
public char? SuggestionFlag { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 诊断列表
|
|||
/// </summary>
|
|||
public List<Guid> DiagnosisIds { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 排序值
|
|||
/// </summary>
|
|||
public int DisplayOrder { get; set; } |
|||
/// <summary>
|
|||
/// 医学解释
|
|||
/// </summary>
|
|||
public List<SumSuggestionContentData> MedicalInterpretations = new List<SumSuggestionContentData>(); |
|||
/// <summary>
|
|||
/// 常见原因
|
|||
/// </summary>
|
|||
public List<SumSuggestionContentData> CommonReasons = new List<SumSuggestionContentData>(); |
|||
/// <summary>
|
|||
/// 健康指导
|
|||
/// </summary>
|
|||
public List<SumSuggestionContentData> HealthGuidances = new List<SumSuggestionContentData>(); |
|||
|
|||
|
|||
} |
|||
public class SumSuggestionContentData |
|||
{ |
|||
/// <summary>
|
|||
/// 建议内容
|
|||
/// </summary>
|
|||
public string SuggestionContent { get; set; } |
|||
|
|||
public int? DisplayOrder { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
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 Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6")); |
|||
foreach (var item in result) |
|||
{ |
|||
_output.WriteLine(item.SuggestionTitle); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
using Shentun.Peis.DiagnosisFunctions; |
|||
using Shentun.Peis.Models; |
|||
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 SumSummaryHeaderAppServiceTest:PeisApplicationTestBase |
|||
{ |
|||
private readonly IRepository<SumSummaryHeader, Guid> _repository; |
|||
private readonly SumSummaryHeaderAppService _appService; |
|||
private readonly ITestOutputHelper _output; |
|||
private readonly IUnitOfWorkManager _unitOfWorkManager; |
|||
public SumSummaryHeaderAppServiceTest(ITestOutputHelper testOutputHelper) |
|||
{ |
|||
_output = testOutputHelper; |
|||
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>(); |
|||
_repository = GetRequiredService<IRepository<SumSummaryHeader, Guid>>(); |
|||
_appService = GetRequiredService<SumSummaryHeaderAppService>(); |
|||
} |
|||
|
|||
[Fact] |
|||
public async Task GetSumSummaryListAsync() |
|||
{ |
|||
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) |
|||
{ |
|||
|
|||
var result = await _appService.GetSumSummaryListAsync(new Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6")); |
|||
foreach (var item in result) |
|||
{ |
|||
_output.WriteLine(item.SummaryTitle); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue