api สอบสวน

This commit is contained in:
Kittapath 2023-11-24 15:28:04 +07:00
parent ab171a7394
commit 4882995f47
34 changed files with 36995 additions and 69 deletions

View file

@ -25,5 +25,6 @@ namespace BMA.EHR.Domain.Models.Discipline
[Required, Comment("เบอร์โทรศัพท์")]
public string Phone { get; set; } = string.Empty;
public virtual List<DisciplineInvestigate_Director> DisciplineInvestigate_Directors { get; set; } = new List<DisciplineInvestigate_Director>();
public virtual List<DisciplineDisciplinary_DirectorInvestigate> DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List<DisciplineDisciplinary_DirectorInvestigate>();
}
}

View file

@ -0,0 +1,113 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary : EntityBase
{
[Required, Comment("สถานะเรื่องร้องเรียน มีดังนี้ ใหม่ (NEW), ยุติเรื่อง (STOP), มีมูลส่งไปสืบสวนแล้ว (SEND_INVESTIGATE)")]
public string Status { get; set; } = string.Empty;
[Required, Comment("ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)")]
public string RespondentType { get; set; } = string.Empty;
[Required, Comment("เรื่องที่ร้องเรียน"), Column(TypeName = "text")]
public string Title { get; set; } = string.Empty;
[Required, Comment("รายละเอียดของเรื่องร้องเรียน"), Column(TypeName = "text")]
public string Description { get; set; } = string.Empty;
[Required, Comment("วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ")]
public DateTime DateReceived { get; set; }
[Required, Comment("ระดับการพิจารณา 'ยังไม่ระบุ' (NORMAL คือ ปกติ, URGENT คือ ด่วน, VERY_URGENT คือ ด่วนมาก)")]
public string LevelConsideration { get; set; } = string.Empty;
[Comment("วันที่กำหนดพิจารณา")]
public DateTime? DateConsideration { get; set; }
[Required, Comment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)")]
public string OffenseDetails { get; set; } = string.Empty;
[Required, Comment("วันแจ้งเตือนล่วงหน้า")]
public DateTime DateNotification { get; set; }
[Required, Comment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)")]
public string ComplaintFrom { get; set; } = string.Empty;
[Required, Comment("ผู้ร้องเรียน")]
public string Appellant { get; set; } = string.Empty;
// [Required, Comment("อ้างอิงรหัสเอกสาร")]
// public Document Document { get; set; }
[Comment("ผลการตรวจสอบเรื่องร้องเรียน")]
public string? ResultComplaint { get; set; }
[Comment("ผลการตรวจสอบเรื่องสืบสวน")]
public string? ResultInvestigate { get; set; }
[Comment("ผลการตรวจสอบ")]
public string? Result { get; set; }
[Comment("กรณีหน่วยงานใส่ id ของหน่วยงาน")]
public Guid? Organization { get; set; }
[Required, Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public Guid ConsideredAgency { get; set; }
[Comment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)")]
public string? InvestigationDetail { get; set; }
[Comment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ")]
public string? InvestigationDetailOther { get; set; }
[Comment("วันที่เริ่มการสืบสวน")]
public DateTime? InvestigationDateStart { get; set; }
[Comment("วันที่สิ้นสุดการสืบสวน")]
public DateTime? InvestigationDateEnd { get; set; }
[Comment("รายละเอียดเกี่ยวกับการสืบสวน")]
public string? InvestigationDescription { get; set; }
[Comment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล")]
public string? InvestigationStatusResult { get; set; }
[Comment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")]
public string? InvestigationCauseText { get; set; }
[Comment("พยานและบันทึกถ้อยคำพยาน")]
public string? DisciplinaryWitnesses { get; set; }
[Comment("บันทึกถ้อยคำของผู้กล่าวหา")]
public string? DisciplinaryRecordAccuser { get; set; }
[Comment("สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา")]
public string? DisciplinarySummaryEvidence { get; set; }
[Comment("อ้างอิงมาตราตามกฎหมาย")]
public string? DisciplinaryRefLaw { get; set; }
[Comment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก")]
public string? DisciplinaryFaultLevel { get; set; }
[Comment("สอบสวนที่")]
public string? DisciplinaryInvestigateAt { get; set; }
[Comment("กรณีความผิด")]
public string? DisciplinaryCaseFault { get; set; }
[Comment("วันที่สรุปพยานหลักฐาน")]
public DateTime? DisciplinaryDateEvident { get; set; }
[Comment("วันที่รับทราบข้อกล่าวหา")]
public DateTime? DisciplinaryDateAllegation { get; set; }
public DisciplineInvestigate DisciplineInvestigate { get; set; }
public virtual List<DisciplineDisciplinary_ProfileComplaintInvestigate> DisciplineDisciplinary_ProfileComplaintInvestigates { get; set; } = new List<DisciplineDisciplinary_ProfileComplaintInvestigate>();
public virtual List<DisciplineDisciplinary_DocComplaintInvestigate> DisciplineDisciplinary_DocComplaintInvestigates { get; set; } = new List<DisciplineDisciplinary_DocComplaintInvestigate>();
public virtual List<DisciplineDisciplinary_DocInvestigate> DisciplineDisciplinary_DocInvestigates { get; set; } = new List<DisciplineDisciplinary_DocInvestigate>();
public virtual List<DisciplineDisciplinary_DocInvestigateRelevant> DisciplineDisciplinary_DocInvestigateRelevants { get; set; } = new List<DisciplineDisciplinary_DocInvestigateRelevant>();
public virtual List<DisciplineDisciplinary_DirectorInvestigate> DisciplineDisciplinary_DirectorInvestigates { get; set; } = new List<DisciplineDisciplinary_DirectorInvestigate>();
public virtual List<DisciplineDisciplinary_DocSummaryEvidence> DisciplineDisciplinary_DocSummaryEvidences { get; set; } = new List<DisciplineDisciplinary_DocSummaryEvidence>();
public virtual List<DisciplineDisciplinary_DocRecordAccuser> DisciplineDisciplinary_DocRecordAccusers { get; set; } = new List<DisciplineDisciplinary_DocRecordAccuser>();
public virtual List<DisciplineDisciplinary_DocWitnesses> DisciplineDisciplinary_DocWitnessess { get; set; } = new List<DisciplineDisciplinary_DocWitnesses>();
public virtual List<DisciplineDisciplinary_DocOther> DisciplineDisciplinary_DocOthers { get; set; } = new List<DisciplineDisciplinary_DocOther>();
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DirectorInvestigate : EntityBase
{
[Required, Comment("อ้างอิงรหัสกรรมการ")]
public DisciplineDirector DisciplineDirector { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocComplaintInvestigate : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocInvestigate : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocInvestigateRelevant : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocOther : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocRecordAccuser : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocSummaryEvidence : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_DocWitnesses : EntityBase
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BMA.EHR.Domain.Models.Base;
using BMA.EHR.Domain.Models.MetaData;
using BMA.EHR.Domain.Models.Organizations;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineDisciplinary_ProfileComplaintInvestigate : EntityBase
{
[Comment("id อ้างอิง profile")]
public Guid? PersonId { get; set; }
[MaxLength(13), Comment("รหัสบัตรประชาชน")]
public string? CitizenId { get; set; }
[Comment("คำนำหน้า")]
public string? Prefix { get; set; }
[Required, MaxLength(100), Comment("ชื่อ")]
public string? FirstName { get; set; }
[Required, MaxLength(100), Comment("นามสกุล")]
public string? LastName { get; set; }
[Comment("สังกัด")]
public string? Organization { get; set; }
[Comment("ตำแหน่ง")]
public string? Position { get; set; }
[Comment("เลขที่ตำแหน่ง")]
public string? PosNo { get; set; }
[Comment("ระดับ")]
public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Required, Comment("Id เรื่องสอบสวน")]
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
}
}

View file

@ -60,10 +60,10 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ")]
public string? InvestigationDetailOther { get; set; }
[Comment("วันที่เริ่มการสบสวน")]
[Comment("วันที่เริ่มการสบสวน")]
public DateTime? InvestigationDateStart { get; set; }
[Comment("วันที่สิ้นสุดการสบสวน")]
[Comment("วันที่สิ้นสุดการสบสวน")]
public DateTime? InvestigationDateEnd { get; set; }
[Comment("รายละเอียดเกี่ยวกับการสืบสวน")]
@ -75,10 +75,11 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")]
public string? InvestigationCauseText { get; set; }
public DisciplineComplaint DisciplineComplaint { get; set; }
public virtual List<DisciplineInvestigate_Profile> DisciplineInvestigate_Profiles { get; set; } = new List<DisciplineInvestigate_Profile>();
public virtual List<DisciplineInvestigate_ProfileComplaint> DisciplineInvestigate_ProfileComplaints { get; set; } = new List<DisciplineInvestigate_ProfileComplaint>();
public virtual List<DisciplineInvestigate_DocComplaint> DisciplineInvestigate_DocComplaints { get; set; } = new List<DisciplineInvestigate_DocComplaint>();
public virtual List<DisciplineInvestigate_Doc> DisciplineInvestigate_Docs { get; set; } = new List<DisciplineInvestigate_Doc>();
public virtual List<DisciplineInvestigateRelevant_Doc> DisciplineInvestigateRelevant_Docs { get; set; } = new List<DisciplineInvestigateRelevant_Doc>();
public virtual List<DisciplineInvestigate_Director> DisciplineInvestigate_Directors { get; set; } = new List<DisciplineInvestigate_Director>();
public virtual List<DisciplineDisciplinary> DisciplineDisciplinarys { get; set; } = new List<DisciplineDisciplinary>();
}
}

View file

@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.Discipline
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสบสวน")]
[Required, Comment("อ้างอิงเรื่องสบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
}

View file

@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.Discipline
{
[Required, Comment("อ้างอิงรหัสกรรมการ")]
public DisciplineDirector DisciplineDirector { get; set; }
[Required, Comment("อ้างอิงเรื่องร้องเรียน")]
[Required, Comment("อ้างอิงเรื่องสืบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
}

View file

@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.Discipline
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องสบสวน")]
[Required, Comment("อ้างอิงเรื่องสบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
}

View file

@ -10,7 +10,7 @@ namespace BMA.EHR.Domain.Models.Discipline
{
[Required, Comment("อ้างอิงรหัสเอกสาร")]
public Document Document { get; set; }
[Required, Comment("อ้างอิงเรื่องร้องเรียน")]
[Required, Comment("อ้างอิงเรื่องสืบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
}

View file

@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Domain.Models.Discipline
{
public class DisciplineInvestigate_Profile : EntityBase
public class DisciplineInvestigate_ProfileComplaint : EntityBase
{
[Comment("id อ้างอิง profile")]
public Guid? PersonId { get; set; }
@ -29,7 +29,7 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Required, Comment("Id เรื่องร้องเรียน")]
[Required, Comment("Id เรื่องสืบสวน")]
public DisciplineInvestigate DisciplineInvestigate { get; set; }
}
}