添加接口 修改原有逻辑

This commit is contained in:
he
2022-04-18 11:40:11 +08:00
parent b992cab7ae
commit 87ee9bbbe4
6 changed files with 82 additions and 15 deletions
@@ -44,13 +44,13 @@ namespace IRaCIS.Application.Contracts
public class SubjectStatusChangeCommand
{
[NotDefault]
public Guid SubjectId { get; set; }
public Guid? TrialId { get; set; }
public Guid? SiteId { get; set; }
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public Guid SiteId { get; set; }
public SubjectStatus Status { get; set; }
public DateTime? OutEnrollmentTime { get; set; }
@@ -118,9 +118,26 @@ namespace IRaCIS.Core.Application.Services
//更新受试者 首次给药日期 是否入组确认
if (svCommand.SubjectFirstGiveMedicineTime != null)
{
List<DataInspection> datas = new List<DataInspection>();
// 更新受试者
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime;
datas.Add(new DataInspection()
{
SubjectId = subject.Id,
SiteId = subject.SiteId,
TrialId = subject.TrialId,
IsSign = false,
CreateTime = DateTime.Now.AddSeconds(1),
JsonDetail = JsonConvert.SerializeObject(new
{
FirstGiveMedicineTime = subject.FirstGiveMedicineTime.Value.ToString("yyyy-MM-dd")
})
});
await _inspectionService.AddListInspectionRecordAsync(datas);
}
if (svCommand.IsEnrollmentConfirm != null)