Compare commits

..

No commits in common. "5b616026ab33a90c51dda51857c57efb0ea6677b" and "2e7a0fe68df8083692b7dab6d2d329bdf709db2e" have entirely different histories.

9 changed files with 65 additions and 18514 deletions

View File

@ -17401,36 +17401,6 @@
工作兼职En
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.University">
<summary>
大学
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.UniversityCN">
<summary>
大学
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.City">
<summary>
城市
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.CityCN">
<summary>
城市
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.HospitalEn">
<summary>
医院
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.HospitalCN">
<summary>
医院
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.AddDoctorCriterionFileDto.FileName">
<summary>
文件名称

View File

@ -445,6 +445,9 @@ namespace IRaCIS.Application.Contracts
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
{
public string HospitalName { get; set; } = string.Empty;
//部门
public Guid? DepartmentId { get; set; }
public string DepartmentOther { get; set; } = string.Empty;
@ -637,6 +640,8 @@ namespace IRaCIS.Application.Contracts
public class EmploymentInfo
{
public Guid Id { get; set; }
public string HospitalName { get; set; } = string.Empty;
//部门
public Guid? DepartmentId { get; set; }
public string DepartmentOther { get; set; } = string.Empty;
@ -666,36 +671,6 @@ namespace IRaCIS.Application.Contracts
/// </summary>
public string WorkPartTimeEn { get; set; } = string.Empty;
/// <summary>
/// 大学
/// </summary>
public string University { get; set; } = string.Empty;
/// <summary>
/// 大学
/// </summary>
public string UniversityCN { get; set; } = string.Empty;
/// <summary>
/// 城市
/// </summary>
public string City { get; set; } = string.Empty;
/// <summary>
/// 城市
/// </summary>
public string CityCN { get; set; } = string.Empty;
/// <summary>
/// 医院
/// </summary>
public string HospitalEn { get; set; } = string.Empty;
/// <summary>
/// 医院
/// </summary>
public string HospitalCN { get; set; } = string.Empty;
}
#endregion

View File

@ -144,6 +144,24 @@ namespace IRaCIS.Core.Application.Service
//---current phone or email number already existed
var verifyPair = new KeyValuePair<Expression<Func<Doctor, bool>>, string>(verifyExp, _localizer["Doctor_DupPhoneOrEmail"]);
if (indto.HospitalName != string.Empty)
{
var hospital = await _hospitalRepository.Where(x => x.HospitalName == indto.HospitalName && x.SiteId == null).FirstOrDefaultAsync();
if (hospital != null)
{
indto.HospitalId = hospital.Id;
}
else
{
var newHospital = await _hospitalRepository.AddAsync(new Hospital()
{
HospitalName = indto.HospitalName,
IsConfirm = false,
}, true);
indto.HospitalId = newHospital.Id;
}
}
if (indto.Id == Guid.Empty || indto.Id == null)
{
@ -612,6 +630,24 @@ namespace IRaCIS.Core.Application.Service
//var success = _doctorRepository.SaveChanges();
#endregion
if (inDto.HospitalName != string.Empty)
{
var hospital = await _hospitalRepository.Where(x => x.HospitalName == inDto.HospitalName && x.SiteId == null).FirstOrDefaultAsync();
if (hospital != null)
{
inDto.HospitalId = hospital.Id;
}
else
{
var newHospital = await _hospitalRepository.AddAsync(new Hospital()
{
HospitalName = inDto.HospitalName,
IsConfirm=false,
}, true);
inDto.HospitalId = newHospital.Id;
}
}
var entity = await _doctorRepository.InsertOrUpdateAsync(inDto, true);

View File

@ -110,6 +110,23 @@ namespace IRaCIS.Core.Application.Service
//}
#endregion
if (inDto.Hospital != string.Empty)
{
var hospital = await _hospitalRepository.Where(x => x.HospitalName == inDto.Hospital && x.SiteId == null).FirstOrDefaultAsync();
if (hospital != null)
{
inDto.HospitalId = hospital.Id;
}
else
{
var newHospital = await _hospitalRepository.AddAsync(new Hospital()
{
HospitalName = inDto.Hospital,
IsConfirm = false,
}, true);
inDto.HospitalId = newHospital.Id;
}
}
var entity = await _postgraduateRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id);
}

View File

@ -247,34 +247,4 @@ public class Doctor : BaseFullAuditEntity
/// ÏîÄ¿Id
/// </summary>
public Guid? TrialId { get; set; }
/// <summary>
/// 大学
/// </summary>
public string University { get; set; } = string.Empty;
/// <summary>
/// 大学
/// </summary>
public string UniversityCN { get; set; } = string.Empty;
/// <summary>
/// 城市
/// </summary>
public string City { get; set; } = string.Empty;
/// <summary>
/// 城市
/// </summary>
public string CityCN { get; set; } = string.Empty;
/// <summary>
/// 医院
/// </summary>
public string HospitalEn { get; set; } = string.Empty;
/// <summary>
/// 医院
/// </summary>
public string HospitalCN { get; set; } = string.Empty;
}

View File

@ -24,6 +24,10 @@ public class Hospital : BaseFullAuditEntity
public string ProvinceCN { get; set; } = string.Empty;
public string CityCN { get; set; } = string.Empty;
/// <summary>
/// 是否确认
/// </summary>
public bool IsConfirm { get; set; } = true;
[Comment("中心Id")]
public Guid? SiteId { get; set; } = Guid.Empty;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,149 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class DoctorHospital : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_SCPInstance_SCPStudy_StudyId",
table: "SCPInstance");
migrationBuilder.DropForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance");
migrationBuilder.DropColumn(
name: "IsConfirm",
table: "Hospital");
migrationBuilder.AddColumn<string>(
name: "City",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "CityCN",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "HospitalCN",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "HospitalEn",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "University",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "UniversityCN",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddForeignKey(
name: "FK_SCPInstance_SCPStudy_StudyId",
table: "SCPInstance",
column: "StudyId",
principalTable: "SCPStudy",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance",
column: "StudyId",
principalTable: "TaskStudy",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_SCPInstance_SCPStudy_StudyId",
table: "SCPInstance");
migrationBuilder.DropForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance");
migrationBuilder.DropColumn(
name: "City",
table: "Doctor");
migrationBuilder.DropColumn(
name: "CityCN",
table: "Doctor");
migrationBuilder.DropColumn(
name: "HospitalCN",
table: "Doctor");
migrationBuilder.DropColumn(
name: "HospitalEn",
table: "Doctor");
migrationBuilder.DropColumn(
name: "University",
table: "Doctor");
migrationBuilder.DropColumn(
name: "UniversityCN",
table: "Doctor");
migrationBuilder.AddColumn<bool>(
name: "IsConfirm",
table: "Hospital",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddForeignKey(
name: "FK_SCPInstance_SCPStudy_StudyId",
table: "SCPInstance",
column: "StudyId",
principalTable: "SCPStudy",
principalColumn: "SeqId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_TaskInstance_TaskStudy_StudyId",
table: "TaskInstance",
column: "StudyId",
principalTable: "TaskStudy",
principalColumn: "SeqId",
onDelete: ReferentialAction.Cascade);
}
}
}

View File

@ -1355,16 +1355,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("City")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("CityCN")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<int>("Code")
.HasColumnType("int");
@ -1416,16 +1406,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<DateTime?>("GCPTime")
.HasColumnType("datetime2");
b.Property<string>("HospitalCN")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("HospitalEn")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<Guid?>("HospitalId")
.HasColumnType("uniqueidentifier");
@ -1589,16 +1569,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid?>("TrialId")
.HasColumnType("uniqueidentifier");
b.Property<string>("University")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("UniversityCN")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
@ -2655,6 +2625,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<bool>("IsConfirm")
.HasColumnType("bit");
b.Property<string>("Province")
.IsRequired()
.HasMaxLength(400)
@ -15743,7 +15716,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy")
.WithMany("InstanceList")
.HasForeignKey("StudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -16545,7 +16517,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy")
.WithMany("InstanceList")
.HasForeignKey("StudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();