Переглянути джерело

医生端患者管理修改

wangjun 4 роки тому
батько
коміт
2ab59ca6da

+ 20 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -9917,14 +9917,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR d.drug_name LIKE '%" + keyName + "%' " +
                    " OR m.drug_name LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    ")");
                    ")");
            countSql.append(" and (" +
            countSql.append(" and (" +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR d.drug_name LIKE '%" + keyName + "%' " +
                    " OR m.drug_name LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    ")");
                    ")");
        }
        }
@ -10308,13 +10308,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
       return envelop;
       return envelop;
    }
    }
    //应声开具处方管理
    //应声开具处方管理
    public MixEnvelop prescriptionManage(String keyWord,String doctorId,String startTime,String endTime,String checkStatus,Integer page,Integer pageSize){
    public MixEnvelop prescriptionManage(String keyWord,String doctorId,String startTime,String endTime,String checkStatus,String status,Integer page,Integer pageSize){
        String sql = " select p.create_time as \"createTime\"," +
        String sql = " select p.create_time as \"createTime\"," +
                " p.patient_name as \"patientName\"," +
                " p.patient_name as \"patientName\"," +
                " o.idcard as \"idcard\"," +
                " o.idcard as \"idcard\"," +
                " o.card_no as \"cardNo\"," +
                " o.card_no as \"cardNo\"," +
                " p.check_status as \"checkStatus\"," +
                " p.check_status as \"checkStatus\"," +
                " p.id as \"id\"," +
                " p.id as \"id\"," +
                " p.status as \"status\"," +
                " p.check_reason as \"checkReason\" " +
                " p.check_reason as \"checkReason\" " +
                " from wlyy_prescription p left join wlyy_outpatient o on p.outpatient_id  = o.id" +
                " from wlyy_prescription p left join wlyy_outpatient o on p.outpatient_id  = o.id" +
                " where  1=1 ";
                " where  1=1 ";
@ -10327,6 +10328,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else {
        }else {
            sql+=" and p.check_status != 4";
            sql+=" and p.check_status != 4";
        }
        }
        if(StringUtils.isNotBlank(status)){
            if ("0".equalsIgnoreCase(status)){
                sql+=" and p.status = 20";
            }else if ("-4".equalsIgnoreCase(status)){
                sql+=" and p.status = -4";
            } else {
                sql+=" and p.status > 20";
            }
        }
        if(StringUtils.isNotBlank(doctorId)){
        if(StringUtils.isNotBlank(doctorId)){
            sql+=" and p.doctor = '"+doctorId+"'";
            sql+=" and p.doctor = '"+doctorId+"'";
        }
        }
@ -10458,17 +10469,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    net.sf.json.JSONObject jsonObject = entranceService.BS10112(jsonData.toJSONString(), demoFlag);
                    net.sf.json.JSONObject jsonObject = entranceService.BS10112(jsonData.toJSONString(), demoFlag);
                }catch (Exception e){
                }catch (Exception e){
                    e.printStackTrace();
                    e.printStackTrace();
                    return "删除失败";
                    return "作废失败";
                }
                }
            }
            }
            prescriptionDO.setStatus(-1);
            prescriptionDO.setCheckStatus(4);
            prescriptionDO.setCheckReason("已删除");
            prescriptionDO.setStatus(-4);
            prescriptionDO.setCheckStatus(5);
            prescriptionDO.setCheckReason("已作废");
            prescriptionDao.save(prescriptionDO);
            prescriptionDao.save(prescriptionDO);
            return "删除成功";
            return "已作废";
        }else {
        }else {
            return "删除失败";
            return "作废失败";
        }
        }
    }
    }

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -544,14 +544,14 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR d.drug_name LIKE '%" + keyName + "%' " +
                    " OR m.drug_name LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    ")");
                    ")");
            countSql.append(" and (" +
            countSql.append(" and (" +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " b.doctor_name LIKE '%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.dept_name LIKE'%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR b.hospital_name LIKE '%" + keyName + "%' " +
                    " OR d.drug_name LIKE '%" + keyName + "%' " +
                    " OR m.drug_name LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    " OR b.real_order LIKE '%" + keyName + "%' " +
                    ")");
                    ")");
        }
        }

+ 2 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -4507,7 +4507,7 @@ public class ImService {
				"  t.mobile as \"mobile\"," +
				"  t.mobile as \"mobile\"," +
				"  op.doctor as \"doctor\"" +
				"  op.doctor as \"doctor\"" +
				" from wlyy_outpatient op left join base_patient t " +
				" from wlyy_outpatient op left join base_patient t " +
				" on t.id = op.patient where t.del ='1' and op.status!= -1";
				" on t.id = op.consumer where t.del ='1' and op.status!= -1";
		if (org.apache.commons.lang3.StringUtils.isNoneBlank(doctor)){
		if (org.apache.commons.lang3.StringUtils.isNoneBlank(doctor)){
			sql+=" and op.doctor = '"+doctor+"'";
			sql+=" and op.doctor = '"+doctor+"'";
		}
		}
@ -4555,7 +4555,7 @@ public class ImService {
					"  t.mobile as \"mobile\"," +
					"  t.mobile as \"mobile\"," +
					"  op.doctor as \"doctor\"" +
					"  op.doctor as \"doctor\"" +
					" from wlyy_outpatient op left join  base_patient t " +
					" from wlyy_outpatient op left join  base_patient t " +
					" on t.id = op.patient where t.del ='1' and op.status!= -1";
					" on t.id = op.consumer where t.del ='1' and op.status!= -1";
			if (org.apache.commons.lang3.StringUtils.isNoneBlank(doctor)){
			if (org.apache.commons.lang3.StringUtils.isNoneBlank(doctor)){
				sql+=" and op.doctor = '"+doctor+"'";
				sql+=" and op.doctor = '"+doctor+"'";
			}
			}

+ 9 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -2102,12 +2102,16 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                                  @RequestParam(value = "status[]", required = false)String status,
                                                  @RequestParam(value = "status[]", required = false)String status,
                                                  @ApiParam(name = "isSelectDrug", value = "1查询处方药品1是0查询检查")
                                                  @ApiParam(name = "isSelectDrug", value = "1查询处方药品1是0查询检查")
                                                      @RequestParam(value = "isSelectDrug", required = false)String isSelectDrug,
                                                      @RequestParam(value = "isSelectDrug", required = false)String isSelectDrug,
                                                  @ApiParam(name = "patient", value = "患者id")
                                                      @RequestParam(value = "patient", required = false)String patient,
                                                  @ApiParam(name = "page", value = "第几页")
                                                  @ApiParam(name = "page", value = "第几页")
                                                  @RequestParam(value = "page",required = false,defaultValue = "1") Integer page,
                                                  @RequestParam(value = "page",required = false,defaultValue = "1") Integer page,
                                                  @ApiParam(name = "size", value = "页面大小")
                                                  @ApiParam(name = "size", value = "页面大小")
                                                  @RequestParam(value = "size",required = false,defaultValue = "10") Integer size)throws Exception {
                                                  @RequestParam(value = "size",required = false,defaultValue = "10") Integer size)throws Exception {
        try {
        try {
            String patient = getUID();
            if (!StringUtils.isNoneBlank(patient)){
                patient=getUID();
            }
            return prescriptionService.findPatientAllPrescription(keyName,status,page,size,patient,isSelectDrug);
            return prescriptionService.findPatientAllPrescription(keyName,status,page,size,patient,isSelectDrug);
        } catch (Exception e) {
        } catch (Exception e) {
            return PageEnvelop.getError(e.getMessage(),-1);
            return PageEnvelop.getError(e.getMessage(),-1);
@ -2404,14 +2408,16 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "startTime",defaultValue = "",required = false) String startTime,
            @RequestParam(value = "startTime",defaultValue = "",required = false) String startTime,
            @ApiParam(name = "endTime", value = "结束时间")
            @ApiParam(name = "endTime", value = "结束时间")
            @RequestParam(value = "endTime",defaultValue = "",required = false) String endTime,
            @RequestParam(value = "endTime",defaultValue = "",required = false) String endTime,
            @ApiParam(name = "checkStatus", value = "处方状态")
            @ApiParam(name = "checkStatus", value = "处方审核状态")
            @RequestParam(value = "checkStatus",defaultValue = "",required = false) String checkStatus,
            @RequestParam(value = "checkStatus",defaultValue = "",required = false) String checkStatus,
            @ApiParam(name = "status", value = "处方状态")
            @RequestParam(value = "status",defaultValue = "",required = false) String status,
            @ApiParam(name = "page", value = "页数")
            @ApiParam(name = "page", value = "页数")
            @RequestParam(value = "page",defaultValue = "",required = false) Integer page,
            @RequestParam(value = "page",defaultValue = "",required = false) Integer page,
            @ApiParam(name = "pageSize",value = "页大小")
            @ApiParam(name = "pageSize",value = "页大小")
            @RequestParam(value = "pageSize",defaultValue = "",required = false) Integer pageSize) throws Exception {
            @RequestParam(value = "pageSize",defaultValue = "",required = false) Integer pageSize) throws Exception {
        return prescriptionService.prescriptionManage(keyWord,doctorId,startTime,endTime,checkStatus,page,pageSize);
        return prescriptionService.prescriptionManage(keyWord,doctorId,startTime,endTime,checkStatus,status,page,pageSize);
    }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.disablePrescription)
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.disablePrescription)
    @ApiOperation(value = "作废处方")
    @ApiOperation(value = "作废处方")