|
@ -6,6 +6,7 @@ import com.yihu.wlyy.entity.consult.ConsultTeam;
|
|
|
import com.yihu.wlyy.entity.consult.ConsultTeamLog;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.message.MessageNoticeSetting;
|
|
|
import com.yihu.wlyy.entity.organization.HospitalDept;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
@ -17,6 +18,7 @@ import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
|
|
|
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
|
|
|
import com.yihu.wlyy.service.app.consult.DoctorCommentService;
|
|
|
import com.yihu.wlyy.service.app.hospital.HospitalDeptService;
|
|
|
import com.yihu.wlyy.service.app.message.MessageService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionDiagnosisService;
|
|
|
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
|
|
@ -107,6 +109,10 @@ public class ConsultController extends WeixinBaseController {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Value("${im.data_base_name}")
|
|
|
private String im;
|
|
|
@Autowired
|
|
|
private HospitalDeptService deptService;
|
|
|
@Value("${wlyy.hospital}")
|
|
|
private String defaultHospital;
|
|
|
|
|
|
/**
|
|
|
* 患者咨询记录查询
|
|
@ -525,6 +531,94 @@ public class ConsultController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询某个医院存在医生科室列表
|
|
|
*
|
|
|
* @param hospital 医院
|
|
|
* @param key 科室名字搜索
|
|
|
* @param page 第几页
|
|
|
* @param pagesize 页大小
|
|
|
* @return
|
|
|
*/
|
|
|
@ApiOperation("查询某个医院存在医生科室列表")
|
|
|
@RequestMapping(value = "/dept_list", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public String deptList(@RequestParam(required = false) String hospital,
|
|
|
@RequestParam(required = false) String key,
|
|
|
@RequestParam(required = true) int page,
|
|
|
@RequestParam(required = true) int pagesize) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(hospital)) {
|
|
|
hospital = defaultHospital;
|
|
|
}
|
|
|
page = page >= 1 ? page - 1 : 0;
|
|
|
List<HospitalDept> dept = deptService.getHospitalDept(hospital, key, page, pagesize);
|
|
|
|
|
|
return write(200, "查询成功", "data", dept);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 医生列表
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "doctorList")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("医生列表")
|
|
|
public String doctorList(
|
|
|
@ApiParam(name = "hospitalCode", value = "医院code", defaultValue = "350200")
|
|
|
@RequestParam(value = "hospitalCode", required = false) String hospitalCode,
|
|
|
@ApiParam(name = "dept", value = "科室代码", defaultValue = "1")
|
|
|
@RequestParam(value = "dept", required = false) String dept,
|
|
|
@ApiParam(name = "name", value = "医生姓名或科室名称", defaultValue = "1")
|
|
|
@RequestParam(value = "name", required = false) String name,
|
|
|
@ApiParam(name = "page", value = "第几页", defaultValue = "")
|
|
|
@RequestParam(value = "page", required = false) Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "每页记录数", defaultValue = "")
|
|
|
@RequestParam(value = "pagesize", required = false) Integer pagesize) {
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
|
List<Doctor> list = doctorService.findDoctorLists(hospitalCode,name,dept, page, pagesize);
|
|
|
if (list != null) {
|
|
|
for (Doctor doctor : list) {
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("id", doctor.getId());
|
|
|
// 医生标识
|
|
|
json.put("code", doctor.getCode());
|
|
|
// 医生性别
|
|
|
json.put("sex", doctor.getSex());
|
|
|
// 医生姓名
|
|
|
json.put("name", doctor.getName());
|
|
|
// 所在医院名称
|
|
|
json.put("hospital", doctor.getHospital());
|
|
|
// 所在医院名称
|
|
|
json.put("hospital_name", doctor.getHospitalName());
|
|
|
// 科室名称
|
|
|
json.put("dept_name", (doctor.getDeptName() == null ||
|
|
|
StringUtils.isEmpty(doctor.getDeptName().toString())) ? " " : doctor.getDeptName());
|
|
|
// 职称名称
|
|
|
json.put("job_name", (doctor.getJobName() == null ||
|
|
|
StringUtils.isEmpty(doctor.getJobName().toString())) ? " " : doctor.getJobName());
|
|
|
// 头像
|
|
|
json.put("photo", doctor.getPhoto());
|
|
|
// 简介
|
|
|
json.put("introduce", doctor.getIntroduce());
|
|
|
// 专长
|
|
|
json.put("expertise", doctor.getExpertise());
|
|
|
array.put(json);
|
|
|
}
|
|
|
}
|
|
|
return write(200, "获取医院医生列表成功!", "list", array);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "获取医院医生列表失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 名医列表
|
|
|
*
|