XMLWAN преди 4 години
родител
ревизия
b948ccde9e

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

2944
 	if errcode == gorm.ErrRecordNotFound {
2944
 	if errcode == gorm.ErrRecordNotFound {
2945
 		err = service.SaveMode(&mode)
2945
 		err = service.SaveMode(&mode)
2946
 	} else if errcode == nil {
2946
 	} else if errcode == nil {
2947
-		fmt.Print("设备型号已存在")
2947
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
2948
+		return
2948
 	} else {
2949
 	} else {
2949
-		fmt.Print("设备型号已存在")
2950
 	}
2950
 	}
2951
 	if err != nil {
2951
 	if err != nil {
2952
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
2952
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)

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

83
 	symptom := this.GetString("symptom")
83
 	symptom := this.GetString("symptom")
84
 	dispose := this.GetString("dispose")
84
 	dispose := this.GetString("dispose")
85
 	conductivity, _ := this.GetFloat("conductivity")
85
 	conductivity, _ := this.GetFloat("conductivity")
86
-	fmt.Println("4444444444444444", conductivity)
87
 	displacement_flow_quantity, _ := this.GetFloat("displacement_flow_quantity")
86
 	displacement_flow_quantity, _ := this.GetFloat("displacement_flow_quantity")
88
 	blood_oxygen_saturation := this.GetString("blood_oxygen_saturation")
87
 	blood_oxygen_saturation := this.GetString("blood_oxygen_saturation")
89
 	result := this.GetString("result")
88
 	result := this.GetString("result")

+ 1 - 0
models/patient_models.go Целия файл

348
 	AssessmentAfterDislysis AssessmentAfterDislysis `json:"assessment_after_dislysis" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
348
 	AssessmentAfterDislysis AssessmentAfterDislysis `json:"assessment_after_dislysis" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
349
 	TreatmentSummary        TreatmentSummary        `json:"treatment_summary" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
349
 	TreatmentSummary        TreatmentSummary        `json:"treatment_summary" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
350
 	Device                  DeviceNumber            `json:"device" gorm:"foreignkey:ID;AssociationForeignKey:BedID;"`
350
 	Device                  DeviceNumber            `json:"device" gorm:"foreignkey:ID;AssociationForeignKey:BedID;"`
351
+	MonitoringRecord        []MonitoringRecord      `json:"monitoring_record" gorm:"foreignkey:MonitoringDate;AssociationForeignKey:DialysisDate;"`
351
 }
352
 }
352
 
353
 
353
 type DialysisPrescriptionAddtional struct {
354
 type DialysisPrescriptionAddtional struct {

+ 1 - 0
service/patientmanage_service.go Целия файл

841
 	var orders []*models.PatientDialysisRecord
841
 	var orders []*models.PatientDialysisRecord
842
 
842
 
843
 	db := readDb.Table("xt_dialysis_order as do").
843
 	db := readDb.Table("xt_dialysis_order as do").
844
+		Preload("MonitoringRecord", "patient_id = ? and user_org_id = ? and status = 1", patientID, orgID).
844
 		Preload("DialysisPrescription", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
845
 		Preload("DialysisPrescription", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
845
 		Preload("PredialysisEvaluation", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
846
 		Preload("PredialysisEvaluation", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
846
 		Preload("DialysisPrescription", func(db *gorm.DB) *gorm.DB {
847
 		Preload("DialysisPrescription", func(db *gorm.DB) *gorm.DB {