|
@ -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);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|