pharmacy_models.go 40KB

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