|
@ -2599,23 +2599,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
ins.setCreateTime(new Date());
|
|
|
ins.setPrescriptionId(prescription.getId());
|
|
|
ins.setOutpatientId(outPatientId);
|
|
|
if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
/*if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
String code = ins.getCode();
|
|
|
com.alibaba.fastjson.JSONArray jsonArray = ykyyEntranceService.findZlxm("",code,"","","");
|
|
|
if (jsonArray!=null&&jsonArray.size()>0){
|
|
|
com.alibaba.fastjson.JSONObject deptobject = jsonArray.getJSONObject(0);
|
|
|
String deptNo = deptobject.getString("dept");
|
|
|
ins.setDept(deptNo);
|
|
|
ins.setDept(StringUtils.isNoneBlank(ins.getDept())?ins.getDept():deptNo);
|
|
|
String yqdm = deptobject.getString("yqdm");
|
|
|
if ("1001".equalsIgnoreCase(yqdm)){
|
|
|
ins.setOrgCode(yqdm);
|
|
|
ins.setOrgName("思北院区");
|
|
|
}else{
|
|
|
ins.setOrgCode(yqdm);
|
|
|
ins.setOrgName("五缘院区");
|
|
|
}
|
|
|
ins.setOrgCode(StringUtils.isNoneBlank(ins.getOrgCode())?ins.getOrgCode():yqdm);
|
|
|
ins.setOrgName("1001".equalsIgnoreCase(ins.getOrgCode())?"思北院区":"五缘院区");
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
System.out.println("____outpatientId=="+outPatientId);
|
|
|
}
|
|
|
//保存检查检验。
|
|
@ -2658,7 +2653,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
|
|
|
/*if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) {
|
|
|
if (StringUtils.isNotBlank(inspectionJson)) {
|
|
|
if (StringUtils.isNotBlank(infoJsons)) {
|
|
|
List<WlyyPrescriptionInfoDO> infoDOs = (List<WlyyPrescriptionInfoDO>) com.alibaba.fastjson.JSONArray.parseArray(infoJsons, WlyyPrescriptionInfoDO.class);
|
|
@ -2673,7 +2668,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
sendWxTemplateMsg(wechatId, outpatientDO.getId(), null, "", "prescriptionPayRemind", prescription.getId());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
prescriptionDao.save(prescription);
|
|
|
result.put("code", 1);
|
|
|
result.put("mes", "诊断完成");
|
|
@ -8544,7 +8539,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
wlyyPrescriptionDO.setId(prescriptionId);
|
|
|
wlyyPrescriptionDO.setCheckStatus(status);
|
|
|
wlyyPrescriptionDO.setCheckReason(reason);
|
|
|
if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
|
|
|
wlyyPrescriptionDO.setStatus(11);
|
|
|
/*if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
|
|
|
wlyyPrescriptionDO.setStatus(10);
|
|
|
List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
@ -8552,11 +8548,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}else {
|
|
|
if(inspectionDOS!=null&&inspectionDOS.size()>0){
|
|
|
wlyyPrescriptionDO.setStatus(20);
|
|
|
wlyyPrescriptionDO.setCheckReason("只开检查检验,不开药品无需审方");
|
|
|
wlyyPrescriptionDO.setCheckStatus(2);
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
wlyyPrescriptionDO.setStatus(11);
|
|
|
}
|
|
|
}else{*/
|
|
|
|
|
|
/* }*/
|
|
|
|
|
|
}
|
|
|
prescriptionDao.save(wlyyPrescriptionDO);
|
|
@ -11597,7 +11595,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
String title="";
|
|
|
String isDoctor="0";//0患者 1医生
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.JSONObject();
|
|
|
if("give_score".equalsIgnoreCase(templateCode)){
|
|
|
if("give_score".equalsIgnoreCase(templateCode)){//评分
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent();
|
|
@ -11617,7 +11615,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = consultTeamDo.getPatient();
|
|
|
jsonObject.put("type",10);
|
|
|
jsonObject.put("id",consultTeamDo.getConsult());
|
|
|
}else if("video_invite".equalsIgnoreCase(templateCode)){
|
|
|
}else if("video_invite".equalsIgnoreCase(templateCode)){//视频邀请
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());;
|
|
@ -11627,7 +11625,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = wlyyOutpatientDO.getConsumer();
|
|
|
jsonObject.put("type",30);
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
}else if("consult_remind".equalsIgnoreCase(templateCode)){
|
|
|
}else if("consult_remind".equalsIgnoreCase(templateCode)){//医生向患者发消息提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent();
|
|
@ -11637,7 +11635,21 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = wlyyOutpatientDO.getConsumer();
|
|
|
jsonObject.put("type",31);
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
} else if("prescription_pay".equalsIgnoreCase(templateCode)){
|
|
|
|
|
|
}else if("consult_remind_doctor".equalsIgnoreCase(templateCode)){//患者向医生发消息提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
//content = baseJpushTemplateDO.getPushContent();
|
|
|
content= drugName;
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{患者姓名}}",consultTeamDo.getName());
|
|
|
}
|
|
|
userId = consultTeamDo.getDoctor();
|
|
|
jsonObject.put("type",33);
|
|
|
jsonObject.put("id",consultTeamDo.getRelationCode());
|
|
|
jsonObject.put("consultType",consultTeamDo.getType());
|
|
|
jsonObject.put("patientName",consultTeamDo.getName());
|
|
|
isDoctor = "1";
|
|
|
} else if("prescription_pay".equalsIgnoreCase(templateCode)){//处方支付提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent();
|
|
@ -11648,7 +11660,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
jsonObject.put("type",6);
|
|
|
jsonObject.put("id",prescriptionId);
|
|
|
jsonObject.put("outpatientId",wlyyOutpatientDO.getId());
|
|
|
} else if("outpatient_pay".equalsIgnoreCase(templateCode)){
|
|
|
} else if("outpatient_pay".equalsIgnoreCase(templateCode)){//诊查费支付提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
@ -11680,7 +11692,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = wlyyOutpatientDO.getConsumer();
|
|
|
jsonObject.put("type",11);
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
} else if("cancel_remind".equalsIgnoreCase(templateCode)){
|
|
|
} else if("cancel_remind".equalsIgnoreCase(templateCode)){//医生取消接诊提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
@ -11706,7 +11718,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = wlyyOutpatientDO.getConsumer();
|
|
|
jsonObject.put("type",12);
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
}else if("outpatient_remind".equalsIgnoreCase(templateCode)){
|
|
|
}else if("outpatient_remind".equalsIgnoreCase(templateCode)){//患者发起复诊向医生推消息
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
@ -11746,18 +11758,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
userId = wlyyOutpatientDO.getDoctor();
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
isDoctor="1";
|
|
|
} else if("prescription_refuse".equalsIgnoreCase(templateCode)){
|
|
|
} else if("prescription_refuse".equalsIgnoreCase(templateCode)){//处方审方失败提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent();
|
|
|
content= content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName()).replace("{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{患者姓名}}",wlyyOutpatientDO.getDoctorName());
|
|
|
content= content.replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName()).replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
}
|
|
|
userId = wlyyOutpatientDO.getDoctor();
|
|
|
jsonObject.put("type",8);
|
|
|
jsonObject.put("id",prescriptionId);
|
|
|
isDoctor="1";
|
|
|
} else if("logistics_remind".equalsIgnoreCase(templateCode)){
|
|
|
} else if("logistics_remind".equalsIgnoreCase(templateCode)){//物流消息提醒
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
content = baseJpushTemplateDO.getPushContent();
|