XMLWAN il y a 4 ans
Parent
révision
c47829eb3f

+ 3 - 0
controllers/dialysis_record_api_controller.go Voir le fichier

@@ -397,6 +397,7 @@ type EditMonitorParamObject struct {
397 397
 	Heparin                   float64 `gorm:"column:heparin" json:"heparin" form:"heparin"`
398 398
 	DialysateFlow             float64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
399 399
 	Urr                       string  `gorm:"column:urr" json:"urr" form:"urr"`
400
+	BloodSugar                float64 `gorm:"column:blood_sugar" json:"blood_sugar" form:"blood_sugar"`
400 401
 }
401 402
 
402 403
 // /api/dislysis/monitor/edit [post]
@@ -506,6 +507,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
506 507
 			Heparin:                   monitorParam.Heparin,
507 508
 			DialysateFlow:             monitorParam.DialysateFlow,
508 509
 			Urr:                       monitorParam.Urr,
510
+			BloodSugar:                monitorParam.BloodSugar,
509 511
 		}
510 512
 		createErr := service.CreateMonitor(&monitor)
511 513
 		if createErr != nil {
@@ -571,6 +573,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
571 573
 		monitor.Heparin = monitorParam.Heparin
572 574
 		monitor.DialysateFlow = monitorParam.DialysateFlow
573 575
 		monitor.Urr = monitorParam.Urr
576
+		monitor.BloodSugar = monitorParam.BloodSugar
574 577
 		updateErr := service.UpdateMonitor(monitor)
575 578
 		if updateErr != nil {
576 579
 			this.ErrorLog("修改透析监测记录失败:%v", updateErr)

+ 4 - 0
controllers/mobile_api_controllers/dialysis_api_controller_extend.go Voir le fichier

@@ -90,6 +90,7 @@ func (this *DialysisAPIController) AddMonitorRecord() {
90 90
 	heparin, _ := this.GetFloat("heparin")
91 91
 	dialysate_flow, _ := this.GetFloat("dialysate_flow")
92 92
 	urr := this.GetString("urr")
93
+	blood_sugar, _ := this.GetFloat("blood_sugar")
93 94
 	adminInfo := this.GetMobileAdminUserInfo()
94 95
 	patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
95 96
 	if getPatientErr != nil {
@@ -143,6 +144,7 @@ func (this *DialysisAPIController) AddMonitorRecord() {
143 144
 		Heparin:                   heparin,
144 145
 		DialysateFlow:             dialysate_flow,
145 146
 		Urr:                       urr,
147
+		BloodSugar:                blood_sugar,
146 148
 	}
147 149
 
148 150
 	err := service.CreateMonitor(&record)
@@ -235,6 +237,7 @@ func (this *DialysisAPIController) EditMonitorRecord() {
235 237
 	heparin, _ := this.GetFloat("heparin")
236 238
 	dialysate_flow, _ := this.GetFloat("dialysate_flow")
237 239
 	urr := this.GetString("urr")
240
+	blood_sugar, _ := this.GetFloat("blood_sugar")
238 241
 	adminInfo := this.GetMobileAdminUserInfo()
239 242
 
240 243
 	monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
@@ -283,6 +286,7 @@ func (this *DialysisAPIController) EditMonitorRecord() {
283 286
 	monitor.Heparin = heparin
284 287
 	monitor.DialysateFlow = dialysate_flow
285 288
 	monitor.Urr = urr
289
+	monitor.BloodSugar = blood_sugar
286 290
 	err = service.UpdateMonitor(monitor)
287 291
 	if err != nil {
288 292
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeMonitorUpdate)

+ 78 - 78
controllers/patient_api_controller.go Voir le fichier

@@ -252,29 +252,29 @@ func (c *PatientApiController) CreatePatient() {
252 252
 	//获取老表的最后一条数据
253 253
 	patients, err := service.GetLastPatientData(adminUserInfo.CurrentOrgId)
254 254
 	patientsNew := models.XtPatientsNew{
255
-		UserOrgId:          adminUserInfo.CurrentOrgId,
256
-		UserId:             0,
257
-		Avatar:             patients.Avatar,
258
-		PatientType:        patients.PatientType,
259
-		DialysisNo:         patients.DialysisNo,
260
-		AdmissionNumber:    patients.AdmissionNumber,
261
-		Source:             patients.Source,
262
-		Lapseto:            patients.Lapseto,
263
-		PartitionId:        patients.PartitionId,
264
-		BedId:              patients.BedId,
265
-		Name:               patients.Name,
266
-		Alias:              patients.Alias,
267
-		Gender:             patients.Gender,
268
-		MaritalStatus:      patients.MaritalStatus,
269
-		IdCardNo:           patients.IdCardNo,
270
-		Birthday:           patients.Birthday,
271
-		ReimbursementWayId: patients.ReimbursementWayId,
272
-		HealthCareType:     patients.HealthCareType,
273
-		HealthCareNo:       patients.HealthCareNo,
274
-		HealthCareDueDate:  patients.HealthCareDueDate,
275
-		Height:             patients.Height,
276
-		BloodType:          patients.BloodType,
277
-		Rh:                 patients.Rh,
255
+		UserOrgId:                    adminUserInfo.CurrentOrgId,
256
+		UserId:                       0,
257
+		Avatar:                       patients.Avatar,
258
+		PatientType:                  patients.PatientType,
259
+		DialysisNo:                   patients.DialysisNo,
260
+		AdmissionNumber:              patients.AdmissionNumber,
261
+		Source:                       patients.Source,
262
+		Lapseto:                      patients.Lapseto,
263
+		PartitionId:                  patients.PartitionId,
264
+		BedId:                        patients.BedId,
265
+		Name:                         patients.Name,
266
+		Alias:                        patients.Alias,
267
+		Gender:                       patients.Gender,
268
+		MaritalStatus:                patients.MaritalStatus,
269
+		IdCardNo:                     patients.IdCardNo,
270
+		Birthday:                     patients.Birthday,
271
+		ReimbursementWayId:           patients.ReimbursementWayId,
272
+		HealthCareType:               patients.HealthCareType,
273
+		HealthCareNo:                 patients.HealthCareNo,
274
+		HealthCareDueDate:            patients.HealthCareDueDate,
275
+		Height:                       patients.Height,
276
+		BloodType:                    patients.BloodType,
277
+		Rh:                           patients.Rh,
278 278
 		HealthCareDueAlertDate:       patients.HealthCareDueAlertDate,
279 279
 		EducationLevel:               patients.EducationLevel,
280 280
 		Profession:                   patients.Profession,
@@ -320,28 +320,28 @@ func (c *PatientApiController) CreatePatient() {
320 320
 		Nation:                       patients.Nation,
321 321
 		NativePlace:                  patients.NativePlace,
322 322
 		Age:                          patients.Age,
323
-		InfectiousNextRecordTime: patients.InfectiousNextRecordTime,
324
-		IsInfectious:             patients.IsInfectious,
325
-		RemindCycle:              patients.RemindCycle,
326
-		ResponseResult:           patients.ResponseResult,
327
-		IsOpenRemind:             patients.IsOpenRemind,
328
-		FirstTreatmentDate:       patients.FirstTreatmentDate,
329
-		DialysisAge:              patients.DialysisAge,
330
-		ExpenseKind:              patients.ExpenseKind,
331
-		TellPhone:                patients.TellPhone,
332
-		ContactName:              patients.ContactName,
333
-		BloodPatients:            1,
334
-		SlowPatients:             0,
335
-		MemberPatients:           0,
336
-		EcommerPatients:          "",
337
-		BloodId:                  patients.ID,
338
-		SlowId:                   0,
339
-		MemberId:                 0,
340
-		MemberFistdate:           0,
341
-		MemberPatienttype:        0,
342
-		MemberTreatement:         0,
343
-		EquitmentId:              "",
344
-		UserSysBeforeCount:       patient.UserSysBeforeCount,
323
+		InfectiousNextRecordTime:     patients.InfectiousNextRecordTime,
324
+		IsInfectious:                 patients.IsInfectious,
325
+		RemindCycle:                  patients.RemindCycle,
326
+		ResponseResult:               patients.ResponseResult,
327
+		IsOpenRemind:                 patients.IsOpenRemind,
328
+		FirstTreatmentDate:           patients.FirstTreatmentDate,
329
+		DialysisAge:                  patients.DialysisAge,
330
+		ExpenseKind:                  patients.ExpenseKind,
331
+		TellPhone:                    patients.TellPhone,
332
+		ContactName:                  patients.ContactName,
333
+		BloodPatients:                1,
334
+		SlowPatients:                 0,
335
+		MemberPatients:               0,
336
+		EcommerPatients:              "",
337
+		BloodId:                      patients.ID,
338
+		SlowId:                       0,
339
+		MemberId:                     0,
340
+		MemberFistdate:               0,
341
+		MemberPatienttype:            0,
342
+		MemberTreatement:             0,
343
+		EquitmentId:                  "",
344
+		UserSysBeforeCount:           patient.UserSysBeforeCount,
345 345
 	}
346 346
 
347 347
 	err = service.CreatePatientsNew(&patientsNew)
@@ -480,28 +480,28 @@ func (c *PatientApiController) EditPatient() {
480 480
 		return
481 481
 	}
482 482
 	patientsNew := models.XtPatientsNew{
483
-		UserOrgId:          patient.UserOrgId,
484
-		UserId:             patient.UserId,
485
-		Avatar:             patient.Avatar,
486
-		PatientType:        patient.PatientType,
487
-		DialysisNo:         patient.DialysisNo,
488
-		AdmissionNumber:    patient.AdmissionNumber,
489
-		Source:             patient.Source,
490
-		PartitionId:        patient.PartitionId,
491
-		BedId:              patient.BedId,
492
-		Name:               patient.Name,
493
-		Alias:              patient.Alias,
494
-		Gender:             patient.Gender,
495
-		MaritalStatus:      patient.MaritalStatus,
496
-		IdCardNo:           patient.IdCardNo,
497
-		Birthday:           patient.Birthday,
498
-		ReimbursementWayId: patient.ReimbursementWayId,
499
-		HealthCareType:     patient.HealthCareType,
500
-		HealthCareNo:       patient.HealthCareNo,
501
-		HealthCareDueDate:  patient.HealthCareDueDate,
502
-		Height:             patient.Height,
503
-		BloodType:          patient.BloodType,
504
-		Rh:                 patient.Rh,
483
+		UserOrgId:                 patient.UserOrgId,
484
+		UserId:                    patient.UserId,
485
+		Avatar:                    patient.Avatar,
486
+		PatientType:               patient.PatientType,
487
+		DialysisNo:                patient.DialysisNo,
488
+		AdmissionNumber:           patient.AdmissionNumber,
489
+		Source:                    patient.Source,
490
+		PartitionId:               patient.PartitionId,
491
+		BedId:                     patient.BedId,
492
+		Name:                      patient.Name,
493
+		Alias:                     patient.Alias,
494
+		Gender:                    patient.Gender,
495
+		MaritalStatus:             patient.MaritalStatus,
496
+		IdCardNo:                  patient.IdCardNo,
497
+		Birthday:                  patient.Birthday,
498
+		ReimbursementWayId:        patient.ReimbursementWayId,
499
+		HealthCareType:            patient.HealthCareType,
500
+		HealthCareNo:              patient.HealthCareNo,
501
+		HealthCareDueDate:         patient.HealthCareDueDate,
502
+		Height:                    patient.Height,
503
+		BloodType:                 patient.BloodType,
504
+		Rh:                        patient.Rh,
505 505
 		HealthCareDueAlertDate:    patient.HealthCareDueAlertDate,
506 506
 		EducationLevel:            patient.EducationLevel,
507 507
 		Profession:                patient.Profession,
@@ -543,17 +543,17 @@ func (c *PatientApiController) EditPatient() {
543 543
 		Nation:                    patient.Nation,
544 544
 		NativePlace:               patient.NativePlace,
545 545
 		Age:                       patient.Age,
546
-		InfectiousNextRecordTime: patient.InfectiousNextRecordTime,
547
-		IsInfectious:             patient.IsInfectious,
548
-		RemindCycle:              patient.RemindCycle,
549
-		ResponseResult:           patient.ResponseResult,
550
-		IsOpenRemind:             patient.IsOpenRemind,
551
-		FirstTreatmentDate:       patient.FirstTreatmentDate,
552
-		DialysisAge:              patient.DialysisAge,
553
-		ExpenseKind:              patient.ExpenseKind,
554
-		TellPhone:                patient.TellPhone,
555
-		ContactName:              patient.ContactName,
556
-		UpdatedTime:              time.Now().Unix(),
546
+		InfectiousNextRecordTime:  patient.InfectiousNextRecordTime,
547
+		IsInfectious:              patient.IsInfectious,
548
+		RemindCycle:               patient.RemindCycle,
549
+		ResponseResult:            patient.ResponseResult,
550
+		IsOpenRemind:              patient.IsOpenRemind,
551
+		FirstTreatmentDate:        patient.FirstTreatmentDate,
552
+		DialysisAge:               patient.DialysisAge,
553
+		ExpenseKind:               patient.ExpenseKind,
554
+		TellPhone:                 patient.TellPhone,
555
+		ContactName:               patient.ContactName,
556
+		UpdatedTime:               time.Now().Unix(),
557 557
 	}
558 558
 	//	//更新病人ID获取新表病人ID
559 559
 	err = service.UpdatepatientTwo(&patientsNew, id)

+ 1 - 0
models/dialysis.go Voir le fichier

@@ -660,6 +660,7 @@ type MonitoringRecord struct {
660 660
 	Heparin                   float64 `gorm:"column:heparin" json:"heparin" form:"heparin"`
661 661
 	DialysateFlow             float64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
662 662
 	Urr                       string  `gorm:"column:urr" json:"urr"`
663
+	BloodSugar                float64 `gorm:"column:blood_sugar" json:"blood_sugar" form:"blood_sugar"`
663 664
 }
664 665
 
665 666
 func (MonitoringRecord) TableName() string {

+ 21 - 2
数据变更脚本.sql Voir le fichier

@@ -93,7 +93,26 @@ ALTER TABLE `test_xt`.`xt_monitoring_record`     ADD COLUMN `arterial_pressure_t
93 93
 ALTER TABLE `sgj_xt`.`xt_monitoring_record`     CHANGE `transmembrane_pressure_unit` `transmembrane_pressure_type` SMALLINT(2) DEFAULT '1' NOT NULL COMMENT '跨膜压类型 1:mmHg 2:kpa';
94 94
 
95 95
 
96
-
97
-
96
+--2020-08-15 author 马文强 --
97
+--数据字典表里添加针眼--
98
+INSERT INTO `sgj_xt`.`xt_data_config`(`parent_id`,`module`,`org_id`,`name`,`field_name`,`value`,`create_time`,`update_time`,`create_user_id`,`status`,`remark`,`delete_id_system`,`title`,`content`,`orders`) VALUES ( '0','hemodialysis','0','针眼','pinholing','0','2020-08-15 16:56:00','2020-08-15 16:56:00','0','1',NULL,'0',NULL,NULL,'0');
99
+--显示配置中添加针眼字段 --
100
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','3','pinholing','针眼','1',NULL,NULL,'0');
101
+--显示配置中添加预冲量字段 --
102
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','1','pre_impulse','预冲量','1',NULL,NULL,'0');
103
+--显示配置中添加实际抗凝用量 --
104
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','5','dosage_of_ anticoagulants','实际抗凝剂用量','1',NULL,NULL,'0');
105
+--显示配置中添加卧位收缩压 --
106
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','5','supine_systolic_blood_pressure','卧位收缩压','1',NULL,NULL,'0');
107
+--显示配置中添加坐位收缩压 --
108
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','5','setting_pressure','坐位收缩压','1',NULL,NULL,'0');
109
+--显示配置中添加卧位舒张压 --
110
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','5','supine_diastolic_blood_pressure','卧位舒张压','1',NULL,NULL,'0');
111
+--显示配置中添加坐位舒张压 --
112
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','5','diastolic_pressure','坐位舒张压','1',NULL,NULL,'0');
113
+--显示配置中添加urr--
114
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','4','URR','URR','1',NULL,NULL,'0');
115
+--显示配置中添加血糖 --
116
+INSERT INTO `sgj_xt`.`xt_filed_config`(`org_id`,`module`,`filed_name`,`filed_name_cn`,`is_show`,`create_time`,`update_time`,`sys_module`) VALUES ( '9886','4','blood_sugar','血糖','1',NULL,NULL,'0');
98 117
 
99 118