Browse Source

2024/6/17

28169 2 days ago
parent
commit
2b5f7e572e

BIN
XT_New.exe View File


+ 4 - 4
controllers/base_api_controller.go View File

83
 		userAdmin.ModifyTime = 1530786071
83
 		userAdmin.ModifyTime = 1530786071
84
 		var subscibe models.ServeSubscibe
84
 		var subscibe models.ServeSubscibe
85
 		subscibe.ID = 11
85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10635 //机构id
86
+		subscibe.OrgId = 10727 //机构id
87
 		subscibe.PeriodStart = 1547447814
87
 		subscibe.PeriodStart = 1547447814
88
 		subscibe.PeriodEnd = 1550039814
88
 		subscibe.PeriodEnd = 1550039814
89
 		subscibe.State = 1
89
 		subscibe.State = 1
93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94
 		subscibes[4] = &subscibe
94
 		subscibes[4] = &subscibe
95
 		var adminUserInfo service.AdminUserInfo
95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10635 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10727 //机构id小英9675或4
97
 		adminUserInfo.CurrentAppId = 18470 //4
97
 		adminUserInfo.CurrentAppId = 18470 //4
98
 		adminUserInfo.AdminUser = &userAdmin
98
 		adminUserInfo.AdminUser = &userAdmin
99
 		adminUserInfo.Subscibes = subscibes
99
 		adminUserInfo.Subscibes = subscibes
329
 		userAdmin.ModifyTime = 1530786071
329
 		userAdmin.ModifyTime = 1530786071
330
 		var subscibe models.ServeSubscibe
330
 		var subscibe models.ServeSubscibe
331
 		subscibe.ID = 11
331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10635 //机构id小英9675或4
332
+		subscibe.OrgId = 10727 //机构id小英9675或4
333
 		subscibe.PeriodStart = 1538035409
333
 		subscibe.PeriodStart = 1538035409
334
 		subscibe.PeriodEnd = 1569571409
334
 		subscibe.PeriodEnd = 1569571409
335
 		subscibe.State = 1
335
 		subscibe.State = 1
339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340
 		subscibes[4] = &subscibe
340
 		subscibes[4] = &subscibe
341
 		var adminUserInfo service.AdminUserInfo
341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10635 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10727 //机构id小英9675或4
343
 		adminUserInfo.CurrentAppId = 18470 //4
343
 		adminUserInfo.CurrentAppId = 18470 //4
344
 		adminUserInfo.AdminUser = &userAdmin
344
 		adminUserInfo.AdminUser = &userAdmin
345
 		adminUserInfo.Subscibes = subscibes
345
 		adminUserInfo.Subscibes = subscibes

+ 4 - 0
controllers/dialysis_api_controller.go View File

2940
 				newprescribe.TargetUltrafiltration = dewater_amount
2940
 				newprescribe.TargetUltrafiltration = dewater_amount
2941
 				newprescribe.PrescriptionWater = dewater_amount
2941
 				newprescribe.PrescriptionWater = dewater_amount
2942
 				newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
2942
 				newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
2943
+				newprescribe.Amylaceum = dialysisSolution.Amylaceum
2943
 				newprescribe.Status = 1
2944
 				newprescribe.Status = 1
2944
 
2945
 
2945
 				if adminUserInfo.CurrentOrgId == 10579 {
2946
 				if adminUserInfo.CurrentOrgId == 10579 {
3013
 					newprescribe.DialysisStrainer = lastDialysisPrescribe.DialysisStrainer
3014
 					newprescribe.DialysisStrainer = lastDialysisPrescribe.DialysisStrainer
3014
 					newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
3015
 					newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
3015
 					newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
3016
 					newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
3017
+					newprescribe.Amylaceum = lastDialysisPrescribe.Amylaceum
3016
 					newprescribe.CreatedTime = time.Now().Unix()
3018
 					newprescribe.CreatedTime = time.Now().Unix()
3017
 					newprescribe.UpdatedTime = time.Now().Unix()
3019
 					newprescribe.UpdatedTime = time.Now().Unix()
3018
 					newprescribe.RecordDate = recordDate.Unix()
3020
 					newprescribe.RecordDate = recordDate.Unix()
3301
 			newprescribe.TargetUltrafiltration = dewater_amount
3303
 			newprescribe.TargetUltrafiltration = dewater_amount
3302
 			newprescribe.PrescriptionWater = dewater_amount
3304
 			newprescribe.PrescriptionWater = dewater_amount
3303
 			newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
3305
 			newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
3306
+			newprescribe.Amylaceum = dialysisSolution.Amylaceum
3304
 			newprescribe.Status = 1
3307
 			newprescribe.Status = 1
3305
 			if adminUserInfo.CurrentOrgId == 10579 {
3308
 			if adminUserInfo.CurrentOrgId == 10579 {
3306
 				newprescribe.Modifier = 0
3309
 				newprescribe.Modifier = 0
3379
 				newprescribe.DialysisStrainer = lastDialysisPrescribe.DialysisStrainer
3382
 				newprescribe.DialysisStrainer = lastDialysisPrescribe.DialysisStrainer
3380
 				newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
3383
 				newprescribe.DialysisIrrigation = lastDialysisPrescribe.DialysisIrrigation
3381
 				newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
3384
 				newprescribe.DialysisDialyszers = lastDialysisPrescribe.DialysisDialyszers
3385
+				newprescribe.Amylaceum = lastDialysisPrescribe.Amylaceum
3382
 				newprescribe.Status = 1
3386
 				newprescribe.Status = 1
3383
 				if adminUserInfo.CurrentOrgId == 10579 {
3387
 				if adminUserInfo.CurrentOrgId == 10579 {
3384
 					newprescribe.Modifier = 0
3388
 					newprescribe.Modifier = 0

+ 1 - 1
controllers/his_api_controller.go View File

3386
 	var adviceList []models.HisDoctorAdviceInfo
3386
 	var adviceList []models.HisDoctorAdviceInfo
3387
 	var projectList []models.HisPrescriptionProject
3387
 	var projectList []models.HisPrescriptionProject
3388
 
3388
 
3389
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10635 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 || adminInfo.CurrentOrgId == 10721 || adminInfo.CurrentOrgId == 10726 || adminInfo.CurrentOrgId == 10731 {
3389
+	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10635 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 || adminInfo.CurrentOrgId == 10721 || adminInfo.CurrentOrgId == 10726 || adminInfo.CurrentOrgId == 10731 || adminInfo.CurrentOrgId == 10571 || adminInfo.CurrentOrgId == 10724 {
3390
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3390
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3391
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3391
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3392
 
3392
 

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

437
 			newprescribe.Chaptalization = dialysisSolution.Chaptalization
437
 			newprescribe.Chaptalization = dialysisSolution.Chaptalization
438
 			newprescribe.PrescribingNumber = 1
438
 			newprescribe.PrescribingNumber = 1
439
 			newprescribe.BloodAccessPartId = dialysisSolution.BloodAccessPartId
439
 			newprescribe.BloodAccessPartId = dialysisSolution.BloodAccessPartId
440
+			newprescribe.Amylaceum = dialysisSolution.Amylaceum
440
 			newprescribe.Status = 1
441
 			newprescribe.Status = 1
441
 			if adminUserInfo.Org.Id != 10013 && adminUserInfo.Org.Id != 10014 && adminUserInfo.Org.Id != 10016 {
442
 			if adminUserInfo.Org.Id != 10013 && adminUserInfo.Org.Id != 10014 && adminUserInfo.Org.Id != 10016 {
442
 				newprescribe.Remark = dialysisSolution.Remark
443
 				newprescribe.Remark = dialysisSolution.Remark
587
 				newprescribe.BodyFluidOther = lastDialysisPrescribe.BodyFluidOther
588
 				newprescribe.BodyFluidOther = lastDialysisPrescribe.BodyFluidOther
588
 				newprescribe.TargetKtv = lastDialysisPrescribe.TargetKtv
589
 				newprescribe.TargetKtv = lastDialysisPrescribe.TargetKtv
589
 				newprescribe.BloodAccessPartId = lastDialysisPrescribe.BloodAccessPartId
590
 				newprescribe.BloodAccessPartId = lastDialysisPrescribe.BloodAccessPartId
591
+				newprescribe.Amylaceum = lastDialysisPrescribe.Amylaceum
590
 				newprescribe.CreatedTime = time.Now().Unix()
592
 				newprescribe.CreatedTime = time.Now().Unix()
591
 				newprescribe.UpdatedTime = time.Now().Unix()
593
 				newprescribe.UpdatedTime = time.Now().Unix()
592
 				newprescribe.RecordDate = theAssessmentDateTime
594
 				newprescribe.RecordDate = theAssessmentDateTime
713
 				newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
715
 				newprescribe.Chaptalization = lastDialysisPrescribe.Chaptalization
714
 				newprescribe.BloodAccessPartId = lastDialysisPrescribe.BloodAccessPartId
716
 				newprescribe.BloodAccessPartId = lastDialysisPrescribe.BloodAccessPartId
715
 				newprescribe.Status = 1
717
 				newprescribe.Status = 1
718
+				newprescribe.Amylaceum = lastDialysisPrescribe.Amylaceum
716
 				newprescribe.PrescribingNumber = 1
719
 				newprescribe.PrescribingNumber = 1
717
 
720
 
718
 				if adminUserInfo.Org.Id == 10340 {
721
 				if adminUserInfo.Org.Id == 10340 {

+ 47 - 3
controllers/mobile_api_controllers/dialysis_api_controller.go View File

3937
 
3937
 
3938
 			}
3938
 			}
3939
 
3939
 
3940
-			if adminUserInfo.Org.Id == 10694 || adminUserInfo.Org.Id == 10697 || adminUserInfo.Org.Id == 10731 {
3940
+			if adminUserInfo.Org.Id == 10727 || adminUserInfo.Org.Id == 10731 {
3941
+				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60)
3942
+				ultrafiltration_rate = ultrafiltration_rate
3943
+
3944
+				ultrafiltration_rate_one = strconv.FormatFloat(ultrafiltration_rate, 'f', -1, 64)
3945
+
3946
+			}
3947
+
3948
+			if adminUserInfo.Org.Id == 10694 || adminUserInfo.Org.Id == 10697 {
3941
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3949
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3942
 				ultrafiltration_rate = ultrafiltration_rate
3950
 				ultrafiltration_rate = ultrafiltration_rate
3943
 			}
3951
 			}
3972
 				}
3980
 				}
3973
 			}
3981
 			}
3974
 
3982
 
3975
-			if adminUserInfo.Org.Id == 10702 {
3983
+			if adminUserInfo.Org.Id == 10702 || adminUserInfo.Org.Id == 10731 || adminUserInfo.Org.Id == 10727 {
3976
 				if prescription.ModeId == 2 {
3984
 				if prescription.ModeId == 2 {
3977
 					totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
3985
 					totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
3978
 					if totalMin == 0 {
3986
 					if totalMin == 0 {
5168
 			if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10599 || adminInfo.Org.Id == 10679 {
5176
 			if adminInfo.Org.Id == 10597 || adminInfo.Org.Id == 10599 || adminInfo.Org.Id == 10679 {
5169
 				record.UltrafiltrationRate = 0
5177
 				record.UltrafiltrationRate = 0
5170
 			}
5178
 			}
5179
+
5180
+			if adminInfo.Org.Id == 10727 || adminInfo.Org.Id == 10731 {
5181
+				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
5182
+				record.UltrafiltrationRate = ultrafiltration_rate / 1000
5183
+
5184
+				fmt.Println("record.UltrafiltrationRate ------------------------", record.UltrafiltrationRate)
5185
+			}
5171
 			//if template.TemplateId == 47 {
5186
 			//if template.TemplateId == 47 {
5172
 			//	ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 60 / float64(totalMin))
5187
 			//	ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 60 / float64(totalMin))
5173
 			//	record.UltrafiltrationRate = ultrafiltration_rate
5188
 			//	record.UltrafiltrationRate = ultrafiltration_rate
5249
 
5264
 
5250
 	}
5265
 	}
5251
 
5266
 
5267
+	//古镇乐生
5268
+	if adminInfo.Org.Id == 10731 || adminInfo.Org.Id == 10727 {
5269
+		if ultrafiltration_rate > 0 {
5270
+			ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
5271
+			record.UltrafiltrationVolume = ultrafiltration_volume / 1000
5272
+		}
5273
+
5274
+	}
5275
+
5252
 	if adminInfo.Org.Id == 10721 {
5276
 	if adminInfo.Org.Id == 10721 {
5253
 		var replacement_rate float64
5277
 		var replacement_rate float64
5254
 		var displacement_quantity float64
5278
 		var displacement_quantity float64
5255
 		totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
5279
 		totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
5256
 		replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*60) / 1000
5280
 		replacement_rate = math.Floor(prescription.ReplacementTotal*1000/float64(totalMin)*60) / 1000
5257
 
5281
 
5258
-		fmt.Println("replacement_rate--------------------------", replacement_rate)
5259
 		record.ReplacementRate = replacement_rate
5282
 		record.ReplacementRate = replacement_rate
5260
 
5283
 
5261
 		fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
5284
 		fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
5264
 
5287
 
5265
 	}
5288
 	}
5266
 
5289
 
5290
+	if adminInfo.Org.Id == 10731 || adminInfo.Org.Id == 10727 {
5291
+
5292
+		var replacement_rate float64
5293
+		var displacement_quantity float64
5294
+
5295
+		totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
5296
+		if totalMin == 0 {
5297
+			totalMin = 240
5298
+		}
5299
+		if prescription.DisplaceLiquiValue == 0 {
5300
+			prescription.ReplacementTotal = 32
5301
+		}
5302
+
5303
+		//乘10 除10是为了保留一位小数
5304
+		replacement_rate = math.Floor(prescription.DisplaceLiquiValue*1000/float64(totalMin)*10) / 10
5305
+
5306
+		fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
5307
+		displacement_quantity = math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * replacement_rate
5308
+		record.DisplacementQuantity = displacement_quantity
5309
+	}
5310
+
5267
 	lastMonitorRecordList, _ := service.GetLastMonitorRecordList(patientID, monitorDate, adminInfo.Org.Id)
5311
 	lastMonitorRecordList, _ := service.GetLastMonitorRecordList(patientID, monitorDate, adminInfo.Org.Id)
5268
 
5312
 
5269
 	this.ServeSuccessJSON(map[string]interface{}{
5313
 	this.ServeSuccessJSON(map[string]interface{}{

+ 10 - 10
controllers/mobile_api_controllers/patient_api_controller.go View File

1375
 
1375
 
1376
 							if medical.IsUse != 1 {
1376
 							if medical.IsUse != 1 {
1377
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
1377
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
1378
-									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 {
1378
+									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 && advice.UserOrgId != 10724 && advice.UserOrgId != 10571 && advice.UserOrgId != 10731 {
1379
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1379
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1380
 										advice.ExecutionTime = 0
1380
 										advice.ExecutionTime = 0
1381
 										advice.ExecutionState = 2
1381
 										advice.ExecutionState = 2
1391
 
1391
 
1392
 								}
1392
 								}
1393
 								if prescribing_number_total > total {
1393
 								if prescribing_number_total > total {
1394
-									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 {
1394
+									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 && advice.UserOrgId != 10724 && advice.UserOrgId != 10571 && advice.UserOrgId != 10731 {
1395
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1395
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1396
 										advice.ExecutionTime = 0
1396
 										advice.ExecutionTime = 0
1397
 										advice.ExecutionState = 2
1397
 										advice.ExecutionState = 2
1418
 											//查询今日是否出库
1418
 											//查询今日是否出库
1419
 											drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1419
 											drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1420
 											if drugOutInfo.ID == 0 {
1420
 											if drugOutInfo.ID == 0 {
1421
-												if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1421
+												if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1422
 													service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1422
 													service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1423
 												}
1423
 												}
1424
 
1424
 
1428
 										if pharmacyConfig.IsOpen != 1 {
1428
 										if pharmacyConfig.IsOpen != 1 {
1429
 											drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1429
 											drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1430
 											if drugOutInfo.ID == 0 {
1430
 											if drugOutInfo.ID == 0 {
1431
-												if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1431
+												if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1432
 													service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1432
 													service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1433
 												}
1433
 												}
1434
 
1434
 
1455
 									if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
1455
 									if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
1456
 										drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1456
 										drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1457
 										if drugOutInfo.ID == 0 {
1457
 										if drugOutInfo.ID == 0 {
1458
-											if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1458
+											if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1459
 												service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1459
 												service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1460
 											}
1460
 											}
1461
 
1461
 
1479
 										service.CreateDrugError(drugError)
1479
 										service.CreateDrugError(drugError)
1480
 										drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1480
 										drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1481
 										if drugOutInfo.ID == 0 {
1481
 										if drugOutInfo.ID == 0 {
1482
-											if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1482
+											if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1483
 												service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1483
 												service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1484
 											}
1484
 											}
1485
 
1485
 
1558
 							}
1558
 							}
1559
 							if medical.IsUse != 1 {
1559
 							if medical.IsUse != 1 {
1560
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
1560
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
1561
-									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 {
1561
+									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1562
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1562
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1563
 										advice.ExecutionTime = 0
1563
 										advice.ExecutionTime = 0
1564
 										advice.ExecutionState = 2
1564
 										advice.ExecutionState = 2
1572
 									return
1572
 									return
1573
 								}
1573
 								}
1574
 								if prescribing_number_total > total {
1574
 								if prescribing_number_total > total {
1575
-									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 {
1575
+									if advice.UserOrgId != 10278 && advice.UserOrgId != 10697 && advice.UserOrgId != 10635 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1576
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1576
 										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
1577
 										advice.ExecutionTime = 0
1577
 										advice.ExecutionTime = 0
1578
 										advice.ExecutionState = 2
1578
 										advice.ExecutionState = 2
1591
 									//查询今日是否出库
1591
 									//查询今日是否出库
1592
 									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1592
 									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1593
 									if drugOutInfo.ID == 0 {
1593
 									if drugOutInfo.ID == 0 {
1594
-										if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1594
+										if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1595
 											service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1595
 											service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1596
 										}
1596
 										}
1597
 
1597
 
1601
 									//查询今日是否出库
1601
 									//查询今日是否出库
1602
 									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1602
 									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1603
 									if drugOutInfo.ID == 0 {
1603
 									if drugOutInfo.ID == 0 {
1604
-										if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 {
1604
+										if item.UserOrgId != 10644 && item.UserOrgId != 10721 && item.UserOrgId != 10138 && item.UserOrgId != 10278 && item.UserOrgId != 10724 && item.UserOrgId != 10571 && item.UserOrgId != 10731 {
1605
 											service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1605
 											service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, &item)
1606
 										}
1606
 										}
1607
 
1607
 

+ 7 - 6
controllers/patient_api_controller.go View File

305
 
305
 
306
 	if adminUserInfo.CurrentOrgId != 10702 {
306
 	if adminUserInfo.CurrentOrgId != 10702 {
307
 		patients, total, _ := service.GetAllPatientList(adminUserInfo.CurrentOrgId)
307
 		patients, total, _ := service.GetAllPatientList(adminUserInfo.CurrentOrgId)
308
-
309
 		c.ServeSuccessJSON(map[string]interface{}{
308
 		c.ServeSuccessJSON(map[string]interface{}{
310
-			"patients": patients,
311
-			"total":    total,
309
+			"patients":    patients,
310
+			"patientsOne": patients,
311
+			"total":       total,
312
 		})
312
 		})
313
 		return
313
 		return
314
 	} else {
314
 	} else {
315
 		patients, total, _ := service.GetAllPatientListOne(adminUserInfo.CurrentOrgId)
315
 		patients, total, _ := service.GetAllPatientListOne(adminUserInfo.CurrentOrgId)
316
-
316
+		patientsOne, total, _ := service.GetAllPatientList(adminUserInfo.CurrentOrgId)
317
 		c.ServeSuccessJSON(map[string]interface{}{
317
 		c.ServeSuccessJSON(map[string]interface{}{
318
-			"patients": patients,
319
-			"total":    total,
318
+			"patients":    patients,
319
+			"patientsOne": patientsOne,
320
+			"total":       total,
320
 		})
321
 		})
321
 		return
322
 		return
322
 	}
323
 	}