|
@ -1165,13 +1165,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
Double price = 0.0;
|
|
|
String chargeType1 = null;
|
|
|
if (doctorDO!=null){
|
|
|
if (outpatient.getOutpatientType().equalsIgnoreCase("1")){
|
|
|
if ("1".equals(outpatient.getOutpatientType())){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwfzChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
chargeType1 = doctorDO.getSpfzChargeType();
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("3")){
|
|
|
}else if ("3".equals(outpatient.getOutpatientType())||"5".equals(outpatient.getOutpatientType())){
|
|
|
if(outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
chargeType1 = doctorDO.getTwzxChargeType();
|
|
|
}else if(outpatientDO.getType().equalsIgnoreCase("2")){
|
|
@ -1202,11 +1202,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/*if (doctorDO != null && StringUtils.isNoneBlank(doctorDO.getFee())) {
|
|
|
price = Double.parseDouble(doctorDO.getFee());
|
|
|
}else {
|
|
|
price = Double.parseDouble(hospitalSysDictDO.getDictValue());
|
|
|
}*/
|
|
|
if (price == 0.0) {
|
|
|
outpatientDO.setPayStatus(1);
|
|
|
} else {
|
|
@ -1223,7 +1218,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
}else if (outpatient.getOutpatientType().equalsIgnoreCase("2")){
|
|
|
businessOrderService.recharge(outpatient.getId(), "协同复诊-诊查费", "5", "协同复诊-诊查费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
|
|
|
}else if ("3".equalsIgnoreCase(outpatient.getOutpatientType())){
|
|
|
}else if ("3".equals(outpatient.getOutpatientType())||"5".equals(outpatient.getOutpatientType())){
|
|
|
BusinessOrderDO businessOrderDO = businessOrderService.recharge(outpatient.getId(), "专家咨询费", "1", "专家咨询费", outpatient.getConsumer(), outpatient.getConsumerName(), outpatient.getDoctor(), price);
|
|
|
}else if ("4".equalsIgnoreCase(outpatient.getOutpatientType())){
|
|
|
if(StringUtils.isNotBlank(outpatient.getPlanId())){
|
|
@ -1242,19 +1237,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
|
|
|
|
|
|
WlyyPatientRegisterTimeDO registerTimeDO = null;
|
|
|
WlyyPatientRegisterTimeDO wlyyPatientRegisterTimeDO =new WlyyPatientRegisterTimeDO();
|
|
|
try {
|
|
|
//如果是视频预约咨询
|
|
|
if (StringUtils.isNotBlank(registerJson)) {
|
|
|
registerTimeDO = objectMapper.readValue(registerJson, WlyyPatientRegisterTimeDO.class);
|
|
|
registerTimeDO.setOutpatientId(outpatient.getId());
|
|
|
registerTimeDO.setCreateTime(new Date());
|
|
|
wlyyPatientRegisterTimeDO = patientRegisterTimeDao.save(registerTimeDO);
|
|
|
patientRegisterTimeDao.save(registerTimeDO);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
throw new ServiceException("号源已经被预约,请选择其他号源");
|
|
|
}
|
|
|
if (!outpatientDO.getOutpatientType().equalsIgnoreCase("3")&&!outpatientDO.getOutpatientType().equalsIgnoreCase("4")){
|
|
|
if ("1".equals(outpatient.getOutpatientType())||"2".equals(outpatient.getOutpatientType())){
|
|
|
if (1==expressageDO.getOneselfPickupFlg()){
|
|
|
if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
String drugCode= expressageDO.getHospitalCode()==null?"5550":expressageDO.getHospitalCode();
|
|
@ -1662,13 +1656,26 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
* @param orgCode
|
|
|
* @return
|
|
|
*/
|
|
|
public List<DictHospitalDeptVO> findDeptByHospital(String orgCode, String dept, String consultDeptFlag) {
|
|
|
List<DictHospitalDeptDO> list;
|
|
|
if (StringUtils.isNotBlank(consultDeptFlag) && "1".equals(consultDeptFlag)) {
|
|
|
list = dictHospitalDeptDao.findByOrgCodeAndConsultDeptFlag(orgCode, consultDeptFlag);
|
|
|
public List<DictHospitalDeptVO> findDeptByHospital(String orgCode, String dept, String consultDeptFlag,String diseaseId) {
|
|
|
|
|
|
String sql = "select distinct d.* from dict_hospital_dept d where 1=1 ";
|
|
|
if ("1".equals(consultDeptFlag)) {
|
|
|
sql += " d.org_code = '"+ orgCode +"' and d.consult_dept_flag=1 ";
|
|
|
} else {
|
|
|
list = dictHospitalDeptDao.findByOrgCodeIn(Arrays.asList(orgCode.split(",")));
|
|
|
sql += " d.org_code in ('"+ orgCode.replace(",","','") +"') ";
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(diseaseId)) {
|
|
|
List<Map<String,Object>> listTmp = jdbcTemplate.queryForList("select dept from base_disease_hospital where id='"+diseaseId+"' ");
|
|
|
if(listTmp.size()>0){
|
|
|
String depts = listTmp.get(0).get("dept")+"";
|
|
|
if(depts.contains(",")){
|
|
|
sql += " AND d.dept_code in ('"+depts.replace(",","','")+"') ";
|
|
|
}else {
|
|
|
sql += " AND d.dept_code = '"+depts+"' ";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
List<DictHospitalDeptDO> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(DictHospitalDeptDO.class));
|
|
|
List<DictHospitalDeptVO> rs = new ArrayList<>();
|
|
|
convertToModels(list, rs, DictHospitalDeptVO.class);
|
|
|
if (rs != null && rs.size() > 0 && StringUtils.isNotBlank(dept)) {
|
|
@ -6405,7 +6412,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
sql += " AND room.reservation_type=2 ";
|
|
|
} else if (4==type){
|
|
|
//专家咨询
|
|
|
sql += " AND room.reservation_type=3 AND room.consult_type =1";
|
|
|
sql += " AND room.consult_type =1 AND room.reservation_type in(3,5)";
|
|
|
} else if (5==type){
|
|
|
//康复咨询
|
|
|
sql += " AND room.reservation_type=4 AND room.consult_type =1";
|