Browse Source

11月9日库存管理

XMLWAN 2 years ago
parent
commit
5b1e03b3a5

+ 1 - 1
conf/app.conf View File

@@ -1,5 +1,5 @@
1 1
 appname = 血透
2
-httpport = 9531
2
+httpport = 9529
3 3
 runmode = dev
4 4
 #dev/prod
5 5
 

+ 5 - 5
controllers/doctors_api_controller.go View File

@@ -93,7 +93,7 @@ func (c *DoctorsApiController) ScheduleAdvices() {
93 93
 	project_config, _ := service.GetHisProjectConfig(orgID)
94 94
 
95 95
 	if config.IsOpen == 0 || config.IsOpen == 2 {
96
-		scheduals, err := service.MobileGetScheduleDoctorAdvicesOne(orgID, date.Unix(), adviceType, patientType, adminUserInfo.AdminUser.Id, delivery_way, schedule_type, partition_type, patient_id, excution_way)
96
+		scheduals, err := service.MobileGetScheduleDoctorAdvicesOne(orgID, date.Unix(), adviceType, patientType, adminUserInfo.AdminUser.Id, delivery_way, schedule_type, partition_type, patient_id, excution_way, 0)
97 97
 		adminUser, _ := service.GetAllAdminUsers(orgID, adminUserInfo.CurrentAppId)
98 98
 		if err != nil {
99 99
 			c.ErrorLog("获取排班信息失败:%v", err)
@@ -114,7 +114,7 @@ func (c *DoctorsApiController) ScheduleAdvices() {
114 114
 		}
115 115
 	}
116 116
 	if config.IsOpen == 1 {
117
-		hisAdvices, err := service.GetHisDoctorAdvicesOne(orgID, date.Unix(), delivery_way, schedule_type, partition_type, patient_id, excution_way)
117
+		hisAdvices, err := service.GetHisDoctorAdvicesOne(orgID, date.Unix(), delivery_way, schedule_type, partition_type, patient_id, excution_way, 0)
118 118
 		adminUser, _ := service.GetAllAdminUsers(orgID, adminUserInfo.CurrentAppId)
119 119
 		project, _ := service.GetPCHisPrescriptionProject(orgID, date.Unix(), delivery_way, patientType, partition_type, patient_id, excution_way)
120 120
 		for _, item := range project {
@@ -1374,7 +1374,7 @@ func (c *DoctorsApiController) GetScheduleAdvicesList() {
1374 1374
 	partition_type, _ := c.GetInt64("partition_type")
1375 1375
 	patient_id, _ := c.GetInt64("patient_id")
1376 1376
 	excution_way, _ := c.GetInt64("excution_way")
1377
-	//cost_type, _ := c.GetInt64("cost_type")
1377
+	cost_type, _ := c.GetInt64("cost_type")
1378 1378
 	if adviceType != 1 && adviceType != 3 && adviceType != 2 {
1379 1379
 		adviceType = 0
1380 1380
 	}
@@ -1397,7 +1397,7 @@ func (c *DoctorsApiController) GetScheduleAdvicesList() {
1397 1397
 	project_config, _ := service.GetHisProjectConfig(orgID)
1398 1398
 
1399 1399
 	if config.IsOpen == 0 || config.IsOpen == 2 {
1400
-		scheduals, err := service.MobileGetScheduleDoctorAdvicesOne(orgID, date.Unix(), adviceType, patientType, adminUserInfo.AdminUser.Id, delivery_way, schedule_type, partition_type, patient_id, excution_way)
1400
+		scheduals, err := service.MobileGetScheduleDoctorAdvicesOne(orgID, date.Unix(), adviceType, patientType, adminUserInfo.AdminUser.Id, delivery_way, schedule_type, partition_type, patient_id, excution_way, cost_type)
1401 1401
 		adminUser, _ := service.GetAllAdminUsers(orgID, adminUserInfo.CurrentAppId)
1402 1402
 		if err != nil {
1403 1403
 			c.ErrorLog("获取排班信息失败:%v", err)
@@ -1418,7 +1418,7 @@ func (c *DoctorsApiController) GetScheduleAdvicesList() {
1418 1418
 		}
1419 1419
 	}
1420 1420
 	if config.IsOpen == 1 {
1421
-		hisAdvices, err := service.GetHisDoctorAdvicesOne(orgID, date.Unix(), delivery_way, schedule_type, partition_type, patient_id, excution_way)
1421
+		hisAdvices, err := service.GetHisDoctorAdvicesOne(orgID, date.Unix(), delivery_way, schedule_type, partition_type, patient_id, excution_way, cost_type)
1422 1422
 		adminUser, _ := service.GetAllAdminUsers(orgID, adminUserInfo.CurrentAppId)
1423 1423
 		project, _ := service.GetPCHisPrescriptionProject(orgID, date.Unix(), delivery_way, patientType, partition_type, patient_id, excution_way)
1424 1424
 		for _, item := range project {

+ 38 - 6
controllers/his_api_controller.go View File

@@ -1930,7 +1930,7 @@ func (c *HisApiController) CreateHisPrescription() {
1930 1930
 							s.PatientId = patient_id
1931 1931
 							s.HisPatientId = his_patient_id
1932 1932
 							s.StartTime = pTime
1933
-
1933
+							s.IsSettle = 2
1934 1934
 							errcode := c.setAdviceWithJSON(&s, advice.(map[string]interface{}))
1935 1935
 							if errcode > 0 {
1936 1936
 								c.ServeFailJSONWithSGJErrorCode(errcode)
@@ -2832,14 +2832,26 @@ func (c *HisApiController) DeletePrescription() {
2832 2832
 
2833 2833
 		}
2834 2834
 	}
2835
-	if drugStockConfig.IsOpen == 1 {
2835
+	if c.GetAdminUserInfo().CurrentOrgId == 10387 {
2836
+
2836 2837
 		if len(advices) > 0 {
2837 2838
 			for _, item := range advices {
2838 2839
 				creater := c.GetAdminUserInfo().AdminUser.Id
2839 2840
 				service.DrugAutoAddCancelInfo(item, creater)
2840 2841
 			}
2841 2842
 		}
2843
+
2844
+	} else {
2845
+		if drugStockConfig.IsOpen == 1 {
2846
+			if len(advices) > 0 {
2847
+				for _, item := range advices {
2848
+					creater := c.GetAdminUserInfo().AdminUser.Id
2849
+					service.DrugAutoAddCancelInfo(item, creater)
2850
+				}
2851
+			}
2852
+		}
2842 2853
 	}
2854
+
2843 2855
 	c.ServeSuccessJSON(map[string]interface{}{
2844 2856
 		"msg": "删除成功",
2845 2857
 	})
@@ -2914,8 +2926,7 @@ func (c *HisApiController) DeleteDoctorAdvice() {
2914 2926
 	defer redis.Close()
2915 2927
 
2916 2928
 	if err == nil {
2917
-		if drugStockConfig.IsOpen == 1 {
2918
-
2929
+		if c.GetAdminUserInfo().CurrentOrgId == 10387 {
2919 2930
 			//查询是否在处方中出库
2920 2931
 			openConfig, _ := service.GetDrugOpenConfigOne(c.GetAdminUserInfo().CurrentOrgId)
2921 2932
 
@@ -2925,16 +2936,37 @@ func (c *HisApiController) DeleteDoctorAdvice() {
2925 2936
 				if advice.ExecutionState == 1 {
2926 2937
 					creater := c.GetAdminUserInfo().AdminUser.Id
2927 2938
 					service.DrugAutoAddCancelInfo(&advice, creater)
2928
-
2929 2939
 				}
2930
-
2931 2940
 			}
2932 2941
 
2933 2942
 			//开启保存处方扣减功能
2934 2943
 			if openConfig.IsOpen == 1 {
2935 2944
 				creater := c.GetAdminUserInfo().AdminUser.Id
2936 2945
 				service.DrugAutoAddCancelInfo(&advice, creater)
2946
+			}
2947
+		} else {
2948
+			if drugStockConfig.IsOpen == 1 {
2949
+
2950
+				//查询是否在处方中出库
2951
+				openConfig, _ := service.GetDrugOpenConfigOne(c.GetAdminUserInfo().CurrentOrgId)
2952
+
2953
+				if openConfig.IsOpen != 1 {
2954
+
2955
+					//判断该医嘱是否执行了
2956
+					if advice.ExecutionState == 1 {
2957
+						creater := c.GetAdminUserInfo().AdminUser.Id
2958
+						service.DrugAutoAddCancelInfo(&advice, creater)
2959
+
2960
+					}
2961
+
2962
+				}
2937 2963
 
2964
+				//开启保存处方扣减功能
2965
+				if openConfig.IsOpen == 1 {
2966
+					creater := c.GetAdminUserInfo().AdminUser.Id
2967
+					service.DrugAutoAddCancelInfo(&advice, creater)
2968
+
2969
+				}
2938 2970
 			}
2939 2971
 		}
2940 2972
 

+ 3 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go View File

@@ -379,6 +379,9 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
379 379
 			newprescribe.Remark = dialysisSolution.Remark
380 380
 			if adminUserInfo.Org.Id == 10340 {
381 381
 				newprescribe.TargetUltrafiltration = 0
382
+				newprescribe.Sodium = 138
383
+				newprescribe.Bicarbonate = 31.1
384
+				newprescribe.DialysateFlow = 500
382 385
 			}
383 386
 			//插入透析处方
384 387
 			err := service.AddSigleRecord(&newprescribe)

+ 2 - 5
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -201,12 +201,11 @@ func (this *DialysisAPIController) Scheduals() {
201 201
 				project, _ = service.GetAllHisProjectPrescription(orgID, date.Unix())
202 202
 			}
203 203
 
204
-			list, _ := service.GetZoneCountList(orgID, date.Unix())
204
+			//list, _ := service.GetZoneCountList(orgID, date.Unix())
205 205
 
206 206
 			this.ServeSuccessJSON(map[string]interface{}{
207 207
 				"scheduals": scheduals,
208 208
 				"project":   project,
209
-				"list":      list,
210 209
 			})
211 210
 		}
212 211
 
@@ -225,13 +224,12 @@ func (this *DialysisAPIController) Scheduals() {
225 224
 		if configs.ID > 0 && configs.IsOpen == 1 {
226 225
 			project, _ = service.GetAllHisProjectPrescription(orgID, date.Unix())
227 226
 		}
228
-		list, _ := service.GetZoneCountList(orgID, date.Unix())
227
+
229 228
 		this.ServeSuccessJSON(map[string]interface{}{
230 229
 			"scheduals": dat,
231 230
 			"redis":     "true",
232 231
 			"date":      schedualDate,
233 232
 			"project":   project,
234
-			"list":      list,
235 233
 		})
236 234
 
237 235
 	}
@@ -565,7 +563,6 @@ func (this *DialysisAPIController) DialysisRecord() {
565 563
 	if is_advice_open.IsAdviceOpen == 1 {
566 564
 		his_advices, _ = service.GetAllHisDoctorAdvice(adminInfo.Org.Id, patientID, date.Unix())
567 565
 	}
568
-	fmt.Println("doctorAdvices23344334344433434334343434wode", doctorAdvices)
569 566
 
570 567
 	lastOrder, _ := service.GetLastDilysisOrder(adminInfo.Org.Id, patientID, date.Unix())
571 568
 	returnData := map[string]interface{}{

+ 37 - 3
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -1772,6 +1772,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1772 1772
 		newprescribe.ID = dialysisPrescription.ID
1773 1773
 
1774 1774
 		if dialysisPrescription.ID == 0 {
1775
+			if adminUserInfo.Org.Id == 10340 {
1776
+				newprescribe.Sodium = 138
1777
+				newprescribe.Bicarbonate = 31.1
1778
+				newprescribe.DialysateFlow = 500
1779
+			}
1775 1780
 			err := service.AddSigleRecord(&newprescribe)
1776 1781
 			//获取key,清空redis
1777 1782
 			key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
@@ -1797,6 +1802,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1797 1802
 				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
1798 1803
 			}
1799 1804
 		} else {
1805
+			if adminUserInfo.Org.Id == 10340 {
1806
+				newprescribe.Sodium = 138
1807
+				newprescribe.Bicarbonate = 31.1
1808
+				newprescribe.DialysateFlow = 500
1809
+			}
1800 1810
 			err := service.UpDateDialysisPrescription(&newprescribe)
1801 1811
 			//获取key,清空redis
1802 1812
 			key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
@@ -1879,6 +1889,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1879 1889
 			_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
1880 1890
 			newprescribe.ID = dialysisPrescription.ID
1881 1891
 			if dialysisPrescription.ID == 0 {
1892
+				if adminUserInfo.Org.Id == 10340 {
1893
+					newprescribe.Sodium = 138
1894
+					newprescribe.Bicarbonate = 31.1
1895
+					newprescribe.DialysateFlow = 500
1896
+				}
1882 1897
 				err := service.AddSigleRecord(&newprescribe)
1883 1898
 				//获取key,清空redis
1884 1899
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
@@ -1900,7 +1915,7 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1900 1915
 
1901 1916
 				keySeven := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":dialysis_prescribe_by_mode"
1902 1917
 				redis.Set(keySeven, "", time.Second)
1903
-				fmt.Println("处方2222222222")
1918
+
1904 1919
 				if err != nil {
1905 1920
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
1906 1921
 				}
@@ -1987,9 +2002,13 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
1987 2002
 			_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
1988 2003
 			newprescribe.ID = dialysisPrescription.ID
1989 2004
 			if dialysisPrescription.ID == 0 {
2005
+				if adminUserInfo.Org.Id == 10340 {
2006
+					newprescribe.Sodium = 138
2007
+					newprescribe.Bicarbonate = 31.1
2008
+					newprescribe.DialysateFlow = 500
2009
+				}
1990 2010
 				err := service.AddSigleRecord(&newprescribe)
1991 2011
 
1992
-				fmt.Println("处方2222222222")
1993 2012
 				//获取key,清空redis
1994 2013
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
1995 2014
 				redis := service.RedisClient()
@@ -2014,6 +2033,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2014 2033
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
2015 2034
 				}
2016 2035
 			} else {
2036
+				if adminUserInfo.Org.Id == 10340 {
2037
+					newprescribe.Sodium = 138
2038
+					newprescribe.Bicarbonate = 31.1
2039
+					newprescribe.DialysateFlow = 500
2040
+				}
2017 2041
 				err := service.UpDateDialysisPrescription(&newprescribe)
2018 2042
 				//获取key,清空redis
2019 2043
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
@@ -2058,8 +2082,13 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2058 2082
 			_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
2059 2083
 			newprescribe.ID = dialysisPrescription.ID
2060 2084
 			if dialysisPrescription.ID == 0 {
2085
+				if adminUserInfo.Org.Id == 10340 {
2086
+					newprescribe.Sodium = 138
2087
+					newprescribe.Bicarbonate = 31.1
2088
+					newprescribe.DialysateFlow = 500
2089
+				}
2061 2090
 				err := service.AddSigleRecord(&newprescribe)
2062
-				fmt.Println("处方44444444444")
2091
+
2063 2092
 				//获取key,清空redis
2064 2093
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
2065 2094
 				redis := service.RedisClient()
@@ -2084,6 +2113,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2084 2113
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
2085 2114
 				}
2086 2115
 			} else {
2116
+				if adminUserInfo.Org.Id == 10340 {
2117
+					newprescribe.Sodium = 138
2118
+					newprescribe.Bicarbonate = 31.1
2119
+					newprescribe.DialysateFlow = 500
2120
+				}
2087 2121
 				err := service.UpDateDialysisPrescription(&newprescribe)
2088 2122
 				//获取key,清空redis
2089 2123
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"

+ 5 - 0
controllers/new_mobile_api_controllers/staff_schedule_api_controller.go View File

@@ -249,6 +249,7 @@ func (this *StaffScheduleApiController) GetAllZone() {
249 249
 
250 250
 	id := this.GetMobileAdminUserInfo().Org.Id
251 251
 	zone, err := service.GetAllMobileZone(id)
252
+
252 253
 	if err != nil {
253 254
 		this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
254 255
 		return
@@ -283,18 +284,21 @@ func (this *StaffScheduleApiController) GetPatientScheduleList() {
283 284
 		//获取当天排班的病人情况
284 285
 		schedule, err := service.GetPatientSchedule(startTime, zoneid, classtype, orgid)
285 286
 
287
+		zonelist, _ := service.GetPatientScheduleListByZone(startTime, classtype, orgid)
286 288
 		if err != nil {
287 289
 			this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
288 290
 			return
289 291
 		}
290 292
 		this.ServeSuccessJSON(map[string]interface{}{
291 293
 			"schedule": schedule,
294
+			"zonelist": zonelist,
292 295
 		})
293 296
 	}
294 297
 	if is_open == 1 {
295 298
 		//获取空床位的排班数据
296 299
 		list, err := service.GetPatientScheduleByBed(startTime, zoneid, orgid, classtype)
297 300
 		stockType, _ := service.GetStockType(orgid)
301
+		zonelist, _ := service.GetPatientScheduleListByZone(startTime, classtype, orgid)
298 302
 		if err != nil {
299 303
 			this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
300 304
 			return
@@ -302,6 +306,7 @@ func (this *StaffScheduleApiController) GetPatientScheduleList() {
302 306
 		this.ServeSuccessJSON(map[string]interface{}{
303 307
 			"schedule":  list,
304 308
 			"stockType": stockType,
309
+			"zonelist":  zonelist,
305 310
 		})
306 311
 	}
307 312
 }

+ 1 - 0
models/patient_models.go View File

@@ -472,6 +472,7 @@ type DialysisAssesmentBefor struct {
472 472
 	PatientId              int64 `gorm:"column:patient_id" json:"patient_id"`
473 473
 	AssessmentDate         int64 `gorm:"column:assessment_date" json:"assessment_date" form:"assessment_date"`
474 474
 	BloodAccessPartOperaId int64 `gorm:"column:blood_access_part_opera_id" json:"blood_access_part_opera_id" form:"blood_access_part_opera_id"`
475
+	CreatedTime            int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
475 476
 }
476 477
 
477 478
 func (DialysisAssesmentBefor) TableName() string {

+ 15 - 1
models/schedule_models.go View File

@@ -500,5 +500,19 @@ type ScheduleTwenty struct {
500 500
 }
501 501
 
502 502
 func (ScheduleTwenty) TableName() string {
503
-	return "ScheduleTwenty"
503
+	return "xt_schedule"
504
+}
505
+
506
+type ScheduleTwentyOne struct {
507
+	ID           int64 `gorm:"column:id" json:"id" form:"id"`
508
+	UserOrgId    int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
509
+	PartitionId  int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
510
+	PatientId    int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
511
+	ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
512
+	ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
513
+	Status       int64 `gorm:"column:status" json:"status" form:"status"`
514
+}
515
+
516
+func (ScheduleTwentyOne) TableName() string {
517
+	return "xt_schedule"
504 518
 }

+ 17 - 0
service/doctor_schedule_service.go View File

@@ -741,3 +741,20 @@ func UpdateDialysisPrescriptionOne(prescription models.DialysisPrescription, pat
741 741
 	err := XTReadDB().Model(&prescription).Where("patient_id = ? and record_date = ? and status = 1", patientid, recordate).Updates(map[string]interface{}{"dialysis_dialyszers": prescription.DialysisDialyszers, "mode_id": mode_id, "dialysis_irrigation": prescription.DialysisIrrigation}).Error
742 742
 	return err
743 743
 }
744
+
745
+func GetPatientScheduleListByZone(schedule_date int64, class_tye int64, orgid int64) (schedule []*models.ScheduleTwentyOne, err error) {
746
+
747
+	db := XTReadDB().Model(&schedule).Where("status = 1")
748
+
749
+	if schedule_date > 0 {
750
+		db = db.Where("schedule_date = ?", schedule_date)
751
+	}
752
+	if class_tye > 0 {
753
+		db = db.Where("schedule_type = ?", class_tye)
754
+	}
755
+	if orgid > 0 {
756
+		db = db.Where("user_org_id = ?", orgid)
757
+	}
758
+	err = db.Select("partition_id,Count(id) as id,user_org_id").Group("partition_id").Scan(&schedule).Error
759
+	return schedule, err
760
+}

File diff suppressed because it is too large
+ 717 - 223
service/mobile_dialysis_service.go


+ 1 - 2
service/patient_service.go View File

@@ -557,9 +557,8 @@ func FindPatientByIdWithDiseases(orgID int64, id int64) (patient models.Patients
557 557
 	redis := RedisClient()
558 558
 	defer redis.Close()
559 559
 	key := strconv.FormatInt(orgID, 10) + ":" + strconv.FormatInt(id, 10) + ":patient_info"
560
-
561 560
 	patient_info_str, _ := redis.Get(key).Result()
562
-	fmt.Println("patient_info_stre223322323232323323223", patient_info_str)
561
+
563 562
 	if len(patient_info_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
564 563
 		err = readDb.Model(&models.Patients{}).Preload("Contagions", "status = 1").Preload("Diseases", "status = 1").Where("id = ? and user_org_id=? and status=1", id, orgID).First(&patient).Error
565 564
 		if err != nil {