Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

liuwenbin %!s(int64=7) %!d(string=hai) anos
pai
achega
3cab24db65

+ 5 - 4
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/AsyncService.java

@ -584,7 +584,7 @@ public class AsyncService extends BaseService{
     * @param deviceType
     */
    @Async
    public void addIntegral(String deviceSn,String type,String userType,String patientCode,Integer deviceType){
    public void addIntegral(String deviceSn,String type,String userType,String patientCode,Integer deviceType,String uploadTime){
        try {
            SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
            String hospital = "";
@ -601,7 +601,8 @@ public class AsyncService extends BaseService{
            PatientDevice patientDevice = patientDeviceDao.findByDeviceSnAndCategoryCodeAndUserType(deviceSn,type,userType);
            boolean dataUoloadCount = true;
            if (patientDevice!=null){
                String today = DateUtil.getStringDateShort();
                //String today = DateUtil.getStringDateShort();
                uploadTime = uploadTime.substring(0,10);
                /*String startTime = today+" 00:00:00";
                String endTime = today+" 23:59:59";
                int dateType =1;
@ -616,10 +617,10 @@ public class AsyncService extends BaseService{
                //判断今天是否加过体征积分
                String urlSearch = wlyyService + "healthBank/selectByDate";
                List<NameValuePair> paramsSearch1 = new ArrayList<>();
                paramsSearch1.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"BP_MEASURE\",\"startTime\":\""+today+"\",\"endTime\":\""+today+"\",\"patientId\":\""+patientCode+"\"}"));
                paramsSearch1.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"BP_MEASURE\",\"startTime\":\""+uploadTime+"\",\"endTime\":\""+uploadTime+"\",\"patientId\":\""+patientCode+"\"}"));
                String responseSearch1 = HttpClientUtil.post(urlSearch, paramsSearch1, "UTF-8");
                List<NameValuePair> paramsSearch2 = new ArrayList<>();
                paramsSearch2.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"GLU_MEASURE\",\"startTime\":\""+today+"\",\"endTime\":\""+today+"\",\"patientId\":\""+patientCode+"\"}"));
                paramsSearch2.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"GLU_MEASURE\",\"startTime\":\""+uploadTime+"\",\"endTime\":\""+uploadTime+"\",\"patientId\":\""+patientCode+"\"}"));
                String responseSearch2 = HttpClientUtil.post(urlSearch, paramsSearch2, "UTF-8");
                com.alibaba.fastjson.JSONObject object1 = com.alibaba.fastjson.JSONObject.parseObject(responseSearch1);
                com.alibaba.fastjson.JSONObject object2 = com.alibaba.fastjson.JSONObject.parseObject(responseSearch2);

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

@ -2828,5 +2828,21 @@ public class ConsultTeamService extends ConsultService {
        re.put("list",ja);
        return re.toString();
    }
    
    //判断居民家庭医生专科是否有共管关系
    public int getSpecialDoctorFamilyDoctorPatientCount(String patient,String special_doctor,String family_doctor){
        String sql = "SELECT " +
                "count(a.id) FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
                "JOIN wlyy.wlyy_sign_family b " +
                "ON a.patient=b.patient " +
                "AND b.`status`=1 " +
                "WHERE a.sign_status> 0 " +
                "AND a.`status`>=0 " +
                "AND a.doctor='"+special_doctor+"' " +
                "AND (b.doctor='"+family_doctor+"' or b.doctor_health='"+family_doctor+"')" +
                "AND a.patient='"+patient+"'";
        int count = jdbcTemplate.queryForObject(sql,Integer.class);
        return  count;
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/disease/PatientDiseaseService.java

@ -504,7 +504,7 @@ public class PatientDiseaseService extends BaseService {
                "b.disease_name AS labelName," +
                "b.disease AS label " +
                "FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
                "JOIN wlyy.wlyy_patient_disease_server b ON a.patient=b.patient " +
                "JOIN wlyy.wlyy_patient_disease_server b ON a.patient=b.patient and b.del=1 " +
                "WHERE a.sign_status> 0 AND a.`status`>=0 " +
                "AND a.doctor='"+doctor+"' " +
                "GROUP BY b.disease";

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

@ -1223,10 +1223,17 @@ public class DoctorConsultController extends WeixinBaseController {
                                   @ApiParam(name = "sessionId", value = "会话id", defaultValue = "")
                                   @RequestParam(value = "sessionId", required = true) String sessionId,
                                   @ApiParam(name = "businessType", value = "businessType", defaultValue = "1")
                                   @RequestParam(value = "businessType", required = true) String businessType){
                                   @RequestParam(value = "businessType", required = true) String businessType,
                                   @ApiParam(name = "specialdoctor", value = "专科医生CODE", defaultValue = "")
                                   @RequestParam(value = "specialdoctor", required = true) String specialdoctor,
                                   @ApiParam(name = "familydoctor", value = "家庭医生CODE", defaultValue = "")
                                   @RequestParam(value = "familydoctor", required = true) String familydoctor){
        try {
            String doctorCode = getUID();
            Doctor doctor = doctorService.findDoctorByCode(doctorCode);
            //判断居民家庭医生专科是否有共管关系
            int count= consultTeamService.getSpecialDoctorFamilyDoctorPatientCount(patient,specialdoctor,familydoctor);
            Patient p = patientService.findByCode(patient);
            com.alibaba.fastjson.JSONObject content = new com.alibaba.fastjson.JSONObject();
            content.put("name",p.getName());
@ -1234,6 +1241,7 @@ public class DoctorConsultController extends WeixinBaseController {
            content.put("photo",p.getPhoto());
            content.put("age",IdCardUtil.getAgeForIdcard(p.getIdcard()));
            content.put("sex",IdCardUtil.getSexForIdcard(p.getIdcard()));
            content.put("count",count);//大于0的就有共管关系
            SignFamily signFamily = signFamilyDao.findByPatient(patient);
            if(signFamily!=null){
                content.put("hospitalName",signFamily.getHospitalName());