20 changed files with 30372 additions and 108 deletions
-
2src/Shentun.Peis.Application.Contracts/OccupationalDiseases/OccupationalDiseaseWithDetailByPatientRegisterIdDto.cs
-
44src/Shentun.Peis.Application.Contracts/OccupationalDiseases/OccupationalDiseaseWithDetailInputDto.cs
-
13src/Shentun.Peis.Application.Contracts/OccupationalDiseases/PatientOccupationalDiseaseDto.cs
-
33src/Shentun.Peis.Application.Contracts/OccupationalDiseases/PatientPastMedicalHistoryDto.cs
-
24src/Shentun.Peis.Application.Contracts/OccupationalDiseases/PatientPoisonDto.cs
-
63src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs
-
10src/Shentun.Peis.Domain/OccupationalContraindicationss/OccupationalContraindicationsManager.cs
-
42src/Shentun.Peis.Domain/PatientOccupationalDiseases/PatientOccupationalDisease.cs
-
14src/Shentun.Peis.Domain/PatientOccupationalDiseases/PatientOccupationalDiseaseManager.cs
-
68src/Shentun.Peis.Domain/PatientPastMedicalHistorys/PatientPastMedicalHistory.cs
-
34src/Shentun.Peis.Domain/PatientPoisons/PatientPoison.cs
-
5src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs
-
12src/Shentun.Peis.Domain/SuspectedOccupationalDiseases/SuspectedOccupationalDiseaseManager.cs
-
41src/Shentun.Peis.EntityFrameworkCore/DbMapping/PatientPastMedicalHistorys/PatientPastMedicalHistoryDbMapping.cs
-
5src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
-
14910src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523092658_init20240523002.Designer.cs
-
105src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523092658_init20240523002.cs
-
14915src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523094105_init20240523003.Designer.cs
-
26src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523094105_init20240523003.cs
-
114src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.OccupationalDiseases |
|||
{ |
|||
public class PatientPastMedicalHistoryDto : AuditedEntityDtoName |
|||
{ |
|||
/// <summary>
|
|||
/// 病名
|
|||
/// </summary>
|
|||
public string? OccupationalDisease { get; set; } |
|||
/// <summary>
|
|||
/// 诊断日期
|
|||
/// </summary>
|
|||
public DateTime? DiagnosisDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 诊断单位
|
|||
/// </summary>
|
|||
public string? DiagnosisHospital { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否恢复
|
|||
/// </summary>
|
|||
public char? IsRecovery { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 治疗方式
|
|||
/// </summary>
|
|||
public string? TreatmentMethods { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Shentun.Peis.Models |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 职业病-既往病史
|
|||
/// </summary>
|
|||
[Table("patient_past_medical_history")] |
|||
public class PatientPastMedicalHistory : AuditedEntity<Guid>, IHasConcurrencyStamp |
|||
{ |
|||
|
|||
[Column("patient_register_id")] |
|||
public Guid PatientRegisterId { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 病名
|
|||
/// </summary>
|
|||
[Column("occupational_disease")] |
|||
[StringLength(50)] |
|||
public string? OccupationalDisease { get; set; } |
|||
/// <summary>
|
|||
/// 诊断日期
|
|||
/// </summary>
|
|||
[Column("diagnosis_date")] |
|||
public DateTime? DiagnosisDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 诊断单位
|
|||
/// </summary>
|
|||
[Column("diagnosis_hospital")] |
|||
[StringLength(50)] |
|||
public string? DiagnosisHospital { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否恢复
|
|||
/// </summary>
|
|||
[Column("is_recovery")] |
|||
public char? IsRecovery { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 治疗方式
|
|||
/// </summary>
|
|||
[Column("treatment_methods")] |
|||
public string? TreatmentMethods { get; set; } |
|||
|
|||
[Column("concurrency_stamp")] |
|||
public string ConcurrencyStamp { get; set; } |
|||
|
|||
|
|||
|
|||
[ForeignKey(nameof(PatientRegisterId))] |
|||
[InverseProperty("PatientPastMedicalHistorys")] |
|||
public virtual PatientRegister PatientRegister { get; set; } = null!; |
|||
|
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Shentun.Peis.EntityFrameworkCore; |
|||
|
|||
namespace Shentun.Peis.DbMapping |
|||
{ |
|||
|
|||
internal class PatientPastMedicalHistoryDbMapping : IEntityTypeConfiguration<PatientPastMedicalHistory> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<PatientPastMedicalHistory> entity) |
|||
{ |
|||
entity.HasComment("既往病史"); |
|||
|
|||
entity.Property(e => e.Id) |
|||
.IsFixedLength() |
|||
.HasComment("既往病史编号"); |
|||
|
|||
|
|||
entity.Property(e => e.DiagnosisDate).HasComment("诊断日期"); |
|||
entity.Property(e => e.DiagnosisHospital).HasComment("诊断单位"); |
|||
entity.Property(e => e.IsRecovery).HasComment("是否恢复"); |
|||
entity.Property(e => e.PatientRegisterId).HasComment("简码").IsFixedLength(); |
|||
entity.Property(e => e.TreatmentMethods).HasComment("治疗方式"); |
|||
entity.Property(e => e.OccupationalDisease).HasComment("病名"); |
|||
|
|||
|
|||
entity.HasOne(d => d.PatientRegister) |
|||
.WithMany(p => p.PatientPastMedicalHistorys) |
|||
.HasForeignKey(d => d.PatientRegisterId) |
|||
.HasConstraintName("fk_patient_past_medical_historys_patient_register"); |
|||
|
|||
entity.ConfigureByConvention(); |
|||
} |
|||
} |
|||
} |
|||
14910
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523092658_init20240523002.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,105 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class init20240523002 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "occupational_contraindications_id", |
|||
table: "patient_poison"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "other_diseases", |
|||
table: "patient_poison"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "suspected_occupational_disease_id", |
|||
table: "patient_poison"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "previous_history", |
|||
table: "patient_occupational_disease"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "risk_factors", |
|||
table: "patient_occupational_disease", |
|||
type: "character varying(200)", |
|||
maxLength: 200, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "patient_past_medical_history", |
|||
columns: table => new |
|||
{ |
|||
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "既往病史编号"), |
|||
patient_register_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "简码"), |
|||
occupational_disease = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, comment: "病名"), |
|||
diagnosis_date = table.Column<DateTime>(type: "timestamp without time zone", nullable: true, comment: "诊断日期"), |
|||
diagnosis_hospital = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, comment: "诊断单位"), |
|||
is_recovery = table.Column<char>(type: "character(1)", nullable: true, comment: "是否恢复"), |
|||
treatment_methods = table.Column<string>(type: "text", nullable: true, comment: "治疗方式"), |
|||
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true), |
|||
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
creator_id = table.Column<Guid>(type: "uuid", nullable: false), |
|||
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), |
|||
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_patient_past_medical_history", x => x.id); |
|||
table.ForeignKey( |
|||
name: "fk_patient_past_medical_historys_patient_register", |
|||
column: x => x.patient_register_id, |
|||
principalTable: "patient_register", |
|||
principalColumn: "id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}, |
|||
comment: "既往病史"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_patient_past_medical_history_patient_register_id", |
|||
table: "patient_past_medical_history", |
|||
column: "patient_register_id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "patient_past_medical_history"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "risk_factors", |
|||
table: "patient_occupational_disease"); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "occupational_contraindications_id", |
|||
table: "patient_poison", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "other_diseases", |
|||
table: "patient_poison", |
|||
type: "text", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "suspected_occupational_disease_id", |
|||
table: "patient_poison", |
|||
type: "uuid", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "previous_history", |
|||
table: "patient_occupational_disease", |
|||
type: "character varying(100)", |
|||
maxLength: 100, |
|||
nullable: true); |
|||
} |
|||
} |
|||
} |
|||
14915
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240523094105_init20240523003.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,26 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class init20240523003 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "family_genetic_history", |
|||
table: "patient_occupational_disease", |
|||
type: "character varying(200)", |
|||
maxLength: 200, |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "family_genetic_history", |
|||
table: "patient_occupational_disease"); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue