28169 преди 3 дни
родител
ревизия
5f6665c3b3

BIN
XT_New.exe Целия файл


+ 4 - 4
controllers/base_api_controller.go Целия файл

@@ -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 = 10278 //机构id
86
+		subscibe.OrgId = 10635 //机构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 = 10278 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10635 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 18470 //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 = 10278 //机构id小英9675或4
332
+		subscibe.OrgId = 10635 //机构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 = 10278 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10635 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 18470 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 1 - 1
controllers/dialysis_api_controller.go Целия файл

@@ -2839,7 +2839,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2839 2839
 			service.CreateDialysisFinish(finish)
2840 2840
 		}
2841 2841
 
2842
-		if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10469 || adminUserInfo.CurrentOrgId == 10551 || adminUserInfo.CurrentOrgId == 10579 || adminUserInfo.CurrentOrgId == 10580 || adminUserInfo.CurrentOrgId == 10585 || adminUserInfo.CurrentOrgId == 10344 || adminUserInfo.CurrentOrgId == 10622 || adminUserInfo.CurrentOrgId == 10702 || adminUserInfo.CurrentOrgId == 10635 || adminUserInfo.CurrentOrgId == 10723 || adminUserInfo.CurrentOrgId == 10164 || adminUserInfo.CurrentOrgId == 10727 || adminUserInfo.CurrentOrgId == 10726 {
2842
+		if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10469 || adminUserInfo.CurrentOrgId == 10551 || adminUserInfo.CurrentOrgId == 10579 || adminUserInfo.CurrentOrgId == 10580 || adminUserInfo.CurrentOrgId == 10585 || adminUserInfo.CurrentOrgId == 10344 || adminUserInfo.CurrentOrgId == 10622 || adminUserInfo.CurrentOrgId == 10702 || adminUserInfo.CurrentOrgId == 10635 || adminUserInfo.CurrentOrgId == 10723 || adminUserInfo.CurrentOrgId == 10164 || adminUserInfo.CurrentOrgId == 10727 || adminUserInfo.CurrentOrgId == 10726 || adminUserInfo.CurrentOrgId == 10731 || adminUserInfo.CurrentOrgId == 10727 {
2843 2843
 			var dewater_amount float64
2844 2844
 			dewater_amount = 0
2845 2845
 			if dry_weight > 0 {

+ 29 - 3
controllers/doctor_schedule_api_controller.go Целия файл

@@ -430,12 +430,37 @@ func (this *DoctorScheduleApiController) CopyStaffSchedule() {
430 430
 	adminUserInfo := this.GetAdminUserInfo()
431 431
 	orgId := adminUserInfo.CurrentOrgId
432 432
 	start_time, _ := this.GetInt64("start_time")
433
-	fmt.Println("start_time", start_time)
433
+
434 434
 	end_time, _ := this.GetInt64("end_time")
435
-	fmt.Println("end_time", end_time)
435
+
436 436
 	copy_startime, _ := this.GetInt64("copy_startime")
437
-	fmt.Println("copy_startime", copy_startime)
437
+
438 438
 	copy_endtime, _ := this.GetInt64("copy_endtime")
439
+
440
+	remark := this.GetString("remark")
441
+
442
+	if len(remark) > 0 {
443
+		scheduleRemark, _ := service.GetStaffScheduleRemark(orgId, copy_startime, copy_endtime)
444
+
445
+		remark := models.XtStaffScheduleRemark{
446
+			ID:        scheduleRemark.ID,
447
+			StartTime: copy_startime,
448
+			EndTime:   copy_endtime,
449
+			Remark:    remark,
450
+			UserOrgId: orgId,
451
+			Status:    1,
452
+			Ctime:     0,
453
+			Mtime:     0,
454
+		}
455
+
456
+		if scheduleRemark.ID == 0 {
457
+			service.CreateStaffScheduleRemark(remark)
458
+		}
459
+
460
+		if scheduleRemark.ID > 0 {
461
+			service.SaveStaffScheduleRemarkOne(remark)
462
+		}
463
+	}
439 464
 	schedule, err := service.GetStaffScheduleListTwo(orgId, start_time, end_time)
440 465
 	//查询选中日期的排班是否存在
441 466
 	_, errcode := service.GetNextWeekSchedule(orgId, copy_startime, copy_endtime)
@@ -477,6 +502,7 @@ func (this *DoctorScheduleApiController) CopyStaffSchedule() {
477 502
 				Status:       1,
478 503
 				Ctime:        time.Now().Unix(),
479 504
 				ScheduleDate: item.ScheduleDate,
505
+				Remark:       item.Remark,
480 506
 			}
481 507
 			service.AddSchedule(&staffSchedule)
482 508
 		}

+ 2 - 3
controllers/his_api_controller.go Целия файл

@@ -3386,7 +3386,7 @@ func (c *HisApiController) CreateHisPrescription() {
3386 3386
 	var adviceList []models.HisDoctorAdviceInfo
3387 3387
 	var projectList []models.HisPrescriptionProject
3388 3388
 
3389
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10635 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 || adminInfo.CurrentOrgId == 10721 || adminInfo.CurrentOrgId == 10726 {
3389
+	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10635 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 || adminInfo.CurrentOrgId == 10721 || adminInfo.CurrentOrgId == 10726 || adminInfo.CurrentOrgId == 10731 {
3390 3390
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3391 3391
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3392 3392
 
@@ -7064,6 +7064,7 @@ func (c *HisApiController) DeletePrescription() {
7064 7064
 									ExpireDate:              it.ExpiryDate,
7065 7065
 									StorehouseId:            houseConfig.StorehouseOutInfo,
7066 7066
 									OverCount:               flush_count_one,
7067
+									OperateTime:             time.Now().Unix(),
7067 7068
 								}
7068 7069
 								service.CreateStockFlowOne(flow)
7069 7070
 
@@ -7697,8 +7698,6 @@ func (c *HisApiController) DeleteProject() {
7697 7698
 					//查询已出库数量
7698 7699
 					dialysisInfo, _ := service.GetGoodDialysisOutInfoSix(adminInfo.CurrentOrgId, info.PatientId, info.SysRecordTime, project.ProjectId)
7699 7700
 
7700
-					//fmt.Println("aiwohonguo --------------------", prescribingNumber)
7701
-					//fmt.Println("aiwohonguo --------------------", dialysisInfo.Count)
7702 7701
 					if prescribingNumber < dialysisInfo.Count {
7703 7702
 						//改变数量
7704 7703
 						service.UpdateAutoGood(adminInfo.CurrentOrgId, info.PatientId, info.SysRecordTime, project.ProjectId, id, prescribingNumber)

+ 26 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go Целия файл

@@ -12408,3 +12408,29 @@ func (c *DialysisAPIController) SaveLongAdviceTemplate() {
12408 12408
 		"advice": newAdvices,
12409 12409
 	})
12410 12410
 }
12411
+
12412
+func (c *DialysisAPIController) StopLongAdvice() {
12413
+
12414
+	stop_time := c.GetString("execution_time")
12415
+	id, _ := c.GetInt64("id")
12416
+	if len(stop_time) <= 0 {
12417
+		utils.ErrorLog("stop_time")
12418
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
12419
+		return
12420
+	}
12421
+	timeLayout2 := "2006-01-02 15:04:05"
12422
+	loc, _ := time.LoadLocation("Local")
12423
+
12424
+	theTime, errs := time.ParseInLocation(timeLayout2, stop_time, loc)
12425
+	if errs != nil {
12426
+		utils.ErrorLog(errs.Error())
12427
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
12428
+		return
12429
+	}
12430
+
12431
+	advice, _ := service.StopLongAdvice(id, theTime.Unix())
12432
+
12433
+	c.ServeSuccessJSON(map[string]interface{}{
12434
+		"advice": advice,
12435
+	})
12436
+}

+ 2 - 0
controllers/mobile_api_controllers/mobile_api_router_register.go Целия файл

@@ -231,4 +231,6 @@ func MobileAPIControllersRegisterRouters() {
231 231
 	beego.Router("/m/api/updateeditdrugorder", &DialysisAPIController{}, "Post:UpdateEditDrugOrder")
232 232
 
233 233
 	beego.Router("/m/api/savelongadvicetemplate", &DialysisAPIController{}, "Post:SaveLongAdviceTemplate")
234
+
235
+	beego.Router("/m/api/stoplongadvice", &DialysisAPIController{}, "Get:StopLongAdvice")
234 236
 }

+ 26 - 0
controllers/mobile_api_controllers/patient_api_controller.go Целия файл

@@ -3494,6 +3494,10 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
3494 3494
 
3495 3495
 		}
3496 3496
 
3497
+		if adminUserInfo.Org.Id == 10727 {
3498
+			dewater_amount = dewater_amount * 1000
3499
+		}
3500
+
3497 3501
 		if dewater_amount <= 0 {
3498 3502
 			dewater_amount = 0
3499 3503
 		}
@@ -4226,6 +4230,27 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
4226 4230
 
4227 4231
 	}
4228 4232
 
4233
+	//古镇乐生
4234
+	if adminUserInfo.Org.Id == 10727 || adminUserInfo.Org.Id == 10731 {
4235
+		if evaluation.ID == 0 {
4236
+			dialysisPrescribeOne, _ := service.MobileGetDialysisPrescribeOne(adminUserInfo.Org.Id, id, theAssessmentDateTime)
4237
+			if dialysisPrescribeOne.ID > 0 && evaluation.ID > 0 {
4238
+				dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
4239
+				dewater_amount = dewater_amount * 1000
4240
+				service.UpdateMobileGetDialysisPrescribe(dialysisPrescribeOne.ID, dewater_amount)
4241
+			}
4242
+		}
4243
+
4244
+		if evaluation.ID > 0 {
4245
+			dialysisPrescribeOne, _ := service.MobileGetDialysisPrescribeOne(adminUserInfo.Org.Id, id, theAssessmentDateTime)
4246
+			if dialysisPrescribeOne.ID > 0 && evaluation.ID > 0 {
4247
+				dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
4248
+				dewater_amount = dewater_amount * 1000
4249
+				service.UpdateMobileGetDialysisPrescribeOne(dialysisPrescribeOne.ID, dewater_amount)
4250
+			}
4251
+		}
4252
+	}
4253
+
4229 4254
 	if adminUserInfo.Org.Id == 10721 || adminUserInfo.Org.Id == 10164 {
4230 4255
 
4231 4256
 		prescription, _ := service.GetTodayPrescription(id, adminUserInfo.Org.Id, theAssessmentDateTime)
@@ -5706,6 +5731,7 @@ func (c *PatientApiController) GetPrintDialysisOrder() {
5706 5731
 				advice.PrescribingNumber = cnt
5707 5732
 				advice.PrescribingNumberUnit = item.Unit
5708 5733
 				advice.AdviceDoctor = item.Doctor
5734
+				advice.Remark = item.Remark
5709 5735
 				if item.Type == 3 {
5710 5736
 					advice.AdviceName = item.GoodInfo.GoodName
5711 5737
 					advice.PrescribingNumberUnit = item.GoodInfo.PackingUnit

+ 18 - 7
controllers/patient_api_controller.go Целия файл

@@ -303,13 +303,24 @@ func (c *PatientApiController) GetPatientsAllList() {
303 303
 
304 304
 	adminUserInfo := c.GetAdminUserInfo()
305 305
 
306
-	patients, total, _ := service.GetAllPatientList(adminUserInfo.CurrentOrgId)
306
+	if adminUserInfo.CurrentOrgId != 10702 {
307
+		patients, total, _ := service.GetAllPatientList(adminUserInfo.CurrentOrgId)
308
+
309
+		c.ServeSuccessJSON(map[string]interface{}{
310
+			"patients": patients,
311
+			"total":    total,
312
+		})
313
+		return
314
+	} else {
315
+		patients, total, _ := service.GetAllPatientListOne(adminUserInfo.CurrentOrgId)
316
+
317
+		c.ServeSuccessJSON(map[string]interface{}{
318
+			"patients": patients,
319
+			"total":    total,
320
+		})
321
+		return
322
+	}
307 323
 
308
-	c.ServeSuccessJSON(map[string]interface{}{
309
-		"patients": patients,
310
-		"total":    total,
311
-	})
312
-	return
313 324
 }
314 325
 
315 326
 // GenerateDialysisNo 生成透析号
@@ -8082,7 +8093,7 @@ func (c *DialysisApiController) AddDeathSummary() {
8082 8093
 	}
8083 8094
 
8084 8095
 	var lastRecordDate int64
8085
-	if len(record_date) > 0 {
8096
+	if len(last_record_date) > 0 {
8086 8097
 		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", last_record_date+" 00:00:00", loc)
8087 8098
 		if err != nil {
8088 8099
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)

+ 26 - 37
controllers/patient_dataconfig_api_controller.go Целия файл

@@ -198,37 +198,31 @@ func (this *PatientDataConfigAPIController) CreateSickHistory() {
198 198
 	guominyaowu_desc := this.GetString("guominyaowu_desc")
199 199
 	doctor_id, _ := this.GetInt64("doctor_id")
200 200
 
201
-	//if patientID <= 0 || len(content) == 0 {
202
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
203
-	//	return
204
-	//}
201
+	timeLayout := "2006-01-02"
202
+	loc, _ := time.LoadLocation("Local")
203
+	var recordDate int64
204
+	if len(record_time_str) > 0 {
205
+		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time_str+" 00:00:00", loc)
206
+		if err != nil {
207
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
208
+			return
209
+		}
210
+		recordDate = theTime.Unix()
211
+	}
205 212
 
206 213
 	if len(record_time_str) == 0 {
207 214
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
208 215
 		return
209 216
 	}
210
-	record_date := strings.Split(record_time_str, " ")
211
-
212
-	checkDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", record_time_str)
213
-	checkDate_two, _ := utils.ParseTimeStringToTime("2006-01-02", record_date[0])
214 217
 
215 218
 	adminUserInfo := this.GetAdminUserInfo()
216
-	//patient, getPatientErr := service.GetPatientByID(adminUserInfo.CurrentOrgId, patientID)
217
-	//if getPatientErr != nil {
218
-	//	this.ErrorLog("获取患者信息失败:%v", getPatientErr)
219
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
220
-	//	return
221
-	//} else if patient == nil {
222
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
223
-	//	return
224
-	//}
225 219
 
226 220
 	now := time.Now().Unix()
227 221
 	record := models.XtPatientSickHistory{
228 222
 		OrgId:                   adminUserInfo.CurrentOrgId,
229 223
 		PatientId:               patientID,
230 224
 		Recorder:                adminUserInfo.AdminUser.Id,
231
-		RecordTime:              checkDate.Unix(),
225
+		RecordTime:              recordDate,
232 226
 		Content:                 content,
233 227
 		Status:                  1,
234 228
 		Title:                   title,
@@ -239,7 +233,7 @@ func (this *PatientDataConfigAPIController) CreateSickHistory() {
239 233
 		Ctime:                   now,
240 234
 		Mtime:                   now,
241 235
 		DoctorId:                doctor_id,
242
-		RecordDate:              checkDate_two.Unix(),
236
+		RecordDate:              recordDate,
243 237
 	}
244 238
 
245 239
 	createErr := service.CreatePatientSickHistory(&record)
@@ -304,24 +298,19 @@ func (this *PatientDataConfigAPIController) ModifySickHistory() {
304 298
 	guominyaowu_desc := this.GetString("guominyaowu_desc")
305 299
 	doctor_id, _ := this.GetInt64("doctor_id")
306 300
 
307
-	if patientID <= 0 || len(content) == 0 || id == 0 || len(record_time_str) == 0 {
308
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
309
-		return
310
-	}
311
-	//timeLayout := "2006-01-02"
312
-	//loc, _ := time.LoadLocation("Local")
313
-	checkDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", record_time_str)
314
-
315 301
 	adminUserInfo := this.GetAdminUserInfo()
316
-	//patient, getPatientErr := service.GetPatientByID(adminUserInfo.CurrentOrgId, patientID)
317
-	//if getPatientErr != nil {
318
-	//	this.ErrorLog("获取患者信息失败:%v", getPatientErr)
319
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
320
-	//	return
321
-	//} else if patient == nil {
322
-	//	this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
323
-	//	return
324
-	//}
302
+
303
+	timeLayout := "2006-01-02"
304
+	loc, _ := time.LoadLocation("Local")
305
+	var recordDate int64
306
+	if len(record_time_str) > 0 {
307
+		theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time_str+" 00:00:00", loc)
308
+		if err != nil {
309
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
310
+			return
311
+		}
312
+		recordDate = theTime.Unix()
313
+	}
325 314
 
326 315
 	now := time.Now().Unix()
327 316
 
@@ -335,7 +324,7 @@ func (this *PatientDataConfigAPIController) ModifySickHistory() {
335 324
 		Ctime:                   now,
336 325
 		Mtime:                   now,
337 326
 		Title:                   title,
338
-		RecordTime:              checkDate.Unix(),
327
+		RecordTime:              recordDate,
339 328
 		IsShenyizhiHistory:      is_shenyizhishi,
340 329
 		IsFumoDialysisHistory:   is_fumotouxishi,
341 330
 		HypersusceptibilityDesc: guominyaowu_desc,

+ 8 - 0
service/dialysis_service.go Целия файл

@@ -2726,3 +2726,11 @@ func ModifyPatientDisplacementQuantity(id int64, displacement_quantity float64)
2726 2726
 	err := XTWriteDB().Model(&models.MonitoringRecord{}).Where("id = ? and status=1", id).Updates(map[string]interface{}{"displacement_quantity": displacement_quantity}).Error
2727 2727
 	return err
2728 2728
 }
2729
+
2730
+func StopLongAdvice(id int64, stop_time int64) (models.DoctorAdvice, error) {
2731
+
2732
+	advice := models.DoctorAdvice{}
2733
+	err := XTWriteDB().Model(&advice).Where("id=? and status=1", id).Updates(map[string]interface{}{"stop_time": stop_time, "stop_state": 1, "updated_time": time.Now().Unix()}).Error
2734
+
2735
+	return advice, err
2736
+}

+ 8 - 0
service/patient_service.go Целия файл

@@ -110,6 +110,14 @@ func GetAllPatientList(orgID int64) (patients []*models.Patients, total int64, e
110 110
 	return
111 111
 }
112 112
 
113
+func GetAllPatientListOne(orgID int64) (patients []*models.Patients, total int64, err error) {
114
+
115
+	db := readDb.Table("xt_patients as p").Where("p.user_org_id=? and p.status=1 and p.lapseto =1", orgID)
116
+
117
+	err = db.Select(" p.id, p.user_org_id, p.user_id, p.patient_type, p.dialysis_no, p.admission_number, p.source, p.lapseto, p.partition_id, p.bed_id, p.name, p.alias, p.gender, p.marital_status, p.id_card_no, p.birthday, p.reimbursement_way_id, p.health_care_type, p.health_care_no, p.health_care_due_date, p.height, p.blood_type, p.rh, p.health_care_due_alert_date, p.education_level, p.profession, p.phone, p.home_telephone, p.relative_phone, p.relative_relations, p.home_address, p.work_unit, p.unit_address, p.children, p.receiving_date, p.is_hospital_first_dialysis, p.first_dialysis_date, p.first_dialysis_hospital, p.induction_period, p.initial_dialysis, p.total_dialysis, p.attending_doctor_id, p.head_nurse_id, p.evaluate, p.diagnose, p.remark, p.registrars_id, p.registrars, p.qr_code, p.binding_state, p.status, p.created_time, p.updated_time,p.age,p.id_card_no").Count(&total).Find(&patients).Error
118
+	return
119
+}
120
+
113 121
 func GetAllPatientListTwenty(orgID int64) (patients []*models.Patients, total int64, err error) {
114 122
 
115 123
 	db := readDb.Table("xt_patients as p").Where("p.user_org_id=? and p.status=1 and p.lapseto = 1", orgID)