|
@ -741,13 +741,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
rs.put("sex", basePatientDO.getSex());
|
|
|
PatientMedicareCardDO cardDO = basePatientMedicareCardDao.findByCodeAndPatientCodeAndDel(outpatientDO.getCardNo(), outpatientDO.getPatient());
|
|
|
rs.put("ssc", cardDO);
|
|
|
rs.put("age", IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
|
|
|
rs.put("age", IdCardUtil.getAgeByBirthday(basePatientDO.getBirthday()));
|
|
|
rs.put("address", basePatientDO.getAddress());
|
|
|
rs.put("mobile", basePatientDO.getMobile());
|
|
|
rs.put("birthday", DateUtil.dateToStr(basePatientDO.getBirthday(), "yyyy-MM-dd"));
|
|
|
rs.put("diseaseCode",outpatientDO.getDiseaseCode());
|
|
|
rs.put("diseaseName",outpatientDO.getDiseaseName());
|
|
|
rs.put("inquirySign",outpatientDO.getInquirySign());
|
|
|
rs.put("visitType",outpatientDO.getVisitType());
|
|
|
rs.put("virusFlag",outpatientDO.getVirusFlag());
|
|
|
String hisPatient="";
|
|
|
PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(basePatientDO.getId());
|
|
|
if(null!=patientMappingDO){
|
|
@ -1114,20 +1116,24 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
Double price = 0.0;
|
|
|
String chargeType1 = null;
|
|
|
if (doctorDO!=null){
|
|
|
if (outpatient.getOutpatientType().equalsIgnoreCase("1")){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwfzChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getSpfzChargeType();
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("3")){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwzxChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getSpzxChargeType();
|
|
|
if (!StringUtils.isNoneBlank(outpatient.getVisitType())||outpatient.getVisitType().equalsIgnoreCase("2")){
|
|
|
if (outpatient.getOutpatientType().equalsIgnoreCase("1")){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwfzChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getSpfzChargeType();
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("3")){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwzxChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getSpzxChargeType();
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getXtfzChargeType();
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getXtfzChargeType();
|
|
|
}else if (StringUtils.isNoneBlank(outpatient.getVisitType())&&outpatient.getVisitType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getXgszChargeType();
|
|
|
}
|
|
|
if(doctorDO!=null){
|
|
|
if (StringUtils.isNoneBlank(chargeType1)){
|
|
@ -2190,21 +2196,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
logger.info("下载银医通");
|
|
|
String chargeType = "";
|
|
|
if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getTwfzChargeType();
|
|
|
}else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getSpfzChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getTwzxChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getSpzxChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getJyzxChargeType();
|
|
|
}else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
|
|
|
chargeType = doctorDO.getXtfzChargeType();
|
|
|
if (StringUtils.isNoneBlank(outpatientDO.getVisitType())&&outpatientDO.getVisitType().equalsIgnoreCase("1")){
|
|
|
chargeType = doctorDO.getXgszChargeType();
|
|
|
}else {
|
|
|
chargeType = doctorDO.getChargeType();
|
|
|
if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getTwfzChargeType();
|
|
|
}else if ("1".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getSpfzChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getTwzxChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getSpzxChargeType();
|
|
|
}else if ("3".equalsIgnoreCase(outpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(outpatientDO.getType())){
|
|
|
chargeType = doctorDO.getJyzxChargeType();
|
|
|
}else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
|
|
|
chargeType = doctorDO.getXtfzChargeType();
|
|
|
}else if ("2".equalsIgnoreCase(outpatientDO.getOutpatientType())){
|
|
|
chargeType = doctorDO.getXtfzChargeType();
|
|
|
}else {
|
|
|
chargeType = doctorDO.getChargeType();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(), doctorMappingDO.getMappingCode(), outpatientDO.getDept(), chargeType, outpatientDO.getWinNo(), demoFlag);
|
|
|
net.sf.json.JSONObject res = rs.getJSONObject("resquest");
|
|
|
logger.info("挂号结果 res: " + res.toString());
|
|
@ -4496,6 +4509,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
rs.put("idCard",doctorDO.getIdcard());
|
|
|
rs.put("idCardType",doctorDO.getIdCardType());
|
|
|
rs.put("mark",doctorDO.getMark());
|
|
|
rs.put("twzxChargeType",doctorDO.getTwzxChargeType());
|
|
|
rs.put("twfzChargeType",doctorDO.getTwfzChargeType());
|
|
|
rs.put("spzxChargeType",doctorDO.getSpzxChargeType());
|
|
|
rs.put("spfzChargeType",doctorDO.getSpfzChargeType());
|
|
|
rs.put("jyzxChargeType",doctorDO.getJyzxChargeType());
|
|
|
rs.put("xtfzChargeType",doctorDO.getXtfzChargeType());
|
|
|
rs.put("xgszChargeType",doctorDO.getXgszChargeType());
|
|
|
List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
|
|
|
String sqlCharge = "SELECT\n" +
|
|
|
"\tm.req_fee as \"twfzFee\",\n" +
|
|
@ -4503,7 +4523,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"\tb.req_fee as \"spzxFee\",\n" +
|
|
|
"\tv.req_fee as \"twzxFee\",\n" +
|
|
|
"\tg.req_fee as \"jyzxFee\",\n" +
|
|
|
"\td.req_fee as \"xtzxFee\"\n" +
|
|
|
"\td.req_fee as \"xtzxFee\",\n" +
|
|
|
"\th.req_fee as \"xgszFee\"\n" +
|
|
|
"FROM\n" +
|
|
|
"\tbase_doctor t\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict m ON t.twfz_charge_type = m.charge_type and m.is_del='1'\n" +
|
|
@ -4512,6 +4533,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"LEFT JOIN wlyy_charge_dict v ON t.twzx_charge_type = v.charge_type and v.is_del='1'\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict d ON t.xtfz_charge_type = d.charge_type and d.is_del='1'\n" +
|
|
|
" LEFT JOIN wlyy_charge_dict g ON t.jyzx_charge_type = g.charge_type and g.is_del='1'\n" +
|
|
|
" LEFT JOIN wlyy_charge_dict h ON t.xgsz_charge_type = h.charge_type and h.is_del='1'\n" +
|
|
|
"WHERE t.id = '"+doctorDO.getId()+"' ";
|
|
|
chargeDictDOLists = hibenateUtils.createSQLQuery(sqlCharge);
|
|
|
//System.out.println(chargeDictDOLists.get(1));
|
|
@ -7767,7 +7789,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
rs.put("townCode", basePatientDO.getTownCode());
|
|
|
rs.put("townName", basePatientDO.getTownName());
|
|
|
rs.put("idcard", basePatientDO.getIdcard());
|
|
|
rs.put("age", IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
|
|
|
rs.put("age", IdCardUtil.getAgeByBirthday(basePatientDO.getBirthday()));
|
|
|
rs.put("mobile", basePatientDO.getMobile());
|
|
|
rs.put("photo", basePatientDO.getPhoto());
|
|
|
rs.put("address", basePatientDO.getAddress());
|
|
@ -8394,7 +8416,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
|
|
|
}
|
|
|
for (WlyyPrescriptionDO prescriptionDO:wlyyPrescriptionDOList){
|
|
|
prescriptionDO.setStatus(32);
|
|
|
prescriptionDO.setStatus(31);
|
|
|
prescriptionDao.save(prescriptionDO);
|
|
|
}
|
|
|
if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
|
|
@ -8506,7 +8528,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
System.out.println("获取顺丰物流面单信息:6");
|
|
|
|
|
|
}
|
|
|
wlyyPrescriptionDOS.setStatus(32);
|
|
|
wlyyPrescriptionDOS.setStatus(31);
|
|
|
prescriptionDao.save(wlyyPrescriptionDOS);
|
|
|
if (sfexpress_obj != null && StringUtils.isNoneBlank(sfexpress_obj.getMailno())) {
|
|
|
com.alibaba.fastjson.JSONObject object = sfexpressService.postSFOrderQueryService(sfexpress_obj);
|
|
@ -12891,7 +12913,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
String url = "https://hlwyy.xmzsh.com/hlwyy/ims-wx/#/nucleicTest/detail?id=" + baseNatAppointmentDO.getId();
|
|
|
String date = DateUtil.dateToStrLong(baseNatAppointmentDO.getAppointmentTime());
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO1 = wlyyHospitalSysDictDao.findById("natConfigTestNew");
|
|
|
String addres = "我院五号楼北侧(急诊部后侧)";
|
|
|
String addres = "我院发热门诊的核酸采样点(采样时间为8:00~12:00,14:00~17:30)。";
|
|
|
String timeDes = "6-8小时";
|
|
|
if (hospitalSysDictDO1!=null){
|
|
|
com.alibaba.fastjson.JSONArray array1 = com.alibaba.fastjson.JSONArray.parseArray(hospitalSysDictDO1.getDictValue());
|
|
@ -12906,7 +12928,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
String first = "尊敬的用户" + baseNatAppointmentDO.getName() + ",您已完成线上自助核酸检测预约申请";
|
|
|
String contentMsg = "申请人:" + baseNatAppointmentDO.getName() + "\r\n 预约时间:" + date + " \r\n发票流水号:" + baseNatAppointmentDO.getRealOrder();
|
|
|
String remark = "1、请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+"核酸检测点领取标本试管窗口绑定检测。\r\n" +
|
|
|
String remark = "1、请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+
|
|
|
"2、核酸检测标本采集"+timeDes+"后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
|
|
|
String responseMsg = "";
|
|
|
responseMsg = entranceService.ehospitalNotice(
|
|
@ -13333,7 +13355,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
String url="";
|
|
|
String date = DateUtil.dateToStrLong(baseNatAppointmentDO.getAppointmentTime());
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO1 = wlyyHospitalSysDictDao.findById("natConfigTestNew");
|
|
|
String addres = "我院五号楼北侧(急诊部后侧)";
|
|
|
String addres = "我院发热门诊的核酸采样点(采样时间为8:00~12:00,14:00~17:30)。";
|
|
|
String timeDes = "6-8小时";
|
|
|
if (hospitalSysDictDO1!=null){
|
|
|
com.alibaba.fastjson.JSONArray array1 = com.alibaba.fastjson.JSONArray.parseArray(hospitalSysDictDO1.getDictValue());
|
|
@ -13348,7 +13370,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
String contentMsg="申请人:"+baseNatAppointmentDO.getName()+"\r\n预约时间:"+date;
|
|
|
String remark = "1、请于预约时间"+date+"前,携带医保卡/就诊卡/电子健康卡到院区自助机进行结算。\r\n" +
|
|
|
"2、结算完成后请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+"核酸检测点领取标本试管窗口绑定检测。\r\n" +
|
|
|
"2、结算完成后请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+
|
|
|
"3、核酸检测标本采集"+timeDes+"后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
|
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)) {
|
|
|
responseMsg = entranceService.ehospitalNotice(
|
|
@ -13372,7 +13394,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
String date = DateUtil.dateToStrLong(baseNatAppointmentDO.getAppointmentTime());
|
|
|
jsonObject.put("keyword2","申请人:"+baseNatAppointmentDO.getName()+"\n预约时间:"+date);
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO1 = wlyyHospitalSysDictDao.findById("natConfigTestNew");
|
|
|
String addres = "我院五号楼北侧(急诊部后侧)";
|
|
|
String addres = "我院发热门诊的核酸采样点(采样时间为8:00~12:00,14:00~17:30)。";
|
|
|
String timeDes = "6-8小时";
|
|
|
if (hospitalSysDictDO1!=null){
|
|
|
com.alibaba.fastjson.JSONArray array1 = com.alibaba.fastjson.JSONArray.parseArray(hospitalSysDictDO1.getDictValue());
|
|
@ -13386,7 +13408,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
}
|
|
|
String remark = "1、请于预约时间"+date+"前,携带医保卡/就诊卡/电子健康卡到院区自助机进行结算。\n" +
|
|
|
"2、结算完成后请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+"核酸检测点领取标本试管窗口绑定检测。\n" +
|
|
|
"2、结算完成后请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+
|
|
|
"3、核酸检测标本采集"+timeDes+"后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
|
|
|
jsonObject.put("remark",remark);
|
|
|
jsonObject.put("url","111111");
|
|
@ -13824,7 +13846,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"发票流水号:"+realorder+"");
|
|
|
BaseNatAppointmentDO baseNatAppointmentDO = baseNatAppointmentDao.findOne(id);
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO1 = wlyyHospitalSysDictDao.findById("natConfigTestNew");
|
|
|
String addres = "我院五号楼北侧(急诊部后侧)";
|
|
|
String addres = "我院发热门诊的核酸采样点(采样时间为8:00~12:00,14:00~17:30)。";
|
|
|
String timeDes = "6-8小时";
|
|
|
if (hospitalSysDictDO1!=null){
|
|
|
com.alibaba.fastjson.JSONArray array1 = com.alibaba.fastjson.JSONArray.parseArray(hospitalSysDictDO1.getDictValue());
|
|
@ -13837,7 +13859,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
String remark = "1、请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+"核酸检测点领取标本试管窗口绑定检测。\n" +
|
|
|
String remark = "1、请您持核酸预约申请信息和发票流水号、医保卡/就诊卡/电子健康卡,准时至"+addres+
|
|
|
"2、核酸检测标本采集"+timeDes+"后出具报告。请关注厦门大学附属中山医院微信公众号查询;如需打印,请至厦门大学附属中山医院核酸检测点自助机打印。";
|
|
|
jsonObject.put("remark",remark);
|
|
|
jsonObject.put("url",redirdctUrl);
|
|
@ -15027,7 +15049,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
logger.info("变更处方结算状态成功");
|
|
|
String fee = ylzMedicalRelationDO.getTotalAmount();
|
|
|
Double medicarePrice = Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())+Double.parseDouble(ylzMedicalRelationDO.getPersonAccount());
|
|
|
String pushPayLog = payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
|
|
|
String pushPayLog = payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getRealOrder(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
|
|
|
logger.info("处方结算成功"+pushPayLog+"====="+realOrder);
|
|
|
//2.6.1 电子处方订单接收
|
|
|
logger.info("医保电子处方订单");
|