|
@@ -333,6 +333,8 @@ func (c *DialysisApiController) PostPrescription() {
|
333
|
333
|
sodium_curve := c.GetString("sodium_curve")
|
334
|
334
|
dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
|
335
|
335
|
sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
|
|
336
|
+ prescription_water, _ := c.GetFloat("prescription_water")
|
|
337
|
+ dialysis_strainer := c.GetString("dialysis_strainer")
|
336
|
338
|
appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
|
337
|
339
|
//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
|
338
|
340
|
|
|
@@ -448,6 +450,8 @@ func (c *DialysisApiController) PostPrescription() {
|
448
|
450
|
SodiumCurve: sodium_curve,
|
449
|
451
|
DialysisFluidFlow: dialysis_fluid_flow,
|
450
|
452
|
SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
|
453
|
+ PrescriptionWater: prescription_water,
|
|
454
|
+ DialysisStrainer: dialysis_strainer,
|
451
|
455
|
}
|
452
|
456
|
|
453
|
457
|
//长沙南雅医院,自动生成抗凝剂的临时处方
|
|
@@ -835,6 +839,8 @@ func (c *DialysisApiController) PostSoulution() {
|
835
|
839
|
sodium_curve := c.GetString("sodium_curve")
|
836
|
840
|
dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
|
837
|
841
|
sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
|
|
842
|
+ prescription_water, _ := c.GetFloat("prescription_water")
|
|
843
|
+ dialysis_strainer := c.GetString("dialysis_strainer")
|
838
|
844
|
var prescription_doctor int64
|
839
|
845
|
appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
|
840
|
846
|
|
|
@@ -970,6 +976,8 @@ func (c *DialysisApiController) PostSoulution() {
|
970
|
976
|
TreatmentRemark: treatment_remark,
|
971
|
977
|
DialysisFluidFlow: dialysis_fluid_flow,
|
972
|
978
|
SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
|
979
|
+ PrescriptionWater: prescription_water,
|
|
980
|
+ DialysisStrainer: dialysis_strainer,
|
973
|
981
|
}
|
974
|
982
|
|
975
|
983
|
//查询最近透析准备表里是否存在 透析器 灌流器
|
|
@@ -1148,6 +1156,8 @@ func (c *DialysisApiController) PostSoulution() {
|
1148
|
1156
|
TreatmentRemark: treatment_remark,
|
1149
|
1157
|
DialysisFluidFlow: dialysis_fluid_flow,
|
1150
|
1158
|
SodiumBicarbonateFlow: sodium_bicarbonate_flow,
|
|
1159
|
+ PrescriptionWater: prescribing_number,
|
|
1160
|
+ DialysisStrainer: dialysis_strainer,
|
1151
|
1161
|
}
|
1152
|
1162
|
|
1153
|
1163
|
//针对河间咸得
|
|
@@ -1959,6 +1969,211 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
|
1959
|
1969
|
}
|
1960
|
1970
|
|
1961
|
1971
|
err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
|
|
1972
|
+
|
|
1973
|
+ if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10469 {
|
|
1974
|
+ fmt.Println("进来--------------------------------------")
|
|
1975
|
+ fmt.Println("evaluation.WeightBefore", weight_before)
|
|
1976
|
+ fmt.Println(" evaluation.DryWeight", dry_weight)
|
|
1977
|
+ var dewater_amount float64
|
|
1978
|
+ dewater_amount = 0
|
|
1979
|
+ if dry_weight > 0 {
|
|
1980
|
+ dewater_amount = weight_before - dry_weight - additional_weight
|
|
1981
|
+
|
|
1982
|
+ dewater_amount = dewater_amount * 1000
|
|
1983
|
+
|
|
1984
|
+ if dewater_amount <= 0 {
|
|
1985
|
+ dewater_amount = 0
|
|
1986
|
+ }
|
|
1987
|
+ } else {
|
|
1988
|
+ dewater_amount = 0
|
|
1989
|
+ }
|
|
1990
|
+
|
|
1991
|
+ // 计算透析处方的相关超滤量
|
|
1992
|
+ schedual, _ := service.MobileGetSchedualDetailSix(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
|
|
1993
|
+ var lastDialysisPrescribe *models.DialysisPrescription
|
|
1994
|
+ var dialysisSolution *models.DialysisSolution
|
|
1995
|
+ var dialysisPrescribe *models.DialysisPrescription
|
|
1996
|
+ var mode_id int64
|
|
1997
|
+ if schedual != nil {
|
|
1998
|
+ dialysisPrescribe, _ = service.MobileGetDialysisPrescribeByModeIdSix(adminUserInfo.CurrentOrgId, patient, recordDate.Unix(), schedual.ModeId)
|
|
1999
|
+ if dialysisPrescribe == nil {
|
|
2000
|
+ dialysisPrescribe, _ = service.MobileGetDialysisPrescribe(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
|
|
2001
|
+ }
|
|
2002
|
+ lastDialysisPrescribe, _ = service.MobileGetLastDialysisPrescribeByModeIdSix(adminUserInfo.CurrentOrgId, patient, schedual.ModeId)
|
|
2003
|
+ // 获取透析模版
|
|
2004
|
+ dialysisSolution, _ = service.MobileGetDialysisSolutionByModeIdSix(adminUserInfo.CurrentOrgId, patient, schedual.ModeId)
|
|
2005
|
+ mode_id = schedual.ModeId
|
|
2006
|
+ } else {
|
|
2007
|
+ //lastDialysisPrescribe, _ = service.MobileGetLastDialysisPrescribe(adminUserInfo.Org.Id, id,schedual.ModeId)
|
|
2008
|
+ // 获取透析模版
|
|
2009
|
+ dialysisPrescribe, _ = service.MobileGetDialysisPrescribe(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
|
|
2010
|
+ dialysisSolution, _ = service.MobileGetDialysisSolution(adminUserInfo.CurrentOrgId, patient)
|
|
2011
|
+
|
|
2012
|
+ if dialysisPrescribe == nil && dialysisSolution != nil {
|
|
2013
|
+ mode_id = dialysisSolution.ModeId
|
|
2014
|
+ }
|
|
2015
|
+
|
|
2016
|
+ if dialysisPrescribe == nil && dialysisSolution == nil {
|
|
2017
|
+ mode_id = 0
|
|
2018
|
+ }
|
|
2019
|
+ }
|
|
2020
|
+
|
|
2021
|
+ // 插入透析处方
|
|
2022
|
+ if dialysisPrescribe == nil && dialysisSolution != nil {
|
|
2023
|
+ var newprescribe models.DialysisPrescription
|
|
2024
|
+ newprescribe.UserOrgId = dialysisSolution.UserOrgId
|
|
2025
|
+ newprescribe.PatientId = dialysisSolution.PatientId
|
|
2026
|
+ newprescribe.Anticoagulant = dialysisSolution.Anticoagulant
|
|
2027
|
+ newprescribe.AnticoagulantShouji = dialysisSolution.AnticoagulantShouji
|
|
2028
|
+ newprescribe.AnticoagulantWeichi = dialysisSolution.AnticoagulantWeichi
|
|
2029
|
+ newprescribe.AnticoagulantZongliang = dialysisSolution.AnticoagulantZongliang
|
|
2030
|
+ newprescribe.AnticoagulantGaimingcheng = dialysisSolution.AnticoagulantGaimingcheng
|
|
2031
|
+ newprescribe.AnticoagulantGaijiliang = dialysisSolution.AnticoagulantGaijiliang
|
|
2032
|
+ newprescribe.ModeId = dialysisSolution.ModeId
|
|
2033
|
+ newprescribe.DialysisDuration = dialysisSolution.DialysisDuration
|
|
2034
|
+ newprescribe.ReplacementWay = dialysisSolution.ReplacementWay
|
|
2035
|
+ newprescribe.HemodialysisMachine = dialysisSolution.HemodialysisMachine
|
|
2036
|
+ newprescribe.BloodFilter = dialysisSolution.BloodFilter
|
|
2037
|
+ newprescribe.PerfusionApparatus = dialysisSolution.PerfusionApparatus
|
|
2038
|
+ newprescribe.BloodFlowVolume = dialysisSolution.BloodFlowVolume
|
|
2039
|
+ newprescribe.DisplaceLiqui = dialysisSolution.DisplaceLiqui
|
|
2040
|
+ newprescribe.Glucose = dialysisSolution.Glucose
|
|
2041
|
+ newprescribe.DialysateFlow = dialysisSolution.DialysateFlow
|
|
2042
|
+ newprescribe.Kalium = dialysisSolution.Kalium
|
|
2043
|
+ newprescribe.Sodium = dialysisSolution.Sodium
|
|
2044
|
+ newprescribe.Calcium = dialysisSolution.Calcium
|
|
2045
|
+ newprescribe.Bicarbonate = dialysisSolution.Bicarbonate
|
|
2046
|
+ newprescribe.DialysateTemperature = dialysisSolution.DialysateTemperature
|
|
2047
|
+ newprescribe.Conductivity = dialysisSolution.Conductivity
|
|
2048
|
+ newprescribe.BodyFluid = dialysisSolution.BodyFluid
|
|
2049
|
+ newprescribe.SpecialMedicine = dialysisSolution.SpecialMedicine
|
|
2050
|
+ newprescribe.SpecialMedicineOther = dialysisSolution.SpecialMedicineOther
|
|
2051
|
+ newprescribe.DisplaceLiquiPart = dialysisSolution.DisplaceLiquiPart
|
|
2052
|
+ newprescribe.DisplaceLiquiValue = dialysisSolution.DisplaceLiquiValue
|
|
2053
|
+ newprescribe.BloodAccess = dialysisSolution.BloodAccess
|
|
2054
|
+ newprescribe.Ultrafiltration = dialysisSolution.Ultrafiltration
|
|
2055
|
+ newprescribe.DialysisDurationHour = dialysisSolution.DialysisDurationHour
|
|
2056
|
+ newprescribe.DialysisDurationMinute = dialysisSolution.DialysisDurationMinute
|
|
2057
|
+ newprescribe.TargetUltrafiltration = dialysisSolution.TargetUltrafiltration
|
|
2058
|
+ newprescribe.DialysateFormulation = dialysisSolution.DialysateFormulation
|
|
2059
|
+ newprescribe.Dialyzer = dialysisSolution.Dialyzer
|
|
2060
|
+ newprescribe.ReplacementTotal = dialysisSolution.ReplacementTotal
|
|
2061
|
+ newprescribe.DialyzerPerfusionApparatus = dialysisSolution.DialyzerPerfusionApparatus
|
|
2062
|
+ newprescribe.BodyFluidOther = dialysisSolution.BodyFluidOther
|
|
2063
|
+ newprescribe.TargetKtv = dialysisSolution.TargetKtv
|
|
2064
|
+
|
|
2065
|
+ newprescribe.CreatedTime = time.Now().Unix()
|
|
2066
|
+ newprescribe.UpdatedTime = time.Now().Unix()
|
|
2067
|
+ newprescribe.RecordDate = recordDate.Unix()
|
|
2068
|
+ newprescribe.DewaterAmount = dewater_amount
|
|
2069
|
+ newprescribe.TargetUltrafiltration = dewater_amount
|
|
2070
|
+ newprescribe.Status = 1
|
|
2071
|
+
|
|
2072
|
+ err := service.AddSigleRecord(&newprescribe)
|
|
2073
|
+ if err != nil {
|
|
2074
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
|
2075
|
+ }
|
|
2076
|
+ }
|
|
2077
|
+
|
|
2078
|
+ if dialysisPrescribe == nil && dialysisSolution == nil {
|
|
2079
|
+ if lastDialysisPrescribe != nil {
|
|
2080
|
+ var newprescribe models.DialysisPrescription
|
|
2081
|
+ newprescribe.UserOrgId = lastDialysisPrescribe.UserOrgId
|
|
2082
|
+ newprescribe.PatientId = lastDialysisPrescribe.PatientId
|
|
2083
|
+ newprescribe.Anticoagulant = lastDialysisPrescribe.Anticoagulant
|
|
2084
|
+ newprescribe.AnticoagulantShouji = lastDialysisPrescribe.AnticoagulantShouji
|
|
2085
|
+ newprescribe.AnticoagulantWeichi = lastDialysisPrescribe.AnticoagulantWeichi
|
|
2086
|
+ newprescribe.AnticoagulantZongliang = lastDialysisPrescribe.AnticoagulantZongliang
|
|
2087
|
+ newprescribe.AnticoagulantGaimingcheng = lastDialysisPrescribe.AnticoagulantGaimingcheng
|
|
2088
|
+ newprescribe.AnticoagulantGaijiliang = lastDialysisPrescribe.AnticoagulantGaijiliang
|
|
2089
|
+ newprescribe.ModeId = lastDialysisPrescribe.ModeId
|
|
2090
|
+ newprescribe.DialysisDuration = lastDialysisPrescribe.DialysisDuration
|
|
2091
|
+ newprescribe.ReplacementWay = lastDialysisPrescribe.ReplacementWay
|
|
2092
|
+ newprescribe.HemodialysisMachine = lastDialysisPrescribe.HemodialysisMachine
|
|
2093
|
+ newprescribe.BloodFilter = lastDialysisPrescribe.BloodFilter
|
|
2094
|
+ newprescribe.PerfusionApparatus = lastDialysisPrescribe.PerfusionApparatus
|
|
2095
|
+ newprescribe.BloodFlowVolume = lastDialysisPrescribe.BloodFlowVolume
|
|
2096
|
+ newprescribe.DisplaceLiqui = lastDialysisPrescribe.DisplaceLiqui
|
|
2097
|
+ newprescribe.Glucose = lastDialysisPrescribe.Glucose
|
|
2098
|
+ newprescribe.DialysateFlow = lastDialysisPrescribe.DialysateFlow
|
|
2099
|
+ newprescribe.Kalium = lastDialysisPrescribe.Kalium
|
|
2100
|
+ newprescribe.Sodium = lastDialysisPrescribe.Sodium
|
|
2101
|
+ newprescribe.Calcium = lastDialysisPrescribe.Calcium
|
|
2102
|
+ newprescribe.Bicarbonate = lastDialysisPrescribe.Bicarbonate
|
|
2103
|
+ newprescribe.DialysateTemperature = lastDialysisPrescribe.DialysateTemperature
|
|
2104
|
+ newprescribe.Conductivity = lastDialysisPrescribe.Conductivity
|
|
2105
|
+ newprescribe.BodyFluid = lastDialysisPrescribe.BodyFluid
|
|
2106
|
+ newprescribe.SpecialMedicine = lastDialysisPrescribe.SpecialMedicine
|
|
2107
|
+ newprescribe.SpecialMedicineOther = lastDialysisPrescribe.SpecialMedicineOther
|
|
2108
|
+ newprescribe.DisplaceLiquiPart = lastDialysisPrescribe.DisplaceLiquiPart
|
|
2109
|
+ newprescribe.DisplaceLiquiValue = lastDialysisPrescribe.DisplaceLiquiValue
|
|
2110
|
+ newprescribe.BloodAccess = lastDialysisPrescribe.BloodAccess
|
|
2111
|
+ newprescribe.Ultrafiltration = lastDialysisPrescribe.Ultrafiltration
|
|
2112
|
+ newprescribe.DialysisDurationHour = lastDialysisPrescribe.DialysisDurationHour
|
|
2113
|
+ newprescribe.DialysisDurationMinute = lastDialysisPrescribe.DialysisDurationMinute
|
|
2114
|
+ newprescribe.DialysateFormulation = lastDialysisPrescribe.DialysateFormulation
|
|
2115
|
+ newprescribe.Dialyzer = lastDialysisPrescribe.Dialyzer
|
|
2116
|
+ newprescribe.ReplacementTotal = lastDialysisPrescribe.ReplacementTotal
|
|
2117
|
+ newprescribe.DialyzerPerfusionApparatus = lastDialysisPrescribe.DialyzerPerfusionApparatus
|
|
2118
|
+ newprescribe.BodyFluidOther = lastDialysisPrescribe.BodyFluidOther
|
|
2119
|
+ newprescribe.TargetKtv = lastDialysisPrescribe.TargetKtv
|
|
2120
|
+ newprescribe.CreatedTime = time.Now().Unix()
|
|
2121
|
+ newprescribe.UpdatedTime = time.Now().Unix()
|
|
2122
|
+ newprescribe.RecordDate = recordDate.Unix()
|
|
2123
|
+ newprescribe.DewaterAmount = dewater_amount
|
|
2124
|
+ newprescribe.TargetUltrafiltration = dewater_amount
|
|
2125
|
+ newprescribe.Status = 1
|
|
2126
|
+ newprescribe.Creater = adminUserInfo.AdminUser.Id
|
|
2127
|
+ newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
|
|
2128
|
+
|
|
2129
|
+ err := service.AddSigleRecord(&newprescribe)
|
|
2130
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
2131
|
+ redis := service.RedisClient()
|
|
2132
|
+ defer redis.Close()
|
|
2133
|
+ //清空key 值
|
|
2134
|
+ redis.Set(key, "", time.Second)
|
|
2135
|
+
|
|
2136
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":prescriptions_list_all"
|
|
2137
|
+ redis.Set(keyOne, "", time.Second)
|
|
2138
|
+ keyThree := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
|
2139
|
+ redis.Set(keyThree, "", time.Second)
|
|
2140
|
+ if err != nil {
|
|
2141
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
|
2142
|
+ }
|
|
2143
|
+ } else {
|
|
2144
|
+ var newprescribe models.DialysisPrescription
|
|
2145
|
+ newprescribe.UserOrgId = adminUserInfo.CurrentOrgId
|
|
2146
|
+ newprescribe.PatientId = patient
|
|
2147
|
+ newprescribe.ModeId = mode_id
|
|
2148
|
+ newprescribe.CreatedTime = time.Now().Unix()
|
|
2149
|
+ newprescribe.UpdatedTime = time.Now().Unix()
|
|
2150
|
+ newprescribe.RecordDate = recordDate.Unix()
|
|
2151
|
+ newprescribe.DewaterAmount = dewater_amount
|
|
2152
|
+ newprescribe.TargetUltrafiltration = dewater_amount
|
|
2153
|
+ newprescribe.Status = 1
|
|
2154
|
+ newprescribe.Creater = adminUserInfo.AdminUser.Id
|
|
2155
|
+ newprescribe.PrescriptionDoctor = adminUserInfo.AdminUser.Id
|
|
2156
|
+ newprescribe.Modifier = adminUserInfo.AdminUser.Id
|
|
2157
|
+
|
|
2158
|
+ err := service.AddSigleRecord(&newprescribe)
|
|
2159
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
2160
|
+ redis := service.RedisClient()
|
|
2161
|
+ defer redis.Close()
|
|
2162
|
+ //清空key 值
|
|
2163
|
+ redis.Set(key, "", time.Second)
|
|
2164
|
+
|
|
2165
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":prescriptions_list_all"
|
|
2166
|
+ redis.Set(keyOne, "", time.Second)
|
|
2167
|
+ keyThree := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
|
2168
|
+ redis.Set(keyThree, "", time.Second)
|
|
2169
|
+ if err != nil {
|
|
2170
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
|
2171
|
+ }
|
|
2172
|
+ }
|
|
2173
|
+ }
|
|
2174
|
+
|
|
2175
|
+ }
|
|
2176
|
+
|
1962
|
2177
|
key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_before_dislysis"
|
1963
|
2178
|
redis := service.RedisClient()
|
1964
|
2179
|
|
|
@@ -1971,6 +2186,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
|
1971
|
2186
|
keyTwo := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
1972
|
2187
|
redis.Set(keyTwo, "", time.Second)
|
1973
|
2188
|
defer redis.Close()
|
|
2189
|
+
|
1974
|
2190
|
if err == nil {
|
1975
|
2191
|
c.ServeSuccessJSON(map[string]interface{}{
|
1976
|
2192
|
"assessmentBeforeDislysis": &assessmentBeforeDislysis,
|
|
@@ -2164,6 +2380,17 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
|
2164
|
2380
|
newprescribe.Status = 1
|
2165
|
2381
|
|
2166
|
2382
|
err := service.AddSigleRecord(&newprescribe)
|
|
2383
|
+
|
|
2384
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
2385
|
+ redis := service.RedisClient()
|
|
2386
|
+ defer redis.Close()
|
|
2387
|
+ //清空key 值
|
|
2388
|
+ redis.Set(key, "", time.Second)
|
|
2389
|
+
|
|
2390
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":prescriptions_list_all"
|
|
2391
|
+ redis.Set(keyOne, "", time.Second)
|
|
2392
|
+ keyThree := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
|
2393
|
+ redis.Set(keyThree, "", time.Second)
|
2167
|
2394
|
if err != nil {
|
2168
|
2395
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
2169
|
2396
|
}
|
|
@@ -2180,6 +2407,16 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
|
2180
|
2407
|
newprescribe.Status = 1
|
2181
|
2408
|
|
2182
|
2409
|
err := service.AddSigleRecord(&newprescribe)
|
|
2410
|
+ key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
2411
|
+ redis := service.RedisClient()
|
|
2412
|
+ defer redis.Close()
|
|
2413
|
+ //清空key 值
|
|
2414
|
+ redis.Set(key, "", time.Second)
|
|
2415
|
+
|
|
2416
|
+ keyOne := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":prescriptions_list_all"
|
|
2417
|
+ redis.Set(keyOne, "", time.Second)
|
|
2418
|
+ keyThree := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
|
2419
|
+ redis.Set(keyThree, "", time.Second)
|
2183
|
2420
|
if err != nil {
|
2184
|
2421
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
2185
|
2422
|
}
|
|
@@ -2197,6 +2434,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
|
2197
|
2434
|
defer redis.Close()
|
2198
|
2435
|
keyTwo := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.CurrentOrgId, 10)
|
2199
|
2436
|
redis.Set(keyTwo, "", time.Second)
|
|
2437
|
+
|
2200
|
2438
|
if err == nil {
|
2201
|
2439
|
c.ServeSuccessJSON(map[string]interface{}{
|
2202
|
2440
|
"assessmentBeforeDislysis": &assessmentBeforeDislysis,
|