Browse Source

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

陈少旭 1 year ago
parent
commit
fad08c4de6

BIN
XT_New.exe View File


+ 6 - 0
controllers/dialysis_api_controller.go View File

@@ -2364,6 +2364,10 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2364 2364
 
2365 2365
 	befor_symptoms := c.GetString("befor_symptoms")
2366 2366
 
2367
+	warsh_count := c.GetString("warsh_count")
2368
+
2369
+	washing_time := c.GetString("washing_time")
2370
+
2367 2371
 	assessmentBeforeDislysis := models.PredialysisEvaluation{
2368 2372
 		DialysisCount:                  dialysis_count,
2369 2373
 		EmergencyTreatment:             emergency_treatment,
@@ -2444,6 +2448,8 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2444 2448
 		WhetherUnobstructed:            whether_unobstructed,
2445 2449
 		LienNecessary:                  lien_necessary,
2446 2450
 		BeforSymptoms:                  befor_symptoms,
2451
+		WarshCount:                     warsh_count,
2452
+		WashingTime:                    washing_time,
2447 2453
 	}
2448 2454
 
2449 2455
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)

+ 18 - 3
controllers/manage_api_controller.go View File

@@ -4604,6 +4604,8 @@ func (this *MachineApiController) SaveNewAirDisInfect() {
4604 4604
 
4605 4605
 	last_creator := int64(dataBody["last_creator"].(float64))
4606 4606
 
4607
+	storey := dataBody["storey"].(string)
4608
+
4607 4609
 	orgId := this.GetAdminUserInfo().CurrentOrgId
4608 4610
 	disinfect := models.XtNewAriDisinfect{
4609 4611
 		UserOrgId:                  orgId,
@@ -4644,6 +4646,7 @@ func (this *MachineApiController) SaveNewAirDisInfect() {
4644 4646
 		Ctime:                      time.Now().Unix(),
4645 4647
 		Mtime:                      time.Now().Unix(),
4646 4648
 		Status:                     1,
4649
+		Storey:                     storey,
4647 4650
 	}
4648 4651
 
4649 4652
 	err = service.CreateNewAirDisinfect(disinfect)
@@ -4665,6 +4668,7 @@ func (this *MachineApiController) GetNewAirDisinfectList() {
4665 4668
 	end_time := this.GetString("end_time")
4666 4669
 	limit, _ := this.GetInt64("limit")
4667 4670
 	page, _ := this.GetInt64("page")
4671
+	storey := this.GetString("storey")
4668 4672
 	var startTime int64
4669 4673
 	if len(start_time) > 0 {
4670 4674
 		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
@@ -4685,7 +4689,7 @@ func (this *MachineApiController) GetNewAirDisinfectList() {
4685 4689
 		endTime = theTime.Unix()
4686 4690
 	}
4687 4691
 	orgId := this.GetAdminUserInfo().CurrentOrgId
4688
-	list, total, err := service.GetNewAirDisinfectList(limit, page, startTime, endTime, orgId)
4692
+	list, total, err := service.GetNewAirDisinfectList(limit, page, startTime, endTime, orgId, storey)
4689 4693
 	if err != nil {
4690 4694
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
4691 4695
 		return
@@ -4832,6 +4836,8 @@ func (this *MachineApiController) UpdateNewAirDisInfect() {
4832 4836
 
4833 4837
 	last_creator := int64(dataBody["last_creator"].(float64))
4834 4838
 
4839
+	storey := dataBody["storey"].(string)
4840
+
4835 4841
 	orgId := this.GetAdminUserInfo().CurrentOrgId
4836 4842
 	disinfect := models.XtNewAriDisinfect{
4837 4843
 		ID:                         id,
@@ -4873,6 +4879,7 @@ func (this *MachineApiController) UpdateNewAirDisInfect() {
4873 4879
 		Ctime:                      time.Now().Unix(),
4874 4880
 		Mtime:                      time.Now().Unix(),
4875 4881
 		Status:                     1,
4882
+		Storey:                     storey,
4876 4883
 	}
4877 4884
 
4878 4885
 	err = service.SaveNewAriDisinfect(disinfect)
@@ -5045,6 +5052,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5045 5052
 
5046 5053
 	last_creator := int64(dataBody["last_creator"].(float64))
5047 5054
 
5055
+	storey := dataBody["storey"].(string)
5056
+
5048 5057
 	orgId := this.GetAdminUserInfo().CurrentOrgId
5049 5058
 
5050 5059
 	objectDisinfect := models.XtNewObjectDisinfect{
@@ -5098,6 +5107,7 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5098 5107
 		LastDisinfectionWater:      last_disinfection_water,
5099 5108
 		LastDisinfectionMethods:    last_disinfection_methods,
5100 5109
 		LastDisinfectionTime:       last_disinfection_time,
5110
+		Storey:                     storey,
5101 5111
 	}
5102 5112
 
5103 5113
 	err = service.CreateObjectDisInfect(objectDisinfect)
@@ -5119,6 +5129,7 @@ func (this *MachineApiController) GetObjectTableDisinfectList() {
5119 5129
 	end_time := this.GetString("end_time")
5120 5130
 	limit, _ := this.GetInt64("limit")
5121 5131
 	page, _ := this.GetInt64("page")
5132
+	storey := this.GetString("storey")
5122 5133
 	var startTime int64
5123 5134
 	if len(start_time) > 0 {
5124 5135
 		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
@@ -5139,7 +5150,7 @@ func (this *MachineApiController) GetObjectTableDisinfectList() {
5139 5150
 		endTime = theTime.Unix()
5140 5151
 	}
5141 5152
 	orgId := this.GetAdminUserInfo().CurrentOrgId
5142
-	list, total, err := service.GetObjectTableDisinfectList(limit, page, startTime, endTime, orgId)
5153
+	list, total, err := service.GetObjectTableDisinfectList(limit, page, startTime, endTime, orgId, storey)
5143 5154
 
5144 5155
 	if err != nil {
5145 5156
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
@@ -5309,6 +5320,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5309 5320
 
5310 5321
 	last_creator := int64(dataBody["last_creator"].(float64))
5311 5322
 
5323
+	storey := dataBody["storey"].(string)
5324
+
5312 5325
 	orgId := this.GetAdminUserInfo().CurrentOrgId
5313 5326
 
5314 5327
 	objectDisinfect := models.XtNewObjectDisinfect{
@@ -5363,6 +5376,7 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5363 5376
 		LastDisinfectionWater:      last_disinfection_water,
5364 5377
 		LastDisinfectionMethods:    last_disinfection_methods,
5365 5378
 		LastDisinfectionTime:       last_disinfection_time,
5379
+		Storey:                     storey,
5366 5380
 	}
5367 5381
 	err = service.UpdateObjectTableDisinfect(objectDisinfect)
5368 5382
 	if err != nil {
@@ -5392,7 +5406,8 @@ func (this *MachineApiController) GetAirDisinfectionLongTime() {
5392 5406
 
5393 5407
 	orgId := this.GetAdminUserInfo().CurrentOrgId
5394 5408
 
5395
-	list, err := service.GetAirDisInfectionLongTime(orgId)
5409
+	storey := this.GetString("storey")
5410
+	list, err := service.GetAirDisInfectionLongTime(orgId, storey)
5396 5411
 
5397 5412
 	if err != nil {
5398 5413
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)

+ 9 - 6
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -3381,7 +3381,7 @@ func (this *DialysisAPIController) StartDialysis() {
3381 3381
 			}
3382 3382
 
3383 3383
 			//针对
3384
-			if adminUserInfo.Org.Id == 10471 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10460 {
3384
+			if adminUserInfo.Org.Id == 10471 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10460 || adminUserInfo.Org.Id == 10551 {
3385 3385
 
3386 3386
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3387 3387
 				ultrafiltration_rate = ultrafiltration_rate / 1000
@@ -4392,7 +4392,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4392 4392
 
4393 4393
 			}
4394 4394
 
4395
-			if adminInfo.Org.Id == 10460 {
4395
+			if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10551 {
4396 4396
 
4397 4397
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
4398 4398
 				record.UltrafiltrationRate = ultrafiltration_rate / 1000
@@ -4442,7 +4442,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4442 4442
 		record.UltrafiltrationVolume = ultrafiltration_volume / 1000
4443 4443
 	}
4444 4444
 
4445
-	if adminInfo.Org.Id == 10460 {
4445
+	if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10551 {
4446 4446
 
4447 4447
 		ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
4448 4448
 
@@ -9826,7 +9826,7 @@ func (c *DialysisAPIController) GetAdviceListNoExecution() {
9826 9826
 	orgId := c.GetMobileAdminUserInfo().Org.Id
9827 9827
 
9828 9828
 	//查询当前护士的患者
9829
-	orderList, _ := service.GetDialysisOrderNoExecution(admin_user_id, orgId)
9829
+	orderList, _ := service.GetDialysisOrderNoExecution(admin_user_id, orgId, timenow)
9830 9830
 	var patientIds []int64
9831 9831
 
9832 9832
 	for _, item := range orderList {
@@ -9836,12 +9836,14 @@ func (c *DialysisAPIController) GetAdviceListNoExecution() {
9836 9836
 	adviceList, _ := service.GetAdviceListNoExecution(timenow, orgId, patientIds)
9837 9837
 
9838 9838
 	hisAdviceList, _ := service.GetHisAdviceListNoExecution(timenow, orgId, patientIds)
9839
-	fmt.Println("hisAdviceList", hisAdviceList)
9839
+
9840 9840
 	projectList, _ := service.GetProjectListNoExecution(timenow, orgId, patientIds)
9841
-	fmt.Println("projectList", projectList)
9841
+
9842 9842
 	//药品管理信息
9843 9843
 	_, drugStockConfig := service.FindHisConfig(orgId)
9844 9844
 
9845
+	_, projectConfig := service.FindXTHisProjectByOrgId(orgId)
9846
+
9845 9847
 	patientList, _ := service.GetPatientNoExecutionList(orgId, patientIds)
9846 9848
 
9847 9849
 	c.ServeSuccessJSON(map[string]interface{}{
@@ -9850,6 +9852,7 @@ func (c *DialysisAPIController) GetAdviceListNoExecution() {
9850 9852
 		"projectList":     projectList,
9851 9853
 		"drugStockConfig": drugStockConfig,
9852 9854
 		"patientList":     patientList,
9855
+		"projectConfig":   projectConfig,
9853 9856
 	})
9854 9857
 
9855 9858
 }

+ 1 - 0
controllers/mobile_api_controllers/mobile_api_router_register.go View File

@@ -55,6 +55,7 @@ func MobileAPIControllersRegisterRouters() {
55 55
 
56 56
 	beego.Router("/m/api/advice/check", &PatientApiController{}, "Post:CheckDoctorAdvice")
57 57
 	beego.Router("/m/api/patient/info", &PatientApiController{}, "Get:GetPatientInfoWithDiseases")
58
+	beego.Router("/m/api/mobile/advice/check", &PatientApiController{}, "Post:CheckMobileDoctorAdvice")
58 59
 
59 60
 	beego.Router("/m/api/monitor/add", &DialysisAPIController{}, "post:AddMonitorRecord")
60 61
 	beego.Router("/m/api/monitor/edit", &DialysisAPIController{}, "post:EditMonitorRecord")

+ 258 - 1
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -1960,6 +1960,253 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1960 1960
 
1961 1961
 }
1962 1962
 
1963
+func (c *PatientApiController) CheckMobileDoctorAdvice() {
1964
+	origin, _ := c.GetInt64("origin", 0)
1965
+	record_date, _ := c.GetInt64("record_date")
1966
+	patient_id, _ := c.GetInt64("patient_id")
1967
+	check_time := c.GetString("check_time")
1968
+	if len(check_time) <= 0 {
1969
+		utils.ErrorLog("check_time")
1970
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1971
+		return
1972
+	}
1973
+	timeLayout2 := "2006-01-02 15:04:05"
1974
+	loc, _ := time.LoadLocation("Local")
1975
+
1976
+	theTime, errs := time.ParseInLocation(timeLayout2, check_time, loc)
1977
+	fmt.Println("theTimewowowow", theTime)
1978
+	if errs != nil {
1979
+		utils.ErrorLog(errs.Error())
1980
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1981
+		return
1982
+	}
1983
+	if origin != 2 {
1984
+		groupno, _ := c.GetInt64("groupno", -1)
1985
+		var ids []string
1986
+		if groupno == 0 {
1987
+			advice_ids := c.GetString("advice_id")
1988
+			if advice_ids == "" {
1989
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1990
+				return
1991
+			} else {
1992
+				ids = strings.Split(advice_ids, ",")
1993
+				if len(ids) <= 0 {
1994
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1995
+					return
1996
+				}
1997
+			}
1998
+		}
1999
+		if groupno < 0 {
2000
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
2001
+			return
2002
+		}
2003
+
2004
+		adminUserInfo := c.GetMobileAdminUserInfo()
2005
+
2006
+		var advice models.DoctorAdvice
2007
+
2008
+		if groupno > 0 {
2009
+			advices, _ := service.FindAllDoctorAdviceByGoroupNo(adminUserInfo.Org.Id, groupno)
2010
+			for _, item := range advices {
2011
+				if item.CheckState == 0 {
2012
+					advice = item
2013
+				}
2014
+
2015
+				//记录日志
2016
+				byterequest, _ := json.Marshal(advices)
2017
+				adviceLog := models.XtDoctorAdviceLog{
2018
+					UserOrgId:   adminUserInfo.Org.Id,
2019
+					PatientId:   item.PatientId,
2020
+					AdminUserId: adminUserInfo.AdminUser.Id,
2021
+					Module:      3,
2022
+					ErrLog:      string(byterequest),
2023
+					Status:      1,
2024
+					Ctime:       time.Now().Unix(),
2025
+					Mtime:       0,
2026
+					Source:      "手机端核对医嘱",
2027
+					RecordDate:  item.AdviceDate,
2028
+				}
2029
+				service.CreateDoctorAdviceLog(adviceLog)
2030
+			}
2031
+			if advice.CheckState == 1 {
2032
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAdviceChecked)
2033
+				return
2034
+			}
2035
+			if advice.ExecutionStaff >= 0 && advice.ExecutionStaff == adminUserInfo.AdminUser.Id {
2036
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeExceAndCheckNotOneUser)
2037
+				return
2038
+			}
2039
+
2040
+		} else {
2041
+			advices, _ := service.FindDoctorAdviceByIds(adminUserInfo.Org.Id, ids)
2042
+			for _, item := range advices {
2043
+				if item.CheckState == 0 {
2044
+					advice = item
2045
+
2046
+				}
2047
+
2048
+				//记录日志
2049
+				byterequest, _ := json.Marshal(advices)
2050
+				adviceLog := models.XtDoctorAdviceLog{
2051
+					UserOrgId:   adminUserInfo.Org.Id,
2052
+					PatientId:   item.PatientId,
2053
+					AdminUserId: adminUserInfo.AdminUser.Id,
2054
+					Module:      3,
2055
+					ErrLog:      string(byterequest),
2056
+					Status:      1,
2057
+					Ctime:       time.Now().Unix(),
2058
+					Mtime:       0,
2059
+					Source:      "手机端核对医嘱",
2060
+					RecordDate:  item.AdviceDate,
2061
+				}
2062
+				service.CreateDoctorAdviceLog(adviceLog)
2063
+			}
2064
+			if advice.CheckState == 1 {
2065
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeAdviceChecked)
2066
+				return
2067
+			}
2068
+			if advice.ExecutionStaff >= 0 && advice.ExecutionStaff == adminUserInfo.AdminUser.Id {
2069
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeExceAndCheckNotOneUser)
2070
+				return
2071
+			}
2072
+		}
2073
+
2074
+		checker := adminUserInfo.AdminUser.Id
2075
+
2076
+		advices := models.DoctorAdvice{
2077
+			CheckTime:   theTime.Unix(),
2078
+			Checker:     checker,
2079
+			UpdatedTime: time.Now().Unix(),
2080
+		}
2081
+		fmt.Println("groupnowowowowoowowow", groupno)
2082
+		var err error
2083
+		if groupno > 0 {
2084
+
2085
+			// 查询信息规挡的设置天数
2086
+
2087
+			infor, _ := service.GetDialysisInformationSetting(adminUserInfo.Org.Id)
2088
+			if infor.ID > 0 && infor.WeekDay > 0 {
2089
+
2090
+				var cha_time int64
2091
+
2092
+				timeNowStr := time.Now().Format("2006-01-02")
2093
+				timeNewDate, _ := utils.ParseTimeStringToTime("2006-01-02", timeNowStr)
2094
+
2095
+				//今日的日期减去设置的日期
2096
+				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
2097
+
2098
+				if cha_time >= record_date {
2099
+					//查询审核是否允许
2100
+					infor, _ := service.GetDialysisInformationByRecordDate(patient_id, record_date, adminUserInfo.Org.Id, 4)
2101
+					//申请状态不允许的情况 拒绝修改
2102
+					if infor.ApplicationStatus != 1 {
2103
+						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
2104
+						return
2105
+					}
2106
+
2107
+				}
2108
+			}
2109
+			err = service.CheckDoctorAdviceByGroupNoOne(&advices, groupno, adminUserInfo.Org.Id)
2110
+
2111
+			key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
2112
+			redis := service.RedisClient()
2113
+			//清空key 值
2114
+			redis.Set(key, "", time.Second)
2115
+			keyTwo := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
2116
+			redis.Set(keyTwo, "", time.Second)
2117
+			keyThree := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":his_doctor_advice"
2118
+			redis.Set(keyThree, "", time.Second)
2119
+			recordDate := theTime.Format("2006-01-02")
2120
+			keyFour := "scheduals_" + recordDate + "_" + strconv.FormatInt(adminUserInfo.Org.Id, 10)
2121
+
2122
+			redis.Set(keyFour, "", time.Second)
2123
+			keyFive := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":his_advices_list_all"
2124
+			redis.Set(keyFive, "", time.Second)
2125
+			defer redis.Close()
2126
+		} else {
2127
+
2128
+			if len(ids[0]) <= 0 {
2129
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateDoctorAdviceFail)
2130
+				return
2131
+			} else {
2132
+				//t := time.Now().Format("2006-01-02")/**/
2133
+				//timeLayout2 := "2006-01-02"
2134
+				//loc, _ := time.LoadLocation("Local")
2135
+				//theTime, _ := time.ParseInLocation(timeLayout2, t, loc)
2136
+				// 查询信息规挡的设置天数
2137
+
2138
+				infor, _ := service.GetDialysisInformationSetting(adminUserInfo.Org.Id)
2139
+				if infor.ID > 0 {
2140
+
2141
+					var cha_time int64
2142
+
2143
+					timeNowStr := time.Now().Format("2006-01-02")
2144
+					timeNewDate, _ := utils.ParseTimeStringToTime("2006-01-02", timeNowStr)
2145
+
2146
+					//今日的日期减去设置的日期
2147
+					cha_time = timeNewDate.Unix() - infor.WeekDay*86400
2148
+
2149
+					if cha_time >= advices.AdviceDate {
2150
+						//查询审核是否允许
2151
+						infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id, 4)
2152
+						//申请状态不允许的情况 拒绝修改
2153
+						if infor.ApplicationStatus != 1 {
2154
+							c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
2155
+							return
2156
+						}
2157
+
2158
+					}
2159
+				}
2160
+				err = service.BatchCheckOldDoctorAdvice(&advices, ids, adminUserInfo.Org.Id, advice.AdviceDate)
2161
+				//记录日志
2162
+				byterequest, _ := json.Marshal(advices)
2163
+				adviceLog := models.XtDoctorAdviceLog{
2164
+					UserOrgId:   adminUserInfo.Org.Id,
2165
+					PatientId:   advices.PatientId,
2166
+					AdminUserId: advices.Checker,
2167
+					Module:      3,
2168
+					ErrLog:      string(byterequest),
2169
+					Status:      1,
2170
+					Ctime:       time.Now().Unix(),
2171
+					Mtime:       0,
2172
+					Source:      "手机端核对医嘱",
2173
+					RecordDate:  advices.AdviceDate,
2174
+				}
2175
+				service.CreateDoctorAdviceLog(adviceLog)
2176
+				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
2177
+				redis := service.RedisClient()
2178
+				//清空key 值
2179
+				redis.Set(key, "", time.Second)
2180
+				keyTwo := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
2181
+				redis.Set(keyTwo, "", time.Second)
2182
+				keyThree := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":his_doctor_advice"
2183
+				redis.Set(keyThree, "", time.Second)
2184
+				recordDate := theTime.Format("2006-01-02")
2185
+				keyFour := "scheduals_" + recordDate + "_" + strconv.FormatInt(adminUserInfo.Org.Id, 10)
2186
+
2187
+				redis.Set(keyFour, "", time.Second)
2188
+				keyFive := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":his_advices_list_all"
2189
+				redis.Set(keyFive, "", time.Second)
2190
+				defer redis.Close()
2191
+			}
2192
+		}
2193
+
2194
+		if err != nil {
2195
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateDoctorAdviceFail)
2196
+			return
2197
+		}
2198
+
2199
+		advice.Checker = checker
2200
+		advice.CheckTime = theTime.Unix()
2201
+		advice.CheckState = 1
2202
+		c.ServeSuccessJSON(map[string]interface{}{
2203
+			"msg":    "ok",
2204
+			"advice": advice,
2205
+		})
2206
+	}
2207
+	return
2208
+}
2209
+
1963 2210
 func (c *PatientApiController) CheckDoctorAdvice() {
1964 2211
 	origin, _ := c.GetInt64("origin", 0)
1965 2212
 	record_date, _ := c.GetInt64("record_date")
@@ -2379,7 +2626,7 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
2379 2626
 
2380 2627
 	dialysisPrescribe, _ = service.MobileGetDialysisPrescribe(adminUserInfo.Org.Id, id, theAssessmentDateTime)
2381 2628
 	lastDialysisPrescribe, _ = service.MobileGetLastDialysisPrescribeByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)
2382
-	fmt.Println("22332232o2o", lastDialysisPrescribe.Chaptalization)
2629
+
2383 2630
 	if schedual != nil {
2384 2631
 		// 获取透析模版
2385 2632
 		dialysisSolution, _ = service.MobileGetDialysisSolutionByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)
@@ -3779,6 +4026,16 @@ func predialysisEvaluationFormData(evaluation *models.PredialysisEvaluation, dat
3779 4026
 		evaluation.BeforSymptoms = befor_symptoms
3780 4027
 
3781 4028
 	}
4029
+
4030
+	if dataBody["washing_time"] != nil && reflect.TypeOf(dataBody["washing_time"]).String() == "string" {
4031
+		washing_time, _ := dataBody["washing_time"].(string)
4032
+		evaluation.WashingTime = washing_time
4033
+	}
4034
+
4035
+	if dataBody["warsh_count"] != nil && reflect.TypeOf(dataBody["warsh_count"]).String() == "string" {
4036
+		warsh_count, _ := dataBody["warsh_count"].(string)
4037
+		evaluation.WarshCount = warsh_count
4038
+	}
3782 4039
 	return
3783 4040
 }
3784 4041
 

+ 4 - 0
controllers/pharmacy_controller.go View File

@@ -104,6 +104,7 @@ func (this *PharmacyController) TodayNumber() {
104 104
 		var itotal int
105 105
 		itotal, err = service.GetTodayPharmacy(stime, etime, orgid, 0)
106 106
 
107
+		drug, _ := service.GetAllBaseDrugList(orgid)
107 108
 		if err != nil {
108 109
 			utils.ErrorLog(err.Error())
109 110
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -112,6 +113,7 @@ func (this *PharmacyController) TodayNumber() {
112 113
 		this.ServeSuccessJSON(map[string]interface{}{
113 114
 			"wtotal": wtotal,
114 115
 			"itotal": itotal,
116
+			"drug":   drug,
115 117
 		})
116 118
 		return
117 119
 	}
@@ -123,9 +125,11 @@ func (this *PharmacyController) TodayNumber() {
123 125
 		wtotal, _ = service.GetTodayAdviceCount(stime, etime, orgid, 1)
124 126
 
125 127
 		itotal, _ = service.GetTodayAdviceCount(stime, etime, orgid, 0)
128
+		drug, _ := service.GetAllBaseDrugList(orgid)
126 129
 		this.ServeSuccessJSON(map[string]interface{}{
127 130
 			"wtotal": wtotal,
128 131
 			"itotal": itotal,
132
+			"drug":   drug,
129 133
 		})
130 134
 		return
131 135
 	}

+ 3 - 0
controllers/secondary_order_api_contorller.go View File

@@ -609,6 +609,8 @@ func (this *SecondaryOrderApiController) SaveSencondOrder() {
609 609
 
610 610
 				min_price := items["min_price"].(float64)
611 611
 
612
+				medical_insurance_number := items["medical_insurance_number"].(string)
613
+
612 614
 				info := &models.XtSecondWarehouseInfo{
613 615
 					ProjectName:             project_name,
614 616
 					SecondSpecificationName: second_specification_name,
@@ -630,6 +632,7 @@ func (this *SecondaryOrderApiController) SaveSencondOrder() {
630 632
 					MinPrice:                min_price,
631 633
 					IsSource:                is_source,
632 634
 					WarehouseId:             secondWarehouse.ID,
635
+					MedicalInsuranceNumber:  medical_insurance_number,
633 636
 				}
634 637
 
635 638
 				warehousingInfo = append(warehousingInfo, info)

+ 2 - 0
models/device_models.go View File

@@ -1378,6 +1378,7 @@ type XtNewAriDisinfect struct {
1378 1378
 	Ctime                      int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
1379 1379
 	Mtime                      int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
1380 1380
 	Status                     int64  `gorm:"column:status" json:"status" form:"status"`
1381
+	Storey                     string `gorm:"column:storey" json:"storey" form:"storey"`
1381 1382
 }
1382 1383
 
1383 1384
 func (XtNewAriDisinfect) TableName() string {
@@ -1467,6 +1468,7 @@ type XtNewObjectDisinfect struct {
1467 1468
 	LastDisinfectionWater      string `gorm:"column:last_disinfection_water" json:"last_disinfection_water" form:"last_disinfection_water"`
1468 1469
 	LastDisinfectionMethods    string `gorm:"column:last_disinfection_methods" json:"last_disinfection_methods" form:"last_disinfection_methods"`
1469 1470
 	LastDisinfectionTime       string `gorm:"column:last_disinfection_time" json:"last_disinfection_time" form:"last_disinfection_time"`
1471
+	Storey                     string `gorm:"column:storey" json:"storey" form:"storey"`
1470 1472
 }
1471 1473
 
1472 1474
 func (XtNewObjectDisinfect) TableName() string {

+ 2 - 0
models/dialysis.go View File

@@ -327,6 +327,8 @@ type PredialysisEvaluation struct {
327 327
 	LienNecessary                  int64   `gorm:"column:lien_necessary" json:"lien_necessary" form:"lien_necessary"`
328 328
 	PathwayFormationTime           int64   `gorm:"column:pathway_formation_time" json:"pathway_formation_time" form:"pathway_formation_time"`
329 329
 	BeforSymptoms                  string  `gorm:"column:befor_symptoms" json:"befor_symptoms" form:"befor_symptoms"`
330
+	WashingTime                    string  `gorm:"column:washing_time" json:"washing_time" form:"washing_time"`
331
+	WarshCount                     string  `gorm:"column:warsh_count" json:"warsh_count" form:"warsh_count"`
330 332
 }
331 333
 
332 334
 func (PredialysisEvaluation) TableName() string {

+ 1 - 0
models/his_models.go View File

@@ -44,6 +44,7 @@ type XtHisProject struct {
44 44
 	SocialSecurityDirectoryCode string  `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
45 45
 	RecordDate                  int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
46 46
 	IsPrint                     int64   `gorm:"column:is_print" json:"is_print" form:"is_print"`
47
+	FirstLetter                 string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
47 48
 }
48 49
 
49 50
 func (XtHisProject) TableName() string {

+ 2 - 0
models/pharmacy_models.go View File

@@ -55,6 +55,7 @@ type PharmacyContent struct {
55 55
 	Doctor       string //开立医生
56 56
 	DataSources  string //数据来源
57 57
 	Remarks      string //备注
58
+	DrugId       int64
58 59
 }
59 60
 
60 61
 // 发药明细列表
@@ -254,6 +255,7 @@ type XtDoctorAdviceL struct {
254 255
 	IsMedicine            int64   `gorm:"column:is_medicine" json:"is_medicine" form:"is_medicine"`
255 256
 	People                int64   `gorm:"column:people" json:"people" form:"people"`
256 257
 	DispensingTime        int64   `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
258
+	DrugId                int64   `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
257 259
 }
258 260
 
259 261
 func (XtDoctorAdviceL) TableName() string {

+ 1 - 0
models/secondary_models.go View File

@@ -179,6 +179,7 @@ type XtSecondWarehouseInfo struct {
179 179
 	MinPrice                float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
180 180
 	IsSource                int64   `gorm:"column:is_source" json:"is_source" form:"is_source"`
181 181
 	WarehouseId             int64   `gorm:"column:warehouse_id" json:"warehouse_id" form:"warehouse_id"`
182
+	MedicalInsuranceNumber  string  `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
182 183
 }
183 184
 
184 185
 func (XtSecondWarehouseInfo) TableName() string {

+ 34 - 32
models/supply.models.go View File

@@ -19,25 +19,26 @@ func (SpSupplierContacts) TableName() string {
19 19
 }
20 20
 
21 21
 type SpBaseDrug struct {
22
-	ID                int64                  `gorm:"column:id" json:"id" form:"id"`
23
-	DrugName          string                 `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
24
-	DrugCategory      int64                  `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
25
-	DrugSpec          string                 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
26
-	DrugType          int64                  `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
27
-	MaxUnit           string                 `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
28
-	MinNumber         int64                  `gorm:"column:min_number" json:"min_number" form:"min_number"`
29
-	MinUnit           string                 `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
30
-	Dose              string                 `gorm:"column:dose" json:"dose" form:"dose"`
31
-	DoseUnit          string                 `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
32
-	DrugDose          float64                `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
33
-	DrugDoseUnit      int64                  `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
34
-	Manufacturer      int64                  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
35
-	OrgId             int64                  `gorm:"column:org_id" json:"org_id" form:"org_id"`
36
-	Number            string                 `gorm:"column:number" json:"number" form:"number"`
37
-	LastPrice         float64                `gorm:"column:last_price" json:"last_price" form:"last_price"`
38
-	DrugWarehouseInfo []*SpDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
39
-	DrugStatus        string                 `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
40
-	MinPrice          float64                `gorm:"column:min_price" json:"min_price" form:"min_price"`
22
+	ID                     int64                  `gorm:"column:id" json:"id" form:"id"`
23
+	DrugName               string                 `gorm:"column:drug_name" json:"drug_name" form:"drug_name"`
24
+	DrugCategory           int64                  `gorm:"column:drug_category" json:"drug_category" form:"drug_category"`
25
+	DrugSpec               string                 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
26
+	DrugType               int64                  `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
27
+	MaxUnit                string                 `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
28
+	MinNumber              int64                  `gorm:"column:min_number" json:"min_number" form:"min_number"`
29
+	MinUnit                string                 `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
30
+	Dose                   string                 `gorm:"column:dose" json:"dose" form:"dose"`
31
+	DoseUnit               string                 `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
32
+	DrugDose               float64                `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
33
+	DrugDoseUnit           int64                  `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
34
+	Manufacturer           int64                  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
35
+	OrgId                  int64                  `gorm:"column:org_id" json:"org_id" form:"org_id"`
36
+	Number                 string                 `gorm:"column:number" json:"number" form:"number"`
37
+	LastPrice              float64                `gorm:"column:last_price" json:"last_price" form:"last_price"`
38
+	DrugWarehouseInfo      []*SpDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
39
+	DrugStatus             string                 `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
40
+	MinPrice               float64                `gorm:"column:min_price" json:"min_price" form:"min_price"`
41
+	MedicalInsuranceNumber string                 `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
41 42
 }
42 43
 
43 44
 func (SpBaseDrug) TableName() string {
@@ -45,19 +46,20 @@ func (SpBaseDrug) TableName() string {
45 46
 }
46 47
 
47 48
 type SpGoodInformation struct {
48
-	ID                int64              `gorm:"column:id" json:"id" form:"id"`
49
-	SpecificationName string             `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
50
-	GoodTypeId        int64              `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
51
-	GoodUnit          int64              `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
52
-	Manufacturer      int64              `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
53
-	OrgId             int64              `gorm:"column:org_id" json:"org_id" form:"org_id"`
54
-	GoodName          string             `gorm:"column:good_name" json:"good_name" form:"good_name"`
55
-	PackingUnit       string             `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
56
-	BuyPrice          float64            `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
57
-	GoodStatus        string             `gorm:"column:good_status" json:"good_status" form:"good_status"`
58
-	GoodWarehouseInfo []*SpWarehouseInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_warehouse_info"`
59
-	Number            string             `gorm:"column:number" json:"number" form:"number"`
60
-	RetailPrice       float64            `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
49
+	ID                     int64              `gorm:"column:id" json:"id" form:"id"`
50
+	SpecificationName      string             `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
51
+	GoodTypeId             int64              `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
52
+	GoodUnit               int64              `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
53
+	Manufacturer           int64              `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
54
+	OrgId                  int64              `gorm:"column:org_id" json:"org_id" form:"org_id"`
55
+	GoodName               string             `gorm:"column:good_name" json:"good_name" form:"good_name"`
56
+	PackingUnit            string             `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
57
+	BuyPrice               float64            `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
58
+	GoodStatus             string             `gorm:"column:good_status" json:"good_status" form:"good_status"`
59
+	GoodWarehouseInfo      []*SpWarehouseInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_warehouse_info"`
60
+	Number                 string             `gorm:"column:number" json:"number" form:"number"`
61
+	RetailPrice            float64            `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
62
+	MedicalInsuranceNumber string             `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
61 63
 }
62 64
 
63 65
 func (SpGoodInformation) TableName() string {

+ 12 - 0
service/dialysis_service.go View File

@@ -984,6 +984,18 @@ func CheckDoctorAdviceByGroupNo(m *models.DoctorAdvice, groupNo int64, org_id in
984 984
 	return err
985 985
 }
986 986
 
987
+func CheckDoctorAdviceByGroupNoOne(m *models.DoctorAdvice, groupNo int64, org_id int64) (err error) {
988
+	ut := writeDb.Begin()
989
+	err = ut.Model(&models.DoctorAdvice{}).Where("groupno = ?  AND user_org_id = ?  AND status = 1", groupNo, org_id).Updates(map[string]interface{}{"check_time": m.CheckTime, "checker": m.Checker, "check_state": 1}).Error
990
+	if err != nil {
991
+		ut.Rollback()
992
+		return
993
+	}
994
+	ut.Commit()
995
+
996
+	return err
997
+}
998
+
987 999
 func CheckOldDoctorAdvice(m *models.DoctorAdvice, advice_id int64) (err error) {
988 1000
 
989 1001
 	ut := writeDb.Begin()

+ 1 - 0
service/his_hospital_service.go View File

@@ -17,6 +17,7 @@ type HospitalPatient struct {
17 17
 	HisHospitalCheckRecord models.HisHospitalCheckRecord `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
18 18
 	VMHisPrescriptionInfo  VMHisPrescriptionInfo         `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"info"`
19 19
 	HisHospitalOrder       models.HisHospitalOrder       `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"order"`
20
+	FirstLetter            string                        `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
20 21
 }
21 22
 
22 23
 func (HospitalPatient) TableName() string {

+ 10 - 4
service/manage_service.go View File

@@ -1648,7 +1648,7 @@ func CreateNewAirDisinfect(disinfect models.XtNewAriDisinfect) error {
1648 1648
 	return err
1649 1649
 }
1650 1650
 
1651
-func GetNewAirDisinfectList(limit int64, page int64, start_time int64, end_time int64, user_org_id int64) (list []*models.XtNewAriDisinfect, total int64, err error) {
1651
+func GetNewAirDisinfectList(limit int64, page int64, start_time int64, end_time int64, user_org_id int64, storey string) (list []*models.XtNewAriDisinfect, total int64, err error) {
1652 1652
 
1653 1653
 	offset := (page - 1) * limit
1654 1654
 
@@ -1662,6 +1662,9 @@ func GetNewAirDisinfectList(limit int64, page int64, start_time int64, end_time
1662 1662
 	if user_org_id > 0 {
1663 1663
 		db = db.Where("user_org_id = ?", user_org_id)
1664 1664
 	}
1665
+	if len(storey) > 0 {
1666
+		db = db.Where("storey =?", storey)
1667
+	}
1665 1668
 	err = db.Count(&total).Offset(offset).Limit(limit).Find(&list).Error
1666 1669
 	return list, total, err
1667 1670
 }
@@ -1727,7 +1730,7 @@ func CreateNewAirWayDisinfect(disinfect models.XtNewAriDisinfectWay) error {
1727 1730
 	return err
1728 1731
 }
1729 1732
 
1730
-func GetObjectTableDisinfectList(limit int64, page int64, start_time int64, end_time int64, user_org_id int64) (list []*models.XtNewObjectDisinfect, total int64, err error) {
1733
+func GetObjectTableDisinfectList(limit int64, page int64, start_time int64, end_time int64, user_org_id int64, storey string) (list []*models.XtNewObjectDisinfect, total int64, err error) {
1731 1734
 
1732 1735
 	offset := (page - 1) * limit
1733 1736
 
@@ -1741,6 +1744,9 @@ func GetObjectTableDisinfectList(limit int64, page int64, start_time int64, end_
1741 1744
 	if user_org_id > 0 {
1742 1745
 		db = db.Where("user_org_id = ?", user_org_id)
1743 1746
 	}
1747
+	if len(storey) > 0 {
1748
+		db = db.Where("storey =?", storey)
1749
+	}
1744 1750
 	err = db.Count(&total).Offset(offset).Limit(limit).Find(&list).Error
1745 1751
 	return list, total, err
1746 1752
 }
@@ -1785,9 +1791,9 @@ func DeleteObjectTableDisinfect(id int64) error {
1785 1791
 	return err
1786 1792
 }
1787 1793
 
1788
-func GetAirDisInfectionLongTime(user_org_id int64) (list []*models.XtNewAriDisinfect, err error) {
1794
+func GetAirDisInfectionLongTime(user_org_id int64, storey string) (list []*models.XtNewAriDisinfect, err error) {
1789 1795
 
1790
-	err = XTReadDB().Where("user_org_id = ? and status = 1", user_org_id).Order("id desc").First(&list).Error
1796
+	err = XTReadDB().Where("user_org_id = ? and status = 1 and storey = ?", user_org_id, storey).Order("id desc").First(&list).Error
1791 1797
 	return
1792 1798
 }
1793 1799
 

+ 2 - 2
service/patient_service.go View File

@@ -3209,9 +3209,9 @@ func CreateDeviceValusalMapVrr(vrr models.XtDeviceValusalMapVrr) error {
3209 3209
 	return err
3210 3210
 }
3211 3211
 
3212
-func GetDialysisOrderNoExecution(start_nurse int64, user_org_id int64) (order []*models.XtDialysisOrder, err error) {
3212
+func GetDialysisOrderNoExecution(start_nurse int64, user_org_id int64, timenow int64) (order []*models.XtDialysisOrder, err error) {
3213 3213
 
3214
-	err = XTReadDB().Where("start_nurse = ? and user_org_id =? and status =1", start_nurse, user_org_id).Find(&order).Error
3214
+	err = XTReadDB().Where("start_nurse = ? and user_org_id =? and status =1 and dialysis_date =?", start_nurse, user_org_id, timenow).Find(&order).Error
3215 3215
 	return order, err
3216 3216
 }
3217 3217
 

+ 2 - 0
service/pharmacy_service.go View File

@@ -274,6 +274,7 @@ func GetPatientMedication(orgid, patient_id, stime, etime, is_medicine int64) (p
274 274
 			Doctor:       GetAdminUserName(v.AdviceDoctor, orgid), //开立医生
275 275
 			DataSources:  "his处方",
276 276
 			Remarks:      v.Remark, //备注
277
+			DrugId:       v.DrugId,
277 278
 		})
278 279
 	}
279 280
 
@@ -303,6 +304,7 @@ func GetPatientMedication(orgid, patient_id, stime, etime, is_medicine int64) (p
303 304
 			Doctor:       GetAdminUserName(v.AdviceDoctor, orgid),
304 305
 			DataSources:  "临时医嘱",
305 306
 			Remarks:      v.Remark,
307
+			DrugId:       v.DrugId,
306 308
 		})
307 309
 	}
308 310
 	return