pharmacy_models.go 39KB

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