pharmacy_models.go 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. package models
  2. // 药房表
  3. type Pharmary struct {
  4. ID int64 `gorm:"column:id" json:"id" form:"id"`
  5. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  6. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  7. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  8. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  9. Status int64 `gorm:"column:status" json:"status" form:"status"`
  10. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  11. }
  12. func (Pharmary) TableName() string {
  13. return "sgj_xt.xt_pharmacy"
  14. }
  15. type XtErrs struct {
  16. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  17. Route string `gorm:"column:route" json:"route" form:"route"`
  18. Parameter string `gorm:"column:parameter" json:"parameter" form:"parameter"`
  19. Text_err string `gorm:"column:text_err" json:"text_err" form:"text_err"`
  20. }
  21. func (XtErrs) TableName() string {
  22. return "sgj_xt.xt_errs"
  23. }
  24. // 病人
  25. type TmpPatient struct {
  26. PatientID int64
  27. Name string
  28. DialysisNo string //透析号
  29. }
  30. type TmpPatientOne struct {
  31. PatientID int64 `gorm:"column:id" json:"PatientID" form:"id"`
  32. DialysisNo string `gorm:"column:dialysis_no" json:"DialysisNo" form:"dialysis_no"`
  33. Name string `gorm:"column:name" json:"Name" form:"name"`
  34. }
  35. func (TmpPatientOne) TableName() string {
  36. return "xt_patients"
  37. }
  38. // 药品信息
  39. type PharmacyContent struct {
  40. ID int64
  41. Name string //名称
  42. SingleDosage string //单次用量
  43. Usage string //用法
  44. Frequency string //频率
  45. Days string //天数
  46. Total string //总量
  47. Doctor string //开立医生
  48. DataSources string //数据来源
  49. Remarks string //备注
  50. DrugId int64
  51. ExecutionTime int64
  52. ExecutionStaff int64
  53. ExecutionState int64
  54. Price float64
  55. DrugCode string
  56. ZeroFlag string
  57. }
  58. // 发药明细列表
  59. type DispensingList struct {
  60. PatientID int64 // 患者id
  61. Name string //患者姓名
  62. DoctorId int64 //医生id
  63. DoctorName string //医生姓名
  64. RecordTime int64 //发药时间(转化前)
  65. RecordDate string //发药时间(转化后)
  66. }
  67. type PrescripDetailsList struct {
  68. Name string //处方名
  69. Id int64 //处方id
  70. Pres []*PrescripDetails
  71. }
  72. // 处方详情
  73. type PrescripDetails struct {
  74. Drugname string //药品名称
  75. SingleDosage string //单次用量
  76. Usage string //用法
  77. Frequency string //频率
  78. Days string //天数
  79. Total string //总量
  80. UnitPrice string //单价
  81. Remarks string //备注
  82. }
  83. // 临时医嘱
  84. type StatOrder struct {
  85. StartTime string //开始时间
  86. Name string //医嘱名称
  87. Specifications string //药品规格
  88. PreQuantity string //开药数量
  89. SingleDosage string //单次用量
  90. RouteOfAdministration string //给药途径
  91. ExecutionFrequency string //执行频率
  92. }
  93. // 退库用的结构体
  94. type SpecialForStock struct {
  95. BatchNumber string `json:"batch_number"`
  96. BatchNumberId int64 `json:"batch_number_id"`
  97. Dealer string `json:"dealer"`
  98. DrugId int64 `json:"drug_id"`
  99. DrugName string `json:"drug_name"`
  100. DrugType int64 `json:"drug_type"`
  101. DrugWarehouseInfo interface{} `json:"drug_warehouse_info"`
  102. ExpiryDate string `json:"expiry_date"`
  103. LastPrice float64 `json:"last_price"`
  104. Manufacturer string `json:"manufacturer"`
  105. MaxUnit string `json:"max_unit"`
  106. MinUnit string `json:"min_unit"`
  107. Name string `json:"name"`
  108. Price string `json:"price"`
  109. ProductDate string `json:"product_date"`
  110. RegisterAccount string `json:"register_account"`
  111. Remark string `json:"remark"`
  112. RetailPrice string `json:"retail_price"`
  113. ReturnCount string `json:"return_count"`
  114. }
  115. // 药品发药药品列表
  116. type ListOfDrugs struct {
  117. ID int64 `json:"id"` //药品id
  118. Name string `json:"name"` //药品 名称
  119. Specifications string `json:"specifications"` //规格
  120. Stock string `json:"stock"` //库存(当前的仓库库存)
  121. }
  122. // 病人信息
  123. type PatientInformation struct {
  124. Id string `json:"id"` //hid表示his_doctor_advice_info的id ,xid表示xt_doctor_advice的id
  125. PatientId int64 `json:"patient_id"` //患者id
  126. Name string `json:"name"` //患者姓名
  127. SingleDosage string `json:"single_dosage"` //单次用量
  128. Usage string `json:"usage"` //用法
  129. Frequency string `json:"frequency"` //频率
  130. Days string `json:"days"` //天数
  131. Total string `json:"total"` //总量
  132. DataSources string `json:"data_sources"` //数据来源
  133. People string `json:"people"` //领药人
  134. Quantity int64 `json:"quantity"` //总量拆分——数据部分
  135. Unit string `json:"unit"` //总量拆分——单位部分
  136. DrugCode string
  137. ID int64
  138. }
  139. type HisDoctorAdviceInfoL struct {
  140. ID int64 `gorm:"column:id" json:"id" form:"id"`
  141. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  142. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  143. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  144. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  145. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  146. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  147. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  148. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  149. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  150. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  151. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  152. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  153. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  154. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  155. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  156. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  157. Status int64 `gorm:"column:status" json:"status" form:"status"`
  158. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  159. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  160. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  161. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  162. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  163. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  164. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  165. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  166. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  167. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  168. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  169. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  170. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  171. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  172. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  173. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  174. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  175. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  176. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  177. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  178. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  179. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  180. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  181. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  182. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  183. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  184. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  185. Price float64 `gorm:"column:price" json:"price" form:"price"`
  186. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  187. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  188. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  189. Day int64 `gorm:"column:day" json:"day" form:"day"`
  190. Diagnosis int64 `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
  191. Way int64 `gorm:"column:way" json:"way" form:"way"`
  192. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  193. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  194. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  195. People int64 `gorm:"column:people" json:"people" form:"people"`
  196. DispensingTime int64 `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
  197. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  198. ZeroFlag int64 `gorm:"column:zero_flag" json:"zero_flag" form:"zero_flag"`
  199. }
  200. func (HisDoctorAdviceInfoL) TableName() string {
  201. return "sgj_xt.his_doctor_advice_info"
  202. }
  203. type XtDoctorAdviceL struct {
  204. ID int64 `gorm:"column:id" json:"id" form:"id"`
  205. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  206. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  207. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  208. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  209. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  210. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  211. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  212. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  213. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  214. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  215. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  216. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  217. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  218. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  219. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  220. Status int64 `gorm:"column:status" json:"status" form:"status"`
  221. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  222. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  223. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  224. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  225. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  226. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  227. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  228. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  229. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  230. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  231. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  232. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  233. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  234. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  235. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  236. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  237. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  238. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  239. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  240. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  241. RemindType int64 `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
  242. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  243. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  244. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  245. TemplateId string `gorm:"column:template_id" json:"template_id" form:"template_id"`
  246. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  247. CheckerName string `gorm:"column:user_name" json:"name" form:"name"`
  248. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  249. IsMedicine int64 `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
  250. People int64 `gorm:"column:people" json:"people" form:"people"`
  251. DispensingTime int64 `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
  252. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  253. Price float64 `gorm:"column:price" json:"price" form:"price"`
  254. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  255. }
  256. func (XtDoctorAdviceL) TableName() string {
  257. return "sgj_xt.xt_doctor_advice"
  258. }
  259. type TmpTTT struct {
  260. PatientID int64
  261. }
  262. type TmpLLL struct {
  263. DrugId int64
  264. }
  265. type TmpID struct {
  266. Id int64
  267. DispensingTime int64
  268. }
  269. type TmpAdviceDoctor struct {
  270. AdviceDoctor int64
  271. }
  272. // 替换药品名称
  273. type ReplacementDrugs struct {
  274. Id int64 `json:"id"`
  275. Name string `json:"name"`
  276. }
  277. // 病人
  278. type DialysisPatient struct {
  279. ID int64 `json:"id"`
  280. Name string `json:"name"`
  281. }
  282. // 项目下拉列表
  283. type DropDownList struct {
  284. Id string `json:"id"`
  285. Name string `json:"name"`
  286. }
  287. type XtHisProjectL struct {
  288. ID int64 `gorm:"column:id" json:"id" form:"id"`
  289. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  290. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  291. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  292. Price float64 `gorm:"column:price" json:"price" form:"price"`
  293. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  294. CostClassify int64 `gorm:"column:cost_classify" json:"cost_classify" form:"cost_classify"`
  295. ExecutiveSection int64 `gorm:"column:executive_section" json:"executive_section" form:"executive_section"`
  296. MedicalCoverage int64 `gorm:"column:medical_coverage" json:"medical_coverage" form:"medical_coverage"`
  297. StatisticalClassification int64 `gorm:"column:statistical_classification" json:"statistical_classification" form:"statistical_classification"` //统计分类(组
  298. DiseaseDirectory int64 `gorm:"column:disease_directory" json:"disease_directory" form:"disease_directory"`
  299. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  300. MedicalCode string `gorm:"column:medical_code" json:"medical_code" form:"medical_code"`
  301. TubeColor int64 `gorm:"column:tube_color" json:"tube_color" form:"tube_color"`
  302. MedicalStatus int64 `gorm:"column:medical_status" json:"medical_status" form:"medical_status"`
  303. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  304. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  305. DefaultNumber string `gorm:"column:default_number" json:"prescribing_number" form:"default_number"`
  306. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  307. IsCharge int64 `gorm:"column:is_charge" json:"is_charge" form:"is_charge"`
  308. IsEstimate int64 `gorm:"column:is_estimate" json:"is_estimate" form:"is_estimate"`
  309. IsWorkload int64 `gorm:"column:is_workload" json:"is_workload" form:"is_workload"`
  310. Sort string `gorm:"column:sort" json:"sort" form:"sort"`
  311. DoctorAdvice int64 `gorm:"column:doctor_advice" json:"doctor_advice" form:"doctor_advice"`
  312. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  313. Status int64 `gorm:"column:status" json:"status" form:"status"`
  314. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  315. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  316. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  317. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  318. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  319. NumberDays string `gorm:"column:number_days" json:"day" form:"number_days"`
  320. Total string `gorm:"column:total" json:"total" form:"total"`
  321. Category int64 `gorm:"column:category" json:"category" form:"category"`
  322. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  323. SpecailProject int64 `gorm:"column:specail_project" json:"specail_project" form:"specail_project"`
  324. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  325. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  326. Translate string `json:"translate"` //翻译——统计分类(组
  327. }
  328. func (XtHisProjectL) TableName() string {
  329. return "sgj_xt.xt_his_project"
  330. }
  331. type GoodInfoL struct {
  332. ID int64 `gorm:"column:id" json:"id" form:"id"`
  333. GoodCode string `gorm:"column:good_code" json:"good_code" form:"good_code"`
  334. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  335. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  336. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
  337. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
  338. SellPrice float64 `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
  339. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  340. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  341. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  342. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  343. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  344. ExpiryDateWarnDayCount int64 `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
  345. StockWarnCount int64 `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
  346. IsReuse int64 `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
  347. Status int64 `gorm:"column:status" json:"status" form:"status"`
  348. FilmArea string `gorm:"column:film_area" json:"film_area" form:"film_area"`
  349. IsUse int64 `gorm:"column:is_use" json:"is_use" form:"is_use"`
  350. FilmMaterialQuality string `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
  351. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  352. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  353. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  354. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  355. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  356. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  357. GoodKind int64 `gorm:"column:good_kind" json:"good_kind" form:"good_kind"` //组
  358. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  359. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  360. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  361. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  362. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  363. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  364. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  365. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  366. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  367. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  368. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  369. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  370. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  371. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  372. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  373. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  374. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  375. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  376. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  377. CommdityCode string `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
  378. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  379. ProductionType string `gorm:"column:production_type" json:"production_type" form:"production_type"`
  380. SpecialMedical string `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
  381. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  382. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  383. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  384. PackingPrice float64 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
  385. DefaultCountUnit string `gorm:"column:default_count_unit" json:"default_count_unit" form:"default_count_unit"`
  386. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  387. Total float64 `gorm:"column:total" json:"total" form:"total"`
  388. StWarehousingInfo []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
  389. CancelStockInfo []*CancelStockInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"cancel_stock_info"`
  390. RegisterNumber string `gorm:"column:register_number" json:"register_number" form:"register_number"`
  391. GoodSotckInfo []*GoodSotckInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_stock_in"`
  392. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  393. Number string `gorm:"column:number" json:"number" form:"number"`
  394. IsWarehouse int64 `gorm:"column:is_warehouse" json:"is_warehouse" form:"is_warehouse"`
  395. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  396. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  397. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  398. WarehousingInfo []*WarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_info"`
  399. Translate string `json:"translate"` //翻译——统计分类(组
  400. }
  401. func (GoodInfoL) TableName() string {
  402. return "sgj_xt.xt_good_information"
  403. }
  404. type BaseDrugLibL struct {
  405. ID int64 `gorm:"column:id" json:"id" form:"id"`
  406. DrugName string `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
  407. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  408. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  409. DrugAlias string `gorm:"column:drug_alias" json:"drug_alias" form:"drug_alias"`
  410. DrugAliasPinyin string `gorm:"column:drug_alias_pinyin" json:"drug_alias_pinyin" form:"drug_alias_pinyin"`
  411. DrugAliasWubi string `gorm:"column:drug_alias_wubi" json:"drug_alias_wubi" form:"drug_alias_wubi"`
  412. DrugCategory int64 `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
  413. DrugSpec string `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  414. DrugType int64 `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
  415. DrugStockLimit string `gorm:"column:drug_stock_limit" json:"drug_stock_limit" form:"drug_stock_limit"`
  416. DrugOriginPlace string `gorm:"column:drug_origin_place" json:"drug_origin_place" form:"drug_origin_place"`
  417. DrugDosageForm int64 `gorm:"column:drug_dosage_form" json:"drug_dosage_form" form:"drug_dosage_form"`
  418. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  419. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  420. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  421. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  422. Dose string `gorm:"column:dose" json:"dose" form:"dose"`
  423. DoseUnit string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
  424. MinPrice float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
  425. UnitMatrixing string `gorm:"column:unit_matrixing" json:"unit_matrixing" form:"unit_matrixing"`
  426. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  427. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  428. DrugControl int64 `gorm:"column:drug_control" json:"drug_control" form:"drug_control"`
  429. Number string `gorm:"column:number" json:"number" form:"number"`
  430. DrugClassify string `gorm:"column:drug_classify" json:"drug_classify" form:"drug_classify"`
  431. DrugDose float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
  432. DrugDoseUnit int64 `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
  433. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  434. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  435. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  436. PharmacologyCategory int64 `gorm:"column:pharmacology_category" json:"pharmacology_category" form:"pharmacology_category"`
  437. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  438. Code string `gorm:"column:code" json:"code" form:"code"`
  439. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  440. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  441. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  442. DrugStatus string `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
  443. LimitRemark string `gorm:"column:limit_remark" json:"limit_remark" form:"limit_remark"`
  444. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  445. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  446. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  447. SingleDoseUnit string `json:"single_dose_unit"` //danwei
  448. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  449. Label int64 `gorm:"column:label" json:"label" form:"label"`
  450. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  451. IsUseDoctorAdvice int64 `gorm:"column:is_use_doctor_advice" json:"is_use_doctor_advice" form:"is_use_doctor_advice"`
  452. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  453. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  454. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  455. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  456. Status int64 `gorm:"column:status" json:"status" form:"status"`
  457. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  458. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  459. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  460. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  461. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  462. PrescriptionMark int64 `gorm:"column:prescription_mark" json:"prescription_mark" form:"prescription_mark"`
  463. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  464. DrugRemark string `gorm:"column:drug_remark" json:"drug_remark" form:"drug_remark"`
  465. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  466. DoseCode string `gorm:"column:dose_code" json:"dose_code" form:"dose_code"`
  467. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  468. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  469. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  470. //MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
  471. DrugDay string `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
  472. Total float64 `gorm:"column:total" json:"total" form:"total"`
  473. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  474. DrugWarehouseInfo []*XtDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
  475. IsUse int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  476. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  477. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  478. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  479. IsPharmacy int64 `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
  480. List1 interface{} `json:"list_1"`
  481. List2 interface{} `json:"list_2"`
  482. }
  483. func (BaseDrugLibL) TableName() string {
  484. return "xt_base_drug"
  485. }
  486. // 组
  487. type HisPrescriptionInfoTemplateL struct {
  488. ID int64 `gorm:"column:id" json:"id" form:"id"`
  489. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  490. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  491. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  492. Status int64 `gorm:"column:status" json:"status" form:"status"`
  493. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  494. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  495. Type int64 `gorm:"column:type" json:"type" form:"type"`
  496. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  497. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  498. PType int64 `gorm:"column:p_type" json:"p_type" form:"p_type"`
  499. PTemplateId int64 `gorm:"column:p_template_id" json:"p_template_id" form:"p_template_id"`
  500. HisPrescriptionAdviceTemplate []*HisPrescriptionAdviceTemplate `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"advices"`
  501. HisPrescriptionProjectTemplate []*HisPrescriptionProjectTemplateL `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
  502. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  503. }
  504. func (HisPrescriptionInfoTemplateL) TableName() string {
  505. return "his_prescription_info_template"
  506. }
  507. type HisPrescriptionProjectTemplateL struct {
  508. ID int64 `gorm:"column:id" json:"id" form:"id"`
  509. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  510. Price float64 `gorm:"column:price" json:"price" form:"price"`
  511. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  512. Status int64 `gorm:"column:status" json:"status" form:"status"`
  513. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  514. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  515. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  516. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  517. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  518. Count string `gorm:"column:count" json:"count" form:"count"`
  519. FeedetlSn string `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
  520. MedListCodg string `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
  521. SingleDose string `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  522. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  523. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  524. Day string `gorm:"column:day" json:"day" form:"day"`
  525. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  526. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  527. Type int64 `gorm:"column:type" json:"type" form:"type"`
  528. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  529. XtHisProject XtHisProjectL `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"project"`
  530. GoodInfo GoodInfoL `gorm:"ForeignKey:ID;AssociationForeignKey:ProjectId" json:"good_info"`
  531. FrequencyType int64 `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
  532. DayCount int64 `gorm:"column:day_count" json:"day_count" form:"day_count"`
  533. WeekDay string `gorm:"column:week_day" json:"week_day" form:"week_day"`
  534. }
  535. func (HisPrescriptionProjectTemplateL) TableName() string {
  536. return "his_prescription_project_template"
  537. }