Browse Source

2024/6/17

28169 7 months ago
parent
commit
74ccbee295

+ 4 - 4
controllers/base_api_controller.go View File

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

+ 1 - 1
controllers/dialysis_api_controller.go View File

2573
 			service.CreateDialysisFinish(finish)
2573
 			service.CreateDialysisFinish(finish)
2574
 		}
2574
 		}
2575
 
2575
 
2576
-		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 {
2576
+		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 {
2577
 			var dewater_amount float64
2577
 			var dewater_amount float64
2578
 			dewater_amount = 0
2578
 			dewater_amount = 0
2579
 			if dry_weight > 0 {
2579
 			if dry_weight > 0 {

+ 4 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go View File

326
 
326
 
327
 	}
327
 	}
328
 
328
 
329
+	if adminUserInfo.Org.Id == 10727 {
330
+		dewater_amount = dewater_amount * 1000
331
+	}
332
+
329
 	if dewater_amount < 0 {
333
 	if dewater_amount < 0 {
330
 		dewater_amount = 0
334
 		dewater_amount = 0
331
 	}
335
 	}

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

3486
 	if evaluation.DryWeight > 0 {
3486
 	if evaluation.DryWeight > 0 {
3487
 		dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
3487
 		dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
3488
 
3488
 
3489
-		if template.TemplateId == 17 || template.TemplateId == 22 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 34 || template.TemplateId == 32 || adminUserInfo.Org.Id == 10469 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10551 || adminUserInfo.Org.Id == 10579 || adminUserInfo.Org.Id == 10580 || adminUserInfo.Org.Id == 10585 || adminUserInfo.Org.Id == 10635 {
3489
+		if template.TemplateId == 17 || template.TemplateId == 22 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 34 || template.TemplateId == 32 || adminUserInfo.Org.Id == 10469 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10551 || adminUserInfo.Org.Id == 10579 || adminUserInfo.Org.Id == 10580 || adminUserInfo.Org.Id == 10585 || adminUserInfo.Org.Id == 10635 || adminUserInfo.Org.Id == 10727 {
3490
 
3490
 
3491
 			if adminUserInfo.Org.Id != 10551 && adminUserInfo.Org.Id != 10579 && adminUserInfo.Org.Id != 10580 && adminUserInfo.Org.Id != 10585 {
3491
 			if adminUserInfo.Org.Id != 10551 && adminUserInfo.Org.Id != 10579 && adminUserInfo.Org.Id != 10580 && adminUserInfo.Org.Id != 10585 {
3492
 				dewater_amount = dewater_amount * 1000
3492
 				dewater_amount = dewater_amount * 1000

+ 7 - 0
controllers/patient_api_controller.go View File

533
 		AllergicHistory:              patient.AllergicHistory,
533
 		AllergicHistory:              patient.AllergicHistory,
534
 		PatientAddress:               patient.PatientAddress,
534
 		PatientAddress:               patient.PatientAddress,
535
 		PrintDate:                    patient.PrintDate,
535
 		PrintDate:                    patient.PrintDate,
536
+		FamalityRecord:               patient.FamalityRecord,
536
 	}
537
 	}
537
 	patientsNew.FirstLetter = firstLetter
538
 	patientsNew.FirstLetter = firstLetter
538
 
539
 
774
 		AllergicHistory:           patient.AllergicHistory,
775
 		AllergicHistory:           patient.AllergicHistory,
775
 		PatientAddress:            patient.PatientAddress,
776
 		PatientAddress:            patient.PatientAddress,
776
 		PrintDate:                 patient.PrintDate,
777
 		PrintDate:                 patient.PrintDate,
778
+		FamalityRecord:            patient.FamalityRecord,
777
 	}
779
 	}
778
 	//	//更新病人ID获取新表病人ID
780
 	//	//更新病人ID获取新表病人ID
779
 	err = service.UpdatepatientTwo(&patientsNew, id)
781
 	err = service.UpdatepatientTwo(&patientsNew, id)
6065
 		patient.PatientAddress = patient_address
6067
 		patient.PatientAddress = patient_address
6066
 	}
6068
 	}
6067
 
6069
 
6070
+	if patientBody["famality_record"] != nil && reflect.TypeOf(patientBody["famality_record"]).String() == "string" {
6071
+		famality_record := patientBody["famality_record"].(string)
6072
+		patient.FamalityRecord = famality_record
6073
+	}
6074
+
6068
 	if patientBody["print_date"] != nil && reflect.TypeOf(patientBody["print_date"]).String() == "string" {
6075
 	if patientBody["print_date"] != nil && reflect.TypeOf(patientBody["print_date"]).String() == "string" {
6069
 		print_date := patientBody["print_date"].(string)
6076
 		print_date := patientBody["print_date"].(string)
6070
 		printDateTime, err := time.ParseInLocation(timeLayout, print_date, loc)
6077
 		printDateTime, err := time.ParseInLocation(timeLayout, print_date, loc)

+ 2 - 0
models/patient_models.go View File

233
 	PatientAddress           string  `gorm:"column:patient_address" json:"patient_address" form:"patient_address"`
233
 	PatientAddress           string  `gorm:"column:patient_address" json:"patient_address" form:"patient_address"`
234
 	FirstLetter              string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
234
 	FirstLetter              string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
235
 	PrintDate                int64   `gorm:"column:print_date" json:"print_date" form:"print_date"`
235
 	PrintDate                int64   `gorm:"column:print_date" json:"print_date" form:"print_date"`
236
+	FamalityRecord           string  `gorm:"column:famality_record" json:"famality_record" form:"famality_record"`
236
 }
237
 }
237
 
238
 
238
 func (Patients) TableName() string {
239
 func (Patients) TableName() string {
862
 	PatientAddress               string  `gorm:"column:patient_address" json:"patient_address" form:"patient_address"`
863
 	PatientAddress               string  `gorm:"column:patient_address" json:"patient_address" form:"patient_address"`
863
 	FirstLetter                  string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
864
 	FirstLetter                  string  `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
864
 	PrintDate                    int64   `gorm:"column:print_date" json:"print_date" form:"print_date"`
865
 	PrintDate                    int64   `gorm:"column:print_date" json:"print_date" form:"print_date"`
866
+	FamalityRecord               string  `gorm:"column:famality_record" json:"famality_record" form:"famality_record"`
865
 }
867
 }
866
 
868
 
867
 func (XtPatientsNew) TableName() string {
869
 func (XtPatientsNew) TableName() string {