浏览代码

医保对接

csx 3 年前
父节点
当前提交
d75c9535b0
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 5 2
      controllers/his_project_api_controller.go
  2. 1 1
      service/his_project_service.go

+ 5 - 2
controllers/his_project_api_controller.go 查看文件

@@ -1228,8 +1228,10 @@ func (this *HisProjectApiController) GetDoctorAdvicePrint() {
1228 1228
 	advicePrint, err := service.GetDoctorAdvicePrint(patient_id, recordDateTime, idStrs, adminUserInfo.CurrentOrgId, temp_p_type)
1229 1229
 	projectlist, err := service.GetAllProjectList(adminUserInfo.CurrentOrgId, "")
1230 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 1235
 	hisHospitalRecord, _ := service.GetLastHospitalRecordTwo(patient_id, adminUserInfo.CurrentOrgId)
1234 1236
 
1235 1237
 	if err != nil {
@@ -1242,6 +1244,7 @@ func (this *HisProjectApiController) GetDoctorAdvicePrint() {
1242 1244
 		"hisPatient":        hisPatient,
1243 1245
 		"his":               his,
1244 1246
 		"hisHospitalRecord": hisHospitalRecord,
1247
+		"info":              prescriptionInfo,
1245 1248
 	})
1246 1249
 }
1247 1250
 

+ 1 - 1
service/his_project_service.go 查看文件

@@ -407,7 +407,7 @@ func GetDoctorAdvicePrint(his_patient_id int64, recorddate int64, schIDs []strin
407 407
 		return db.Where("status = 1 and user_org_id = ?", orgid).Preload("Drug", "status = 1")
408 408
 	}).Preload("HisPrescriptionProject", func(db *gorm.DB) *gorm.DB {
409 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 412
 	return prescription, err
413 413
 }