Browse Source

需求更改

XMLWAN 3 years ago
parent
commit
e2d1a760e6

+ 4 - 0
controllers/dialysis_api_controller.go View File

@@ -3495,6 +3495,8 @@ func (c *DialysisApiController) PostTreatmentSummary() {
3495 3495
 
3496 3496
 	mission := c.GetString("mission")
3497 3497
 	dialysis_summary := c.GetString("dialysis_summary")
3498
+	nursingRecord := c.GetString("nursing_record")
3499
+	specialRecord := c.GetString("special_record")
3498 3500
 	sj_nurse := adminUserInfo.AdminUser.Id
3499 3501
 	zl_nurse := adminUserInfo.AdminUser.Id
3500 3502
 	hd_nurse := adminUserInfo.AdminUser.Id
@@ -3514,6 +3516,8 @@ func (c *DialysisApiController) PostTreatmentSummary() {
3514 3516
 		ZlDoctor:        zl_doctor,
3515 3517
 		Status:          1,
3516 3518
 		CreatedTime:     time.Now().Unix(),
3519
+		NursingRecord:   nursingRecord,
3520
+		SpecialRecord:   specialRecord,
3517 3521
 	}
3518 3522
 
3519 3523
 	_, tempTreatmentSummary := service.FindTreatmentSummaryByReordDate(patient, recordDate.Unix(), adminUserInfo.CurrentOrgId)

+ 5 - 1
controllers/inspection_api_controller.go View File

@@ -226,9 +226,13 @@ func (c *InspectionApiController) CreatePatientInspection() {
226 226
 }
227 227
 
228 228
 func (c *InspectionApiController) EditPatientInspection() {
229
+	fmt.Println("触发了没有---------------------------------------")
229 230
 	patient, _ := c.GetInt64("patient", 0)
230 231
 	remind_cycle, _ := c.GetInt64("remind_cycle", 0)
231
-
232
+	dates := c.GetString("dates")
233
+	projectid := c.GetString("projectid")
234
+	fmt.Println("日期---", dates)
235
+	fmt.Println("projectid", projectid)
232 236
 	if patient <= 0 {
233 237
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
234 238
 		return

+ 6 - 1
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -445,7 +445,10 @@ func (c *DialysisAPIController) PostAtreatmentInfo() {
445 445
 	checkStaffId, _ := c.GetInt64("checkStaff", 0)
446 446
 	deboardNurseId, _ := c.GetInt64("deboardNurse", 0)
447 447
 	treatDoctor, _ := c.GetInt64("treatDoctor", 0)
448
-
448
+	nursingRecord := c.GetString("nursing_record")
449
+	fmt.Println("护理记录", nursingRecord)
450
+	specialRecord := c.GetString("special_record")
451
+	fmt.Println("特殊记录", specialRecord)
449 452
 	adminUserInfo := c.GetMobileAdminUserInfo()
450 453
 
451 454
 	changeMedicalNurseId = adminUserInfo.AdminUser.Id
@@ -491,6 +494,8 @@ func (c *DialysisAPIController) PostAtreatmentInfo() {
491 494
 		ZlDoctor:        treatDoctor,
492 495
 		CreatedTime:     time.Now().Unix(),
493 496
 		Status:          1,
497
+		NursingRecord:   nursingRecord,
498
+		SpecialRecord:   specialRecord,
494 499
 	}
495 500
 	_, treatmentSummary := service.FindTreatmentSummaryByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
496 501
 	if treatmentSummary.ID == 0 { //新增

+ 27 - 26
controllers/patient_api_controller.go View File

@@ -63,7 +63,7 @@ func PatientApiRegistRouters() {
63 63
 
64 64
 	beego.Router("/api/remind/is_open", &PatientApiController{}, "Post:PostIsOpenRemind")
65 65
 	beego.Router("/api/patients/advices/getpatientschedules", &PatientApiController{}, "Get:GetPatientScheduleOne")
66
-  beego.Router("/api/patients/advices/saveditadvices",&PatientApiController{},"Get:SaveEditAdvices")
66
+	beego.Router("/api/patients/advices/saveditadvices", &PatientApiController{}, "Get:SaveEditAdvices")
67 67
 }
68 68
 
69 69
 //GetPatientsList 取患者列表
@@ -235,7 +235,7 @@ func (c *PatientApiController) CreatePatient() {
235 235
 	// patient.Lapseto = 1
236 236
 
237 237
 	err := service.CreatePatient(&patient, contagions, diseases)
238
-	fmt.Println("创建病人失败---------------------------------------------err")
238
+	fmt.Println("创建病人失败err")
239 239
 	if err != nil {
240 240
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreatePatient)
241 241
 		return
@@ -333,6 +333,7 @@ func (c *PatientApiController) CreatePatient() {
333 333
 		MemberPatienttype:            0,
334 334
 		MemberTreatement:             0,
335 335
 		EquitmentId:                  "",
336
+		UserSysBeforeCount:           patient.UserSysBeforeCount,
336 337
 	}
337 338
 
338 339
 	err = service.CreatePatientsNew(&patientsNew)
@@ -3375,28 +3376,28 @@ func (c *PatientApiController) GetPatientScheduleOne() {
3375 3376
 	})
3376 3377
 }
3377 3378
 
3378
-func (c *PatientApiController) SaveEditAdvices()  {
3379
-  adminInfo := c.GetAdminUserInfo()
3380
-  orgid := adminInfo.CurrentOrgId
3381
-  startTime := c.GetString("start_time")
3382
-  fmt.Println("开始时间",startTime)
3383
-  theTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
3384
-  fmt.Println(theTime.Unix())
3385
-  groupno, _ := c.GetInt64("groupno")
3386
-  fmt.Println("组",groupno)
3387
-  date, _ := c.GetInt64("date")
3388
-  fmt.Println("date",date)
3389
-  patient_id, _ := c.GetInt64("patient_id")
3390
-  fmt.Println("paitent_id",patient_id)
3391
-  advice := models.XtDoctorAdvice{
3392
-    StartTime: theTime.Unix(),
3393
-  }
3394
-  err := service.UpdateDoctorEditAdvice(advice, orgid, groupno, date, patient_id)
3395
-  if err != nil {
3396
-    c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3397
-    return
3398
-  }
3399
-  c.ServeSuccessJSON(map[string]interface{}{
3400
-    "advice": advice,
3401
-  })
3379
+func (c *PatientApiController) SaveEditAdvices() {
3380
+	adminInfo := c.GetAdminUserInfo()
3381
+	orgid := adminInfo.CurrentOrgId
3382
+	startTime := c.GetString("start_time")
3383
+	fmt.Println("开始时间", startTime)
3384
+	theTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
3385
+	fmt.Println(theTime.Unix())
3386
+	groupno, _ := c.GetInt64("groupno")
3387
+	fmt.Println("组", groupno)
3388
+	date, _ := c.GetInt64("date")
3389
+	fmt.Println("date", date)
3390
+	patient_id, _ := c.GetInt64("patient_id")
3391
+	fmt.Println("paitent_id", patient_id)
3392
+	advice := models.XtDoctorAdvice{
3393
+		StartTime: theTime.Unix(),
3394
+	}
3395
+	err := service.UpdateDoctorEditAdvice(advice, orgid, groupno, date, patient_id)
3396
+	if err != nil {
3397
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3398
+		return
3399
+	}
3400
+	c.ServeSuccessJSON(map[string]interface{}{
3401
+		"advice": advice,
3402
+	})
3402 3403
 }

+ 2 - 0
models/dialysis.go View File

@@ -580,6 +580,8 @@ type TreatmentSummary struct {
580 580
 	UpdatedTime       int64  `gorm:"column:updated_time" json:"updated_time"`
581 581
 	Creater           int64  `gorm:"column:creater" json:"creater"`
582 582
 	Modifier          int64  `gorm:"column:modifier" json:"modifier"`
583
+	NursingRecord     string `gorm:"column:nursing_record" json:"nursing_record" form:"nursing_record"`
584
+	SpecialRecord     string `gorm:"column:special_record" json:"special_record" form:"special_record"`
583 585
 }
584 586
 
585 587
 func (TreatmentSummary) TableName() string {

+ 1 - 0
models/patient_models.go View File

@@ -485,6 +485,7 @@ type XtPatientsNew struct {
485 485
 	MemberTreatement             int64   `gorm:"column:member_treatement" json:"member_treatement" form:"member_treatement"`
486 486
 	EquitmentId                  string  `gorm:"column:equitment_id" json:"equitment_id" form:"equitment_id"`
487 487
 	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
488
+	IsExcelExport                int64   `gorm:"column:is_excel_export" json:"is_excel_export" form:"is_excel_export"`
488 489
 }
489 490
 
490 491
 func (XtPatientsNew) TableName() string {

+ 2 - 0
models/user_models.go View File

@@ -457,6 +457,8 @@ type XtTreatmentSummary struct {
457 457
 	UpdatedTime       int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
458 458
 	Creater           int64  `gorm:"column:creater" json:"creater" form:"creater"`
459 459
 	Modifier          int64  `gorm:"column:modifier" json:"modifier" form:"modifier"`
460
+	NursingRecord     string `gorm:"column:nursing_record" json:"nursing_record" form:"nursing_record"`
461
+	SpecialRecord     string `gorm:"column:special_record" json:"special_record" form:"special_record"`
460 462
 }
461 463
 
462 464
 func (XtTreatmentSummary) TableName() string {

+ 12 - 10
service/mobile_dialysis_service.go View File

@@ -650,16 +650,15 @@ func GetMonitor(orgID int64, patientID int64, id int64) (*models.MonitoringRecor
650 650
 }
651 651
 
652 652
 type MScheduleDoctorAdviceVM struct {
653
-	ID           int64 `gorm:"column:id" json:"id"`
654
-	UserOrgId    int64 `gorm:"column:user_org_id" json:"user_org_id"`
655
-	PartitionId  int64 `gorm:"column:partition_id" json:"partition_id"`
656
-	BedId        int64 `gorm:"column:bed_id" json:"bed_id"`
657
-	PatientId    int64 `gorm:"column:patient_id" json:"patient_id"`
658
-	ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date"`
659
-	ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type"`
660
-	ModeId       int64 `gorm:"column:mode_id" json:"mode_id"`
661
-	Status       int64 `gorm:"column:status" json:"status"`
662
-
653
+	ID              int64               `gorm:"column:id" json:"id"`
654
+	UserOrgId       int64               `gorm:"column:user_org_id" json:"user_org_id"`
655
+	PartitionId     int64               `gorm:"column:partition_id" json:"partition_id"`
656
+	BedId           int64               `gorm:"column:bed_id" json:"bed_id"`
657
+	PatientId       int64               `gorm:"column:patient_id" json:"patient_id"`
658
+	ScheduleDate    int64               `gorm:"column:schedule_date" json:"schedule_date"`
659
+	ScheduleType    int64               `gorm:"column:schedule_type" json:"schedule_type"`
660
+	ModeId          int64               `gorm:"column:mode_id" json:"mode_id"`
661
+	Status          int64               `gorm:"column:status" json:"status"`
663 662
 	DialysisOrder   *MDialysisOrderVM   `gorm:"ForeignKey:DialysisDate,PatientId;AssociationForeignKey:ScheduleDate,PatientId" json:"dialysis_order"`
664 663
 	SchedualPatient *MSchedualPatientVM `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
665 664
 	DeviceNumber    *MDeviceNumberVM    `gorm:"ForeignKey:BedId" json:"device_number"`
@@ -723,6 +722,9 @@ func (MDoctorAdviceVM) TableName() string {
723 722
 func MobileGetScheduleDoctorAdvices(orgID int64, scheduleDate int64, adviceType int, patientType int, adminUserId int64) ([]*MScheduleDoctorAdviceVM, error) {
724 723
 	var vms []*MScheduleDoctorAdviceVM
725 724
 	adviceWhere := ""
725
+	fmt.Println("advicetype", adviceType)
726
+	fmt.Println("patientType", patientType)
727
+	fmt.Println("adminUserId", adminUserId)
726 728
 	adviceCondition := []interface{}{}
727 729
 	if adviceType == 0 {
728 730
 		if patientType == 0 {

+ 2 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go View File

@@ -692,6 +692,8 @@ type SummerVM struct {
692 692
 	UpdatedTime       int64  `gorm:"column:updated_time" json:"updated_time"`
693 693
 	Creater           int64  `gorm:"column:creater" json:"creater"`
694 694
 	Modifier          int64  `gorm:"column:modifier" json:"modifier"`
695
+	NursingRecord     string `gorm:"column:nursing_record" json:"nursing_record" form:"nursing_record"`
696
+	SpecialRecord     string `gorm:"column:special_record" json:"special_record" form:"special_record"`
695 697
 }
696 698
 
697 699
 func (SummerVM) TableName() string {