xmg123 2 tygodni temu
rodzic
commit
9b2d27fb6a

BIN
XT_New.exe Wyświetl plik


+ 6 - 6
controllers/base_api_controller.go Wyświetl plik

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10164 //机构id
86
+		subscibe.OrgId = 10028 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,8 +93,8 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
97
-		adminUserInfo.CurrentAppId = 17733 //4
96
+		adminUserInfo.CurrentOrgId = 10028 //机构id小英9675或4
97
+		adminUserInfo.CurrentAppId = 12123 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
100 100
 		this.SetSession("admin_user_info", &adminUserInfo)
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10164 //机构id小英9675或4
332
+		subscibe.OrgId = 10028 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,8 +339,8 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
343
-		adminUserInfo.CurrentAppId = 17733 //4
342
+		adminUserInfo.CurrentOrgId = 10028 //机构id小英9675或4
343
+		adminUserInfo.CurrentAppId = 12123 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes
346 346
 		this.SetSession("admin_user_info", &adminUserInfo)

+ 68 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go Wyświetl plik

@@ -4281,6 +4281,11 @@ func (this *DialysisAPIController) StartDialysis() {
4281 4281
 				ultrafiltration_rate = ultrafiltration_rate / 1000
4282 4282
 			}
4283 4283
 
4284
+			if adminUserInfo.Org.Id == 10633 {
4285
+				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
4286
+				ultrafiltration_rate = ultrafiltration_rate / 1000
4287
+			}
4288
+
4284 4289
 			if adminUserInfo.Org.Id == 10612 || adminUserInfo.Org.Id == 10617 {
4285 4290
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
4286 4291
 				ultrafiltration_rate = ultrafiltration_rate / 1000
@@ -4435,6 +4440,27 @@ func (this *DialysisAPIController) StartDialysis() {
4435 4440
 				}
4436 4441
 			}
4437 4442
 
4443
+			if adminUserInfo.Org.Id == 10726 {
4444
+
4445
+				if prescription.ID > 0 {
4446
+
4447
+					if prescription.ModeId == 2 {
4448
+						totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
4449
+						if totalMin == 0 {
4450
+							totalMin = 240
4451
+						}
4452
+						if prescription.DisplaceLiquiValue == 0 {
4453
+							prescription.DisplaceLiquiValue = 1500
4454
+						}
4455
+
4456
+						//乘10 除10是为了保留一位小数
4457
+						replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin))
4458
+
4459
+					}
4460
+
4461
+				}
4462
+			}
4463
+
4438 4464
 		}
4439 4465
 	}
4440 4466
 
@@ -4457,6 +4483,25 @@ func (this *DialysisAPIController) StartDialysis() {
4457 4483
 		}
4458 4484
 	}
4459 4485
 
4486
+	if adminUserInfo.Org.Id == 10726 {
4487
+		if prescription.ID == 0 {
4488
+
4489
+			if prescription.ModeId == 2 {
4490
+				totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
4491
+				if totalMin == 0 {
4492
+					totalMin = 240
4493
+				}
4494
+				if prescription.DisplaceLiquiValue == 0 {
4495
+					prescription.DisplaceLiquiValue = 1500
4496
+				}
4497
+
4498
+				//乘10 除10是为了保留一位小数
4499
+				replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin))
4500
+			}
4501
+
4502
+		}
4503
+	}
4504
+
4460 4505
 	record := models.MonitoringRecord{
4461 4506
 		UserOrgId:       adminUserInfo.Org.Id,
4462 4507
 		PatientId:       patientID,
@@ -5778,6 +5823,12 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
5778 5823
 
5779 5824
 			}
5780 5825
 
5826
+			if adminInfo.Org.Id == 10633 {
5827
+				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
5828
+
5829
+				record.UltrafiltrationRate = ultrafiltration_rate / 1000
5830
+			}
5831
+
5781 5832
 			if adminInfo.Org.Id == 10206 {
5782 5833
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
5783 5834
 
@@ -5847,6 +5898,11 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
5847 5898
 		record.UltrafiltrationVolume = ultrafiltration_volume
5848 5899
 	}
5849 5900
 
5901
+	if adminInfo.Org.Id == 10633 {
5902
+		ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
5903
+		record.UltrafiltrationVolume = ultrafiltration_volume / 1000
5904
+	}
5905
+
5850 5906
 	//长沙南雅
5851 5907
 	if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 || adminInfo.Org.Id == 10469 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10610 || adminInfo.Org.Id == 10537 || adminInfo.Org.Id == 10667 || adminInfo.Org.Id == 9478 || adminInfo.Org.Id == 10766 {
5852 5908
 
@@ -5948,6 +6004,18 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
5948 6004
 
5949 6005
 	}
5950 6006
 
6007
+	if adminInfo.Org.Id == 10726 {
6008
+		var replacement_rate float64
6009
+		var displacement_quantity float64
6010
+		totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
6011
+		replacement_rate = math.Floor(prescription.DisplaceLiquiValue / float64(totalMin) * 60)
6012
+		record.ReplacementRate = replacement_rate
6013
+		fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
6014
+		displacement_quantity = math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * replacement_rate
6015
+		record.DisplacementQuantity = displacement_quantity
6016
+
6017
+	}
6018
+
5951 6019
 	if adminInfo.Org.Id == 10766 || adminInfo.Org.Id == 10164 || adminInfo.Org.Id == 10768 {
5952 6020
 		var replacement_rate float64
5953 6021
 		var displacement_quantity float64

+ 1 - 1
controllers/patient_api_controller.go Wyświetl plik

@@ -9420,7 +9420,7 @@ func (this *PatientApiController) CheckPatientCount() {
9420 9420
 	}
9421 9421
 
9422 9422
 	checkpatientcount, _ := service.CheckPatientCount(id, tx)
9423
-	fmt.Println("checkpatientcount----------------", checkpatientcount)
9423
+
9424 9424
 	tx.Commit()
9425 9425
 
9426 9426
 	this.ServeSuccessJSON(map[string]interface{}{

+ 1 - 1
controllers/stock_in_api_controller.go Wyświetl plik

@@ -8217,7 +8217,7 @@ func (this *StockManagerApiController) UpdateBaseDrugListByUserOrgID() {
8217 8217
 	//	service.UpdateDealerManufacturerOne(item.ID, manufacturer.ManufacturerName)
8218 8218
 	//}
8219 8219
 
8220
-	drugList, _ := service.GetAllBaseDrugListTwentyOne(10265)
8220
+	drugList, _ := service.GetAllBaseDrugListTwentyOne(9478)
8221 8221
 
8222 8222
 	for _, item := range drugList {
8223 8223
 		var drug_spec = item.Dose + item.DoseUnit + "*" + strconv.FormatInt(item.MinNumber, 10) + item.MinUnit + "/" + item.MaxUnit

+ 2 - 4
service/patient_service.go Wyświetl plik

@@ -5461,7 +5461,7 @@ func DeletePatientCountFlow(id int64, tx *gorm.DB) error {
5461 5461
 
5462 5462
 func GetPatientCountMapList(patient_id int64, limit int64, page int64, user_org_id int64) (patient []*models.SfPatients, total int64, err error) {
5463 5463
 
5464
-	db := XTReadDB().Model(&patient).Where("status=1")
5464
+	db := XTReadDB().Model(&patient).Where("status=1 and lapseto =1")
5465 5465
 
5466 5466
 	offset := (page - 1) * limit
5467 5467
 
@@ -5618,9 +5618,7 @@ func GetPatientCountFlowByIdList(patient_id int64, orgId int64, mode_id int64, i
5618 5618
 	if endTime > 0 {
5619 5619
 		db = db.Where("ctime<=?", endTime)
5620 5620
 	}
5621
-	if mode_id > 0 {
5622
-		db = db.Where("mode_id = ?", mode_id)
5623
-	}
5621
+
5624 5622
 	err = db.Find(&flow).Error
5625 5623
 
5626 5624
 	return flow, err