张保健 1年前
父节点
当前提交
a71f4af45a
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      service/inspection_service.go

+ 4 - 0
service/inspection_service.go 查看文件

@@ -33,6 +33,10 @@ func GetAdvices(orgid int64, patientid int64, recorddate int64) (advcie []*model
33 33
 	err = XTReadDB().Model(&models.DoctorAdvice{}).Where("patient_id = ? and user_org_id = ? and record_date = ? and status =1", patientid, orgid, recorddate).Find(&advcie).Error
34 34
 	return
35 35
 }
36
+func GetAdvicesByPrescription(orgid int64, patientid int64, recorddate int64) (advcie *models.DoctorAdvice, err error) {
37
+	err = XTReadDB().Model(&models.DoctorAdvice{}).Where("patient_id = ? and user_org_id = ? and record_date = ? and status =1 and is_prescription = 1", patientid, orgid, recorddate).Find(&advcie).Error
38
+	return
39
+}
36 40
 
37 41
 func CreatePatientInspection(inspectins []models.Inspection) (err error) {
38 42
 	if len(inspectins) == 0 {