csx 3 gadus atpakaļ
vecāks
revīzija
d75c9535b0

+ 5 - 2
controllers/his_project_api_controller.go Parādīt failu

1228
 	advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1228
 	advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1229
 	projectlist, err := service.GetAllProjectList(adminUserInfo.CurrentOrgId, "")
1229
 	projectlist, err := service.GetAllProjectList(adminUserInfo.CurrentOrgId, "")
1230
 	his, _ := service.GetLastHisPatient(patient_id, adminUserInfo.CurrentOrgId)
1230
 	his, _ := service.GetLastHisPatient(patient_id, adminUserInfo.CurrentOrgId)
1231
-	//prescriptionInfo, _ := service.GetPrscriptionInfo(patient_id, recordDateTime)
1232
-	hisPatient, _ := service.GetHisPatientById(patient_id)
1231
+	prescriptionInfo, _ := service.GetPrscriptionInfo(patient_id, recordDateTime)
1232
+	//advicePrint, err := service.GetPre(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1233
+	hisPatient, _ := service.GetHisPatient(adminUserInfo.CurrentOrgId, recordDateTime)
1234
+	//hisPatient, _ := service.GetHisPatientById(patient_id)
1233
 	hisHospitalRecord, _ := service.GetLastHospitalRecordTwo(patient_id, adminUserInfo.CurrentOrgId)
1235
 	hisHospitalRecord, _ := service.GetLastHospitalRecordTwo(patient_id, adminUserInfo.CurrentOrgId)
1234
 
1236
 
1235
 	if err != nil {
1237
 	if err != nil {
1242
 		"hisPatient":        hisPatient,
1244
 		"hisPatient":        hisPatient,
1243
 		"his":               his,
1245
 		"his":               his,
1244
 		"hisHospitalRecord": hisHospitalRecord,
1246
 		"hisHospitalRecord": hisHospitalRecord,
1247
+		"info":              prescriptionInfo,
1245
 	})
1248
 	})
1246
 }
1249
 }
1247
 
1250
 

+ 1 - 1
service/his_project_service.go Parādīt failu

407
 		return db.Where("status = 1 and user_org_id = ?", orgid).Preload("Drug", "status = 1")
407
 		return db.Where("status = 1 and user_org_id = ?", orgid).Preload("Drug", "status = 1")
408
 	}).Preload("HisPrescriptionProject", func(db *gorm.DB) *gorm.DB {
408
 	}).Preload("HisPrescriptionProject", func(db *gorm.DB) *gorm.DB {
409
 		return db.Where("status = 1 AND user_org_id = ?", orgid).Preload("HisProject").Preload("GoodInfo", "status=1").Preload("XtHisProjectTeam", "status = 1")
409
 		return db.Where("status = 1 AND user_org_id = ?", orgid).Preload("HisProject").Preload("GoodInfo", "status=1").Preload("XtHisProjectTeam", "status = 1")
410
-	}).Preload("HisPrescriptionInfo", "status =1 and user_org_id = ? and p_type = ? AND record_date = ?", orgid, p_type).Preload("HisAdditionalCharge", "status = 1 and user_org_id = ?", orgid).Find(&prescription).Error
410
+	}).Preload("HisPrescriptionInfo", "status =1 and user_org_id = ? and p_type = ? AND record_date = ?", orgid, p_type, recorddate).Preload("HisAdditionalCharge", "status = 1 and user_org_id = ?", orgid).Find(&prescription).Error
411
 
411
 
412
 	return prescription, err
412
 	return prescription, err
413
 }
413
 }