|
@@ -1898,7 +1898,7 @@ func (c *DialysisAPIController) Finish() {
|
1898
|
1898
|
|
1899
|
1899
|
}
|
1900
|
1900
|
|
1901
|
|
- 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 {
|
|
1901
|
+ 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 {
|
1902
|
1902
|
evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.Org.Id, id, recordDate.Unix())
|
1903
|
1903
|
if evaluation.SystolicBloodPressure == 0 {
|
1904
|
1904
|
evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
|
@@ -1995,6 +1995,11 @@ func (c *DialysisAPIController) Finish() {
|
1995
|
1995
|
tempassessmentAfterDislysis.ActualUltrafiltration = endmonitorRecords.UltrafiltrationVolume
|
1996
|
1996
|
}
|
1997
|
1997
|
|
|
1998
|
+ if endmonitorRecords.ID > 0 && adminUserInfo.Org.Id == 9829 {
|
|
1999
|
+ tempassessmentAfterDislysis.SystolicBloodPressure = endmonitorRecords.SystolicBloodPressure
|
|
2000
|
+ tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
|
|
2001
|
+ }
|
|
2002
|
+
|
1998
|
2003
|
if lastAssessmentAfterDislysis != nil {
|
1999
|
2004
|
tempassessmentAfterDislysis.BloodPressureType = lastAssessmentAfterDislysis.BloodPressureType
|
2000
|
2005
|
|
|
@@ -2548,6 +2553,11 @@ func (this *DialysisAPIController) StartDialysis() {
|
2548
|
2553
|
record.DiastolicBloodPressure = befor.DiastolicBloodPressure
|
2549
|
2554
|
record.BreathingRate = befor.BreathingRate
|
2550
|
2555
|
}
|
|
2556
|
+
|
|
2557
|
+ if adminUserInfo.Org.Id == 9829 {
|
|
2558
|
+ record.PulseFrequency = 80
|
|
2559
|
+ record.Temperature = 36.5
|
|
2560
|
+ }
|
2551
|
2561
|
err := service.CreateMonitor(&record)
|
2552
|
2562
|
|
2553
|
2563
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":monitor_records"
|
|
@@ -3164,7 +3174,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
|
3164
|
3174
|
record.UltrafiltrationRate = ultrafiltration_rate
|
3165
|
3175
|
}
|
3166
|
3176
|
|
3167
|
|
- if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10340 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 {
|
|
3177
|
+ if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10340 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 || adminInfo.Org.Id == 9829 {
|
3168
|
3178
|
ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration * 60 / 1000 / float64(totalMin) * 1000)
|
3169
|
3179
|
record.UltrafiltrationRate = ultrafiltration_rate
|
3170
|
3180
|
}
|
|
@@ -3402,11 +3412,9 @@ func (this *DialysisAPIController) ModifyStartDialysisOrder() {
|
3402
|
3412
|
ScheduleRemark: schedule_remark,
|
3403
|
3413
|
}
|
3404
|
3414
|
|
|
3415
|
+ //修改床位号需要重新消毒
|
3405
|
3416
|
if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10445 {
|
3406
|
|
-
|
3407
|
|
- if tempDialysisRecord.BedID != bedID {
|
3408
|
|
- service.UpdateDeviceInformation(tempDialysisRecord.PatientId, tempDialysisRecord.DialysisDate)
|
3409
|
|
- }
|
|
3417
|
+ service.UpdateDeviceInformation(tempDialysisRecord.PatientId, tempDialysisRecord.DialysisDate)
|
3410
|
3418
|
}
|
3411
|
3419
|
|
3412
|
3420
|
updateErr := service.ModifyStartDialysisOrder(dialysisRecord)
|
|
@@ -4790,6 +4798,10 @@ func (c *DialysisAPIController) CreateStockOutInfo() {
|
4790
|
4798
|
for _, item := range consumables {
|
4791
|
4799
|
//出库
|
4792
|
4800
|
err := service.ConsumablesGoodDelivery(item.UserOrgId, patient_id, record_time, item, &warehouseOut, item.Count)
|
|
4801
|
+
|
|
4802
|
+ //err := service.ConsumableMobileDelivery(item.UserOrgId, patient_id, record_time, item, &warehouseOut, adminInfo.AdminUser.Id, item.Count)
|
|
4803
|
+ //fmt.Println("item----------------------------------count", item.Count)
|
|
4804
|
+
|
4793
|
4805
|
if err == nil {
|
4794
|
4806
|
goodErrcode := models.XtGoodErrcode{
|
4795
|
4807
|
UserOrgId: adminInfo.Org.Id,
|
|
@@ -4940,6 +4952,8 @@ func (c *DialysisAPIController) CreateStockOutInfo() {
|
4940
|
4952
|
for _, item := range consumables {
|
4941
|
4953
|
//出库
|
4942
|
4954
|
err := service.ConsumablesGoodDelivery(item.UserOrgId, patient_id, record_time, item, &out, item.Count)
|
|
4955
|
+ //err := service.ConsumableMobileDelivery(item.UserOrgId, patient_id, record_time, item, &out, adminInfo.AdminUser.Id, item.Count)
|
|
4956
|
+ //fmt.Println("item----------------------------------count", item.Count)
|
4943
|
4957
|
if err != nil {
|
4944
|
4958
|
goodErrcode := models.XtGoodErrcode{
|
4945
|
4959
|
UserOrgId: adminInfo.Org.Id,
|
|
@@ -5213,6 +5227,7 @@ func (c *DialysisAPIController) EditConsumables() {
|
5213
|
5227
|
|
5214
|
5228
|
fmt.Println("退库长度", len(cancelbefor))
|
5215
|
5229
|
fmt.Println("出库长度", len(outbefor))
|
|
5230
|
+
|
5216
|
5231
|
//退库
|
5217
|
5232
|
for _, item := range cancelbefor {
|
5218
|
5233
|
warehouseOut, _ := service.FindStockOutByIsSys(adminInfo.Org.Id, 1, record_time)
|
|
@@ -5258,7 +5273,6 @@ func (c *DialysisAPIController) EditConsumables() {
|
5258
|
5273
|
warehouseOutInfo.LicenseNumber = stockInInfo.LicenseNumber
|
5259
|
5274
|
warehouseOutInfo.WarehouseInfotId = stockInInfo.ID
|
5260
|
5275
|
//查找当天是否存在出库记录
|
5261
|
|
-
|
5262
|
5276
|
_, errcod := service.GetWarehouseOutInfoIsExistOne(item.GoodId, patient_id, record_time, 0)
|
5263
|
5277
|
|
5264
|
5278
|
if errcod == gorm.ErrRecordNotFound {
|
|
@@ -5358,6 +5372,7 @@ func (c *DialysisAPIController) EditConsumables() {
|
5358
|
5372
|
StorehouseId: houseConfig.StorehouseOutInfo,
|
5359
|
5373
|
}
|
5360
|
5374
|
exsit, errflows := service.GetStockFlowIsExsit(warehouseOutInfos.WarehouseInfotId, patient_id, record_time, item.GoodId)
|
|
5375
|
+
|
5361
|
5376
|
if errflows == gorm.ErrRecordNotFound {
|
5362
|
5377
|
//创建流水表
|
5363
|
5378
|
service.CreateStockFlowOne(stockFlow)
|
|
@@ -5478,8 +5493,6 @@ func (c *DialysisAPIController) EditConsumables() {
|
5478
|
5493
|
|
5479
|
5494
|
}
|
5480
|
5495
|
|
5481
|
|
- //比较剩余库存 和 当前相差的数量,库存剩余量大于则正常出库
|
5482
|
|
-
|
5483
|
5496
|
//查询该耗材的总库存
|
5484
|
5497
|
wareinfo, _ := service.GetStockGoodCount(item.GoodId)
|
5485
|
5498
|
// 如果库存差大于剩余库存则提示库存不足
|