Ver código fonte

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

chenweida 7 anos atrás
pai
commit
aaf061b9b9

+ 15 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowupDrugsService.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.service.app.followup;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.entity.dict.DmDrugsGroupItem;
import com.yihu.wlyy.entity.followup.FollowupContent;
import com.yihu.wlyy.entity.followup.FollowupDrugs;
@ -35,11 +36,11 @@ public class FollowupDrugsService extends BaseService {
	@Autowired
	private DmDrugsGroupItemDao dmDrugsGroupItemDao;
	@Autowired
	private SystemDictDao systemDictDao;
	@Autowired
	private ObjectMapper objectMapper;
	
	@Autowired
	private FollowUpService followUpService;
	private String drugsProject = "6";
@ -49,11 +50,18 @@ public class FollowupDrugsService extends BaseService {
	public Map<String,Object> getFollowupDrugs(String id) throws Exception
	{
		Map<String,Object> re = new HashMap<>();
		List<FollowupContent> dataList =  followupContentDao.findByFollowupIdAndFollowupProject(Long.valueOf(id),drugsProject);
		for(FollowupContent item:dataList)
		{
			re.put(item.getFollowupKey(),item.getFollowupValue());
		
		//2017-11-16 修改为从ES获取--huangwenjie
		FollowupContentESDO followupContentESDO = followUpService.esGetFollowupProjectData(id, "6");
		if(followupContentESDO != null){
			re.put("DRUG_COMPLIANCE_CODE",followupContentESDO.getDRUG_COMPLIANCE_CODE());
		}
		
//		List<FollowupContent> dataList =  followupContentDao.findByFollowupIdAndFollowupProject(Long.valueOf(id),drugsProject);
//		for(FollowupContent item:dataList)
//		{
//			re.put(item.getFollowupKey(),item.getFollowupValue());
//		}
		//获取用药记录
		List<FollowupDrugs> drugsList = followupDrugsDao.findByFollowupId(Long.valueOf(id));

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

@ -508,7 +508,6 @@ public class PrescriptionInfoService extends BaseService {
        String rs = jwPrescriptionService.getRecipe(code, p.getSsc());
        com.alibaba.fastjson.JSONObject r = presModeAdapter.modelToSinglePrescription(rs);
    
        Followup followup = followUpDao.getFollowupByPrescriptionCode(code);
        String rState = presCheckStateObj(code);
        if ("1".equals(rState)) {
            r.put("reviewedState", 1);
@ -516,8 +515,11 @@ public class PrescriptionInfoService extends BaseService {
        } else {
            r.put("reviewedState", 0);
            r.put("prescriptionCode", rState);
            
            Followup followup = followUpDao.getFollowupByPrescriptionCode(rState);
            r.put("followup",followup);
        }
        r.put("followup",followup);
        
        return r;
    }
@ -868,6 +870,9 @@ public class PrescriptionInfoService extends BaseService {
        } else {
            rs.put("prescriptionAdjust", "");
        }
    
        Followup followup = followUpDao.getFollowupByPrescriptionCode(code);
        rs.put("followup",followup);
        return rs;
    }