Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
8f28f79be3

+ 2 - 0
controllers/dialysis_api_controller.go View File

@@ -1294,6 +1294,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
1294 1294
 	thrombus_a := c.GetString("thromubus_a")
1295 1295
 	thrombus_av := c.GetString("thrombus_av")
1296 1296
 	thrombus_v := c.GetString("thromubus_v")
1297
+	dehydration := c.GetString("dehydration")
1297 1298
 	assessmentBeforeDislysis := models.PredialysisEvaluation{
1298 1299
 		DialysisCount:                  dialysis_count,
1299 1300
 		EmergencyTreatment:             emergency_treatment,
@@ -1355,6 +1356,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
1355 1356
 		ThrombusAv:                     thrombus_av,
1356 1357
 		ThromubusA:                     thrombus_a,
1357 1358
 		ThromubusV:                     thrombus_v,
1359
+		Dehydration:                    dehydration,
1358 1360
 	}
1359 1361
 
1360 1362
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)

+ 5 - 0
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -2402,6 +2402,11 @@ func predialysisEvaluationFormData(evaluation *models.PredialysisEvaluation, dat
2402 2402
 		thromubus_v := dataBody["thromubus_v"].(string)
2403 2403
 		evaluation.ThromubusV = thromubus_v
2404 2404
 	}
2405
+
2406
+	if dataBody["dehydration"] != nil && reflect.TypeOf(dataBody["dehydration"]).String() == "string" {
2407
+		dehydration := dataBody["dehydration"].(string)
2408
+		evaluation.Dehydration = dehydration
2409
+	}
2405 2410
 	return
2406 2411
 }
2407 2412
 

+ 1 - 0
models/dialysis.go View File

@@ -280,6 +280,7 @@ type PredialysisEvaluation struct {
280 280
 	ThrombusAv                     string  `gorm:"column:thrombus_av" json:"thrombus_av" form:"thrombus_av"`
281 281
 	ThromubusA                     string  `gorm:"column:thromubus_a" json:"thromubus_a" form:"thromubus_a"`
282 282
 	ThromubusV                     string  `gorm:"column:thromubus_v" json:"thromubus_v" form:"thromubus_v"`
283
+	Dehydration                    string  `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
283 284
 }
284 285
 
285 286
 func (PredialysisEvaluation) TableName() string {

+ 6 - 1
service/patient_service.go View File

@@ -1495,7 +1495,12 @@ func UpdatePatientDialysisSolutionOne(patientid int64, orgid int64, prescription
1495 1495
 	return err
1496 1496
 }
1497 1497
 
1498
+//func FindRemindAdvice(user_org_id int64, advice_name string, advice_desc string, template_id string, fre_type int64, patient_id int64, record_date int64) (advice models.DoctorAdvice, err error) {
1499
+//	err = XTWriteDB().Model(&models.DoctorAdvice{}).Where("patient_id = ? and user_org_id = ? and record_date = ? and advice_name = ? and advice_desc = ? and template_id = ? and frequency_type = ? ", patient_id, user_org_id, record_date, advice_name, advice_desc, template_id, fre_type).First(&advice).Error
1500
+//	return
1501
+//}
1502
+
1498 1503
 func FindRemindAdvice(user_org_id int64, advice_name string, advice_desc string, template_id string, fre_type int64, patient_id int64, record_date int64) (advice models.DoctorAdvice, err error) {
1499
-	err = XTWriteDB().Model(&models.DoctorAdvice{}).Where("patient_id = ? and user_org_id = ? and record_date = ? and advice_name = ? and advice_desc = ? and template_id = ? and frequency_type = ? ", patient_id, user_org_id, record_date, advice_name, advice_desc, template_id, fre_type).First(&advice).Error
1504
+	err = XTWriteDB().Model(&models.DoctorAdvice{}).Where("patient_id = ? and user_org_id = ? and record_date = ? and advice_name = ? and advice_desc = ? and template_id = ? and frequency_type = ? AND advice_type = 2 ", patient_id, user_org_id, record_date, advice_name, advice_desc, template_id, fre_type).First(&advice).Error
1500 1505
 	return
1501 1506
 }