|
@@ -1277,6 +1277,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1277
|
1277
|
weightAfter, _ := c.GetFloat("weight_after", 0)
|
1278
|
1278
|
additionalWeight, _ := c.GetFloat("additional_weight", 0)
|
1279
|
1279
|
weightReduce, _ := c.GetFloat("weight_loss", 0)
|
|
1280
|
+ fmt.Println("weight_loss", weightReduce)
|
1280
|
1281
|
temperature, _ := c.GetFloat("temperature", 0)
|
1281
|
1282
|
pulse_frequency, _ := c.GetFloat("pulse_frequency", 0)
|
1282
|
1283
|
breathing_rate := c.GetString("breathing_rate")
|
|
@@ -1284,7 +1285,10 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1284
|
1285
|
|
1285
|
1286
|
diastolic_blood_pressure, _ := c.GetFloat("diastolic_blood_pressure", 0)
|
1286
|
1287
|
actual_ultrafiltration, _ := c.GetFloat("actual_ultrafiltration", 0)
|
|
1288
|
+
|
|
1289
|
+ fmt.Println("actual_ultrafiltration233232322323", actual_ultrafiltration)
|
1287
|
1290
|
actual_displacement, _ := c.GetFloat("actual_displacement", 0)
|
|
1291
|
+
|
1288
|
1292
|
actualtreatHour, _ := c.GetInt64("actual_treatment_hour", 0)
|
1289
|
1293
|
actualtreatmin, _ := c.GetInt64("actual_treatment_minute", 0)
|
1290
|
1294
|
cruor := c.GetString("cruor")
|
|
@@ -1354,6 +1358,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1354
|
1358
|
after_urea := c.GetString("after_urea")
|
1355
|
1359
|
pip_coagulation := c.GetString("pip_coagulation")
|
1356
|
1360
|
accumulated_blood_volume := c.GetString("accumulated_blood_volume")
|
|
1361
|
+ fmt.Println("accumulated_blood_volume", accumulated_blood_volume)
|
1357
|
1362
|
if id <= 0 {
|
1358
|
1363
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
1359
|
1364
|
return
|
|
@@ -1361,6 +1366,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1361
|
1366
|
|
1362
|
1367
|
adminUserInfo := c.GetMobileAdminUserInfo()
|
1363
|
1368
|
patient, _ := service.FindPatientById(adminUserInfo.Org.Id, id)
|
|
1369
|
+
|
1364
|
1370
|
if patient.ID == 0 {
|
1365
|
1371
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
|
1366
|
1372
|
return
|
|
@@ -1370,6 +1376,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1370
|
1376
|
recordDateStr = time.Now().Format("2006-01-02")
|
1371
|
1377
|
}
|
1372
|
1378
|
recordDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
|
|
1379
|
+ fmt.Println("parseDateErr", parseDateErr)
|
1373
|
1380
|
if parseDateErr != nil {
|
1374
|
1381
|
c.ErrorLog("日期(%v)解析错误:%v", recordDateStr, parseDateErr)
|
1375
|
1382
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
|
@@ -1531,6 +1538,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1531
|
1538
|
"assessmentAfterDislysis": assessmentAfterDislysis,
|
1532
|
1539
|
})
|
1533
|
1540
|
}
|
|
1541
|
+ return
|
1534
|
1542
|
} else { //修改
|
1535
|
1543
|
|
1536
|
1544
|
infor, _ := service.GetDialysisInformationSetting(adminUserInfo.Org.Id)
|
|
@@ -1543,7 +1551,6 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1543
|
1551
|
|
1544
|
1552
|
//今日的日期减去设置的日期
|
1545
|
1553
|
cha_time = timeNewDate.Unix() - infor.WeekDay*86400
|
1546
|
|
- fmt.Println("recordDate.Unix()", recordDate.Unix())
|
1547
|
1554
|
if cha_time >= recordDate.Unix() {
|
1548
|
1555
|
//查询审核是否允许
|
1549
|
1556
|
infor, _ := service.GetDialysisInformationByRecordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
|
@@ -1569,6 +1576,7 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1569
|
1576
|
assessmentAfterDislysis.ID = assessmentAfter.ID
|
1570
|
1577
|
|
1571
|
1578
|
err := service.UpdateAssessmentAfterDislysisRecord(&assessmentAfterDislysis)
|
|
1579
|
+ fmt.Println("werwewweoweoweoweoewoewoew", err)
|
1572
|
1580
|
redis := service.RedisClient()
|
1573
|
1581
|
keyTwo := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.Org.Id, 10)
|
1574
|
1582
|
|
|
@@ -1580,13 +1588,16 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
|
1580
|
1588
|
|
1581
|
1589
|
keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":assessment_after_dislysis_list_all"
|
1582
|
1590
|
redis.Set(keyOne, "", time.Second)
|
1583
|
|
-
|
1584
|
1591
|
if err == nil {
|
1585
|
1592
|
c.ServeSuccessJSON(map[string]interface{}{
|
1586
|
1593
|
"assessmentAfterDislysis": assessmentAfterDislysis,
|
1587
|
1594
|
})
|
|
1595
|
+ return
|
1588
|
1596
|
}
|
|
1597
|
+
|
1589
|
1598
|
}
|
|
1599
|
+
|
|
1600
|
+ return
|
1590
|
1601
|
}
|
1591
|
1602
|
|
1592
|
1603
|
func (c *DialysisAPIController) PostDialysisPrescription() {
|
|
@@ -3657,6 +3668,7 @@ func (c *DialysisAPIController) PostSolution() {
|
3657
|
3668
|
|
3658
|
3669
|
_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
|
3659
|
3670
|
appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
|
|
3671
|
+ fmt.Println("appRole0000000000000", appRole.UserType)
|
3660
|
3672
|
//
|
3661
|
3673
|
if appRole.UserType == 2 || appRole.UserType == 1 {
|
3662
|
3674
|
prescription_doctor = adminUserInfo.AdminUser.Id
|
|
@@ -5846,6 +5858,24 @@ func (c *DialysisAPIController) CreateStockOutInfo() {
|
5846
|
5858
|
|
5847
|
5859
|
}
|
5848
|
5860
|
}
|
|
5861
|
+
|
|
5862
|
+ //创建步骤表
|
|
5863
|
+ finish := models.XtDialysisFinish{
|
|
5864
|
+ IsFinish: 1,
|
|
5865
|
+ UserOrgId: adminInfo.Org.Id,
|
|
5866
|
+ Status: 1,
|
|
5867
|
+ Ctime: time.Now().Unix(),
|
|
5868
|
+ Mtime: 0,
|
|
5869
|
+ Module: 11,
|
|
5870
|
+ RecordDate: record_time,
|
|
5871
|
+ Sourse: 1,
|
|
5872
|
+ PatientId: patient_id,
|
|
5873
|
+ }
|
|
5874
|
+
|
|
5875
|
+ dialysisFinish, _ := service.GetDialysisFinish(adminInfo.Org.Id, record_time, 11, patient_id)
|
|
5876
|
+ if dialysisFinish.ID == 0 {
|
|
5877
|
+ service.CreateDialysisFinish(finish)
|
|
5878
|
+ }
|
5849
|
5879
|
consumables, _ := service.FindConsumablesByDate(adminInfo.Org.Id, patient_id, record_time)
|
5850
|
5880
|
|
5851
|
5881
|
_, record := service.FindAutomaticReduceRecordByOrgId(adminInfo.Org.Id)
|