Browse Source

上传报告次数

master
wxd 1 year ago
parent
commit
1a6764c485
  1. 27
      src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs
  2. 9
      src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs

27
src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs

@ -6,6 +6,7 @@ using NPOI.SS.Formula.Functions;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using Shentun.Peis.Patients;
using Shentun.Peis.Permissions;
using SqlSugar;
using System;
@ -82,6 +83,29 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces
_columnReferenceInterfaceRepository = columnReferenceInterfaceRepository;
}
/// <summary>
/// 根据身份证获取体检记录
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[Authorize(PeisPermissions.Third.Default)]
[HttpPost("api/Third/ThirdPartyPublicInterface/GetPatientRegisterListByIdNo")]
public async Task<List<GetPatientRegisterListByIdNoDto>> GetPatientRegisterListByIdNoAsync(IdNoInputDto input)
{
var entListDto = (from patientRegister in await _patientRegisterRepository.GetQueryableAsync()
join patient in await _patientRepository.GetQueryableAsync() on patientRegister.PatientId equals patient.Id
where patient.IdNo == input.IdNo
orderby patientRegister.MedicalStartDate descending
select new GetPatientRegisterListByIdNoDto
{
MedicalStartDate = DataHelper.ConversionDateShortToString(patientRegister.MedicalStartDate),
PatientName = patientRegister.PatientName,
PatientRegisterNo = patientRegister.PatientRegisterNo
}).ToList();
return entListDto;
}
/// <summary>
/// 查询体检人员基本信息
@ -276,6 +300,9 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces
}
///// <summary>
///// 查询体检明细项目信息
///// </summary>

9
src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs

@ -918,7 +918,7 @@ namespace Shentun.Peis.TransToWebPeis
short newMedicalTimes = patientRegisterEnt.MedicalTimes;
var IsPatient = (await WebDb.Ado.GetDataTableAsync($"select patient_id from patient where patient_id='{patientRegisterEnt.PatientId}'")).Rows.Count;
@ -957,10 +957,9 @@ namespace Shentun.Peis.TransToWebPeis
#endregion
}
else
{
newMedicalTimes = (short)((short)(await WebDb.Ado.GetScalarAsync($"select max(medical_times) from patient_register where patient_id='{patientRegisterEnt.PatientId}'")) + 1);
}
short newMedicalTimes = (short)((short)(await WebDb.Ado.GetScalarAsync($"select max(medical_times) from patient_register where patient_id='{patientRegisterEnt.PatientId}'")) + 1);

Loading…
Cancel
Save