Browse Source

2024/6/17

28169 1 week ago
parent
commit
862a9e3da4

BIN
XT_New.exe View File


+ 4 - 4
controllers/base_api_controller.go View File

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10653 //机构id
86
+		subscibe.OrgId = 10702 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,7 +93,7 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10653 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 12123 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10653 //机构id小英9675或4
332
+		subscibe.OrgId = 10702 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,7 +339,7 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10653 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 12123 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 1 - 1
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -4317,7 +4317,7 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
4317 4317
 			dialysisPrescribeOne, _ := service.MobileGetDialysisPrescribeOne(adminUserInfo.Org.Id, id, theAssessmentDateTime)
4318 4318
 			if dialysisPrescribeOne.ID > 0 && evaluation.ID > 0 {
4319 4319
 				dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
4320
-				service.UpdateMobileGetDialysisPrescribe(dialysisPrescribeOne.ID, dewater_amount)
4320
+				service.UpdateMobileGetDialysisPrescribeOne(dialysisPrescribeOne.ID, dewater_amount)
4321 4321
 			}
4322 4322
 		}
4323 4323
 	}

+ 6 - 0
controllers/patient_api_controller.go View File

@@ -8636,6 +8636,10 @@ func (this *PatientApiController) GetAutoPatientContent() {
8636 8636
 
8637 8637
 	minMonitorDiastolicBloodPressure, _ := service.GetMinMonitorDiastolicBloodPressure(patient_id, startTime, endTime, orgId)
8638 8638
 
8639
+	patientVascularAccess, _ := service.GetPatientVascularAccessList(patient_id, orgId)
8640
+
8641
+	lastBefor, _ := service.GetPatientLastBefor(patient_id, startTime, endTime, orgId)
8642
+
8639 8643
 	this.ServeSuccessJSON(map[string]interface{}{
8640 8644
 		"prescription":                         prescription,
8641 8645
 		"berfor":                               berfor,
@@ -8661,6 +8665,8 @@ func (this *PatientApiController) GetAutoPatientContent() {
8661 8665
 		"max_monitor_diastolic_blood_pressure": maxMonitorDiastolicBloodPressure.DiastolicBloodPressure,
8662 8666
 		"min_monitor_diastolic_blood_pressure": minMonitorDiastolicBloodPressure.DiastolicBloodPressure,
8663 8667
 		"lastDryWeight":                        lastDryWeight,
8668
+		"patientVascularAccess":                patientVascularAccess,
8669
+		"lastBefor":                            lastBefor,
8664 8670
 	})
8665 8671
 
8666 8672
 }

+ 18 - 0
service/patient_service.go View File

@@ -4842,3 +4842,21 @@ func GetMinMonitorDiastolicBloodPressure(patient_id int64, start_time int64, end
4842 4842
 	err := XTReadDB().Raw("select Min(diastolic_blood_pressure) as diastolic_blood_pressure from xt_monitoring_record where patient_id = ? and monitoring_date>=? and monitoring_date<=? and user_org_id = ?", patient_id, start_time, end_time, org_id).Scan(&monitor).Error
4843 4843
 	return monitor, err
4844 4844
 }
4845
+
4846
+func GetPatientVascularAccessList(patient_id int64, org_id int64) (models.XtPatientVascularAccess, error) {
4847
+
4848
+	vascularAccess := models.XtPatientVascularAccess{}
4849
+
4850
+	err := XTReadDB().Where("patient_id = ? and user_org_id = ? and status=1", patient_id, org_id).Last(&vascularAccess).Error
4851
+
4852
+	return vascularAccess, err
4853
+}
4854
+
4855
+func GetPatientLastBefor(patient_id int64, start_time int64, end_time int64, org_id int64) (models.XtAssessmentBeforeDislysis, error) {
4856
+
4857
+	beforeDislysis := models.XtAssessmentBeforeDislysis{}
4858
+
4859
+	err := XTReadDB().Where("patient_id =? and user_org_id = ? and assessment_date>=? and assessment_date<=? and status=1 and complication!=''", patient_id, org_id, start_time, end_time).Order("id asc").Last(&beforeDislysis).Error
4860
+
4861
+	return beforeDislysis, err
4862
+}