Просмотр исходного кода

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 лет назад
Родитель
Сommit
504a5f43ae

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -2672,4 +2672,18 @@ public class ConsultTeamService extends ConsultService {
//        //居民发送Im消息
//        ImUtill.sendTopicIM(prescription.getPatient(), prescription.getPatientName(), prescription.getConsult(), "17", contentobj.toString(), null);
    }
    /**
     * 根据续方code获取咨询
     * @param prescriptionCode
     * @return
     */
    public ConsultTeam getConsultStatus(String prescriptionCode){
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        if(prescription!=null){
            return consultTeamDao.findByConsult(prescription.getConsult());
        }
        return null;
    }
}

+ 5 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -8,7 +8,6 @@ import com.yihu.wlyy.entity.doctor.scheme.DoctorSchemeBloodPressure;
import com.yihu.wlyy.entity.doctor.scheme.DoctorSchemeBloodSugger;
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodPressureVO;
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodSuggerVO;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientSchemeList;
import com.yihu.wlyy.entity.patient.vo.PatientVO;
import com.yihu.wlyy.health.repository.DevicePatientHealthIndexDao;
@ -80,7 +79,7 @@ public class DoctorSchemeService {
        if(-1 != deviceType){
            sql = sql + " LEFT JOIN wlyy_patient_device dev on dev.user = p.code ";
        }
    
        sql = sql+ " RIGHT JOIN wlyy_sign_patient_label_info sp on sp.patient = p.code and sp.status =1 ";
        sql = sql+ " LEFT JOIN wlyy_sign_family sf on sf.patient = p.code where sf.admin_team_code = "+teamCode;
@ -394,7 +393,7 @@ public class DoctorSchemeService {
    public JSONObject getSlowDiseaseTeaminfos(String teamCode, int getcolor, int getstands, int gethealthindex, String startdate, String enddate,String doctorcode) throws Exception{
//        List<Patient> patients = patientDao.findAllSignPatientTeamcode(teamCode,doctorcode);
    
        List<PatientVO> patients = new ArrayList<>();
        String patientsql = "select p.*,b.deviceType as deviceType,group_concat(sp.label) diseaseType from wlyy_patient p " +
                "  LEFT JOIN wlyy_sign_family s on s.patient = p.code " +
@ -403,8 +402,8 @@ public class DoctorSchemeService {
                "WHERE s.status > 0 and s.admin_team_code ='"+teamCode+"' and (s.doctor = '"+doctorcode+"' or s.doctor_health ='"+doctorcode+"') GROUP BY p.code";
        patients= jdbcTemplate.query(patientsql,new BeanPropertyRowMapper(PatientVO.class));
        
        
        JSONObject result = new JSONObject();
        JSONObject green = new JSONObject();//绿标
@ -462,7 +461,7 @@ public class DoctorSchemeService {
                            bloodpressure_patientcodes.add(patient.getCode());
                        }
                        if( "2" == patient.getDisease() || "1,2".equals(patient.getDisease()) || "2,1".equals(patient.getDisease())){
                        if( "2".equals(patient.getDisease()) || "1,2".equals(patient.getDisease()) || "2,1".equals(patient.getDisease())){
                            bloodsugar_patientcodes.add(patient.getCode());
                        }
                    }

+ 18 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -772,6 +772,24 @@ public class DoctorConsultController extends WeixinBaseController {
        }
    }
    @ApiOperation("咨询是否结束")
    @RequestMapping(value = "/getConsultStatusByPrescription",method = RequestMethod.GET)
    @ResponseBody
    public String getConsultStatusByPrescription(@ApiParam(name = "prescriptionCode", value = "续方code")
                                                 @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode){
        try {
            ConsultTeam consultTeam =  consultTeamService.getConsultStatus(prescriptionCode);
            if(consultTeam!=null){
                return write(200, "查询成功", "data", consultTeam.getStatus());
            }else {
                return error(-1, "咨询不存在");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
     * 查询与某个医生是否存在未结束的咨询