chenweida 7 gadi atpakaļ
vecāks
revīzija
39c7a9509e

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

@ -280,9 +280,9 @@ public class ConsultTeamService extends ConsultService {
//                member = doctorTeamDoctor.findDoctorJiating2ByTeam(doctorTeam.getCode(), 2);
//            }
        }
        if (member == null) {
            throw new Exception("找不到签约服务团队医生");
        }
//        if (member == null) {
//            throw new Exception("找不到签约服务团队医生");
//        }
        int count = consultTeamDao.countByPatient(patient, memberCode);
        return count > 0;
    }

+ 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){

+ 38 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -28,11 +28,11 @@ import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.app.message.MessageService;
import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.third.fzzb.HealthEducationArticleService;
import com.yihu.wlyy.service.third.jw.JwArchivesService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.task.SignUploadTask;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.web.third.gateway.controller.doctor.GcDoctorController;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
@ -139,6 +139,8 @@ public class FamilyContractService extends BaseService {
    private JwArchivesService jwArchivesService;
    @Autowired
    private FamilyContractService familyContractService;
    @Autowired
    private HealthEducationArticleService healthEducationArticleService;
    @Autowired
    private ImUtill ImUtill;
@ -368,6 +370,41 @@ public class FamilyContractService extends BaseService {
        return json;
    }
    /**
     * 查询集美医生主页信息
     *
     * @param doctor  医生标识
     * @param patient 患者标识
     * @return
     */
    public JSONObject findJiMeiDoctorMainPage(String patient, String doctor) {
        JSONObject json = new JSONObject();
        // 查询医生基本信息
        Doctor d = doctorDao.findByCode(doctor);
        json.put("doctor", d.getCode());
        json.put("evaluateScore", d.getEvaluateScore());
        json.put("name", d.getName());
        json.put("photo", d.getPhoto());
        json.put("sex", d.getSex());
        json.put("job", d.getJob());
        json.put("jobName", d.getJobName());
        json.put("hospital", d.getHospitalName());
        json.put("dept", d.getDeptName());
        json.put("intro", d.getIntroduce());
        json.put("expertise", d.getExpertise());
        json.put("level", d.getLevel());
        //获取健康文章
        com.alibaba.fastjson.JSONArray jsonArray = new com.alibaba.fastjson.JSONArray();
        try {
            jsonArray = healthEducationArticleService.getDoctorArticalByUserId(null,1,null,0,3,doctor);
        }catch (Exception e){
            logger.error("获取福州健康文章失败,"+e.getMessage());
        }
        json.put("healthEduArticles",jsonArray);
        return json;
    }
    /**
     * 查询患者与医生的签约信息
     *

+ 15 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java

@ -19,6 +19,7 @@ import com.yihu.wlyy.util.RSAUtils;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -222,6 +223,20 @@ public class FamilyContractController extends BaseController {
        }
    }
    @RequestMapping(value = "jimeiHomepage",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("集美家签医生主页")
    public String jimeiHomepage(@ApiParam(name = "doctor", value = "医生编码")
                                @RequestParam(value = "doctor", required = true) String doctor){
        try{
            JSONObject json = familyContractService.findJiMeiDoctorMainPage(getRepUID(), doctor);
            return write(200, "医生主页查询成功!", "data", json);
        }catch (Exception e){
            error(e);
            return error(-1, "医生主页查询失败!");
        }
    }
    /**
     * 与指定医生的签约状态查询接口
     *