|
@ -2789,7 +2789,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
outpatientDao.save(outpatientDO);
|
|
|
//先下单
|
|
|
businessOrderService.savePrescriptionOrder(prescription.getId());
|
|
|
if(!demoFlag) {
|
|
|
/*if(!demoFlag) {
|
|
|
//同步his
|
|
|
ykyyEntranceService.findByRealOrder(prescription.getId(), demoFlag);
|
|
|
List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
|
|
@ -2808,7 +2808,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
ykyySMSService.sendSmsByTempcode("prescription_remind", outpatientDO, wlyyPrescriptionDO, "");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
/*if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
|
|
|
if (StringUtils.isNotBlank(inspectionJson)) {
|
|
|
if (StringUtils.isNotBlank(infoJsons)) {
|
|
@ -9330,6 +9330,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}*/
|
|
|
if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
|
|
|
wlyyPrescriptionDO.setStatus(10);
|
|
|
if(!demoFlag) {
|
|
|
//同步his
|
|
|
try {
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
|
|
|
ykyyEntranceService.findByRealOrder(prescriptionId, demoFlag);
|
|
|
BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
|
|
|
logger.info("cfsb", wlyyPrescriptionDO.getRealOrder());
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("YKTCONTROL");
|
|
|
if (null != hospitalSysDictDO && "0".equalsIgnoreCase(hospitalSysDictDO.getDictValue())) {
|
|
|
|
|
|
} else {
|
|
|
ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(), wlyyPrescriptionDO.getOrderId(), wlyyPrescriptionDO.getRealOrder());
|
|
|
}
|
|
|
List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
if (list!=null&&list.size()>0){
|
|
|
ykyySMSService.sendSmsByTempcode("prescription_remind", outpatientDO, wlyyPrescriptionDO, "");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
if (list!=null&&list.size()>0){
|
|
@ -11499,7 +11520,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
|
|
|
public Map saveNatAppointment(String chargeAmount,String inspectionName,String mediaCard,String patientId,String name,String cardNo,String cardType,String mobile,
|
|
|
String firstJobCode,String firstJobName,String secondJobCode,String secondJobName,String natTime,String address,String provinceName,String cityName,String townName,String streetName,String pm,String pushFlag,String cardNoType,String consumer,
|
|
|
String checkPart,String chargeFlag,String chargeCode,String icdCode) throws Exception {
|
|
|
String checkPart,String chargeFlag,String chargeCode,String icdCode,String preNo) throws Exception {
|
|
|
Map returnMap = new HashMap();
|
|
|
Integer winNo = 6;
|
|
|
if (checkPart==null||checkPart==""){
|
|
@ -11844,7 +11865,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
format2 = new SimpleDateFormat("yyyy-MM-dd").parse(natTime);
|
|
|
String shortDate = new SimpleDateFormat("yyyyMMdd").format(format2);
|
|
|
System.out.println("yyyy-MM-dd转yyyyMMdd:"+shortDate);
|
|
|
/* String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,preNo,cardNo,mobile,name,"3");
|
|
|
String regRes=tasyNatService.saveRegOrder(regDept,shortDate,pm,preNo,cardNo,mobile,name,"3");
|
|
|
com.alibaba.fastjson.JSONObject regObj = com.alibaba.fastjson.JSONObject.parseObject(regRes);
|
|
|
String HisSeqNo="";
|
|
|
String orderNum="";
|
|
@ -11858,11 +11879,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
returnMap.put("status","-1");
|
|
|
return returnMap;
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
//先进行核算检测预约
|
|
|
String realOrder="";
|
|
|
String addressNow=provinceName+cityName+townName+streetName+address;
|
|
|
String result = tasyNatService.initNatParams("",name.trim(),mediaCard.trim(),addressNow,firstJobCode,secondJobCode);
|
|
|
String result = tasyNatService.initNatParams(HisSeqNo,name.trim(),mediaCard.trim(),addressNow,firstJobCode,secondJobCode);
|
|
|
Boolean flag = false;
|
|
|
if (StringUtils.isNoneBlank(result)){
|
|
|
com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
|
|
@ -11873,7 +11894,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if ("0".equalsIgnoreCase(returnCode)){
|
|
|
returnMap.put("msg",object.getString("data"));
|
|
|
returnMap.put("status","-1");
|
|
|
//tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
|
|
|
tasyNatService.cancleOrder(cardNo,HisSeqNo,orderNum);
|
|
|
return returnMap;
|
|
|
}else {
|
|
|
flag = true;
|
|
@ -11889,13 +11910,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
BaseNatAppointmentDO baseNatAppointmentDO= new BaseNatAppointmentDO();
|
|
|
baseNatAppointmentDO.setChargeAmount(itemPrice);
|
|
|
baseNatAppointmentDO.setMedicare(mediaCard.trim());
|
|
|
//baseNatAppointmentDO.setRegisterNo(HisSeqNo);
|
|
|
baseNatAppointmentDO.setRegisterNo(HisSeqNo);
|
|
|
baseNatAppointmentDO.setName(name);
|
|
|
baseNatAppointmentDO.setCardNo(cardNo.trim());
|
|
|
baseNatAppointmentDO.setCardType(cardType);
|
|
|
baseNatAppointmentDO.setAddress(address);
|
|
|
//baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
|
|
|
//baseNatAppointmentDO.setOderNum(orderNum);
|
|
|
baseNatAppointmentDO.setAppointmentTime(DateUtil.strToDateLong(natTime));
|
|
|
baseNatAppointmentDO.setOderNum(orderNum);
|
|
|
baseNatAppointmentDO.setCityName(cityName);
|
|
|
baseNatAppointmentDO.setFirstJobCode(firstJobCode);
|
|
|
baseNatAppointmentDO.setFirstJobName(firstJobName);
|
|
@ -12392,9 +12413,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (StringUtils.isNoneBlank(baseNatAppointmentDO.getRealOrder())){
|
|
|
logger.info("同步his订单状态"+baseNatAppointmentDO.getRealOrder());
|
|
|
//取消号源
|
|
|
//String registerCancel =tasyNatService.cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
|
|
|
/*com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(registerCancel);
|
|
|
String isSuccess=jsonObject.getString("success");*/
|
|
|
String registerCancel =tasyNatService.cancleOrder(baseNatAppointmentDO.getCardNo(),baseNatAppointmentDO.getRegisterNo(),baseNatAppointmentDO.getOderNum());
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(registerCancel);
|
|
|
String isSuccess=jsonObject.getString("success");
|
|
|
String natCancel=tasyNatService.cancelNat(baseNatAppointmentDO.getRealOrder(),baseNatAppointmentDO.getMedicare().trim(),baseNatAppointmentDO.getName());
|
|
|
com.alibaba.fastjson.JSONObject jsonObject1 = JSON.parseObject(natCancel);
|
|
|
String returnCode=jsonObject1.getString("ReturnCode");
|
|
@ -13141,18 +13162,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
logger.info("获取患者待结算信息结束!");
|
|
|
logger.info("医保挂号开始!");
|
|
|
String register = healthCareService.register(registerNo);
|
|
|
String register = healthCareService.registerToEntrance(registerNo);
|
|
|
logger.info("医保挂号结束!");
|
|
|
logger.info("医保费用明细上传开始!");
|
|
|
String feeDetailUpload= healthCareService.feeDetailUpload(registerNo);
|
|
|
String feeDetailUpload= healthCareService.feeDetailUploadToEntrance(registerNo);
|
|
|
logger.info("医保费用明细上传结束!");
|
|
|
|
|
|
logger.info("医保预结算信息开始!");
|
|
|
YlzMedicalRelationDO ylzMedicalRelationDO = healthCareService.preSettlement(registerNo);
|
|
|
YlzMedicalRelationDO ylzMedicalRelationDO = healthCareService.preSettlementToEntrance(registerNo);
|
|
|
logger.info("医保预结算信息结束!");
|
|
|
|
|
|
logger.info("获取医保结算页面地址开始!");
|
|
|
String getSettlementResultUrl = healthCareService.getSettlementResultUrl(registerNo);
|
|
|
String getSettlementResultUrl = healthCareService.getSettlementResultUrlToEntrance(registerNo);
|
|
|
logger.info("获取医保结算页面地址结束!");
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("register",register);
|