drug_pharmacy_management_models.go 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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 float64 `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. }
  77. func (PharmacyBaseDrug) TableName() string {
  78. return "xt_base_drug"
  79. }
  80. type PharmacyDoctorAdvice struct {
  81. ID int64 `gorm:"column:id" json:"id" form:"id"`
  82. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  83. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  84. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  85. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  86. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  87. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  88. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  89. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  90. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  91. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  92. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  93. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  94. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  95. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  96. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  97. Status int64 `gorm:"column:status" json:"status" form:"status"`
  98. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  99. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  100. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  101. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  102. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  103. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  104. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  105. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  106. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  107. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  108. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  109. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  110. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  111. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  112. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  113. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  114. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  115. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  116. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  117. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  118. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  119. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  120. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  121. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  122. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  123. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  124. Way int64 `gorm:"column:way" json:"way" form:"way"`
  125. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  126. DrugNameId int64 `gorm:"column:drug_name_id" json:"drug_name_id" form:"drug_name_id"`
  127. SyncAdviceId int64 `gorm:"column:sync_advice_id" json:"sync_advice_id" form:"sync_advice_id"`
  128. IsSync int64 `gorm:"column:is_sync" json:"is_sync" form:"is_sync"`
  129. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  130. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  131. }
  132. func (PharmacyDoctorAdvice) TableName() string {
  133. return "xt_doctor_advice"
  134. }
  135. type PharmacyHisDoctorAdviceInfo struct {
  136. ID int64 `gorm:"column:id" json:"id" form:"id"`
  137. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  138. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  139. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  140. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  141. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  142. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  143. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  144. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  145. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  146. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  147. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  148. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  149. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  150. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  151. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  152. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  153. Status int64 `gorm:"column:status" json:"status" form:"status"`
  154. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  155. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  156. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  157. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  158. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  159. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  160. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  161. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  162. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  163. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  164. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  165. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  166. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  167. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  168. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  169. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  170. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  171. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  172. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  173. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  174. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  175. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  176. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  177. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  178. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  179. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  180. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  181. Price float64 `gorm:"column:price" json:"price" form:"price"`
  182. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  183. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  184. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  185. Day int64 `gorm:"column:day" json:"day" form:"day"`
  186. Diagnosis int64 `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
  187. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  188. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  189. Way int64 `gorm:"column:way" json:"way" form:"way"`
  190. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  191. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  192. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  193. }
  194. func (PharmacyHisDoctorAdviceInfo) TableName() string {
  195. return "his_doctor_advice_info"
  196. }
  197. type PharmacyConfig struct {
  198. ID int64 `gorm:"column:id" json:"id" form:"id"`
  199. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  200. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  201. Status int64 `gorm:"column:status" json:"status" form:"status"`
  202. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  203. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  204. }
  205. func (PharmacyConfig) TableName() string {
  206. return "xt_pharmacy_config"
  207. }
  208. type Pharmacy struct {
  209. ID int64 `gorm:"column:id" json:"id" form:"id"`
  210. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  211. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  212. HisAdviceInfoId int64 `gorm:"column:his_advice_info_id" json:"his_advice_info_id" form:"his_advice_info_id"`
  213. XtAdviceId int64 `gorm:"column:xt_advice_id" json:"xt_advice_id" form:"xt_advice_id"`
  214. HisOrXt int64 `gorm:"column:his_or_xt" json:"his_or_xt" form:"his_or_xt"`
  215. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  216. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  217. Status int64 `gorm:"column:status" json:"status" form:"status"`
  218. HisAdviceId int64 `gorm:"column:his_advice_id" json:"his_advice_id" form:"his_advice_id"`
  219. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  220. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  221. OrdreNumber string `gorm:"column:ordre_number" json:"ordre_number" form:"ordre_number"`
  222. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  223. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  224. }
  225. func (Pharmacy) TableName() string {
  226. return "xt_pharmacy"
  227. }