18 changed files with 611 additions and 70 deletions
-
2src/Shentun.WebPeis.Application.Contracts/AppointPatientRegisters/CreateAppointPatientRegisterDto.cs
-
61src/Shentun.WebPeis.Application.Contracts/CustomerOrgs/CustomerOrgDto.cs
-
11src/Shentun.WebPeis.Application.Contracts/CustomerOrgs/CustomerOrgGroupIdInput.cs
-
1src/Shentun.WebPeis.Application.Contracts/MedicalPackages/MedicalPackageIdInput.cs
-
197src/Shentun.WebPeis.Application.Contracts/PatientRegisters/PatientRegisterDto.cs
-
128src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs
-
4src/Shentun.WebPeis.Application/Asbitems/AsbitemAppService.cs
-
107src/Shentun.WebPeis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs
-
14src/Shentun.WebPeis.Application/MedicalPackages/MedicalPackageAppservice.cs
-
21src/Shentun.WebPeis.Application/PatientRegisters/PatientRegisterAppService.cs
-
12src/Shentun.WebPeis.Application/Persons/PersonAppService.cs
-
1src/Shentun.WebPeis.Application/Shentun.WebPeis.Application.csproj
-
31src/Shentun.WebPeis.Domain.Shared/Enums/AppointPatientRegisterCompleteFlag.cs
-
6src/Shentun.WebPeis.Domain/AppointPatientRegisters/AppointPatientRegisterManager.cs
-
4src/Shentun.WebPeis.Domain/Models/AppointPatientRegister.cs
-
15src/Shentun.WebPeis.Domain/Models/RegisterCheck.cs
-
13src/Shentun.WebPeis.Domain/Models/RegisterCheckAsbitem.cs
-
1src/Shentun.WebPeis.EntityFrameworkCore/Configures/AppointPatientRegisterConfigure.cs
@ -0,0 +1,61 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.CustomerOrgs |
||||
|
{ |
||||
|
public class CustomerOrgDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 单位ID
|
||||
|
/// </summary>
|
||||
|
public Guid CustomerOrgId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 单位名称
|
||||
|
/// </summary>
|
||||
|
public string CustomerOrgName { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 简称
|
||||
|
/// </summary>
|
||||
|
public string ShortName { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 父编号
|
||||
|
/// </summary>
|
||||
|
public Guid? ParentId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 路径编码
|
||||
|
/// </summary>
|
||||
|
public string PathCode { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 拼音简码
|
||||
|
/// </summary>
|
||||
|
public string SimpleCode { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
public string? Remark { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public char IsActive { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 显示顺序
|
||||
|
/// </summary>
|
||||
|
public int DisplayOrder { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检中心ID
|
||||
|
/// </summary>
|
||||
|
public Guid MedicalCenterId { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.CustomerOrgs |
||||
|
{ |
||||
|
public class CustomerOrgGroupIdInput |
||||
|
{ |
||||
|
public Guid CustomerOrgGroupId { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,197 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.PatientRegisters |
||||
|
{ |
||||
|
public class PatientRegisterDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 登记流水号
|
||||
|
/// </summary>
|
||||
|
public Guid PatientRegisterId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 条码号
|
||||
|
/// </summary>
|
||||
|
public string PatientRegisterNo { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 档案号
|
||||
|
/// </summary>
|
||||
|
public Guid PatientId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检次数
|
||||
|
/// </summary>
|
||||
|
public short MedicalTimes { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 单位编号
|
||||
|
/// </summary>
|
||||
|
public Guid CustomerOrgId { get; set; } |
||||
|
|
||||
|
public string CustomerOrgName { get; set; } |
||||
|
|
||||
|
public string ChildCustomerOrgName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 分组
|
||||
|
/// </summary>
|
||||
|
public Guid? CustomerOrgGroupId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 套餐
|
||||
|
/// </summary>
|
||||
|
public Guid? MedicalPackageId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 姓名
|
||||
|
/// </summary>
|
||||
|
public string PatientName { get; set; } = null!; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 性别
|
||||
|
/// </summary>
|
||||
|
public char SexId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 出生日期
|
||||
|
/// </summary>
|
||||
|
public DateTime? BirthDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 年龄
|
||||
|
/// </summary>
|
||||
|
public short? Age { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工卡号
|
||||
|
/// </summary>
|
||||
|
public string? JobCardNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检卡号
|
||||
|
/// </summary>
|
||||
|
public string? MedicalCardNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 婚姻状况
|
||||
|
/// </summary>
|
||||
|
public char MaritalStatusId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检类别
|
||||
|
/// </summary>
|
||||
|
public Guid? MedicalTypeId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 人员类别
|
||||
|
/// </summary>
|
||||
|
public Guid? PersonnelTypeId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 职务
|
||||
|
/// </summary>
|
||||
|
public string? JobPost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 职称
|
||||
|
/// </summary>
|
||||
|
public string? JobTitle { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 照片
|
||||
|
/// </summary>
|
||||
|
public string? Photo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 性激素期限
|
||||
|
/// </summary>
|
||||
|
public Guid? SexHormoneTermId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 干预措施
|
||||
|
/// </summary>
|
||||
|
public char? InterposeMeasure { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检结论
|
||||
|
/// </summary>
|
||||
|
public Guid? MedicalConclusionId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 完成标志
|
||||
|
/// </summary>
|
||||
|
public char CompleteFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检开始标志
|
||||
|
/// </summary>
|
||||
|
public char IsMedicalStart { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检开始日期
|
||||
|
/// </summary>
|
||||
|
public DateTime MedicalStartDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 总检日期
|
||||
|
/// </summary>
|
||||
|
public DateTime? SummaryDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 审核
|
||||
|
/// </summary>
|
||||
|
public char IsAudit { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 审核日期
|
||||
|
/// </summary>
|
||||
|
public DateTime? AuditDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// vip客户
|
||||
|
/// </summary>
|
||||
|
public char IsVip { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 附加第三方信息
|
||||
|
/// </summary>
|
||||
|
public string? ThirdInfo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
public string? Remark { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 体检中心ID
|
||||
|
/// </summary>
|
||||
|
public Guid MedicalCenterId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 客户单位登记ID
|
||||
|
/// </summary>
|
||||
|
public Guid CustomerOrgRegisterId { get; set; } |
||||
|
|
||||
|
public string? ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 审核医生
|
||||
|
/// </summary>
|
||||
|
public Guid? AuditDoctorId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 总检医生
|
||||
|
/// </summary>
|
||||
|
public Guid? SummaryDoctorId { get; set; } |
||||
|
|
||||
|
public string? HisPatientId { get; set; } |
||||
|
|
||||
|
public string? ThirdRegisterId { get; set; } |
||||
|
|
||||
|
public string? ReportFile { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,107 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Shentun.WebPeis.customerOrgGroups; |
||||
|
using Shentun.WebPeis.CustomerOrgs; |
||||
|
using Shentun.WebPeis.Enums; |
||||
|
using Shentun.WebPeis.MedicalPackages; |
||||
|
using Shentun.WebPeis.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace Shentun.WebPeis.CustomerOrgGroups |
||||
|
{ |
||||
|
public class CustomerOrgGroupAppService : ApplicationService |
||||
|
{ |
||||
|
private readonly IRepository<CustomerOrgGroup> _repository; |
||||
|
private readonly IRepository<Asbitem> _asbitemRepository; |
||||
|
private readonly IRepository<ItemType> _itemTypeRepository; |
||||
|
private readonly IRepository<CustomerOrgGroupDetail> _customerOrgGroupDetailRepository; |
||||
|
private readonly CacheService _cacheService; |
||||
|
|
||||
|
public CustomerOrgGroupAppService(IRepository<CustomerOrgGroup> repository, |
||||
|
CacheService cacheService, |
||||
|
IRepository<Asbitem> asbitemRepository, |
||||
|
IRepository<CustomerOrgGroupDetail> customerOrgGroupDetailRepository, |
||||
|
IRepository<ItemType> itemTypeRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_cacheService = cacheService; |
||||
|
_asbitemRepository = asbitemRepository; |
||||
|
_customerOrgGroupDetailRepository = customerOrgGroupDetailRepository; |
||||
|
_itemTypeRepository = itemTypeRepository; |
||||
|
|
||||
|
} |
||||
|
/* |
||||
|
/// <summary>
|
||||
|
/// 获取分组组合项目,暂时不起作用,由GetCheckTypeWithAsbitemsListByMedicalPackageId取代
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/app/CustomerOrgGroup/GetCheckTypeWithAsbitemsListByCustomerOrgGroupId")] |
||||
|
//[AllowAnonymous]
|
||||
|
public async Task<List<MedicalPackageCheckTypeWithAsbitemsDto>> GetCheckTypeWithAsbitemsListByCustomerOrgGroupIdAsync(CustomerOrgGroupIdInput input) |
||||
|
{ |
||||
|
//获取套餐所有组合项目
|
||||
|
var asbitems = (from customerOrgGroupDetail in await _customerOrgGroupDetailRepository.GetQueryableAsync() |
||||
|
join asbitem in await _asbitemRepository.GetQueryableAsync() |
||||
|
on customerOrgGroupDetail.AsbitemId equals asbitem.AsbitemId |
||||
|
where customerOrgGroupDetail.CustomerOrgGroupId == input.CustomerOrgGroupId |
||||
|
select new MedicalPackageAsbitem() |
||||
|
{ |
||||
|
ItemTypeId = asbitem.ItemTypeId, |
||||
|
AsbitemId = asbitem.AsbitemId, |
||||
|
AsbitemName = asbitem.AsbitemName, |
||||
|
ShortName = asbitem.ShortName, |
||||
|
Price = asbitem.Price, |
||||
|
ForSexId = asbitem.ForSexId, |
||||
|
//ForSexName = _cacheService.GetForSexNameAsync(asbitem.ForSexId).Result,
|
||||
|
IsBeforeEat = asbitem.IsBeforeEat, |
||||
|
ClinicalMeaning = asbitem.ClinicalMeaning, |
||||
|
IsCheck = asbitem.IsCheck, |
||||
|
Warn = asbitem.Warn, |
||||
|
DiseaseScreeningTypeId = asbitem.DiseaseScreeningTypeId, |
||||
|
SimpleCode = asbitem.SimpleCode, |
||||
|
DisplayOrder = asbitem.DisplayOrder, |
||||
|
} |
||||
|
).ToList(); |
||||
|
|
||||
|
//获取检查分类
|
||||
|
var customerOrgGroupAsbitemDtos = new List<MedicalPackageCheckTypeWithAsbitemsDto>() |
||||
|
{ |
||||
|
new MedicalPackageCheckTypeWithAsbitemsDto(){CheckTypeFlag = CheckTypeFlag.Regular,CheckTypeFlagName = "科室检查",DisplayOrder = 1}, |
||||
|
new MedicalPackageCheckTypeWithAsbitemsDto(){CheckTypeFlag = CheckTypeFlag.Laboratory,CheckTypeFlagName = "检验",DisplayOrder = 2}, |
||||
|
new MedicalPackageCheckTypeWithAsbitemsDto(){CheckTypeFlag =CheckTypeFlag.SpecialInspection,CheckTypeFlagName = "特检",DisplayOrder = 3}, |
||||
|
new MedicalPackageCheckTypeWithAsbitemsDto(){CheckTypeFlag = CheckTypeFlag.Radiology,CheckTypeFlagName = "放射",DisplayOrder = 4} |
||||
|
}; |
||||
|
|
||||
|
var itemTypes = await _itemTypeRepository.GetListAsync(); |
||||
|
foreach (var asbitem in asbitems) |
||||
|
{ |
||||
|
asbitem.ForSexName = await _cacheService.GetForSexNameAsync(asbitem.ForSexId); |
||||
|
var itemType = itemTypes.Where(o => o.ItemTypeId == asbitem.ItemTypeId).Single(); |
||||
|
if (itemType.PathCode.Length > 5) |
||||
|
{ |
||||
|
itemType = itemTypes.Where(o => o.PathCode == itemType.PathCode.Substring(0, 5)).Single(); |
||||
|
asbitem.ItemTypeId = itemType.ItemTypeId; |
||||
|
} |
||||
|
asbitem.CheckTypeFlag = itemType.CheckTypeFlag; |
||||
|
} |
||||
|
//设置每个分类包含的组合项目
|
||||
|
foreach (var customerOrgGroupAsbitemDto in customerOrgGroupAsbitemDtos) |
||||
|
{ |
||||
|
customerOrgGroupAsbitemDto.Asbitems = asbitems.Where(o => o.CheckTypeFlag == customerOrgGroupAsbitemDto.CheckTypeFlag).ToList(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
return customerOrgGroupAsbitemDtos; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
*/ |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue