Browse Source

体检报告

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
228c303ab9
  1. 23
      src/Shentun.Peis.Application.Contracts/PrintReports/MedicalReportDto.cs
  2. 50
      src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
  3. 2
      src/Shentun.Peis.Domain/ItemTypes/ItemTypeManager.cs

23
src/Shentun.Peis.Application.Contracts/PrintReports/MedicalReportDto.cs

@ -129,8 +129,11 @@ namespace Shentun.Peis.PrintReports
/// </summary>
public string MedicalCenterTelphone { get; set; }
#endregion
/// <summary>
/// 体检报告类别
/// </summary>
public List<MedicalReportMedicalReportTypeDto> MedicalReportTypes { get; set; } = new List<MedicalReportMedicalReportTypeDto>();
public List<MedicalReportItemTypeDto> ItemTypes { get; set; } = new List<MedicalReportItemTypeDto>();
#endregion
/// <summary>
/// 综述
@ -145,6 +148,8 @@ namespace Shentun.Peis.PrintReports
/// </summary>
public List<MedicalReportRegisterCheckDto> RegisterChecks { get; set; }
}
/// <summary>
/// 综述
@ -370,8 +375,20 @@ namespace Shentun.Peis.PrintReports
/// </summary>
public class MedicalReportItemTypeDto
{
public char ItemTypeId { get; set; }
/// <summary>
/// 项目类别编号
/// </summary>
public Guid ItemTypeId { get; set; }
/// <summary>
/// 项目类别多级编码
/// </summary>
public string PathCode { get; set; }
/// <summary>
/// 项目类别名
/// </summary>
public string ItemTypeName { get; set; }
public char IsTop { get; set; }
/// <summary>
/// 显示顺序
/// </summary>

50
src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs

@ -305,17 +305,9 @@ namespace Shentun.Peis.PrintReports
#endregion
var resultStatusList = (await _resultStatusRepository.GetListAsync());
//获取体检报告类别
var medicalReportTypes = (await _medicalReportTypeRepository.GetListAsync()).OrderBy(o=>o.DisplayOrder);
var MedicalReportMedicalReportTypeDtos = new List<MedicalReportMedicalReportTypeDto>();
foreach (var medicalReportType in medicalReportTypes)
{
MedicalReportMedicalReportTypeDtos.Add(new MedicalReportMedicalReportTypeDto()
{
MedicalReportTypeId = medicalReportType.Id,
MedicalReportTypeName = medicalReportType.DisplayName,
DisplayOrder = medicalReportType.DisplayOrder,
});
}
medicalReportDto.MedicalReportTypes = await GetMedicalReportTypeList();
//获取项目类别
medicalReportDto.ItemTypes = await GetItemTypeList();
#region 综述
var sumSummarylist = (await _sumSummaryHeaderRepository.GetDbSetAsync())
@ -480,5 +472,41 @@ namespace Shentun.Peis.PrintReports
return await _chargeReportRepository.GetChargeReportAsync(ChargeId);
}
private async Task<List<MedicalReportItemTypeDto>> GetItemTypeList()
{
var itemTypes = await _itemTypeRepository.GetListAsync();
var medicalReportItemTypeDtos = new List<MedicalReportItemTypeDto>();
foreach (var itemType in itemTypes)
{
var medicalReportItemTypeDto = new MedicalReportItemTypeDto()
{
ItemTypeId = itemType.Id,
ItemTypeName = itemType.DisplayName,
PathCode = itemType.PathCode,
DisplayOrder = itemType.DisplayOrder,
IsTop = 'N'
};
if(itemType.PathCode.Length <= 5)
{
medicalReportItemTypeDto.IsTop = 'Y';
}
}
return medicalReportItemTypeDtos;
}
private async Task<List<MedicalReportMedicalReportTypeDto>> GetMedicalReportTypeList()
{
var medicalReportTypes = (await _medicalReportTypeRepository.GetListAsync()).OrderBy(o => o.DisplayOrder);
var MedicalReportMedicalReportTypeDtos = new List<MedicalReportMedicalReportTypeDto>();
foreach (var medicalReportType in medicalReportTypes)
{
MedicalReportMedicalReportTypeDtos.Add(new MedicalReportMedicalReportTypeDto()
{
MedicalReportTypeId = medicalReportType.Id,
MedicalReportTypeName = medicalReportType.DisplayName,
DisplayOrder = medicalReportType.DisplayOrder,
});
}
return MedicalReportMedicalReportTypeDtos;
}
}
}

2
src/Shentun.Peis.Domain/ItemTypes/ItemTypeManager.cs

@ -229,6 +229,6 @@ namespace Shentun.Peis.ItemTypes
return itmeTypeIds;
}
}
}
Loading…
Cancel
Save