|
@ -31,6 +31,7 @@ import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
|
|
|
import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService;
|
|
|
import com.yihu.jw.im.dao.ConsultDao;
|
|
|
import com.yihu.jw.im.service.ImService;
|
|
|
import com.yihu.jw.im.util.ImUtil;
|
|
|
import com.yihu.jw.order.BusinessOrderService;
|
|
|
import com.yihu.jw.restmodel.base.area.BaseCityVO;
|
|
|
import com.yihu.jw.restmodel.base.area.BaseCommitteeVO;
|
|
@ -144,6 +145,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
@Value("${qywx.url}")
|
|
|
private String qywxUrl;
|
|
|
@Autowired
|
|
|
public ImUtil imUtil;
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList)
|
|
|
@ApiOperation(value = " 查询某个时间段的患者门诊就诊记录")
|
|
@ -159,22 +162,27 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "cardNo",required = false)String cardNo,
|
|
|
@ApiParam(name = "flag", value = "标识", required = false)
|
|
|
@RequestParam(value = "flag",required = false)String flag) throws Exception {
|
|
|
if(StringUtils.isNoneBlank(startTime)){
|
|
|
startTime = startTime+" 00:00:00";
|
|
|
}
|
|
|
if(StringUtils.isNoneBlank(endTime)){
|
|
|
endTime =endTime+" 23:59:59";
|
|
|
}
|
|
|
List<WlyyOutpatientVO> vos = new ArrayList<>();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
vos = prescriptionService.findOutpatientList(patient, startTime, endTime, demoFlag,ksdm,cardNo);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
vos = tnPrescriptionService.findOutpatientList(patient, cardNo,startTime, endTime, demoFlag,ksdm,flag);
|
|
|
}else {
|
|
|
return ListEnvelop.getError("尚未开发!");
|
|
|
}
|
|
|
|
|
|
return success(vos);
|
|
|
try {
|
|
|
if(StringUtils.isNoneBlank(startTime)){
|
|
|
startTime = startTime+" 00:00:00";
|
|
|
}
|
|
|
if(StringUtils.isNoneBlank(endTime)){
|
|
|
endTime =endTime+" 23:59:59";
|
|
|
}
|
|
|
List<WlyyOutpatientVO> vos = new ArrayList<>();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
vos = prescriptionService.findOutpatientList(patient, startTime, endTime, demoFlag,ksdm,cardNo);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
vos = tnPrescriptionService.findOutpatientList(patient, cardNo,startTime, endTime, demoFlag,ksdm,flag);
|
|
|
}else {
|
|
|
return ListEnvelop.getError("尚未开发!");
|
|
|
}
|
|
|
|
|
|
return success(vos);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientInfo)
|
|
@ -183,15 +191,20 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "patient",required = false) String patient,
|
|
|
@ApiParam(name = "conNo", value = "就诊次数")
|
|
|
@RequestParam(value = "conNo",required = false) String conNo)throws Exception{
|
|
|
WlyyOutpatientVO obj = new WlyyOutpatientVO();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
obj = prescriptionService.findOutpatientInfo(patient,conNo);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
obj = tnPrescriptionService.findOutpatientInfo(patient,conNo,demoFlag,null);
|
|
|
}else {
|
|
|
return ObjEnvelop.getError("尚未开发!");
|
|
|
|
|
|
try {
|
|
|
WlyyOutpatientVO obj = new WlyyOutpatientVO();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
obj = prescriptionService.findOutpatientInfo(patient,conNo);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
obj = tnPrescriptionService.findOutpatientInfo(patient,conNo,demoFlag,null);
|
|
|
}else {
|
|
|
return ObjEnvelop.getError("尚未开发!");
|
|
|
}
|
|
|
return success(obj);
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
return success(obj);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findOriginPrescriptionList)
|
|
@ -205,16 +218,21 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "admNo",required = false) String admNo,
|
|
|
@ApiParam(name = "realOrder", value = "处方号")
|
|
|
@RequestParam(value = "realOrder",required = false) String realOrder) throws Exception {
|
|
|
List<WlyyPrescriptionVO> obj = new ArrayList<>();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
obj= prescriptionService.findOriginPrescriptionList(registerSn, patNo, realOrder, admNo,demoFlag);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
obj= tnPrescriptionService.findOriginPrescriptionList(registerSn, patNo, realOrder, admNo,demoFlag);
|
|
|
}else {
|
|
|
return ListEnvelop.getError("尚未开发!");
|
|
|
}
|
|
|
|
|
|
return success(obj);
|
|
|
try {
|
|
|
List<WlyyPrescriptionVO> obj = new ArrayList<>();
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
obj= prescriptionService.findOriginPrescriptionList(registerSn, patNo, realOrder, admNo,demoFlag);
|
|
|
}else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
|
|
|
obj= tnPrescriptionService.findOriginPrescriptionList(registerSn, patNo, realOrder, admNo,demoFlag);
|
|
|
}else {
|
|
|
return ListEnvelop.getError("尚未开发!");
|
|
|
}
|
|
|
|
|
|
return success(obj);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findOriginPrescription)
|
|
@ -228,8 +246,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "admNo",required = false) String admNo,
|
|
|
@ApiParam(name = "realOrder", value = "处方号", required = false)
|
|
|
@RequestParam(value = "realOrder",required = false) String realOrder) throws Exception {
|
|
|
WlyyPrescriptionVO obj = prescriptionService.findOriginPrescription(registerSn, patNo, admNo,realOrder, demoFlag);
|
|
|
return success(obj);
|
|
|
|
|
|
try{
|
|
|
WlyyPrescriptionVO obj = prescriptionService.findOriginPrescription(registerSn, patNo, admNo,realOrder, demoFlag);
|
|
|
return success(obj);
|
|
|
} catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findPrescriptionList)
|
|
@ -246,7 +269,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page", required = false)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true) Integer size) {
|
|
|
return prescriptionService.findPrescriptionList(patient,status,startTime,endTime,page,size,wxId);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findPrescriptionList(patient,status,startTime,endTime,page,size,wxId);
|
|
|
} catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findReOutpatientList)
|
|
@ -265,7 +293,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page", required = false)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true) Integer size) {
|
|
|
return prescriptionService.findReOutpatientList(patient,status,startTime,endTime,outpatientType,page,size);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findReOutpatientList(patient,status,startTime,endTime,outpatientType,page,size);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findReOutpatientInfo)
|
|
@ -274,16 +307,25 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "outpatientId", required = true) String outpatientId,
|
|
|
@ApiParam(name = "prescriptionId", value = "处方ID")
|
|
|
@RequestParam(value = "prescriptionId", required = false) String prescriptionId)throws Exception{
|
|
|
com.alibaba.fastjson.JSONObject obj = prescriptionService.findReOutpatientInfo(outpatientId,prescriptionId,wxId);
|
|
|
return success(obj);
|
|
|
|
|
|
try {
|
|
|
com.alibaba.fastjson.JSONObject obj = prescriptionService.findReOutpatientInfo(outpatientId,prescriptionId,wxId);
|
|
|
return success(obj);
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findPrescriptionInfo)
|
|
|
@ApiOperation(value = "获取所有居民相关信息,续方信息,物流信息,药品信息(单条)", notes = "获取所有居民相关信息,续方信息,物流信息,药品信息(单条)")
|
|
|
public ObjEnvelop<Map<String,Object>> findPrescriptionInfo(@ApiParam(name = "prescriptionId", value = "续方明细")
|
|
|
@RequestParam(value = "prescriptionId", required = false) String prescriptionId) {
|
|
|
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.findPrescriptionInfo(prescriptionId));
|
|
|
|
|
|
try {
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.findPrescriptionInfo(prescriptionId));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.checkPrescription)
|
|
@ -291,7 +333,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
public ObjEnvelop<Boolean> checkPrescription(@ApiParam(name = "patient", value = "续方明细")
|
|
|
@RequestParam(value = "patient", required = false) String patient) {
|
|
|
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.checkPrescription(patient));
|
|
|
|
|
|
try {
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.checkPrescription(patient));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.cancelPrescription)
|
|
@ -299,14 +346,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
public ObjEnvelop<Boolean> cancelPrescription(@ApiParam(name = "prescriptionId", value = "续方ID")
|
|
|
@RequestParam(value = "prescriptionId", required = false) String prescriptionId) {
|
|
|
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.cancelPrescription(prescriptionId));
|
|
|
try {
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.cancelPrescription(prescriptionId));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientCard)
|
|
|
@ApiOperation(value = "查询患者就诊卡", notes = "查询患者就诊卡")
|
|
|
public ListEnvelop findPatientCard(@ApiParam(name = "patient", value = "居民Code")
|
|
|
@RequestParam(value = "patient", required = true)String patient)throws Exception {
|
|
|
return success(prescriptionService.findPatientCard(patient));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findPatientCard(patient));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOutpatient)
|
|
@ -317,7 +373,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "flag", required = false)boolean flag,
|
|
|
@ApiParam(name = "outpatientType", value = "1在线复诊 2 协同 3 专家咨询")
|
|
|
@RequestParam(value = "outpatientType", required = false)String outpatientType)throws Exception{
|
|
|
return success(prescriptionService.checkOutpatient(patient,wxId,flag,outpatientType));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.checkOutpatient(patient,wxId,flag,outpatientType));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findAllHospital)
|
|
@ -326,7 +387,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "level", required = false)Integer level,
|
|
|
@ApiParam(name = "keyWord", value = "名字关键字")
|
|
|
@RequestParam(value = "keyWord", required = false)String keyWord) {
|
|
|
return success(prescriptionService.findAllHospital(level,keyWord));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findAllHospital(level,keyWord));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptByHospital)
|
|
@ -337,7 +403,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "dept", required = false)String dept,
|
|
|
@ApiParam(name = "consultDeptFlag", value = "1为查询开通服务部门")
|
|
|
@RequestParam(value = "consultDeptFlag", required = false)String consultDeptFlag) {
|
|
|
return success(prescriptionService.findDeptByHospital(orgCode,dept,consultDeptFlag));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findDeptByHospital(orgCode,dept,consultDeptFlag));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -347,7 +418,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "orgCode", required = true)String orgCode,
|
|
|
@ApiParam(name = "deptCode", value = "部门code")
|
|
|
@RequestParam(value = "deptCode", required = true)String deptCode) {
|
|
|
return prescriptionService.findDeptDesc(orgCode,deptCode);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findDeptDesc(orgCode,deptCode);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -357,7 +433,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "orgCode", required = true)String orgCode,
|
|
|
@ApiParam(name = "keyName", value = "关键字")
|
|
|
@RequestParam(value = "keyName", required = false)String keyName) {
|
|
|
return prescriptionService.findDeptByOrgCode(orgCode,keyName);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findDeptByOrgCode(orgCode,keyName);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptByKeyWord)
|
|
@ -368,7 +449,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page",required = true) Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "分页大小")
|
|
|
@RequestParam(value = "pagesize",required = true) Integer pagesize) {
|
|
|
return success(prescriptionService.findDeptByKeyWord(keyWord,page,pagesize));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findDeptByKeyWord(keyWord,page,pagesize));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorByHospitalAndDept)
|
|
@ -391,7 +477,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "key", required = false)String key,
|
|
|
@ApiParam(name = "consultStatus", value = "是否在线")
|
|
|
@RequestParam(value = "consultStatus", required = false)String consultStatus) {
|
|
|
return success(prescriptionService.findDoctorByHospitalAndDept(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorByHospitalAndDept(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.appointmentRevisit)
|
|
@ -405,47 +495,50 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "chargeType", value = "预约实体json")
|
|
|
@RequestParam(value = "chargeType", required = false)String chargeType)throws Exception {
|
|
|
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType);
|
|
|
if (wlyyOutpatientDO!=null&&null==wlyyOutpatientDO.getId()&&!wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("3")){
|
|
|
ObjEnvelop objEnvelop =new ObjEnvelop();
|
|
|
String msg = "";
|
|
|
if (1==wlyyOutpatientDO.getRemindCount()){
|
|
|
msg = "自取";
|
|
|
|
|
|
try {
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType);
|
|
|
if (wlyyOutpatientDO!=null&&null==wlyyOutpatientDO.getId()&&!wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("3")){
|
|
|
ObjEnvelop objEnvelop =new ObjEnvelop();
|
|
|
String msg = "";
|
|
|
if (1==wlyyOutpatientDO.getRemindCount()){
|
|
|
msg = "自取";
|
|
|
}else {
|
|
|
msg = "快递配送";
|
|
|
}
|
|
|
objEnvelop.setMessage("您已经选择过"+msg+"方式,请勿修改");
|
|
|
objEnvelop.setStatus(300);
|
|
|
return objEnvelop;
|
|
|
}else {
|
|
|
msg = "快递配送";
|
|
|
}
|
|
|
objEnvelop.setMessage("您已经选择过"+msg+"方式,请勿修改");
|
|
|
objEnvelop.setStatus(300);
|
|
|
return objEnvelop;
|
|
|
}else {
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(wlyyOutpatientDO.getDoctor());
|
|
|
//发送系统消息
|
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
|
|
|
//发送IM消息
|
|
|
hospitalSystemMessageService.sendImMessage(systemMessageDO);
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(wlyyOutpatientDO.getDoctor());
|
|
|
//发送系统消息
|
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
|
|
|
//发送IM消息
|
|
|
hospitalSystemMessageService.sendImMessage(systemMessageDO);
|
|
|
|
|
|
//发送医生抢单消息
|
|
|
if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
|
|
|
hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
|
|
|
}
|
|
|
if(!"zsyy".equals(qywxId) && !"xm_xzzx_wx".equals(qywxId)){
|
|
|
//发送厦门i健康智能推送
|
|
|
try{
|
|
|
if (doctorDO!=null&&"3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
|
|
|
String wxurl = wlyyUrl+"/im/common/message/sendDoctorTemplateByDoctorIdcard?sessionId=1_1&sessionType=1&from=1&content=1&businessType=new&doctor_idcard="+doctorDO.getIdcard()+"&patientName="+URLEncoder.encode(wlyyOutpatientDO.getPatientName())+"&url=1";
|
|
|
logger.info("发送厦门i健康智能推送url:"+wxurl);
|
|
|
wlyyBusinessService.sendDoctorTemplateByDoctorIdcard(wxurl);
|
|
|
//发送医生抢单消息
|
|
|
if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
|
|
|
hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
|
|
|
}
|
|
|
if(!"zsyy".equals(qywxId) && !"xm_xzzx_wx".equals(qywxId)){
|
|
|
//发送厦门i健康智能推送
|
|
|
try{
|
|
|
if (doctorDO!=null&&"3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
|
|
|
String wxurl = wlyyUrl+"/im/common/message/sendDoctorTemplateByDoctorIdcard?sessionId=1_1&sessionType=1&from=1&content=1&businessType=new&doctor_idcard="+doctorDO.getIdcard()+"&patientName="+URLEncoder.encode(wlyyOutpatientDO.getPatientName())+"&url=1";
|
|
|
logger.info("发送厦门i健康智能推送url:"+wxurl);
|
|
|
wlyyBusinessService.sendDoctorTemplateByDoctorIdcard(wxurl);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.info("发送厦门i健康智能失败"+e.toString());
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.info("发送厦门i健康智能失败"+e.toString());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
|
|
|
return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
|
|
|
}
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10)
|
|
@ -525,7 +618,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "删除处方草稿", notes = "删除处方草稿")
|
|
|
public Envelop deletePrescription(@ApiParam(name = "id", value = "处方id")
|
|
|
@RequestParam(value = "id", required = true)String id)throws Exception {
|
|
|
return success(prescriptionService.deletePrescription(id));
|
|
|
|
|
|
try{
|
|
|
return success(prescriptionService.deletePrescription(id));
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.makeDiagnosis)
|
|
@ -583,7 +682,6 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
return success(result);
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findExpressageList)
|
|
|
@ApiOperation(value = "获取订单列表", notes = "获取订单列表")
|
|
|
public MixEnvelop findExpressageList(@ApiParam(name = "status", value = "流程状态,多状态用‘,’分割")
|
|
@ -600,7 +698,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page", required = false)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = false)Integer size) {
|
|
|
return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size,wxId);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size,wxId);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.setMailno)
|
|
@ -609,7 +712,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "mailno", required = false)String mailno,
|
|
|
@ApiParam(name = "expressageId", value = "订单id")
|
|
|
@RequestParam(value = "expressageId", required = false)String expressageId) {
|
|
|
return success(prescriptionService.setMailno(mailno,expressageId));
|
|
|
|
|
|
try{
|
|
|
return success(prescriptionService.setMailno(mailno,expressageId));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.pushListWrite)
|
|
@ -637,7 +746,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "就诊费用查询", notes = "就诊费用查询")
|
|
|
public ListEnvelop findByDeptTypeCode(@ApiParam(name = "deptTypeCode", value = "6总部7金榜8夏禾")
|
|
|
@RequestParam(value = "deptTypeCode", required = false)String deptTypeCode) throws Exception{
|
|
|
return success(prescriptionService.findByDeptTypeCode(deptTypeCode));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findByDeptTypeCode(deptTypeCode));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.getCardInfo)
|
|
@ -674,7 +788,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true)Integer size) {
|
|
|
|
|
|
return success(prescriptionService.findDoctorWithWork(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus,page,size,ywCode));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorWithWork(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus,page,size,ywCode));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorWithMouthWork)
|
|
@ -696,7 +815,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true)Integer size) {
|
|
|
|
|
|
return success(prescriptionService.findDoctorWithMouthWork(orgCode,dept,chargeType,date,nameKey,iswork,page,size));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorWithMouthWork(orgCode,dept,chargeType,date,nameKey,iswork,page,size));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -704,7 +827,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "获取具体号源", notes = "获取具体号源")
|
|
|
public ListEnvelop findWorkTimeInfo(@ApiParam(name = "id", value = "排班id")
|
|
|
@RequestParam(value = "id", required = false)String id) {
|
|
|
return success(prescriptionService.findWorkTimeInfo(id));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findWorkTimeInfo(id));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorInfo)
|
|
|
@ApiOperation(value = "获取医生信息", notes = "获取医生信息")
|
|
@ -714,7 +842,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "withWork", required = false)String withWork,
|
|
|
@ApiParam(name = "patient", value = "患者code")
|
|
|
@RequestParam(value = "patient", required = false)String patient){
|
|
|
return success(prescriptionService.findDoctorInfo(doctor,withWork,patient));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorInfo(doctor,withWork,patient));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.updateDoctorInfo)
|
|
@ -751,7 +883,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
return success(prescriptionService.updateDoctorInfo(id, img,background,expertise, visitHospital, visitHospitalName, visitDept, visitDeptName, backgroundId,name,sex,learning,introduce,photo));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -759,7 +891,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "获取医生基本信息信息", notes = "获取医生基本信息信息")
|
|
|
public ObjEnvelop findDoctorBaseInfo(@ApiParam(name = "doctor", value = "医生code")
|
|
|
@RequestParam(value = "doctor", required = true)String doctor){
|
|
|
return success(prescriptionService.findDoctorBaseInfo(doctor));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorBaseInfo(doctor));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.cancelOutPatient)
|
|
@ -783,38 +921,56 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
consultTeamDao.save(consultTeamDo);
|
|
|
}
|
|
|
}*/
|
|
|
try {
|
|
|
String consultCode = imService.getConsultCodeByOutpatientId(outPatientId);
|
|
|
System.out.println("consultCode"+consultCode);
|
|
|
if(StringUtils.isNoneBlank(consultCode)) {
|
|
|
ConsultDo consultDo = consultDao.findByRelationCode(outPatientId);
|
|
|
if(null!=consultDo){
|
|
|
imService.cancelRevisit(consultCode, consultDo.getPatient(), 1);
|
|
|
|
|
|
try{
|
|
|
try {
|
|
|
String consultCode = imService.getConsultCodeByOutpatientId(outPatientId);
|
|
|
System.out.println("consultCode"+consultCode);
|
|
|
if(StringUtils.isNoneBlank(consultCode)) {
|
|
|
ConsultDo consultDo = consultDao.findByRelationCode(outPatientId);
|
|
|
if(null!=consultDo){
|
|
|
imService.cancelRevisit(consultCode, consultDo.getPatient(), 1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
|
|
|
String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+outPatientId;
|
|
|
prescriptionService.sendZsMsgFlow("OL_WZ_CANCEL",outPatientId,"",msgUrl,"取消问诊(用户)");
|
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wxId)){
|
|
|
String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/record?outpatientId="+outPatientId;
|
|
|
prescriptionService.sendZsMsgFlow("OL_WZ_CANCEL",outPatientId,"",msgUrl,"取消问诊(用户)");
|
|
|
}
|
|
|
|
|
|
}catch (Exception e){
|
|
|
System.out.println("居民取消复诊失败");
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
}catch (Exception e){
|
|
|
System.out.println("居民取消复诊失败");
|
|
|
return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,1,wxId));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,1,wxId));
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findCancelReasonList)
|
|
|
@ApiOperation(value = "获取居民取消原因字典", notes = "获取居民取消原因字典")
|
|
|
public ListEnvelop findCancelReasonList(){
|
|
|
return success(prescriptionService.findCancelReasonList());
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findCancelReasonList());
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findFastRegisterDate)
|
|
|
@ApiOperation(value = "獲取快速咨詢時間", notes = "獲取快速咨詢時間")
|
|
|
public ListEnvelop findFastRegisterDate(){
|
|
|
return success(prescriptionService.findFastRegisterDate());
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findFastRegisterDate());
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findByTimeSlot)
|
|
@ -823,7 +979,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "startTime", required = false)String startTime,
|
|
|
@ApiParam(name = "endTime", value = "结束时间")
|
|
|
@RequestParam(value = "endTime", required = false)String endTime) {
|
|
|
return success(prescriptionService.findByTimeSlot(startTime,endTime));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.findByTimeSlot(startTime,endTime));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -837,21 +999,37 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "startDate", required = false)String startDate,
|
|
|
@ApiParam(name = "endDate", value = "yyyy-MM-dd")
|
|
|
@RequestParam(value = "endDate", required = false)String endDate) {
|
|
|
return success(prescriptionService.findDoctorWorkTimeByMonth(doctor,date,startDate,endDate));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorWorkTimeByMonth(doctor,date,startDate,endDate));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findWorkRule)
|
|
|
@ApiOperation(value = "查询排班规则", notes = "查询排班规则")
|
|
|
public ListEnvelop findWorkRule(@ApiParam(name = "hospital", value = "医生code")
|
|
|
@RequestParam(value = "hospital", required = true)String hospital) {
|
|
|
return success(prescriptionService.findWorkRule("Scheduling",hospital));
|
|
|
try {
|
|
|
return success(prescriptionService.findWorkRule("Scheduling",hospital));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.updateWorkRule)
|
|
|
@ApiOperation(value = "保存排班规则", notes = "保存排班规则")
|
|
|
public ObjEnvelop updateWorkRule(@ApiParam(name = "workRoleJsons", value = "排班规则json")
|
|
|
@RequestParam(value = "workRoleJsons", required = true)String workRoleJsons) {
|
|
|
return success(prescriptionService.updateWorkRule(workRoleJsons));
|
|
|
try {
|
|
|
return success(prescriptionService.updateWorkRule(workRoleJsons));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.saveDoctorWorkTimeJson)
|
|
@ -864,7 +1042,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "workTimeJson", required = true)String workTimeJson,
|
|
|
@ApiParam(name = "date", value = "yyyy-MM,支持‘,’分割")
|
|
|
@RequestParam(value = "date", required = false)String date)throws Exception {
|
|
|
return success(prescriptionService.saveDoctorWorkTimeJson(type,codes,workTimeJson,date));
|
|
|
try {
|
|
|
return success(prescriptionService.saveDoctorWorkTimeJson(type,codes,workTimeJson,date));
|
|
|
}catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -879,7 +1062,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return success(prescriptionService.doctorSaveWorkTimeJson(codes,workTimeJson,date));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
@ -893,7 +1076,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return success(prescriptionService.doctorUpdateWorkTimeJson(workTimeJson,codes));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.deleteWorkTime)
|
|
@ -903,7 +1086,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return success(prescriptionService.deleteWorkTime(code));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -916,7 +1099,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@PostMapping(value = "test2")
|
|
|
@ApiOperation(value = "test2", notes = "test2")
|
|
|
public Envelop test(String no)throws Exception {
|
|
|
return success(prescriptionService.test2(no));
|
|
|
try {
|
|
|
return success(prescriptionService.test2(no));
|
|
|
} catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/sendMes")
|
|
@ -987,7 +1174,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "获取居民信息接口", notes = "获取居民信息接口")
|
|
|
public ObjEnvelop findPatientInfo(@ApiParam(name = "patient", value = "居民ID")
|
|
|
@RequestParam(value = "patient", required = true)String patient){
|
|
|
return success(prescriptionService.findPatientInfo(patient));
|
|
|
try {
|
|
|
return success(prescriptionService.findPatientInfo(patient));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
@ -1025,22 +1216,33 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "city", required = false)String city,
|
|
|
@ApiParam(name = "cityName", value = "市名称")
|
|
|
@RequestParam(value = "cityName", required = false)String cityName){
|
|
|
return success(prescriptionService.updatePatientInfo(patient,name,idcard,ssc,sex,town,townName,committeeCode,committeeName,address,photo,mobile,province,provinceName,city,cityName));
|
|
|
|
|
|
try {
|
|
|
return success(prescriptionService.updatePatientInfo(patient,name,idcard,ssc,sex,town,townName,committeeCode,committeeName,address,photo,mobile,province,provinceName,city,cityName));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.saveDoctorOnlineWork)
|
|
|
@ApiOperation(value = "保存在线排班", notes = "保存在线排班")
|
|
|
public Envelop saveDoctorOnlineWork(@ApiParam(name = "onlineWorkJson", value = "保存在线排班json")
|
|
|
@RequestParam(value = "onlineWorkJson", required = true)String onlineWorkJson)throws Exception {
|
|
|
return prescriptionService.saveDoctorOnlineWork(onlineWorkJson);
|
|
|
try {
|
|
|
return prescriptionService.saveDoctorOnlineWork(onlineWorkJson);
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.delDoctorOnlineWork)
|
|
|
@ApiOperation(value = "删除在线排班", notes = "删除在线排班")
|
|
|
public Envelop delDoctorOnlineWork(@ApiParam(name = "id", value = "保存在线排班ID")
|
|
|
@RequestParam(value = "id", required = true)String id)throws Exception {
|
|
|
return prescriptionService.delDoctorOnlineWork(id);
|
|
|
try {
|
|
|
return prescriptionService.delDoctorOnlineWork(id);
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorOnlineWorkList)
|
|
@ -1051,7 +1253,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "startDate", required = true)String startDate,
|
|
|
@ApiParam(name = "endDate", value = "结束时间,YYYY-MM-dd")
|
|
|
@RequestParam(value = "endDate", required = true)String endDate)throws Exception {
|
|
|
return success(prescriptionService.findDoctorOnlineWorkList(doctor,startDate,endDate));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorOnlineWorkList(doctor,startDate,endDate));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.cooperativeOutpatient)
|
|
@ -1062,19 +1269,24 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "registerJson", required = false)String registerJson,
|
|
|
@ApiParam(name = "chargeType", value = "号别")
|
|
|
@RequestParam(value = "chargeType", required = false)String chargeType)throws Exception {
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType);
|
|
|
|
|
|
//构建系统消息
|
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
|
|
|
//发送系统消息
|
|
|
hospitalSystemMessageService.sendImMessage(systemMessageDO);
|
|
|
|
|
|
//发送医生抢单消息
|
|
|
if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
|
|
|
hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
|
|
|
|
|
|
try {
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType);
|
|
|
|
|
|
//构建系统消息
|
|
|
SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO,payFlag);
|
|
|
//发送系统消息
|
|
|
hospitalSystemMessageService.sendImMessage(systemMessageDO);
|
|
|
|
|
|
//发送医生抢单消息
|
|
|
if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){
|
|
|
hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO);
|
|
|
}
|
|
|
|
|
|
return success(wlyyOutpatientDO);
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
return success(wlyyOutpatientDO);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.saveOutpatientDoctor)
|
|
@ -1085,7 +1297,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "registerJson", required = false)String registerJson,
|
|
|
@ApiParam(name = "chargeType", value = "号别")
|
|
|
@RequestParam(value = "chargeType", required = false)String chargeType)throws Exception {
|
|
|
return success(prescriptionService.saveOutpatientDoctor(outpatientJson,registerJson,chargeType));
|
|
|
try {
|
|
|
return success(prescriptionService.saveOutpatientDoctor(outpatientJson,registerJson,chargeType));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOauthQRCode)
|
|
@ -1111,7 +1327,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page", required = true)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小")
|
|
|
@RequestParam(value = "size", required = true)Integer size) {
|
|
|
return prescriptionService.findByGeneralDoctor(generalDoctor,startDate,endDate,status,sort,page,size,wxId);
|
|
|
try {
|
|
|
return prescriptionService.findByGeneralDoctor(generalDoctor,startDate,endDate,status,sort,page,size,wxId);
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -1119,7 +1339,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "全科医生首页统计信息", notes = "全科医生首页统计信息")
|
|
|
public ObjEnvelop findGeneralDoctorInfo(@ApiParam(name = "generalDoctor", value = "全科医生")
|
|
|
@RequestParam(value = "generalDoctor", required = true)String generalDoctor) {
|
|
|
return success(prescriptionService.findGeneralDoctorInfo(generalDoctor));
|
|
|
try {
|
|
|
return success(prescriptionService.findGeneralDoctorInfo(generalDoctor));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.sendWlyyOutpatientMes)
|
|
@ -1143,7 +1367,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表")
|
|
|
public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID")
|
|
|
@RequestParam(value = "patient", required = true) String patient){
|
|
|
return success(prescriptionService.getTodayOutpatinetList(patient,wxId));
|
|
|
try{
|
|
|
return success(prescriptionService.getTodayOutpatinetList(patient,wxId));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorMapping)
|
|
@ -1152,7 +1380,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "doctor", required = true)String doctor,
|
|
|
@ApiParam(name = "orgCode", value = "机构code")
|
|
|
@RequestParam(value = "orgCode", required = true)String orgCode){
|
|
|
return success(prescriptionService.getDoctorMapping(doctor,orgCode));
|
|
|
try {
|
|
|
return success(prescriptionService.getDoctorMapping(doctor,orgCode));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
@ -1183,14 +1416,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "查询处方日志", notes = "查询处方日志")
|
|
|
public ListEnvelop findPrescriptionLogByPreId(@ApiParam(name = "prescriptionCode", value = "处方code")
|
|
|
@RequestParam(value = "prescriptionCode", required = true)String prescriptionCode)throws Exception{
|
|
|
return success(prescriptionLogService.findPrescriptionLogByPreId(prescriptionCode));
|
|
|
try{
|
|
|
return success(prescriptionLogService.findPrescriptionLogByPreId(prescriptionCode));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findByPrescriptionCodeByStatus)
|
|
|
@ApiOperation(value = "查询处方流程", notes = "查询处方流程")
|
|
|
public ListEnvelop findByPrescriptionCodeByStatus(@ApiParam(name = "prescriptionCode", value = "处方code")
|
|
|
@RequestParam(value = "prescriptionCode", required = true)String prescriptionCode)throws Exception{
|
|
|
return success(prescriptionLogService.findByPrescriptionCodeByStatus(prescriptionCode));
|
|
|
try {
|
|
|
return success(prescriptionLogService.findByPrescriptionCodeByStatus(prescriptionCode));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.xzzxFindByPartsCode)
|
|
|
@ApiOperation(value = "心脏查询部位字典", notes = "心脏查询部位字典")
|
|
@ -1278,7 +1520,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "获取医生简介")
|
|
|
public ObjEnvelop getDoctorIntroduction(@ApiParam(name = "doctor", value = "医生编码")
|
|
|
@RequestParam(value = "doctor",required = false) String doctor)throws Exception{
|
|
|
return success(prescriptionService.getDoctorIntroduction(doctor));
|
|
|
try {
|
|
|
return success(prescriptionService.getDoctorIntroduction(doctor));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findByDict)
|
|
@ -1287,7 +1534,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "name", required = true)String name,
|
|
|
@ApiParam(name = "hospital", value = "医生code")
|
|
|
@RequestParam(value = "hospital", required = true)String hospital) {
|
|
|
return success(prescriptionService.findByDict(name,hospital));
|
|
|
try {
|
|
|
return success(prescriptionService.findByDict(name,hospital));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.getPatientAccetokenByIdcard)
|
|
@ -1400,7 +1652,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "chargeType",required = false)String chargeType,
|
|
|
@ApiParam(name = "dept", value = "科室")
|
|
|
@RequestParam(value = "dept",required = false)String dept) {
|
|
|
return success(prescriptionService.findDoctorByName(hospital,name,chargeType,dept));
|
|
|
try {
|
|
|
return success(prescriptionService.findDoctorByName(hospital,name,chargeType,dept));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptWithDoctorWorkTime)
|
|
@ -1413,14 +1669,23 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page",required = false)Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "每页大小")
|
|
|
@RequestParam(value = "pagesize",required = false)Integer pagesize) {
|
|
|
return success(prescriptionService.findDeptWithDoctorWorkTime(hospital,keyWord,page,pagesize));
|
|
|
try {
|
|
|
return success(prescriptionService.findDeptWithDoctorWorkTime(hospital,keyWord,page,pagesize));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value= BaseHospitalRequestMapping.Prescription.findWorkTimeRule)
|
|
|
@ApiOperation(value = "查询排班规则")
|
|
|
public ObjEnvelop findWorkTimeRule(@ApiParam(name = "hospital", value = "医院code")
|
|
|
@RequestParam(value = "hospital",required = true)String hospital) {
|
|
|
return success(workTimeService.findWorkTimeRule(hospital));
|
|
|
try {
|
|
|
return success(workTimeService.findWorkTimeRule(hospital));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value= BaseHospitalRequestMapping.Prescription.saveWorkTimeRule)
|
|
@ -1429,7 +1694,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "workTimeRuleJson",required = true)String workTimeRuleJson,
|
|
|
@ApiParam(name = "isDoctorWorkJson", value = "判断是否排班json数据")
|
|
|
@RequestParam(value = "isDoctorWorkJson",required = false)String isDoctorWorkJson) throws Exception{
|
|
|
return success(workTimeService.saveWorkTimeRule(workTimeRuleJson,isDoctorWorkJson));
|
|
|
try {
|
|
|
return success(workTimeService.saveWorkTimeRule(workTimeRuleJson,isDoctorWorkJson));
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -1439,7 +1709,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "doctor",required = true)String doctor,
|
|
|
@ApiParam(name = "ywCode", value = "业务code")
|
|
|
@RequestParam(value = "ywCode",required = false) String ywCode) throws Exception{
|
|
|
return success(workTimeService.checkDoctorWork(doctor,ywCode));
|
|
|
try {
|
|
|
return success(workTimeService.checkDoctorWork(doctor,ywCode));
|
|
|
}catch (Exception e) {
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value= BaseHospitalRequestMapping.Prescription.importDoctorWork)
|
|
@ -1451,45 +1725,50 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "dateMoth", value = "年-月,格式:2020-03")
|
|
|
@RequestParam(value = "dateMoth",required = true)String dateMoth,
|
|
|
HttpServletRequest request)throws Exception{
|
|
|
request.setCharacterEncoding("UTF-8");
|
|
|
DoctorWorkTimeExcelReader reader = new DoctorWorkTimeExcelReader();
|
|
|
reader.read(file);
|
|
|
|
|
|
if("-1".equals(reader.getCode())) {
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage("目前仅支持200位医生同时导入!");
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
List<DoctorWorkTimeMainExcelDO> errorLs = reader.getErrorLs();
|
|
|
List<DoctorWorkTimeMainExcelDO> correctLs = reader.getCorrectLs();
|
|
|
if(errorLs!=null&&errorLs.size()>0){
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage("格式错误!");
|
|
|
envelop.setDetailModelList(errorLs);
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
Map<String,Object> rs = workTimeService.getExcelWorkInfo(correctLs,dateMoth,hospital);
|
|
|
List<DoctorWorkTimeMainExcelDO> error = (List<DoctorWorkTimeMainExcelDO>)rs.get("error");
|
|
|
Integer errorTotal = (Integer) rs.get("errorTotal");
|
|
|
Integer succTotal = (Integer) rs.get("succTotal");
|
|
|
|
|
|
if(error!=null&&error.size()>0){
|
|
|
|
|
|
try {
|
|
|
request.setCharacterEncoding("UTF-8");
|
|
|
DoctorWorkTimeExcelReader reader = new DoctorWorkTimeExcelReader();
|
|
|
reader.read(file);
|
|
|
|
|
|
if("-1".equals(reader.getCode())) {
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage("目前仅支持200位医生同时导入!");
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
List<DoctorWorkTimeMainExcelDO> errorLs = reader.getErrorLs();
|
|
|
List<DoctorWorkTimeMainExcelDO> correctLs = reader.getCorrectLs();
|
|
|
if(errorLs!=null&&errorLs.size()>0){
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage("格式错误!");
|
|
|
envelop.setDetailModelList(errorLs);
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
Map<String,Object> rs = workTimeService.getExcelWorkInfo(correctLs,dateMoth,hospital);
|
|
|
List<DoctorWorkTimeMainExcelDO> error = (List<DoctorWorkTimeMainExcelDO>)rs.get("error");
|
|
|
Integer errorTotal = (Integer) rs.get("errorTotal");
|
|
|
Integer succTotal = (Integer) rs.get("succTotal");
|
|
|
|
|
|
if(error!=null&&error.size()>0){
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage(succTotal+"位医生,更新成功!"+","+errorTotal+"位医生,身份信息错误!更新失败!");
|
|
|
envelop.setDetailModelList(error);
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(-1);
|
|
|
envelop.setMessage(succTotal+"位医生,更新成功!"+","+errorTotal+"位医生,身份信息错误!更新失败!");
|
|
|
envelop.setStatus(200);
|
|
|
envelop.setMessage("导入成功!"+succTotal+"位医生排班数据!");
|
|
|
envelop.setDetailModelList(error);
|
|
|
return envelop;
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
|
|
|
ListEnvelop envelop = new ListEnvelop();
|
|
|
envelop.setStatus(200);
|
|
|
envelop.setMessage("导入成功!"+succTotal+"位医生排班数据!");
|
|
|
envelop.setDetailModelList(error);
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
|
|
@ -1612,7 +1891,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",businessOrderService.selectStatusById(id));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1630,7 +1909,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",businessOrderService.selectListStatus(relationCode));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1700,7 +1979,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "page",required = false)Integer page,
|
|
|
@ApiParam(name = "pagesize", value = "每页大小")
|
|
|
@RequestParam(value = "pagesize",required = false)Integer pagesize) {
|
|
|
return success(prescriptionService.selectByCondition(hospital,dept,status,startTime,endTime,nameinfo,page,pagesize,wxId));
|
|
|
try {
|
|
|
return success(prescriptionService.selectByCondition(hospital,dept,status,startTime,endTime,nameinfo,page,pagesize,wxId));
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value= BaseHospitalRequestMapping.Prescription.updateStatus)
|
|
@ -1714,7 +1997,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
prescriptionService.updateStatus(prescriptionId,status);
|
|
|
return ObjEnvelop.getSuccess("ok",null);
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1736,7 +2019,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
prescriptionService.updateMailNoById(id,mailNo);
|
|
|
return ObjEnvelop.getSuccess("ok",null);
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1835,7 +2118,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
//String operate,String operateName,String reason,Integer status,String prescriptionId
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.savePrescriptionCheck(operate,reason,status,prescriptionId));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1856,7 +2139,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.findPrescriptionCheck(prescriptionId));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1876,7 +2159,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.selectByPrescriptionId(prescriptionId));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1892,7 +2175,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
prescriptionService.deleteById(flag,id);
|
|
|
return ObjEnvelop.getSuccess("ok",null);
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1906,7 +2189,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
return ObjEnvelop.getSuccess("ok",businessOrderService.selectOrderTime(relationCode));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1945,7 +2228,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.findByPrescriptionId(prescriptionId));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -1995,7 +2278,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.readOutPatient(registerSn));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2013,7 +2296,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.readOutPatientXml(registerSn));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2030,7 +2313,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
|
|
|
}
|
|
|
}
|
|
@ -2043,7 +2326,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.outpmedicaldoc(patient));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2061,7 +2344,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.getPatInfoDataXml(opid,recSn));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2088,7 +2371,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",prescriptionService.writeOutPatient(registerSn,chiefComplaint,hpi,elapsemhis,bodycheck,assistanTcheck,doctor,doctorName));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2116,7 +2399,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
return prescriptionService.findPatientAllPrescription(keyName,status,page,size,patient,isSelectDrug,consumerflag);
|
|
|
} catch (Exception e) {
|
|
|
return PageEnvelop.getError(e.getMessage(),-1);
|
|
|
return failedPageEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2131,7 +2414,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return prescriptionService.findDrugAddress(outpatientId,longitude,dimension);
|
|
|
} catch (Exception e) {
|
|
|
return MixEnvelop.getError(e.getMessage());
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2145,8 +2428,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts) throws Exception {
|
|
|
List<BaseCommitteeDO> baseProvinces = baseCommitteeService.search(fields, filters, sorts);
|
|
|
return success(baseProvinces, BaseCommitteeVO.class);
|
|
|
|
|
|
try {
|
|
|
List<BaseCommitteeDO> baseProvinces = baseCommitteeService.search(fields, filters, sorts);
|
|
|
return success(baseProvinces, BaseCommitteeVO.class);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -2159,8 +2447,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts) throws Exception {
|
|
|
List<BaseTownDO> baseTowns = baseTownService.search(fields, filters, sorts);
|
|
|
return success(baseTowns, BaseTownVO.class);
|
|
|
|
|
|
try{
|
|
|
List<BaseTownDO> baseTowns = baseTownService.search(fields, filters, sorts);
|
|
|
return success(baseTowns, BaseTownVO.class);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -2173,8 +2466,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts) throws Exception {
|
|
|
List<BaseProvinceDO> baseProvinces = baseProvinceService.search(fields, filters, sorts);
|
|
|
return success(baseProvinces, BaseProvinceVO.class);
|
|
|
|
|
|
try {
|
|
|
List<BaseProvinceDO> baseProvinces = baseProvinceService.search(fields, filters, sorts);
|
|
|
return success(baseProvinces, BaseProvinceVO.class);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.findCity)
|
|
@ -2186,8 +2484,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts) throws Exception {
|
|
|
List<BaseCityDO> baseCitys = baseCityService.search(fields, filters, sorts);
|
|
|
return success(baseCitys, BaseCityVO.class);
|
|
|
|
|
|
try {
|
|
|
List<BaseCityDO> baseCitys = baseCityService.search(fields, filters, sorts);
|
|
|
return success(baseCitys, BaseCityVO.class);
|
|
|
}catch (Exception e) {
|
|
|
return failedListEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 获取诊间支付url
|
|
@ -2223,7 +2526,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
public MixEnvelop findCity (
|
|
|
@ApiParam(name = "patientCode", value = "居民code")
|
|
|
@RequestParam(value = "patientCode", required = false) String patientCode) throws Exception {
|
|
|
return prescriptionService.findPatientOpenId(patientCode);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.findPatientOpenId(patientCode);
|
|
|
} catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.updatePayStatus)
|
|
@ -2250,7 +2558,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
return ObjEnvelop.getSuccess("ok",businessOrderDO);
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -2263,7 +2571,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
return ObjEnvelop.getSuccess("ok",patientMappingService.findPatientNoByPatientCode(code));
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
return failedObjEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.popularityIncrease)
|
|
@ -2271,8 +2579,13 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
public Envelop popularityIncrease (
|
|
|
@ApiParam(name = "doctor", value = "医生id")
|
|
|
@RequestParam(value = "doctor", required = false) String doctor) throws Exception {
|
|
|
BaseDoctorDO baseDoctorDO=baseDoctorInfoService.popularityIncrease(doctor);
|
|
|
return success("操作成功",baseDoctorDO);
|
|
|
|
|
|
try {
|
|
|
BaseDoctorDO baseDoctorDO=baseDoctorInfoService.popularityIncrease(doctor);
|
|
|
return success("操作成功",baseDoctorDO);
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.xzzxSelectExamApply)
|
|
|
@ApiOperation(value = "检查项目查询接口")
|
|
@ -2379,7 +2692,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "icd10Name", value = "诊断名称")
|
|
|
@RequestParam(value = "icd10Name",defaultValue = "") String icd10Name) throws Exception {
|
|
|
|
|
|
return prescriptionService.updatePatientDiagnosis(outpatientId,icd10,icd10Name);
|
|
|
|
|
|
try {
|
|
|
return prescriptionService.updatePatientDiagnosis(outpatientId,icd10,icd10Name);
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
@PostMapping(value = BaseHospitalRequestMapping.Prescription.delHisPrescriptionByHisNo)
|
|
|
@ApiOperation(value = "删除his处方信息")
|
|
@ -2419,7 +2737,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "pageSize",value = "页大小")
|
|
|
@RequestParam(value = "pageSize",defaultValue = "",required = false) Integer pageSize) throws Exception {
|
|
|
|
|
|
return prescriptionService.prescriptionManage(keyWord,doctorId,startTime,endTime,checkStatus,status,page,pageSize);
|
|
|
try {
|
|
|
return prescriptionService.prescriptionManage(keyWord,doctorId,startTime,endTime,checkStatus,status,page,pageSize);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseHospitalRequestMapping.Prescription.disablePrescription)
|
|
|
@ApiOperation(value = "作废处方")
|
|
@ -2707,8 +3029,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "pageSize", required = false) Integer pageSize) throws Exception {
|
|
|
try {
|
|
|
return prescriptionService.getNatAppointmentList(realOrder, name, hospitalFlag, mobile, idcard, payStatus, medicare, createTimeStart, createTimeEnd, appointmentTimeStart,appointmentTimeEnd,isSuccess, page, pageSize,orderNo);
|
|
|
} catch (Exception e) {
|
|
|
return ObjEnvelop.getError(e.getMessage());
|
|
|
}catch (Exception e) {
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|