Browse Source

1021

master
wxd 6 months ago
parent
commit
7eaaaf700a
  1. 14
      src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetCheckPacsInfoDto.cs
  2. 20
      src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetCheckPacsInfoInputDto.cs
  3. 4
      src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs
  4. 18
      src/Shentun.Pacs.Application.Contracts/PacsBusiness/UpdateCheckStatusByRegisterCheckIdInputDto.cs
  5. 5
      src/Shentun.Pacs.Application.Contracts/RegisterChecks/UpdateCheckResultDto.cs
  6. 93
      src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs
  7. 2
      src/Shentun.Pacs.Application/RegisterChecks/RegisterCheckAppService.cs
  8. 23
      src/Shentun.Pacs.Domain/RegisterChecks/RegisterCheckManager.cs

14
src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetCheckPacsInfoDto.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Pacs.PacsBusiness
{
public class GetCheckPacsInfoDto
{
/// <summary>
/// 是否正确
/// </summary>
public char IsPass { get; set; }
}
}

20
src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetCheckPacsInfoInputDto.cs

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Pacs.PacsBusiness
{
public class GetCheckPacsInfoInputDto
{
/// <summary>
/// 姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 条码号
/// </summary>
public string CheckRequestNo { get; set; }
}
}

4
src/Shentun.Pacs.Application.Contracts/PacsBusiness/GetPatientRegisterPacsCheckDto.cs

@ -96,5 +96,9 @@ namespace Shentun.Pacs.PacsBusiness
/// </summary> /// </summary>
public string AuditorUserName { get; set; } public string AuditorUserName { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public string AuditTime { get; set; }
} }
} }

18
src/Shentun.Pacs.Application.Contracts/PacsBusiness/UpdateCheckStatusByRegisterCheckIdInputDto.cs

@ -28,13 +28,27 @@ namespace Shentun.Pacs.PacsBusiness
/// <summary> /// <summary>
/// 审核医生 传空字符串 清空 并清理时间
/// 审核医生 传空字符串 清空
/// </summary> /// </summary>
public string AuditorUserId { get; set; } public string AuditorUserId { get; set; }
/// <summary> /// <summary>
/// 检查医生 传空字符串 清空 并清理时间
/// 审核时间 传空字符串 清空
/// </summary>
public string AuditTime { get; set; }
/// <summary>
/// 检查医生 传空字符串 清空
/// </summary> /// </summary>
public string CheckDoctorId { get; set; } public string CheckDoctorId { get; set; }
/// <summary>
/// 检查医生 传空字符串 清空
/// </summary>
public string CheckDate { get; set; }
} }
} }

5
src/Shentun.Pacs.Application.Contracts/RegisterChecks/UpdateCheckResultDto.cs

@ -54,6 +54,11 @@ namespace Shentun.Pacs.RegisterChecks
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 检查医生是否支持修改 Y=一直修改 N=只第一次保存,检查医生存在后不修改
/// </summary>
public char IsCheckDoctorUpdate { get; set; } = 'Y';
} }
public class UpdateRegisterCheckItemDetail public class UpdateRegisterCheckItemDetail

93
src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NPOI.POIFS.Properties;
using NPOI.POIFS.Storage; using NPOI.POIFS.Storage;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using NPOI.Util; using NPOI.Util;
@ -13,6 +14,7 @@ using Shentun.Pacs.Devices;
using Shentun.Pacs.Enums; using Shentun.Pacs.Enums;
using Shentun.Pacs.Migrations; using Shentun.Pacs.Migrations;
using Shentun.Pacs.Models; using Shentun.Pacs.Models;
using Shentun.Pacs.OrganizationUnits;
using Shentun.Pacs.PatientRegisters; using Shentun.Pacs.PatientRegisters;
using Shentun.Pacs.Patients; using Shentun.Pacs.Patients;
using Shentun.Pacs.PrintReports; using Shentun.Pacs.PrintReports;
@ -84,6 +86,7 @@ namespace Shentun.Pacs.PacsBusiness
private readonly IRepository<RegisterCheckSummary, Guid> _registerCheckSummaryRepository; private readonly IRepository<RegisterCheckSummary, Guid> _registerCheckSummaryRepository;
private readonly SysParmValueManager _sysParmValueManager; private readonly SysParmValueManager _sysParmValueManager;
private readonly IRepository<Item, Guid> _itemRepository; private readonly IRepository<Item, Guid> _itemRepository;
private readonly PeisOrganizationUnitManager _peisOrganizationUnitManager;
private readonly SqlSugarClient oldDb; private readonly SqlSugarClient oldDb;
@ -121,7 +124,8 @@ namespace Shentun.Pacs.PacsBusiness
UnitOfWorkManager unitOfWorkManager, UnitOfWorkManager unitOfWorkManager,
IRepository<RegisterCheckSummary, Guid> registerCheckSummaryRepository, IRepository<RegisterCheckSummary, Guid> registerCheckSummaryRepository,
SysParmValueManager sysParmValueManager, SysParmValueManager sysParmValueManager,
IRepository<Item, Guid> itemRepository)
IRepository<Item, Guid> itemRepository,
PeisOrganizationUnitManager peisOrganizationUnitManager)
{ {
_configuration = configuration; _configuration = configuration;
_registerCheckRepository = registerCheckRepository; _registerCheckRepository = registerCheckRepository;
@ -156,7 +160,7 @@ namespace Shentun.Pacs.PacsBusiness
_registerCheckSummaryRepository = registerCheckSummaryRepository; _registerCheckSummaryRepository = registerCheckSummaryRepository;
_sysParmValueManager = sysParmValueManager; _sysParmValueManager = sysParmValueManager;
_itemRepository = itemRepository; _itemRepository = itemRepository;
_peisOrganizationUnitManager = peisOrganizationUnitManager;
oldDb = new SqlSugarClient(new ConnectionConfig() oldDb = new SqlSugarClient(new ConnectionConfig()
{ {
@ -165,8 +169,6 @@ namespace Shentun.Pacs.PacsBusiness
IsAutoCloseConnection = true IsAutoCloseConnection = true
}); });
} }
@ -518,7 +520,8 @@ namespace Shentun.Pacs.PacsBusiness
idNo = patient.IdNo, idNo = patient.IdNo,
age = patientRegister.Age, age = patientRegister.Age,
mobileTelephone = patient.MobileTelephone, mobileTelephone = patient.MobileTelephone,
auditorUserName = _cacheService.GetSurnameAsync(registerCheck.AuditorUserId).GetAwaiter().GetResult()
auditorUserName = _cacheService.GetSurnameAsync(registerCheck.AuditorUserId).GetAwaiter().GetResult(),
auditTime = registerCheck.AuditTime
}; };
if (!string.IsNullOrWhiteSpace(input.PatientName)) if (!string.IsNullOrWhiteSpace(input.PatientName))
@ -683,7 +686,8 @@ namespace Shentun.Pacs.PacsBusiness
IdNo = fisrtItem.idNo, IdNo = fisrtItem.idNo,
OldPatientNo = fisrtItem.oldPatientNo, OldPatientNo = fisrtItem.oldPatientNo,
CustomerOrgName = fisrtItem.customerOrgName, CustomerOrgName = fisrtItem.customerOrgName,
MobileTelephone = fisrtItem.mobileTelephone
MobileTelephone = fisrtItem.mobileTelephone,
AuditTime = DataHelper.ConversionDateToString(fisrtItem.auditTime)
}); });
} }
@ -1290,7 +1294,7 @@ namespace Shentun.Pacs.PacsBusiness
/// <summary> /// <summary>
/// 导入老系统人员、项目数据,并自动加入worklist
/// 导入老系统人员、项目数据,并自动加入worklist 老红豚
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
@ -1340,7 +1344,15 @@ namespace Shentun.Pacs.PacsBusiness
string oldDeviceTypeId = deviceTypeCodeValues.First(); string oldDeviceTypeId = deviceTypeCodeValues.First();
Guid medicalCenterId = Guid.Empty;
if (_currentUser.Id != null && _currentUser.Id != Guid.Empty)
{
var peisId = await _peisOrganizationUnitManager.GetPeisIdAsync(_currentUser.Id.Value);
if (peisId != null)
{
medicalCenterId = peisId.Value;
}
}
//string connectionString = _configuration.GetValue<string>("OldPeis:ConnectionStrings", ""); //string connectionString = _configuration.GetValue<string>("OldPeis:ConnectionStrings", "");
//SqlSugarClient oldDb = new SqlSugarClient(new ConnectionConfig() //SqlSugarClient oldDb = new SqlSugarClient(new ConnectionConfig()
//{ //{
@ -1536,7 +1548,7 @@ namespace Shentun.Pacs.PacsBusiness
IsUpload = 'N', IsUpload = 'N',
IsUploadAppoint = 'N', IsUploadAppoint = 'N',
MaritalStatusId = maritalStatusId, MaritalStatusId = maritalStatusId,
MedicalCenterId = Guid.Empty,
MedicalCenterId = medicalCenterId,
MedicalTimes = 0, MedicalTimes = 0,
PatientId = patientEnt.Id, PatientId = patientEnt.Id,
PatientName = patientName, PatientName = patientName,
@ -1615,7 +1627,8 @@ namespace Shentun.Pacs.PacsBusiness
AsbitemId = asbitemId, AsbitemId = asbitemId,
ChargePrice = oldAsbitemPrice, ChargePrice = oldAsbitemPrice,
StandardPrice = oldAsbitemStandardPrice, StandardPrice = oldAsbitemStandardPrice,
IsCharge = Convert.ToChar(row["charge_flag"].ToString()),
//IsCharge = Convert.ToChar(row["charge_flag"].ToString()),
IsCharge = 'N',
OldAsbitemId = oldAsbitemId, OldAsbitemId = oldAsbitemId,
OldPatientRegisterId = row["patient_register_id"].ToString(), OldPatientRegisterId = row["patient_register_id"].ToString(),
PatientRegisterId = tempPatientRegisterId, PatientRegisterId = tempPatientRegisterId,
@ -2095,23 +2108,37 @@ namespace Shentun.Pacs.PacsBusiness
if (string.IsNullOrWhiteSpace(input.AuditorUserId)) if (string.IsNullOrWhiteSpace(input.AuditorUserId))
{ {
registerCheckFirst.AuditorUserId = null; registerCheckFirst.AuditorUserId = null;
registerCheckFirst.AuditTime = null;
} }
else else
{ {
registerCheckFirst.AuditorUserId = Guid.Parse(input.AuditorUserId); registerCheckFirst.AuditorUserId = Guid.Parse(input.AuditorUserId);
registerCheckFirst.AuditTime = DateTime.Now;
}
if (string.IsNullOrWhiteSpace(input.AuditTime))
{
registerCheckFirst.AuditTime = null;
}
else
{
registerCheckFirst.AuditTime = DateTime.Parse(input.AuditTime);
} }
if (string.IsNullOrWhiteSpace(input.CheckDoctorId)) if (string.IsNullOrWhiteSpace(input.CheckDoctorId))
{ {
registerCheckFirst.CheckDoctorId = null; registerCheckFirst.CheckDoctorId = null;
registerCheckFirst.CheckDate = null;
} }
else else
{ {
registerCheckFirst.CheckDoctorId = input.CheckDoctorId; registerCheckFirst.CheckDoctorId = input.CheckDoctorId;
registerCheckFirst.CheckDate = DateTime.Now;
}
if (string.IsNullOrWhiteSpace(input.CheckDate))
{
registerCheckFirst.CheckDate = null;
}
else
{
registerCheckFirst.CheckDate = DateTime.Parse(input.CheckDate);
} }
await _registerCheckRepository.UpdateAsync(registerCheckFirst); await _registerCheckRepository.UpdateAsync(registerCheckFirst);
@ -2353,6 +2380,44 @@ namespace Shentun.Pacs.PacsBusiness
#endregion #endregion
#region 云胶片信息校验
/// <summary>
/// 校验身份 Y=通过 N=未通过
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("api/app/PacsBusiness/GetCheckPacsInfo")]
public async Task<GetCheckPacsInfoDto> GetCheckPacsInfoAsync(GetCheckPacsInfoInputDto input)
{
GetCheckPacsInfoDto entDto = new GetCheckPacsInfoDto
{
IsPass = 'N'
};
if (string.IsNullOrWhiteSpace(input.PatientName))
{
throw new UserFriendlyException("姓名不能为空");
}
if (string.IsNullOrWhiteSpace(input.CheckRequestNo))
{
throw new UserFriendlyException("条码号不能为空");
}
string oldSql = $"select * from patient_register where barcode_no='{input.CheckRequestNo}' and [name]='{input.PatientName}'";
var patientList = await oldDb.Ado.GetDataTableAsync(oldSql);
if (patientList.Rows.Count == 1)
{
entDto.IsPass = 'Y';
}
return entDto;
}
#endregion
/// <summary> /// <summary>
/// 转换老系统性别 /// 转换老系统性别

2
src/Shentun.Pacs.Application/RegisterChecks/RegisterCheckAppService.cs

@ -387,7 +387,7 @@ namespace Shentun.Pacs.RegisterChecks
{ {
input.CheckDoctorId = CurrentUser.Id.ToString(); input.CheckDoctorId = CurrentUser.Id.ToString();
} }
_registerCheckManager.UpdateCheckDoctorAndDateAsync(patientRegister, registerCheck, input.CheckDoctorId, input.CheckDate, input.ExecOrganizationUnitId);
_registerCheckManager.UpdateCheckDoctorAndDateAsync(patientRegister, registerCheck, input.CheckDoctorId, input.CheckDate, input.ExecOrganizationUnitId, input.IsCheckDoctorUpdate);
if (!string.IsNullOrWhiteSpace(input.AuditorName)) if (!string.IsNullOrWhiteSpace(input.AuditorName))
registerCheck.AuditorName = input.AuditorName; registerCheck.AuditorName = input.AuditorName;
if (!string.IsNullOrWhiteSpace(input.LisSampleNo)) if (!string.IsNullOrWhiteSpace(input.LisSampleNo))

23
src/Shentun.Pacs.Domain/RegisterChecks/RegisterCheckManager.cs

@ -180,7 +180,8 @@ namespace Shentun.Pacs.RegisterChecks
RegisterCheck entity, RegisterCheck entity,
string checkDoctorId, string checkDoctorId,
DateTime? checkDate, DateTime? checkDate,
Guid? execOrganizationUnitId
Guid? execOrganizationUnitId,
char isCheckDoctorUpdate
) )
{ {
if (entity == null) if (entity == null)
@ -199,16 +200,22 @@ namespace Shentun.Pacs.RegisterChecks
{ {
throw new UserFriendlyException("检查项目已加锁不允许修改"); throw new UserFriendlyException("检查项目已加锁不允许修改");
} }
if (checkDate == null)
entity.CheckDate = DateTime.Now;
else
entity.CheckDate = checkDate;
if (string.IsNullOrWhiteSpace(checkDoctorId))
if (isCheckDoctorUpdate == 'Y' || string.IsNullOrWhiteSpace(entity.CheckDoctorId))
{ {
checkDoctorId = _currentUser.Id.ToString();
if (checkDate == null)
entity.CheckDate = DateTime.Now;
else
entity.CheckDate = checkDate;
if (string.IsNullOrWhiteSpace(checkDoctorId))
{
checkDoctorId = _currentUser.Id.ToString();
}
entity.CheckDoctorId = checkDoctorId;
} }
entity.CheckDoctorId = checkDoctorId;
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; entity.CompleteFlag = RegisterCheckCompleteFlag.Checked;
if (execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty) if (execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty)
{ {

Loading…
Cancel
Save