Explorar o código

续方咨询,导入问卷,只覆盖血糖血压,其他不覆盖

huangwenjie %!s(int64=7) %!d(string=hai) anos
pai
achega
db9fceca36

+ 27 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -1209,4 +1209,31 @@ public class FollowUpService extends BaseService {
        
        return result;
    }
    
    /**
     * 保存随访详情
     * @param followupContentESDO
     * @throws Exception
     */
    public void esSaveFollowupContentESDAO(FollowupContentESDO followupContentESDO)throws Exception{
        JestClient jestClient = null;
        try {
        
        
            jestClient = elasticFactory.getJestClient();
        
            List<FollowupContentESDO> dataList = new ArrayList<>();
            if(followupContentESDO != null){
                dataList.add(followupContentESDO);
                //删除原有记录
                this.esDeleteFollowUpContent(dataList);
            }
            elastricSearchSave.save(dataList, esIndex, esType);
        
        } finally {
            if (jestClient != null) {
                jestClient.shutdownClient();
            }
        }
    }
}

+ 35 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionFollowupContentService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.device.entity.DevicePatientHealthIndex;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.entity.followup.Followup;
import com.yihu.wlyy.entity.followup.FollowupDrugs;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
@ -358,7 +359,28 @@ public class PrescriptionFollowupContentService extends BaseService {
				imBloodSugarValue = obj.getString("value7");
			}
			
			followUpService.esSaveFollowupProjectData(followup_id, "3", followupProjectData);
			
			
			
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"3");
			
			if(followupContentESDO != null){
				followUpService.esSaveFollowupProjectData(followup_id, "3", followupProjectData);
			}else{
				FollowupContentESDO newfollowupContentESDO = JSON.parseObject(followupProjectData, FollowupContentESDO.class);
				if(StringUtils.isNotBlank(newfollowupContentESDO.getRANDOM_BLOOD_SUGAR())){
					followupContentESDO.setRANDOM_BLOOD_SUGAR(newfollowupContentESDO.getRANDOM_BLOOD_SUGAR());
				}
				
				if(StringUtils.isNotBlank(newfollowupContentESDO.getNO_BS_FPG())){
					followupContentESDO.setNO_BS_FPG(newfollowupContentESDO.getNO_BS_FPG());
				}
				
				if(StringUtils.isNotBlank(newfollowupContentESDO.getBS_FPG())){
					followupContentESDO.setBS_FPG(newfollowupContentESDO.getBS_FPG());
				}
				followUpService.esSaveFollowupContentESDAO(followupContentESDO);
			}
			
			//是否需要发送IM消息
			if(sendIM){
@ -490,7 +512,18 @@ public class PrescriptionFollowupContentService extends BaseService {
			org.json.JSONObject jsonObject = jsonArray.getJSONObject(0);
			
			followupProjectData = "{'BP_D':'"+jsonObject.getString("value1")+"','BP_U':'"+jsonObject.getString("value2")+"'}";
			followUpService.esSaveFollowupProjectData(followup_id, "2", followupProjectData);
			
			
			FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(followup_id,"2");
			
			if(followupContentESDO != null){
				followUpService.esSaveFollowupProjectData(followup_id, "2", followupProjectData);
			}else{
				followupContentESDO.setBP_D(jsonObject.getString("value1"));
				followupContentESDO.setBP_U(jsonObject.getString("value2"));
				followUpService.esSaveFollowupContentESDAO(followupContentESDO);
			}
			
			
			//是否需要发送IM消息
			if(sendIM){

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcEduArticleController.java

@ -1,7 +1,6 @@
package com.yihu.wlyy.web.third.gateway.controller.doctor;
import com.yihu.es.entity.HealthEduArticlePatient;
import com.yihu.es.entity.HealthEduArticlePatientESModel;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.app.consult.ConsultService;
import com.yihu.wlyy.service.common.account.PatientService;

+ 0 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/service/GcEduArticleService.java

@ -1,13 +1,10 @@
package com.yihu.wlyy.web.third.gateway.service;
//import com.yihu.es.entity.ArticleTest;
import com.alibaba.fastjson.JSONObject;
import com.yihu.es.entity.HealthEduArticlePatient;
import com.yihu.es.entity.HealthEduArticlePatientESModel;
import com.yihu.wlyy.config.es.ElastricSearchSave;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.education.HealthEduArticlePatientDao;
import com.yihu.wlyy.repository.patient.PatientDao;