|
@ -11931,7 +11931,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
//作废处方
|
|
|
public String disablePrescription(String prescriptionId) throws Exception{
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).orElse(null);
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
|
|
|
if (null!=prescriptionDO){
|
|
|
String hisId = prescriptionDO.getHisId();
|
|
|
if("xm_xzzx_wx".equalsIgnoreCase(wechatId)){
|
|
@ -11942,8 +11942,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
xzzxEntranceService.deletePrescriptionToEntrance(prescriptionDO.getRealOrder());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
}else if("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
/*prescriptionDao.updateCheckStatus(prescriptionId,2,reason,20);*/
|
|
|
logger.info("作废处方开始" + prescriptionDO.getCheckStatus());
|
|
|
WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
|
|
@ -12003,6 +12002,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
prescriptionDO.setCheckReason("已作废");
|
|
|
prescriptionDao.save(prescriptionDO);
|
|
|
return "已作废";
|
|
|
}else if("xm_dsyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId()).get();
|
|
|
DoctorMappingDO doctorMappingDO = doctorMappingDao.findById(outpatientDO.getDoctor()).get();
|
|
|
if (StringUtils.isNotBlank(prescriptionDO.getRealOrder())){
|
|
|
String applyDoctor = doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
|
|
|
dsyyPrescriptionService.delHisPrescriptionByHisNo("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50105",prescriptionDO.getRealOrder());
|
|
|
prescriptionDO.setStatus(-4);
|
|
|
prescriptionDO.setDisableTime(new Date());
|
|
|
prescriptionDO.setCheckStatus(5);
|
|
|
prescriptionDO.setCheckReason("已作废");
|
|
|
prescriptionDao.save(prescriptionDO);
|
|
|
}
|
|
|
return "已作废";
|
|
|
}else {
|
|
|
return "作废失败";
|
|
|
}
|