Browse Source

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

yeshijie 7 years ago
parent
commit
1005dd0e26

+ 18 - 25
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/DeviceService.java

@ -904,34 +904,27 @@ public class DeviceService {
     * @param patient
     */
    private void sendPrescriptionHealthIndexMsgresult(PatientHealthIndex result, Patient patient) {
        
        List<ConsultTeam> consultTeams = consultTeamDao.findUnfinishedConsult(patient.getCode());
    
        if(1 == result.getType()){
            for (ConsultTeam consultTeam:consultTeams) {
                if(1 == consultTeam.getHealthindexType() || 3 == consultTeam.getHealthindexType()){
                    org.json.JSONObject contentPatient = new org.json.JSONObject();
                    //患者发送的消息
                    contentPatient.put("title", "【本消息为系统提醒】:");
                    contentPatient.put("tzMsg", "体征记录:血糖 "+result.getValue1());
                    contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                    contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以自动填入本次随访记录");
                    //患者发送Im消息
                    ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
                }
            }
        }else if(2 == result.getType()){
            for (ConsultTeam consultTeam:consultTeams) {
                if(2 == consultTeam.getHealthindexType() || 3 == consultTeam.getHealthindexType()){
                    org.json.JSONObject contentPatient = new org.json.JSONObject();
                    //患者发送的消息
                    contentPatient.put("title", "【本消息为系统提醒】:");
        for (ConsultTeam consultTeam:consultTeams) {
            if(consultTeam.getHealthindexType() != null){
                org.json.JSONObject contentPatient = new org.json.JSONObject();
                //患者发送的消息
                contentPatient.put("title", "【本消息为系统提醒】:");
                if(1 == result.getType()){
                    contentPatient.put("tzMsg", "体征记录:血糖 "+result.getValue1()+" mmol/L");
                    contentPatient.put("type",2);
                }else if(2 == result.getType()){
                    contentPatient.put("tzMsg", "体征记录:血压 "+result.getValue1()+"/"+result.getValue2()+" mmHg");
                    contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                    contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以自动填入本次随访记录");
                    //患者发送Im消息
                    ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
                }
                    contentPatient.put("type",1);
                }else{}
            
                contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以");
                contentPatient.put("needUpload","false");
            
                //患者发送Im消息
                ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
            }
        }

+ 18 - 29
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -910,39 +910,28 @@ public class PatientHealthIndexService extends BaseService {
    private void sendPrescriptionHealthIndexMsgresult(DevicePatientHealthIndex result, Patient patient) {
        
        List<ConsultTeam> consultTeams = consultTeamDao.findUnfinishedConsultPrescription(patient.getCode());
        
        if(1 == result.getType()){
            for (ConsultTeam consultTeam:consultTeams) {
                if(1 == consultTeam.getHealthindexType() || 3 == consultTeam.getHealthindexType()){
                    org.json.JSONObject contentPatient = new org.json.JSONObject();
                    //患者发送的消息
                    contentPatient.put("title", "【本消息为系统提醒】:");
    
        for (ConsultTeam consultTeam:consultTeams) {
            if(consultTeam.getHealthindexType() != null){
                org.json.JSONObject contentPatient = new org.json.JSONObject();
                //患者发送的消息
                contentPatient.put("title", "【本消息为系统提醒】:");
                if(1 == result.getType()){
                    contentPatient.put("tzMsg", "体征记录:血糖 "+result.getValue1()+" mmol/L");
                    contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                    contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以");
                    contentPatient.put("needUpload","false");
                    contentPatient.put("type",1);
                    //患者发送Im消息
                    ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
                }
            }
        }else if(2 == result.getType()){
            for (ConsultTeam consultTeam:consultTeams) {
                if(2 == consultTeam.getHealthindexType() || 3 == consultTeam.getHealthindexType()){
                    org.json.JSONObject contentPatient = new org.json.JSONObject();
                    //患者发送的消息
                    contentPatient.put("title", "【本消息为系统提醒】:");
                    contentPatient.put("tzMsg", "体征记录:血压 "+result.getValue1()+"/"+result.getValue2()+" mmHg");
                    contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                    contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以");
                    contentPatient.put("needUpload","false");
                    contentPatient.put("type",2);
                    //患者发送Im消息
                    ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
                }
                }else if(2 == result.getType()){
                    contentPatient.put("tzMsg", "体征记录:血压 "+result.getValue1()+"/"+result.getValue2()+" mmHg");
                    contentPatient.put("type",1);
                }else{}
                
                contentPatient.put("tzTime", "检测时间:"+DateUtil.dateToStrLong(result.getRecordDate()));
                contentPatient.put("tzAlert","温馨提示:本条体征为居民上传的健康体征数据,您可以");
                contentPatient.put("needUpload","false");
                
                //患者发送Im消息
                ImUtill.sendTopicIM(patient.getCode(), patient.getName(), consultTeam.getConsult(), "16", contentPatient.toString(), null);
            }
        }
        
    }
    /**