You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
8.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. using Microsoft.EntityFrameworkCore;
  2. using Shentun.Peis.CollectItemTypes;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel.DataAnnotations.Schema;
  7. using Volo.Abp.Domain.Entities;
  8. using Volo.Abp.Domain.Entities.Auditing;
  9. namespace Shentun.Peis.Models
  10. {
  11. /// <summary>
  12. /// 组合项目
  13. /// </summary>
  14. [Table("asbitem")]
  15. [Index(nameof(DisplayName), Name = "ix_asbitem", IsUnique = true)]
  16. public class Asbitem : AuditedEntity<Guid>, IDisplayName, IDisplayOrder, IHasConcurrencyStamp
  17. {
  18. public Asbitem(Guid id):base(id) { }
  19. public Asbitem()
  20. {
  21. AsbitemDetails = new HashSet<AsbitemDetail>();
  22. ChargeAsbitems = new HashSet<ChargeAsbitem>();
  23. CustomerOrgGroupDetails = new HashSet<CustomerOrgGroupDetail>();
  24. MedicalPackageDetails = new HashSet<MedicalPackageDetail>();
  25. RegisterCheckAsbitems = new HashSet<RegisterCheckAsbitem>();
  26. Rooms = new HashSet<Room>();
  27. }
  28. /// <summary>
  29. /// 名称
  30. /// </summary>
  31. [Column("display_name")]
  32. [StringLength(30)]
  33. public string DisplayName { get; set; }
  34. /// <summary>
  35. /// 简称
  36. /// </summary>
  37. [Column("short_name")]
  38. [StringLength(20)]
  39. public string ShortName { get; set; }
  40. /// <summary>
  41. /// 适用性别,M-男,F-女,A-全部
  42. /// </summary>
  43. [Column("for_sex_id")]
  44. [MaxLength(1)]
  45. public char ForSexId { get; set; }
  46. /// <summary>
  47. /// 婚姻状况
  48. /// </summary>
  49. [Column("marital_status_id")]
  50. [MaxLength(1)]
  51. public char MaritalStatusId { get; set; }
  52. /// <summary>
  53. /// 项目类别
  54. /// </summary>
  55. [Column("item_type_id")]
  56. public Guid ItemTypeId { get; set; }
  57. /// <summary>
  58. /// 价格
  59. /// </summary>
  60. [Column("price")]
  61. [Precision(8, 2)]
  62. public decimal Price { get; set; }
  63. /// <summary>
  64. /// 仪器类别
  65. /// </summary>
  66. [Column("device_type_id")]
  67. public Guid? DeviceTypeId { get; set; }
  68. /// <summary>
  69. ///// 发票类别
  70. ///// </summary>
  71. //[Column("invoice_item_type_id")]
  72. //public Guid InvoiceItemTypeId { get; set; }
  73. /// <summary>
  74. /// 汇总项目类别ID
  75. /// </summary>
  76. [Column("collect_item_type_id")]
  77. public Guid CollectItemTypeId { get; set; }
  78. /// <summary>
  79. /// 项目结果合并
  80. /// </summary>
  81. [Column("is_item_result_merger")]
  82. [MaxLength(1)]
  83. public char IsItemResultMerger { get; set; }
  84. /// <summary>
  85. /// 餐前项目
  86. /// </summary>
  87. [Column("is_before_eat")]
  88. [MaxLength(1)]
  89. public char IsBeforeEat { get; set; }
  90. /// <summary>
  91. /// 临床意义
  92. /// </summary>
  93. [Column("clinical_meaning")]
  94. [StringLength(100)]
  95. public string ClinicalMeaning { get; set; }
  96. /// <summary>
  97. /// 默认结果
  98. /// </summary>
  99. [Column("default_result")]
  100. [StringLength(100)]
  101. public string DefaultResult { get; set; }
  102. /// <summary>
  103. /// 候诊时间
  104. /// </summary>
  105. [Column("queue_time")]
  106. [Precision(3, 1)]
  107. public decimal QueueTime { get; set; }
  108. /// <summary>
  109. /// 启用诊断函数
  110. /// </summary>
  111. [Column("is_diagnosis_function")]
  112. [MaxLength(1)]
  113. public char IsDiagnosisFunction { get; set; }
  114. /// <summary>
  115. /// 诊断函数
  116. /// </summary>
  117. [Column("diagnosis_function")]
  118. [MaxLength(4000)]
  119. public string DiagnosisFunction { get; set; }
  120. /// <summary>
  121. /// 诊断函数处理完毕后继续处理
  122. /// </summary>
  123. [Column("is_continue_process")]
  124. [MaxLength(1)]
  125. public char IsContinueProcess { get; set; }
  126. /// <summary>
  127. /// 体检报告图片旋转90°
  128. /// </summary>
  129. [Column("is_picture_rotate")]
  130. [MaxLength(1)]
  131. public char IsPictureRotate { get; set; }
  132. /// <summary>
  133. /// 是否为检查项目
  134. /// </summary>
  135. [Column("is_check")]
  136. [MaxLength(1)]
  137. public char IsCheck { get; set; }
  138. /// <summary>
  139. /// 是否启用
  140. /// </summary>
  141. [Column("is_active")]
  142. [MaxLength(1)]
  143. public char IsActive { get; set; }
  144. [Column("simple_code")]
  145. [StringLength(30)]
  146. public string SimpleCode { get; set; } = null!;
  147. [Column("display_order")]
  148. public int DisplayOrder { get; set; }
  149. /// <summary>
  150. /// 条码模式 0-使用项目类别设置,1-打印人员登记号,2-不打印,默认值是0
  151. /// </summary>
  152. [Column("barcode_mode")]
  153. [MaxLength(1)]
  154. public char BarcodeMode { get; set; }
  155. /// <summary>
  156. /// 是否支持网上预约
  157. /// </summary>
  158. [Column("is_web_appoint")]
  159. [MaxLength(1)]
  160. public char IsWebAppoint { get; set; }
  161. /// <summary>
  162. /// 疾病筛查类别
  163. /// </summary>
  164. [Column("disease_screening_type_id")]
  165. public Guid? DiseaseScreeningTypeId { get; set; }
  166. /// <summary>
  167. /// 警告事项
  168. /// </summary>
  169. [MaxLength(100)]
  170. [Column("warn")]
  171. public string Warn { get; set; }
  172. /// <summary>
  173. /// 备孕期间禁止检查
  174. /// </summary>
  175. [MaxLength(1)]
  176. [Column("pregnant_flag")]
  177. public char PregnantFlag { get; set; }
  178. ///// <summary>
  179. ///// 备孕期间禁止检查
  180. ///// </summary>
  181. //[MaxLength(1)]
  182. //[Column("is_disable_prepare_pregnancy")]
  183. //public char IsDisablePreparePregnancy { get; set; }
  184. ///// <summary>
  185. ///// 怀孕期间禁止检查
  186. ///// </summary>
  187. //[MaxLength(1)]
  188. //[Column("is_disable_pregnancy")]
  189. //public char IsDisablePregnancy { get; set; }
  190. [Column("concurrency_stamp")]
  191. public string ConcurrencyStamp { get; set; }
  192. //[ForeignKey(nameof(InvoiceItemTypeId))]
  193. //[InverseProperty("Asbitems")]
  194. //public virtual InvoiceItemType InvoiceItemType { get; set; }
  195. [ForeignKey(nameof(CollectItemTypeId))]
  196. [InverseProperty("Asbitems")]
  197. public virtual CollectItemType CollectItemType { get; set; }
  198. [ForeignKey(nameof(ItemTypeId))]
  199. [InverseProperty("Asbitems")]
  200. public virtual ItemType ItemType { get; set; } = null!;
  201. [InverseProperty("Asbitem")]
  202. public virtual SampleGroupDetail SampleGroupDetail { get; set; } = null!;
  203. [InverseProperty(nameof(AsbitemDetail.Asbitem))]
  204. public virtual ICollection<AsbitemDetail> AsbitemDetails { get; set; }
  205. [InverseProperty(nameof(ChargeAsbitem.Asbitem))]
  206. public virtual ICollection<ChargeAsbitem> ChargeAsbitems { get; set; }
  207. [InverseProperty(nameof(ChargeRequestAsbitem.Asbitem))]
  208. public virtual ICollection<ChargeRequestAsbitem> ChargeRequestAsbitems { get; set; }
  209. [InverseProperty(nameof(CustomerOrgGroupDetail.Asbitem))]
  210. public virtual ICollection<CustomerOrgGroupDetail> CustomerOrgGroupDetails { get; set; }
  211. [InverseProperty(nameof(MedicalPackageDetail.Asbitem))]
  212. public virtual ICollection<MedicalPackageDetail> MedicalPackageDetails { get; set; }
  213. [InverseProperty(nameof(RegisterCheckAsbitem.Asbitem))]
  214. public virtual ICollection<RegisterCheckAsbitem> RegisterCheckAsbitems { get; set; }
  215. [ForeignKey("AsbitemId")]
  216. [InverseProperty(nameof(Room.Asbitems))]
  217. public virtual ICollection<Room> Rooms { get; set; }
  218. #region 审计属性
  219. //public DateTime CreationTime { get; set; }
  220. //public Guid? CreatorId { get; set; }
  221. //public Guid? LastModifierId { get; set; }
  222. //public DateTime? LastModificationTime { get; set; }
  223. //public Guid? DeleterId { get; set; }
  224. //public DateTime? DeletionTime { get; set; }
  225. //public bool IsDeleted { get; set; }
  226. //public override object[] GetKeys()
  227. //{
  228. // return new object[] { AsbitemId };
  229. //}
  230. #endregion
  231. }
  232. }