|
@ -11,6 +11,8 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@ -23,6 +25,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
@Api(value = "医生端-咨询IM&诊室&导诊台相关接口", description = "医生端-咨询IM&诊室&导诊台相关接口", tags = {"医生端-咨询IM&诊室&导诊台相关接口"})
|
|
|
public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(DoctorConsultEndpoint.class);
|
|
|
|
|
|
@Autowired
|
|
|
private ImService imService;
|
|
|
|
|
@ -104,12 +108,15 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
JSONObject result = new JSONObject();
|
|
|
synchronized (outpatientCode.intern()){
|
|
|
|
|
|
// //1.调用挂号接口
|
|
|
// net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
|
|
|
// String rsCode = (String)rs.get("@RESULT");
|
|
|
// if(!"0".equals(rsCode)){
|
|
|
// return failed("挂号失败,无法发起咨询");
|
|
|
// }
|
|
|
//1.调用挂号接口
|
|
|
logger.info("调用挂号接口====START");
|
|
|
net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
|
|
|
logger.info("调用挂号接口,rs:"+rs.toString());
|
|
|
String rsCode = (String)rs.get("@RESULT");
|
|
|
if(!"0".equals(rsCode)){
|
|
|
return failed("挂号失败,无法发起咨询");
|
|
|
}
|
|
|
logger.info("调用挂号接口====END");
|
|
|
|
|
|
//2.
|
|
|
result = imService.addPrescriptionConsult(outpatientCode, patientCode,doctorCode,consult,reason,type);
|