Browse Source

医保对接

csx 3 years ago
parent
commit
d2eef7fcd2

+ 25 - 21
controllers/dialysis_api_controller.go View File

@@ -2582,27 +2582,27 @@ func (c *DialysisApiController) GetDialysisOrder() {
2582 2582
 
2583 2583
 	project_config, _ := service.GetHisProjectConfig(adminUserInfo.CurrentOrgId)
2584 2584
 	projects, _ := service.FindAllHisProjectById(adminUserInfo.CurrentOrgId, patientInfo.ID, xttime)
2585
-	if config.IsOpen == 1 && project_config.IsOpen == 1 && len(projects) > 0 {
2586
-		for _, item := range projects {
2587
-			var advice *models.HisDoctorAdviceInfo
2588
-			advice.ID = item.ID
2589
-			advice.Checker = item.Checker
2590
-			advice.CheckTime = item.CheckTime
2591
-			advice.CheckState = item.CheckState
2592
-			advice.ExecutionState = item.ExecutionState
2593
-			advice.ExecutionStaff = item.ExecutionStaff
2594
-			advice.PrescribingNumber = float64(item.Count)
2595
-			advice.PrescribingNumberUnit = item.Unit
2596
-			advice.AdviceDoctor = item.Doctor
2597
-			if item.Type == 3 {
2598
-				advice.AdviceName = item.GoodInfo.GoodName
2599
-			} else if item.Type == 2 {
2600
-				advice.AdviceName = item.HisProject.ProjectName
2601
-			}
2602
-			advice.StartTime = item.StartTime
2603
-			hisAdvice = append(hisAdvice, advice)
2604
-		}
2605
-	}
2585
+	//if config.IsOpen == 1 && project_config.IsOpen == 1 && len(projects) > 0 {
2586
+	//	for _, item := range projects {
2587
+	//		var advice *models.HisDoctorAdviceInfo
2588
+	//		advice.ID = item.ID
2589
+	//		advice.Checker = item.Checker
2590
+	//		advice.CheckTime = item.CheckTime
2591
+	//		advice.CheckState = item.CheckState
2592
+	//		advice.ExecutionState = item.ExecutionState
2593
+	//		advice.ExecutionStaff = item.ExecutionStaff
2594
+	//		advice.PrescribingNumber = float64(item.Count)
2595
+	//		advice.PrescribingNumberUnit = item.Unit
2596
+	//		advice.AdviceDoctor = item.Doctor
2597
+	//		if item.Type == 3 {
2598
+	//			advice.AdviceName = item.GoodInfo.GoodName
2599
+	//		} else if item.Type == 2 {
2600
+	//			advice.AdviceName = item.HisProject.ProjectName
2601
+	//		}
2602
+	//		advice.StartTime = item.StartTime
2603
+	//		hisAdvice = append(hisAdvice, advice)
2604
+	//	}
2605
+	//}
2606 2606
 	if config.IsOpen == 1 {
2607 2607
 		c.ServeSuccessJSON(map[string]interface{}{
2608 2608
 			"xtdate":                    xtdate,
@@ -2635,6 +2635,8 @@ func (c *DialysisApiController) GetDialysisOrder() {
2635 2635
 			"lastPredialysisEvaluation": lastPredialysisEvaluation,
2636 2636
 			"dialysiscount":             dialysiscount,
2637 2637
 			"last_order":                lastOrder,
2638
+			"project_config":            project_config,
2639
+			"projects":                  projects,
2638 2640
 		})
2639 2641
 
2640 2642
 	}
@@ -2670,6 +2672,8 @@ func (c *DialysisApiController) GetDialysisOrder() {
2670 2672
 			"lastPredialysisEvaluation": lastPredialysisEvaluation,
2671 2673
 			"dialysiscount":             dialysiscount,
2672 2674
 			"last_order":                lastOrder,
2675
+			"project_config":            project_config,
2676
+			"projects":                  projects,
2673 2677
 		})
2674 2678
 
2675 2679
 	}

+ 2 - 2
controllers/his_api_controller.go View File

@@ -290,7 +290,7 @@ func (c *HisApiController) CreateHisPrescription() {
290 290
 	record_date := c.GetString("record_date")
291 291
 	patient_id, _ := c.GetInt64("patient_id")
292 292
 	reg_type, _ := c.GetInt64("reg_type")
293
-	diagnose, _ := c.GetInt64("diagnose")
293
+	diagnose := c.GetString("diagnose")
294 294
 	sick_type, _ := c.GetInt64("sick_type")
295 295
 	sick_history := c.GetString("sick_history")
296 296
 	doctor_id, _ := c.GetInt64("doctor", 0)
@@ -714,7 +714,7 @@ func (c *HisApiController) EditHisPrescription() {
714 714
 	record_date := c.GetString("record_date")
715 715
 	patient_id, _ := c.GetInt64("patient_id")
716 716
 	reg_type, _ := c.GetInt64("reg_type")
717
-	diagnose, _ := c.GetInt64("diagnose")
717
+	diagnose := c.GetString("diagnose")
718 718
 	sick_type, _ := c.GetInt64("sick_type")
719 719
 	sick_history := c.GetString("sick_history")
720 720
 	doctor_id, _ := c.GetInt64("doctor", 0)

+ 11 - 11
controllers/new_mobile_api_controllers/mobile_his_api_controller.go View File

@@ -257,7 +257,7 @@ func (c *MobileHisApiController) CreateHisPrescription() {
257 257
 	record_date := c.GetString("record_date")
258 258
 	patient_id, _ := c.GetInt64("patient_id")
259 259
 	reg_type, _ := c.GetInt64("reg_type")
260
-	diagnose, _ := c.GetInt64("diagnose")
260
+	//diagnose := c.GetString("diagnose")
261 261
 	sick_type, _ := c.GetInt64("sick_type")
262 262
 	sick_history := c.GetString("sick_history")
263 263
 	doctor_id, _ := c.GetInt64("doctor", 0)
@@ -400,15 +400,15 @@ func (c *MobileHisApiController) CreateHisPrescription() {
400 400
 		p_number := timeFormat + strconv.FormatInt(int64(randNum), 10) + strconv.FormatInt(int64(adminInfo.Org.Id), 10) + strconv.FormatInt(int64(patient_id), 10)
401 401
 
402 402
 		hpInfo = models.HisPrescriptionInfo{
403
-			UserOrgId:          adminInfo.Org.Id,
404
-			RecordDate:         theTime.Unix(),
405
-			PatientId:          patient_id,
406
-			Status:             1,
407
-			Ctime:              time.Now().Unix(),
408
-			Mtime:              time.Now().Unix(),
409
-			Creator:            adminInfo.AdminUser.Id,
410
-			Modifier:           adminInfo.AdminUser.Id,
411
-			Diagnosis:          diagnose,
403
+			UserOrgId:  adminInfo.Org.Id,
404
+			RecordDate: theTime.Unix(),
405
+			PatientId:  patient_id,
406
+			Status:     1,
407
+			Ctime:      time.Now().Unix(),
408
+			Mtime:      time.Now().Unix(),
409
+			Creator:    adminInfo.AdminUser.Id,
410
+			Modifier:   adminInfo.AdminUser.Id,
411
+			//Diagnosis:          diagnose,
412 412
 			SickHistory:        sick_history,
413 413
 			Departments:        department,
414 414
 			RegisterType:       reg_type,
@@ -432,7 +432,7 @@ func (c *MobileHisApiController) CreateHisPrescription() {
432 432
 			Mtime:              time.Now().Unix(),
433 433
 			Creator:            info.Creator,
434 434
 			Modifier:           adminInfo.AdminUser.Id,
435
-			Diagnosis:          diagnose,
435
+			Diagnosis:          info.Diagnosis,
436 436
 			SickHistory:        sick_history,
437 437
 			Departments:        department,
438 438
 			RegisterType:       reg_type,

+ 1 - 1
models/his_models.go View File

@@ -374,7 +374,7 @@ type HisPrescriptionInfo struct {
374 374
 	Mtime              int64           `gorm:"column:mtime" json:"mtime" form:"mtime"`
375 375
 	Creator            int64           `gorm:"column:creator" json:"creator" form:"creator"`
376 376
 	Modifier           int64           `gorm:"column:modifier" json:"modifier" form:"modifier"`
377
-	Diagnosis          int64           `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
377
+	Diagnosis          string          `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
378 378
 	RegisterType       int64           `gorm:"column:register_type" json:"register_type" form:"register_type"`
379 379
 	Doctor             string          `gorm:"column:doctor" json:"doctor" form:"doctor"`
380 380
 	Departments        int64           `gorm:"column:departments" json:"departments" form:"departments"`

+ 1 - 1
service/his_hospital_service.go View File

@@ -140,7 +140,7 @@ type VMHisHospitalPrescriptionInfo struct {
140 140
 	Mtime              int64              `gorm:"column:mtime" json:"mtime" form:"mtime"`
141 141
 	Creator            int64              `gorm:"column:creator" json:"creator" form:"creator"`
142 142
 	Modifier           int64              `gorm:"column:modifier" json:"modifier" form:"modifier"`
143
-	Diagnosis          int64              `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
143
+	Diagnosis          string             `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
144 144
 	RegisterType       int64              `gorm:"column:register_type" json:"register_type" form:"register_type"`
145 145
 	Doctor             string             `gorm:"column:doctor" json:"doctor" form:"doctor"`
146 146
 	Departments        string             `gorm:"column:departments" json:"departments" form:"departments"`

+ 1 - 1
service/his_service.go View File

@@ -66,7 +66,7 @@ type VMHisPrescriptionInfo struct {
66 66
 	Mtime              int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
67 67
 	Creator            int64  `gorm:"column:creator" json:"creator" form:"creator"`
68 68
 	Modifier           int64  `gorm:"column:modifier" json:"modifier" form:"modifier"`
69
-	Diagnosis          int64  `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
69
+	Diagnosis          string `gorm:"column:diagnosis" json:"diagnosis" form:"diagnosis"`
70 70
 	RegisterType       int64  `gorm:"column:register_type" json:"register_type" form:"register_type"`
71 71
 	Doctor             string `gorm:"column:doctor" json:"doctor" form:"doctor"`
72 72
 	Departments        string `gorm:"column:departments" json:"departments" form:"departments"`