|
@@ -864,6 +864,11 @@ func (c *DialysisAPIController) PostAcceptsAssessment() {
|
864
|
864
|
if receiveTreatment.ID == 0 { //新增
|
865
|
865
|
receiveTreatmentAsses.Creater = adminUserInfo.AdminUser.Id
|
866
|
866
|
err := service.AddSigleReceiveTreatmentAssesRecord(&receiveTreatmentAsses)
|
|
867
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":receive_treatment_asses"
|
|
868
|
+ redis := service.RedisClient()
|
|
869
|
+ defer redis.Close()
|
|
870
|
+ //清空key 值
|
|
871
|
+ redis.Set(key, "", time.Second)
|
867
|
872
|
if err == nil {
|
868
|
873
|
c.ServeSuccessJSON(map[string]interface{}{
|
869
|
874
|
"receiveTreatmentAsses": receiveTreatmentAsses,
|
|
@@ -888,6 +893,11 @@ func (c *DialysisAPIController) PostAcceptsAssessment() {
|
888
|
893
|
receiveTreatmentAsses.Modifier = adminUserInfo.AdminUser.Id
|
889
|
894
|
receiveTreatmentAsses.ID = receiveTreatment.ID
|
890
|
895
|
err := service.UpadateReceiveTreatmentAsses(&receiveTreatmentAsses)
|
|
896
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":receive_treatment_asses"
|
|
897
|
+ redis := service.RedisClient()
|
|
898
|
+ defer redis.Close()
|
|
899
|
+ //清空key 值
|
|
900
|
+ redis.Set(key, "", time.Second)
|
891
|
901
|
if err == nil {
|
892
|
902
|
c.ServeSuccessJSON(map[string]interface{}{
|
893
|
903
|
"receiveTreatmentAsses": receiveTreatmentAsses,
|
|
@@ -1418,15 +1428,11 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1418
|
1428
|
|
1419
|
1429
|
//获取key,清空redis
|
1420
|
1430
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
1421
|
|
- fmt.Println("key23323233232", key)
|
1422
|
1431
|
redis := service.RedisClient()
|
1423
|
1432
|
defer redis.Close()
|
1424
|
|
- resultOne, err := redis.Get(key).Result()
|
1425
|
|
- fmt.Println("清空前23232323223223", resultOne)
|
1426
|
1433
|
//清空key 值
|
1427
|
1434
|
redis.Set(key, "", time.Second)
|
1428
|
|
- resultTwo, err := redis.Get(key).Result()
|
1429
|
|
- fmt.Println("清空后3344444444444", resultTwo)
|
|
1435
|
+
|
1430
|
1436
|
if err == nil {
|
1431
|
1437
|
updateErr := service.UpdateScheduleModeId(patient.ID, adminUserInfo.Org.Id, recordDate.Unix(), mode_id)
|
1432
|
1438
|
if updateErr != nil {
|
|
@@ -1474,6 +1480,12 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
|
1474
|
1480
|
|
1475
|
1481
|
prescription.ID = dialysisPrescription.ID
|
1476
|
1482
|
err := service.UpDateDialysisPrescription(&prescription)
|
|
1483
|
+ //获取key,清空redis
|
|
1484
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
1485
|
+ redis := service.RedisClient()
|
|
1486
|
+ defer redis.Close()
|
|
1487
|
+ //清空key 值
|
|
1488
|
+ redis.Set(key, "", time.Second)
|
1477
|
1489
|
if err == nil {
|
1478
|
1490
|
updateErr := service.UpdateScheduleModeId(patient.ID, adminUserInfo.Org.Id, recordDate.Unix(), mode_id)
|
1479
|
1491
|
if updateErr != nil {
|
|
@@ -2438,6 +2450,16 @@ func (c *DialysisAPIController) PostSolution() {
|
2438
|
2450
|
}
|
2439
|
2451
|
service.SavePrescriptionAndCreateSolution(&solution, &prescription)
|
2440
|
2452
|
|
|
2453
|
+ //获取key,清空redis
|
|
2454
|
+ key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
2455
|
+ redis := service.RedisClient()
|
|
2456
|
+ defer redis.Close()
|
|
2457
|
+ //清空key 值
|
|
2458
|
+ redis.Set(key, "", time.Second)
|
|
2459
|
+
|
|
2460
|
+ //清空长期医嘱的key
|
|
2461
|
+ soulution_key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_solution"
|
|
2462
|
+ redis.Set(soulution_key, "", time.Second)
|
2441
|
2463
|
//查询最近透析准备表里是否存在 透析器 灌流器
|
2442
|
2464
|
|
2443
|
2465
|
//splitStr := strings.Split(dialysis_dialyszers, ",")
|