|
@@ -1349,72 +1349,72 @@ func (this *DialysisRecordAPIController) FinishDialysis() {
|
1349
|
1349
|
|
1350
|
1350
|
if adminUserInfo.CurrentOrgId == 10101 || adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 9675 || adminUserInfo.CurrentOrgId == 10215 || adminUserInfo.CurrentOrgId == 10233 || adminUserInfo.CurrentOrgId == 10223 || adminUserInfo.CurrentOrgId == 10243 || adminUserInfo.CurrentOrgId == 10340 {
|
1351
|
1351
|
|
1352
|
|
- evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
1353
|
|
- if evaluation.SystolicBloodPressure == 0 {
|
1354
|
|
- evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
1355
|
|
-
|
1356
|
|
- pre := models.PredialysisEvaluation{
|
1357
|
|
- SystolicBloodPressure: evaluation.SystolicBloodPressure,
|
1358
|
|
- }
|
1359
|
|
- fmt.Println("prew", pre)
|
1360
|
|
- getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
1361
|
|
- key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1362
|
|
- keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1363
|
|
-
|
1364
|
|
- redis := service.RedisClient()
|
1365
|
|
- redis.Set(key, "", time.Second)
|
1366
|
|
- redis.Set(keyOne, "", time.Second)
|
1367
|
|
- defer redis.Close()
|
1368
|
|
- fmt.Println(getNurseErr)
|
1369
|
|
- }
|
1370
|
|
- if evaluation.DiastolicBloodPressure == 0 {
|
1371
|
|
- evaluation.DiastolicBloodPressure = fmonitorRecords.DiastolicBloodPressure
|
1372
|
|
- pres := models.PredialysisEvaluation{
|
1373
|
|
- DiastolicBloodPressure: evaluation.DiastolicBloodPressure,
|
1374
|
|
- }
|
1375
|
|
- getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
1376
|
|
- key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1377
|
|
-
|
1378
|
|
- redis := service.RedisClient()
|
1379
|
|
- redis.Set(key, "", time.Second)
|
1380
|
|
-
|
1381
|
|
- keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1382
|
|
- redis.Set(keyOne, "", time.Second)
|
1383
|
|
- defer redis.Close()
|
1384
|
|
- fmt.Println(getNurseErr)
|
1385
|
|
- }
|
1386
|
|
- if evaluation.PulseFrequency == 0 {
|
1387
|
|
- evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
1388
|
|
- press := models.PredialysisEvaluation{
|
1389
|
|
- PulseFrequency: evaluation.PulseFrequency,
|
1390
|
|
- }
|
1391
|
|
- getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
1392
|
|
- key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1393
|
|
-
|
1394
|
|
- redis := service.RedisClient()
|
1395
|
|
- redis.Set(key, "", time.Second)
|
1396
|
|
- keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1397
|
|
- redis.Set(keyOne, "", time.Second)
|
1398
|
|
- defer redis.Close()
|
1399
|
|
- fmt.Println(getNurseErr)
|
1400
|
|
- }
|
1401
|
|
-
|
1402
|
|
- if evaluation.Temperature == 0 {
|
1403
|
|
- evaluation.Temperature = fmonitorRecords.Temperature
|
1404
|
|
- press := models.PredialysisEvaluation{
|
1405
|
|
- Temperature: evaluation.Temperature,
|
1406
|
|
- }
|
1407
|
|
- getNurseErr := service.UpdatePredialysisEvaluationFour(&press, evaluation.ID)
|
1408
|
|
- key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1409
|
|
-
|
1410
|
|
- redis := service.RedisClient()
|
1411
|
|
- redis.Set(key, "", time.Second)
|
1412
|
|
- keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1413
|
|
- redis.Set(keyOne, "", time.Second)
|
1414
|
|
- defer redis.Close()
|
1415
|
|
- fmt.Println(getNurseErr)
|
1416
|
|
- }
|
1417
|
|
-
|
|
1352
|
+ //evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
|
1353
|
+ //if evaluation.SystolicBloodPressure == 0 {
|
|
1354
|
+ // evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
|
1355
|
+ //
|
|
1356
|
+ // pre := models.PredialysisEvaluation{
|
|
1357
|
+ // SystolicBloodPressure: evaluation.SystolicBloodPressure,
|
|
1358
|
+ // }
|
|
1359
|
+ // fmt.Println("prew", pre)
|
|
1360
|
+ // getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
|
1361
|
+ // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1362
|
+ // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1363
|
+ //
|
|
1364
|
+ // redis := service.RedisClient()
|
|
1365
|
+ // redis.Set(key, "", time.Second)
|
|
1366
|
+ // redis.Set(keyOne, "", time.Second)
|
|
1367
|
+ // defer redis.Close()
|
|
1368
|
+ // fmt.Println(getNurseErr)
|
|
1369
|
+ //}
|
|
1370
|
+ //if evaluation.DiastolicBloodPressure == 0 {
|
|
1371
|
+ // evaluation.DiastolicBloodPressure = fmonitorRecords.DiastolicBloodPressure
|
|
1372
|
+ // pres := models.PredialysisEvaluation{
|
|
1373
|
+ // DiastolicBloodPressure: evaluation.DiastolicBloodPressure,
|
|
1374
|
+ // }
|
|
1375
|
+ // getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
|
1376
|
+ // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1377
|
+ //
|
|
1378
|
+ // redis := service.RedisClient()
|
|
1379
|
+ // redis.Set(key, "", time.Second)
|
|
1380
|
+ //
|
|
1381
|
+ // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1382
|
+ // redis.Set(keyOne, "", time.Second)
|
|
1383
|
+ // defer redis.Close()
|
|
1384
|
+ // fmt.Println(getNurseErr)
|
|
1385
|
+ //}
|
|
1386
|
+ //if evaluation.PulseFrequency == 0 {
|
|
1387
|
+ // evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
|
1388
|
+ // press := models.PredialysisEvaluation{
|
|
1389
|
+ // PulseFrequency: evaluation.PulseFrequency,
|
|
1390
|
+ // }
|
|
1391
|
+ // getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
|
1392
|
+ // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1393
|
+ //
|
|
1394
|
+ // redis := service.RedisClient()
|
|
1395
|
+ // redis.Set(key, "", time.Second)
|
|
1396
|
+ // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1397
|
+ // redis.Set(keyOne, "", time.Second)
|
|
1398
|
+ // defer redis.Close()
|
|
1399
|
+ // fmt.Println(getNurseErr)
|
|
1400
|
+ //}
|
|
1401
|
+ //
|
|
1402
|
+ //if evaluation.Temperature == 0 {
|
|
1403
|
+ // evaluation.Temperature = fmonitorRecords.Temperature
|
|
1404
|
+ // press := models.PredialysisEvaluation{
|
|
1405
|
+ // Temperature: evaluation.Temperature,
|
|
1406
|
+ // }
|
|
1407
|
+ // getNurseErr := service.UpdatePredialysisEvaluationFour(&press, evaluation.ID)
|
|
1408
|
+ // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1409
|
+ //
|
|
1410
|
+ // redis := service.RedisClient()
|
|
1411
|
+ // redis.Set(key, "", time.Second)
|
|
1412
|
+ // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1413
|
+ // redis.Set(keyOne, "", time.Second)
|
|
1414
|
+ // defer redis.Close()
|
|
1415
|
+ // fmt.Println(getNurseErr)
|
|
1416
|
+ //}
|
|
1417
|
+ //
|
1418
|
1418
|
if err != nil {
|
1419
|
1419
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
1420
|
1420
|
return
|