drug.go 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package models
  2. type BaseDrugLib struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. DrugName string `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
  5. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  6. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  7. DrugAlias string `gorm:"column:drug_alias" json:"drug_alias" form:"drug_alias"`
  8. DrugAliasPinyin string `gorm:"column:drug_alias_pinyin" json:"drug_alias_pinyin" form:"drug_alias_pinyin"`
  9. DrugAliasWubi string `gorm:"column:drug_alias_wubi" json:"drug_alias_wubi" form:"drug_alias_wubi"`
  10. DrugCategory int64 `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
  11. DrugSpec string `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  12. DrugType int64 `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
  13. DrugStockLimit string `gorm:"column:drug_stock_limit" json:"drug_stock_limit" form:"drug_stock_limit"`
  14. DrugOriginPlace string `gorm:"column:drug_origin_place" json:"drug_origin_place" form:"drug_origin_place"`
  15. DrugDosageForm int64 `gorm:"column:drug_dosage_form" json:"drug_dosage_form" form:"drug_dosage_form"`
  16. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  17. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  18. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  19. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  20. Dose float64 `gorm:"column:dose" json:"dose" form:"dose"`
  21. DoseUnit string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
  22. MinPrice float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
  23. UnitMatrixing string `gorm:"column:unit_matrixing" json:"unit_matrixing" form:"unit_matrixing"`
  24. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  25. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  26. DrugControl int64 `gorm:"column:drug_control" json:"drug_control" form:"drug_control"`
  27. Number string `gorm:"column:number" json:"number" form:"number"`
  28. DrugClassify string `gorm:"column:drug_classify" json:"drug_classify" form:"drug_classify"`
  29. DrugDose float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
  30. DrugDoseUnit int64 `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
  31. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  32. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  33. PharmacologyCategory int64 `gorm:"column:pharmacology_category" json:"pharmacology_category" form:"pharmacology_category"`
  34. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  35. Code string `gorm:"column:code" json:"code" form:"code"`
  36. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  37. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  38. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  39. DrugStatus string `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
  40. LimitRemark string `gorm:"column:limit_remark" json:"limit_remark" form:"limit_remark"`
  41. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  42. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  43. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  44. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  45. Label int64 `gorm:"column:label" json:"label" form:"label"`
  46. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  47. IsUseDoctorAdvice int64 `gorm:"column:is_use_doctor_advice" json:"is_use_doctor_advice" form:"is_use_doctor_advice"`
  48. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  49. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  50. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  51. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  52. Status int64 `gorm:"column:status" json:"status" form:"status"`
  53. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  54. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  55. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  56. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  57. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  58. PrescriptionMark int64 `gorm:"column:prescription_mark" json:"prescription_mark" form:"prescription_mark"`
  59. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  60. DrugRemark string `gorm:"column:drug_remark" json:"drug_remark" form:"drug_remark"`
  61. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  62. DoseCode string `gorm:"column:dose_code" json:"dose_code" form:"dose_code"`
  63. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  64. HospApprFlag int64 `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
  65. LmtUsedFlag int64 `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
  66. //MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
  67. DrugDay string `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
  68. Total float64 `gorm:"column:total" json:"total" form:"total"`
  69. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  70. }
  71. func (BaseDrugLib) TableName() string {
  72. return "xt_base_drug"
  73. }
  74. type DrugUnitSafeguard struct {
  75. ID int64 `gorm:"column:id" json:"id" form:"id"`
  76. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  77. ConversionFactor string `gorm:"column:conversion_factor" json:"conversion_factor" form:"conversion_factor"`
  78. IsStockUse int64 `gorm:"column:is_stock_use" json:"is_stock_use" form:"is_stock_use"`
  79. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  80. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  81. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  82. Status int64 `gorm:"column:status" json:"status" form:"status"`
  83. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  84. }
  85. func (DrugUnitSafeguard) TableName() string {
  86. return "xt_drug_unit_safeguard"
  87. }
  88. type MedicineInsurancePercentage struct {
  89. ID int64 `gorm:"column:id" json:"id" form:"id"`
  90. MedicineInsuranceType int64 `gorm:"column:medicine_insurance_type" json:"medicine_insurance_type" form:"medicine_insurance_type"`
  91. Percent float64 `gorm:"column:percent" json:"percent" form:"percent"`
  92. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  93. Status int64 `gorm:"column:status" json:"status" form:"status"`
  94. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  95. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  96. TypeId int64 `gorm:"column:type_id" json:"drug_id" form:"type_id"`
  97. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  98. Module int64 `gorm:"column:module" json:"module" form:"module"`
  99. GoodId int64 `gorm:"column:good_id" json:"good_id" form:"good_id"`
  100. }
  101. func (MedicineInsurancePercentage) TableName() string {
  102. return "xt_medicine_insurance_percentage"
  103. }