|
@@ -3013,70 +3013,78 @@ func (c *DialysisAPIController) Finish() {
|
3013
|
3013
|
|
3014
|
3014
|
if adminUserInfo.Org.Id == 10101 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9675 || adminUserInfo.Org.Id == 10215 || adminUserInfo.Org.Id == 10233 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 10243 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10414 || adminUserInfo.Org.Id == 10430 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 9829 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10440 || adminUserInfo.Org.Id == 10469 || adminUserInfo.Org.Id == 10693 || adminUserInfo.Org.Id == 10702 {
|
3015
|
3015
|
evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.Org.Id, id, recordDate.Unix())
|
3016
|
|
- if evaluation.SystolicBloodPressure == 0 {
|
3017
|
|
- evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
3018
|
3016
|
|
3019
|
|
- if adminUserInfo.Org.Id == 10693 {
|
3020
|
|
- SystolicBloodPressureOne, _ := strconv.ParseFloat(fmonitorRecords.MonitorSystolicBloodPressureOne, 64)
|
3021
|
|
- evaluation.SystolicBloodPressure = SystolicBloodPressureOne
|
3022
|
|
- }
|
|
3017
|
+ if adminUserInfo.Org.Id != 10702 {
|
|
3018
|
+ if evaluation.SystolicBloodPressure == 0 {
|
|
3019
|
+ evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
3023
|
3020
|
|
3024
|
|
- pre := models.PredialysisEvaluation{
|
3025
|
|
- SystolicBloodPressure: evaluation.SystolicBloodPressure,
|
3026
|
|
- }
|
3027
|
|
- fmt.Println("prew", pre)
|
3028
|
|
- getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
3029
|
|
- key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
3030
|
|
- keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
3021
|
+ if adminUserInfo.Org.Id == 10693 {
|
|
3022
|
+ SystolicBloodPressureOne, _ := strconv.ParseFloat(fmonitorRecords.MonitorSystolicBloodPressureOne, 64)
|
|
3023
|
+ evaluation.SystolicBloodPressure = SystolicBloodPressureOne
|
|
3024
|
+ }
|
3031
|
3025
|
|
3032
|
|
- redis := service.RedisClient()
|
3033
|
|
- redis.Set(key, "", time.Second)
|
3034
|
|
- redis.Set(keyOne, "", time.Second)
|
3035
|
|
- defer redis.Close()
|
3036
|
|
- fmt.Println(getNurseErr)
|
|
3026
|
+ pre := models.PredialysisEvaluation{
|
|
3027
|
+ SystolicBloodPressure: evaluation.SystolicBloodPressure,
|
|
3028
|
+ }
|
|
3029
|
+ fmt.Println("prew", pre)
|
|
3030
|
+ getNurseErr := service.UpdatePredialysisEvaluation(&pre, evaluation.ID)
|
|
3031
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
3032
|
+ keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
3033
|
+
|
|
3034
|
+ redis := service.RedisClient()
|
|
3035
|
+ redis.Set(key, "", time.Second)
|
|
3036
|
+ redis.Set(keyOne, "", time.Second)
|
|
3037
|
+ defer redis.Close()
|
|
3038
|
+ fmt.Println(getNurseErr)
|
|
3039
|
+ }
|
3037
|
3040
|
}
|
3038
|
3041
|
|
3039
|
|
- if evaluation.DiastolicBloodPressure == 0 {
|
3040
|
|
- evaluation.DiastolicBloodPressure = fmonitorRecords.DiastolicBloodPressure
|
|
3042
|
+ if adminUserInfo.Org.Id != 10702 {
|
|
3043
|
+ if evaluation.DiastolicBloodPressure == 0 {
|
|
3044
|
+ evaluation.DiastolicBloodPressure = fmonitorRecords.DiastolicBloodPressure
|
3041
|
3045
|
|
3042
|
|
- if adminUserInfo.Org.Id == 10693 {
|
3043
|
|
- DiastolicBloodPressureOne, _ := strconv.ParseFloat(fmonitorRecords.MonitorDiastolicBloodPressureOne, 64)
|
3044
|
|
- evaluation.DiastolicBloodPressure = DiastolicBloodPressureOne
|
3045
|
|
- }
|
3046
|
|
- pres := models.PredialysisEvaluation{
|
3047
|
|
- DiastolicBloodPressure: evaluation.DiastolicBloodPressure,
|
3048
|
|
- }
|
|
3046
|
+ if adminUserInfo.Org.Id == 10693 {
|
|
3047
|
+ DiastolicBloodPressureOne, _ := strconv.ParseFloat(fmonitorRecords.MonitorDiastolicBloodPressureOne, 64)
|
|
3048
|
+ evaluation.DiastolicBloodPressure = DiastolicBloodPressureOne
|
|
3049
|
+ }
|
|
3050
|
+ pres := models.PredialysisEvaluation{
|
|
3051
|
+ DiastolicBloodPressure: evaluation.DiastolicBloodPressure,
|
|
3052
|
+ }
|
3049
|
3053
|
|
3050
|
|
- getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
3051
|
|
- key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
3054
|
+ getNurseErr := service.UpdatePredialysisEvaluationTwo(&pres, evaluation.ID)
|
|
3055
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
3052
|
3056
|
|
3053
|
|
- redis := service.RedisClient()
|
3054
|
|
- redis.Set(key, "", time.Second)
|
|
3057
|
+ redis := service.RedisClient()
|
|
3058
|
+ redis.Set(key, "", time.Second)
|
3055
|
3059
|
|
3056
|
|
- keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
3057
|
|
- redis.Set(keyOne, "", time.Second)
|
3058
|
|
- defer redis.Close()
|
3059
|
|
- fmt.Println(getNurseErr)
|
|
3060
|
+ keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
3061
|
+ redis.Set(keyOne, "", time.Second)
|
|
3062
|
+ defer redis.Close()
|
|
3063
|
+ fmt.Println(getNurseErr)
|
|
3064
|
+ }
|
3060
|
3065
|
}
|
3061
|
|
- if evaluation.PulseFrequency == 0 {
|
3062
|
|
- evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
3063
|
3066
|
|
3064
|
|
- if adminUserInfo.Org.Id == 10693 {
|
3065
|
|
- pulseFrequency, _ := strconv.ParseFloat(endmonitorRecords.MonitorPulseFrequencyOne, 64)
|
3066
|
|
- evaluation.PulseFrequency = pulseFrequency
|
3067
|
|
- }
|
3068
|
|
- press := models.PredialysisEvaluation{
|
3069
|
|
- PulseFrequency: evaluation.PulseFrequency,
|
3070
|
|
- }
|
3071
|
|
- getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
3072
|
|
- key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
3067
|
+ if adminUserInfo.Org.Id != 10702 {
|
|
3068
|
+ if evaluation.PulseFrequency == 0 {
|
|
3069
|
+ evaluation.PulseFrequency = fmonitorRecords.PulseFrequency
|
3073
|
3070
|
|
3074
|
|
- redis := service.RedisClient()
|
3075
|
|
- redis.Set(key, "", time.Second)
|
3076
|
|
- keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
3077
|
|
- redis.Set(keyOne, "", time.Second)
|
3078
|
|
- defer redis.Close()
|
3079
|
|
- fmt.Println(getNurseErr)
|
|
3071
|
+ if adminUserInfo.Org.Id == 10693 {
|
|
3072
|
+ pulseFrequency, _ := strconv.ParseFloat(endmonitorRecords.MonitorPulseFrequencyOne, 64)
|
|
3073
|
+ evaluation.PulseFrequency = pulseFrequency
|
|
3074
|
+ }
|
|
3075
|
+ press := models.PredialysisEvaluation{
|
|
3076
|
+ PulseFrequency: evaluation.PulseFrequency,
|
|
3077
|
+ }
|
|
3078
|
+ getNurseErr := service.UpdatePredialysisEvaluationThree(&press, evaluation.ID)
|
|
3079
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
|
3080
|
+
|
|
3081
|
+ redis := service.RedisClient()
|
|
3082
|
+ redis.Set(key, "", time.Second)
|
|
3083
|
+ keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_befores_list_all"
|
|
3084
|
+ redis.Set(keyOne, "", time.Second)
|
|
3085
|
+ defer redis.Close()
|
|
3086
|
+ fmt.Println(getNurseErr)
|
|
3087
|
+ }
|
3080
|
3088
|
}
|
3081
|
3089
|
|
3082
|
3090
|
if evaluation.Temperature == 0 {
|
|
@@ -3945,6 +3953,13 @@ func (this *DialysisAPIController) StartDialysis() {
|
3945
|
3953
|
|
3946
|
3954
|
}
|
3947
|
3955
|
|
|
3956
|
+ if adminUserInfo.Org.Id == 10206 {
|
|
3957
|
+ ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60)
|
|
3958
|
+ ultrafiltration_rate = ultrafiltration_rate
|
|
3959
|
+
|
|
3960
|
+ ultrafiltration_rate_one = strconv.FormatFloat(ultrafiltration_rate, 'f', -1, 64)
|
|
3961
|
+ }
|
|
3962
|
+
|
3948
|
3963
|
if adminUserInfo.Org.Id == 10694 || adminUserInfo.Org.Id == 10697 {
|
3949
|
3964
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
|
3950
|
3965
|
ultrafiltration_rate = ultrafiltration_rate
|
|
@@ -5181,7 +5196,12 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5181
|
5196
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
|
5182
|
5197
|
record.UltrafiltrationRate = ultrafiltration_rate / 1000
|
5183
|
5198
|
|
5184
|
|
- fmt.Println("record.UltrafiltrationRate ------------------------", record.UltrafiltrationRate)
|
|
5199
|
+ }
|
|
5200
|
+
|
|
5201
|
+ if adminInfo.Org.Id == 10206 {
|
|
5202
|
+ ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 1000 / float64(totalMin) * 60 * 1000)
|
|
5203
|
+ fmt.Println("ultrafiltration_rate------------------", ultrafiltration_rate)
|
|
5204
|
+ record.UltrafiltrationRate = ultrafiltration_rate / 1000
|
5185
|
5205
|
}
|
5186
|
5206
|
//if template.TemplateId == 47 {
|
5187
|
5207
|
// ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 60 / float64(totalMin))
|
|
@@ -5273,6 +5293,13 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
5273
|
5293
|
|
5274
|
5294
|
}
|
5275
|
5295
|
|
|
5296
|
+ if adminInfo.Org.Id == 10206 {
|
|
5297
|
+ if ultrafiltration_rate > 0 {
|
|
5298
|
+ ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
|
|
5299
|
+ record.UltrafiltrationVolume = ultrafiltration_volume / 1000
|
|
5300
|
+ }
|
|
5301
|
+ }
|
|
5302
|
+
|
5276
|
5303
|
if adminInfo.Org.Id == 10721 {
|
5277
|
5304
|
var replacement_rate float64
|
5278
|
5305
|
var displacement_quantity float64
|