瀏覽代碼

医保对接

csx 3 年之前
父節點
當前提交
37b07aca19
共有 3 個文件被更改,包括 2 次插入9 次删除
  1. 0 3
      controllers/his_print_api_controller.go
  2. 0 4
      models/his_print_models.go
  3. 2 2
      service/his_print_service.go

+ 0 - 3
controllers/his_print_api_controller.go 查看文件

@@ -30,7 +30,6 @@ func (c *HisPrintApiController) GetBatchHisPrescriptionData() {
30 30
 	recordDateTime := theTime.Unix()
31 31
 	adminInfo := c.GetAdminUserInfo()
32 32
 	ids := strings.Split(patient_ids, ",")
33
-
34 33
 	switch print_type {
35 34
 	case 1:
36 35
 		patients, _ := service.GetBatchDrugHisPrescription(ids, recordDateTime, adminInfo.CurrentOrgId)
@@ -50,7 +49,5 @@ func (c *HisPrintApiController) GetBatchHisPrescriptionData() {
50 49
 			"patients": patients,
51 50
 		})
52 51
 		break
53
-
54 52
 	}
55
-
56 53
 }

+ 0 - 4
models/his_print_models.go 查看文件

@@ -80,13 +80,9 @@ type HisPrintPrescription struct {
80 80
 	HisPatient             VMHisPatient              `gorm:"ForeignKey:PatientId;AssociationForeignKey:patient_id" json:"hisPatient"`
81 81
 	HisDoctorAdviceInfo    []*HisDoctorAdviceInfo    `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"advices"`
82 82
 	HisPrescriptionProject []*HisPrescriptionProject `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"project"`
83
-	HisAdditionalCharge    []*HisAdditionalCharge    `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
84
-	HisPrescriptionInfo    HisPrescriptionInfo       `gorm:"ForeignKey:PatientId,RecordDate;AssociationForeignKey:PatientId,ScheduleDate" json:"info"`
85
-	HisOrder               HisOrder                  `gorm:"ForeignKey:PrescriptionId;AssociationForeignKey:ID" json:"addition"`
86 83
 	Total                  string                    `gorm:"-" json:"total" form:"total"`
87 84
 	PType                  int64                     `gorm:"column:p_type" json:"p_type" form:"p_type"`
88 85
 	MedType                string                    `gorm:"column:med_type" json:"med_type" form:"med_type"`
89
-	TempHisOrder           TempHisOrder              `gorm:"ForeignKey:Number,MedType;AssociationForeignKey:BatchNumber,MedType" json:"order"`
90 86
 }
91 87
 
92 88
 func (HisPrintPrescription) TableName() string {

+ 2 - 2
service/his_print_service.go 查看文件

@@ -18,7 +18,7 @@ func GetBatchDrugHisPrescription(ids []string, record_time int64, user_org_id in
18 18
 	return
19 19
 }
20 20
 
21
-func GetBatchProjectHisPrescription(ids []string, record_time int64, user_org_id int64) (patients models.PrintPatient, err error) {
21
+func GetBatchProjectHisPrescription(ids []string, record_time int64, user_org_id int64) (patients []*models.PrintPatient, err error) {
22 22
 	readDb.Model(&models.PrintPatient{}).Preload("HisPrintPatient", "status = 1 AND record_date = ?", record_time).
23 23
 		Preload("HisPrintPrescription", func(db *gorm.DB) *gorm.DB {
24 24
 			return db.Where("status = 1 AND user_org_id = ? AND record_date = ? AND type <> 1", user_org_id, record_time).
@@ -32,7 +32,7 @@ func GetBatchProjectHisPrescription(ids []string, record_time int64, user_org_id
32 32
 
33 33
 }
34 34
 
35
-func GetBatchInspectionProjectHisPrescription(ids []string, record_time int64, user_org_id int64) (patients models.PrintPatient, err error) {
35
+func GetBatchInspectionProjectHisPrescription(ids []string, record_time int64, user_org_id int64) (patients []*models.PrintPatient, err error) {
36 36
 	readDb.Model(&models.PrintPatient{}).Preload("HisPrintPatient", "status = 1 AND record_date = ?", record_time).
37 37
 		Preload("HisPrintPrescription", func(db *gorm.DB) *gorm.DB {
38 38
 			return db.Where("status = 1 AND user_org_id = ? AND record_date = ? AND type <> 1", user_org_id, record_time).