|
@ -6,7 +6,6 @@ import com.yihu.wlyy.entity.consult.ConsultTeam;
|
|
import com.yihu.wlyy.entity.consult.ConsultTeamLog;
|
|
import com.yihu.wlyy.entity.consult.ConsultTeamLog;
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
import com.yihu.wlyy.logs.BusinessLogs;
|
|
import com.yihu.wlyy.repository.consult.ConsultDao;
|
|
import com.yihu.wlyy.repository.consult.ConsultDao;
|
|
@ -964,24 +963,11 @@ public class ConsultController extends WeixinBaseController {
|
|
@ApiOperation("是否可以续方咨询")
|
|
@ApiOperation("是否可以续方咨询")
|
|
public String isPrescriptConsult(@ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true)String patient){
|
|
public String isPrescriptConsult(@ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true)String patient){
|
|
try{
|
|
try{
|
|
SignFamily signFamily = signFamilyDao.findByPatient(patient);
|
|
|
|
if(signFamily==null){
|
|
|
|
return error(-1,"您还未签约,不能发起续方咨询!");
|
|
|
|
|
|
JSONObject json = consultTeamService.isPrescriptConsult(patient);
|
|
|
|
if(json.has("msg")){
|
|
|
|
return error(-1,json.getString("msg"));
|
|
}
|
|
}
|
|
|
|
|
|
//点击后判断,如果用户当前存在可申请续方的处方记录,则进入续方申请流程,若不存在可续方记录,alert“当前没有可以申请续方的处方记录”
|
|
|
|
|
|
|
|
|
|
|
|
Doctor doctor = doctorDao.findByAdminTeamId(signFamily.getAdminTeamId());
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
json.put("doctor",doctor.getCode());
|
|
|
|
json.put("doctorName",doctor.getName());
|
|
|
|
json.put("adminTeamId",signFamily.getAdminTeamId());
|
|
|
|
json.put("hospital",doctor.getHospital());
|
|
|
|
json.put("hospitalName",doctor.getHospitalName());
|
|
|
|
|
|
|
|
return write(200, "查询成功!", "data", json);
|
|
return write(200, "查询成功!", "data", json);
|
|
|
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
error(e);
|
|
error(e);
|
|
return error(-1,"查询失败");
|
|
return error(-1,"查询失败");
|