|
@@ -1259,6 +1259,13 @@ func (this *DialysisRecordAPIController) FinishDialysis() {
|
1259
|
1259
|
tempassessmentAfterDislysis.BreathingRate = endmonitorRecords.BreathingRate
|
1260
|
1260
|
tempassessmentAfterDislysis.SystolicBloodPressure = endmonitorRecords.SystolicBloodPressure
|
1261
|
1261
|
tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
|
|
1262
|
+ //长沙南雅
|
|
1263
|
+ if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 9675 || adminUserInfo.CurrentOrgId == 10340 {
|
|
1264
|
+ //获取最后一条透析处方数据
|
|
1265
|
+ prescription, _ := service.GetLastDialysisPrescriptionByPatientIdTwo(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
|
1266
|
+ evaluation, _ := service.MobileGetPredialysisEvaluationTwo(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
|
1267
|
+ tempassessmentAfterDislysis.WeightAfter = evaluation.WeightBefore - prescription.TargetUltrafiltration
|
|
1268
|
+ }
|
1262
|
1269
|
if adminUserInfo.CurrentOrgId == 10101 {
|
1263
|
1270
|
tempassessmentAfterDislysis.ActualUltrafiltration = endmonitorRecords.UltrafiltrationVolume / 1000
|
1264
|
1271
|
} else {
|
|
@@ -1348,72 +1355,72 @@ func (this *DialysisRecordAPIController) FinishDialysis() {
|
1348
|
1355
|
|
1349
|
1356
|
err := service.UpdateAssessmentAfterDislysisRecord(&tempassessmentAfterDislysis)
|
1350
|
1357
|
|
1351
|
|
- //evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
1352
|
|
- //if evaluation.SystolicBloodPressure == 0 {
|
1353
|
|
- // evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
1354
|
|
- //
|
1355
|
|
- // pre := models.PredialysisEvaluation{
|
1356
|
|
- // SystolicBloodPressure: evaluation.SystolicBloodPressure,
|
1357
|
|
- // }
|
1358
|
|
- // fmt.Println("prew", pre)
|
1359
|
|
- // getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
1360
|
|
- // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1361
|
|
- // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1362
|
|
- //
|
1363
|
|
- // redis := service.RedisClient()
|
1364
|
|
- // redis.Set(key, "", time.Second)
|
1365
|
|
- // redis.Set(keyOne, "", time.Second)
|
1366
|
|
- // defer redis.Close()
|
1367
|
|
- // fmt.Println(getNurseErr)
|
1368
|
|
- //}
|
1369
|
|
- //if evaluation.DiastolicBloodPressure == 0 {
|
1370
|
|
- // evaluation.DiastolicBloodPressure = fmonitorRecords.DiastolicBloodPressure
|
1371
|
|
- // pres := models.PredialysisEvaluation{
|
1372
|
|
- // DiastolicBloodPressure: evaluation.DiastolicBloodPressure,
|
1373
|
|
- // }
|
1374
|
|
- // getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
1375
|
|
- // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1376
|
|
- //
|
1377
|
|
- // redis := service.RedisClient()
|
1378
|
|
- // redis.Set(key, "", time.Second)
|
1379
|
|
- //
|
1380
|
|
- // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1381
|
|
- // redis.Set(keyOne, "", time.Second)
|
1382
|
|
- // defer redis.Close()
|
1383
|
|
- // fmt.Println(getNurseErr)
|
1384
|
|
- //}
|
1385
|
|
- //if evaluation.PulseFrequency == 0 {
|
1386
|
|
- // evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
1387
|
|
- // press := models.PredialysisEvaluation{
|
1388
|
|
- // PulseFrequency: evaluation.PulseFrequency,
|
1389
|
|
- // }
|
1390
|
|
- // getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
1391
|
|
- // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1392
|
|
- //
|
1393
|
|
- // redis := service.RedisClient()
|
1394
|
|
- // redis.Set(key, "", time.Second)
|
1395
|
|
- // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1396
|
|
- // redis.Set(keyOne, "", time.Second)
|
1397
|
|
- // defer redis.Close()
|
1398
|
|
- // fmt.Println(getNurseErr)
|
1399
|
|
- //}
|
1400
|
|
- //
|
1401
|
|
- //if evaluation.Temperature == 0 {
|
1402
|
|
- // evaluation.Temperature = fmonitorRecords.Temperature
|
1403
|
|
- // press := models.PredialysisEvaluation{
|
1404
|
|
- // Temperature: evaluation.Temperature,
|
1405
|
|
- // }
|
1406
|
|
- // getNurseErr := service.UpdatePredialysisEvaluationFour(&press, evaluation.ID)
|
1407
|
|
- // key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1408
|
|
- //
|
1409
|
|
- // redis := service.RedisClient()
|
1410
|
|
- // redis.Set(key, "", time.Second)
|
1411
|
|
- // keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
1412
|
|
- // redis.Set(keyOne, "", time.Second)
|
1413
|
|
- // defer redis.Close()
|
1414
|
|
- // fmt.Println(getNurseErr)
|
1415
|
|
- //}
|
1416
|
|
- //
|
|
1358
|
+ if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 9675 || adminUserInfo.CurrentOrgId == 10164 || adminUserInfo.CurrentOrgId == 10340 {
|
|
1359
|
+ fmt.Println("进来2332233333333333333333333333333333333我的")
|
|
1360
|
+ evaluation, _ := service.MobileGetPredialysisEvaluationTwo(adminUserInfo.CurrentOrgId, patientID, recordDate.Unix())
|
|
1361
|
+ if evaluation.SystolicBloodPressure == 0 {
|
|
1362
|
+ pre := models.PredialysisEvaluation{
|
|
1363
|
+ SystolicBloodPressure: fmonitorRecords.SystolicBloodPressure,
|
|
1364
|
+ }
|
|
1365
|
+ fmt.Println("prew", pre)
|
|
1366
|
+ getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
|
1367
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1368
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1369
|
+
|
|
1370
|
+ redis := service.RedisClient()
|
|
1371
|
+ redis.Set(key, "", time.Second)
|
|
1372
|
+ redis.Set(keyOne, "", time.Second)
|
|
1373
|
+ defer redis.Close()
|
|
1374
|
+ fmt.Println(getNurseErr)
|
|
1375
|
+ }
|
|
1376
|
+ if evaluation.DiastolicBloodPressure == 0 {
|
|
1377
|
+ pres := models.PredialysisEvaluation{
|
|
1378
|
+ DiastolicBloodPressure: fmonitorRecords.DiastolicBloodPressure,
|
|
1379
|
+ }
|
|
1380
|
+ getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
|
1381
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1382
|
+
|
|
1383
|
+ redis := service.RedisClient()
|
|
1384
|
+ redis.Set(key, "", time.Second)
|
|
1385
|
+
|
|
1386
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1387
|
+ redis.Set(keyOne, "", time.Second)
|
|
1388
|
+ defer redis.Close()
|
|
1389
|
+ fmt.Println(getNurseErr)
|
|
1390
|
+ }
|
|
1391
|
+ if evaluation.PulseFrequency == 0 {
|
|
1392
|
+ evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
|
1393
|
+ press := models.PredialysisEvaluation{
|
|
1394
|
+ PulseFrequency: evaluation.PulseFrequency,
|
|
1395
|
+ }
|
|
1396
|
+ getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
|
1397
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1398
|
+
|
|
1399
|
+ redis := service.RedisClient()
|
|
1400
|
+ redis.Set(key, "", time.Second)
|
|
1401
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1402
|
+ redis.Set(keyOne, "", time.Second)
|
|
1403
|
+ defer redis.Close()
|
|
1404
|
+ fmt.Println(getNurseErr)
|
|
1405
|
+ }
|
|
1406
|
+
|
|
1407
|
+ if evaluation.Temperature == 0 {
|
|
1408
|
+ evaluation.Temperature = fmonitorRecords.Temperature
|
|
1409
|
+ press := models.PredialysisEvaluation{
|
|
1410
|
+ Temperature: evaluation.Temperature,
|
|
1411
|
+ }
|
|
1412
|
+ getNurseErr := service.UpdatePredialysisEvaluationFour(&press, evaluation.ID)
|
|
1413
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
1414
|
+
|
|
1415
|
+ redis := service.RedisClient()
|
|
1416
|
+ redis.Set(key, "", time.Second)
|
|
1417
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
1418
|
+ redis.Set(keyOne, "", time.Second)
|
|
1419
|
+ defer redis.Close()
|
|
1420
|
+ fmt.Println(getNurseErr)
|
|
1421
|
+ }
|
|
1422
|
+ }
|
|
1423
|
+
|
1417
|
1424
|
if err != nil {
|
1418
|
1425
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
1419
|
1426
|
return
|