drug_pharmacy_management_models.go 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. package models
  2. type PharmacyBaseDrug struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. DrugName string `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
  5. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  6. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  7. DrugAlias string `gorm:"column:drug_alias" json:"drug_alias" form:"drug_alias"`
  8. DrugAliasPinyin string `gorm:"column:drug_alias_pinyin" json:"drug_alias_pinyin" form:"drug_alias_pinyin"`
  9. DrugAliasWubi string `gorm:"column:drug_alias_wubi" json:"drug_alias_wubi" form:"drug_alias_wubi"`
  10. DrugCategory int64 `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
  11. DrugSpec string `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  12. DrugType int64 `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
  13. DrugStockLimit string `gorm:"column:drug_stock_limit" json:"drug_stock_limit" form:"drug_stock_limit"`
  14. DrugOriginPlace string `gorm:"column:drug_origin_place" json:"drug_origin_place" form:"drug_origin_place"`
  15. DrugDosageForm int64 `gorm:"column:drug_dosage_form" json:"drug_dosage_form" form:"drug_dosage_form"`
  16. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  17. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  18. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  19. UnitMatrixing string `gorm:"column:unit_matrixing" json:"unit_matrixing" form:"unit_matrixing"`
  20. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  21. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  22. DrugControl int64 `gorm:"column:drug_control" json:"drug_control" form:"drug_control"`
  23. Number string `gorm:"column:number" json:"number" form:"number"`
  24. DrugClassify string `gorm:"column:drug_classify" json:"drug_classify" form:"drug_classify"`
  25. DrugDose float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
  26. DrugDoseUnit int64 `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
  27. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  28. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  29. PharmacologyCategory int64 `gorm:"column:pharmacology_category" json:"pharmacology_category" form:"pharmacology_category"`
  30. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  31. Code string `gorm:"column:code" json:"code" form:"code"`
  32. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  33. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  34. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  35. DrugStatus string `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
  36. LimitRemark string `gorm:"column:limit_remark" json:"limit_remark" form:"limit_remark"`
  37. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  38. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  39. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  40. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  41. Label int64 `gorm:"column:label" json:"label" form:"label"`
  42. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  43. IsUseDoctorAdvice int64 `gorm:"column:is_use_doctor_advice" json:"is_use_doctor_advice" form:"is_use_doctor_advice"`
  44. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  45. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  46. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  47. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  48. Status int64 `gorm:"column:status" json:"status" form:"status"`
  49. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  50. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  51. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  52. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  53. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  54. DoseCode string `gorm:"column:dose_code" json:"dose_code" form:"dose_code"`
  55. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  56. DrugRemark string `gorm:"column:drug_remark" json:"drug_remark" form:"drug_remark"`
  57. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  58. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  59. PrescriptionMark int64 `gorm:"column:prescription_mark" json:"prescription_mark" form:"prescription_mark"`
  60. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  61. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  62. Total float64 `gorm:"column:total" json:"total" form:"total"`
  63. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  64. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  65. Dose string `gorm:"column:dose" json:"dose" form:"dose"`
  66. DoseUnit string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
  67. DrugDay string `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
  68. MinPrice float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
  69. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  70. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  71. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  72. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  73. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  74. IsPharmacy int64 `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
  75. DrugWarehouseInfo []*XtDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
  76. IsZeroFlag int64 `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
  77. }
  78. func (PharmacyBaseDrug) TableName() string {
  79. return "xt_base_drug"
  80. }
  81. type PharmacyDoctorAdvice struct {
  82. ID int64 `gorm:"column:id" json:"id" form:"id"`
  83. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  84. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  85. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  86. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  87. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  88. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  89. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  90. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  91. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  92. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  93. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  94. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  95. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  96. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  97. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  98. Status int64 `gorm:"column:status" json:"status" form:"status"`
  99. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  100. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  101. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  102. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  103. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  104. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  105. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  106. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  107. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  108. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  109. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  110. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  111. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  112. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  113. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  114. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  115. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  116. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  117. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  118. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  119. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  120. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  121. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  122. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  123. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  124. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  125. Way int64 `gorm:"column:way" json:"way" form:"way"`
  126. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  127. DrugNameId int64 `gorm:"column:drug_name_id" json:"drug_name_id" form:"drug_name_id"`
  128. SyncAdviceId int64 `gorm:"column:sync_advice_id" json:"sync_advice_id" form:"sync_advice_id"`
  129. IsSync int64 `gorm:"column:is_sync" json:"is_sync" form:"is_sync"`
  130. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  131. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  132. }
  133. func (PharmacyDoctorAdvice) TableName() string {
  134. return "xt_doctor_advice"
  135. }
  136. type PharmacyHisDoctorAdviceInfo struct {
  137. ID int64 `gorm:"column:id" json:"id" form:"id"`
  138. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  139. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  140. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  141. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  142. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  143. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  144. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  145. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  146. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  147. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  148. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  149. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  150. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  151. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  152. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  153. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  154. Status int64 `gorm:"column:status" json:"status" form:"status"`
  155. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  156. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  157. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  158. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  159. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  160. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  161. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  162. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  163. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  164. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  165. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  166. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  167. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  168. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  169. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  170. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  171. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  172. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  173. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  174. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  175. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  176. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  177. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  178. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  179. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  180. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  181. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  182. Price float64 `gorm:"column:price" json:"price" form:"price"`
  183. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  184. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  185. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  186. Day int64 `gorm:"column:day" json:"day" form:"day"`
  187. Diagnosis int64 `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
  188. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  189. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  190. Way int64 `gorm:"column:way" json:"way" form:"way"`
  191. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  192. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  193. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  194. ExecutionFrequencyId int64 `gorm:"column:execution_frequency_id" json:"execution_frequency_id" form:"execution_frequency_id"`
  195. IsSelfDrug int64 `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
  196. }
  197. func (PharmacyHisDoctorAdviceInfo) TableName() string {
  198. return "his_doctor_advice_info"
  199. }
  200. type PharmacyConfig struct {
  201. ID int64 `gorm:"column:id" json:"id" form:"id"`
  202. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  203. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  204. Status int64 `gorm:"column:status" json:"status" form:"status"`
  205. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  206. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  207. }
  208. func (PharmacyConfig) TableName() string {
  209. return "xt_pharmacy_config"
  210. }
  211. type Pharmacy struct {
  212. ID int64 `gorm:"column:id" json:"id" form:"id"`
  213. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  214. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  215. HisAdviceInfoId int64 `gorm:"column:his_advice_info_id" json:"his_advice_info_id" form:"his_advice_info_id"`
  216. XtAdviceId int64 `gorm:"column:xt_advice_id" json:"xt_advice_id" form:"xt_advice_id"`
  217. HisOrXt int64 `gorm:"column:his_or_xt" json:"his_or_xt" form:"his_or_xt"`
  218. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  219. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  220. Status int64 `gorm:"column:status" json:"status" form:"status"`
  221. HisAdviceId int64 `gorm:"column:his_advice_id" json:"his_advice_id" form:"his_advice_id"`
  222. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  223. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  224. OrdreNumber string `gorm:"column:ordre_number" json:"ordre_number" form:"ordre_number"`
  225. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  226. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  227. }
  228. func (Pharmacy) TableName() string {
  229. return "xt_pharmacy"
  230. }
  231. type XtDrugCodeConfig struct {
  232. ID int64 `gorm:"column:id" json:"id" form:"id"`
  233. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  234. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  235. Status int64 `gorm:"column:status" json:"status" form:"status"`
  236. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  237. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  238. }
  239. func (XtDrugCodeConfig) TableName() string {
  240. return "xt_drug_code_config"
  241. }