pharmacy_models.go 40KB

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