| 
					
				 | 
			
			
				@ -411,7 +411,6 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("查询居民随访记录,开始时间"+startdate+",结束时间:"+enddate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String url = jwUrl + "/third/sign/getEhrChroDaysFollowUpInfoRecord"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<NameValuePair> params = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.add(new BasicNameValuePair("TIME_START", startdate));//开始时间 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -431,7 +430,6 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(1 == jwCode){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONArray dataArray = jwData.getJSONArray("DATA"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    for (int i = 0; i < dataArray.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        Followup followup = new Followup(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        JSONObject json = dataArray.getJSONObject(i); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -457,7 +455,6 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followup.setDataFrom(dataFrom); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String followupDate = json.getString("THIS_FOLLOWUP_VISIT_DATE");//随访时间:此次随访时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followup.setFollowupDate(DateUtil.strToDate(followupDate)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String followupPlanDate = "";//随访计划时间 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -473,17 +470,14 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        //医院映射 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        HospitalMapping hm = hospitalMappingDao.getCodeByMapping(orgCode, "1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (hm == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            logger.info("no mapping hospital:" + orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            throw new Exception("no mapping hospital:" + orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        //医生映射 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        Doctor doctor = doctorDao.findMappingDoctor(jwdoctorCode, orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (doctor == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            logger.info("no mapping hospital:" + orgCode + ",familyDoctor:" + jwdoctorCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                            throw new Exception("no mapping hospital:" + orgCode + ",familyDoctor:" + jwdoctorCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String doctorCode = doctor.getCode();//医生CODE 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -627,7 +621,6 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent8.put("HEALTH_EDUCATE",json.getString("HEALTH_EDUCATE"));//健康教育【CHRO_HEALTH_EDUCATE_DICT】 V19 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent8.put("EDUCATE_CONTENT",json.getString("EDUCATE_CONTENT"));//健康教育内容 V20 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        //转诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent9.put("DRUG_ADVERSE_MARK",json.getString("DRUG_ADVERSE_MARK"));//药物不良反应【0.无;1.有;】 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent9.put("ADR_REMARK",json.getString("ADR_REMARK"));//药物不良反应【内容】 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -636,22 +629,17 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent9.put("REFUSE_REFERRAL",json.getString("REFUSE_REFERRAL"));//患者拒绝转诊【0 否 1 是】 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent9.put("REFUSE_REFERRAL_WHY",json.getString("REFUSE_REFERRAL_WHY"));//患者拒绝转诊内容 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        //多余字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent10.put("ARCHIVE_ID",json.getString("ARCHIVE_ID"));//档案ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent10.put("CHECK_FEE_TYPE",json.getString("CHECK_FEE_TYPE"));//检测费用类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        followupContent10.put("FAMILY_FOLLOWUP_ID",json.getString("FAMILY_FOLLOWUP_ID"));//随访细表外键随访ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        DefaultTransactionDefinition def = new DefaultTransactionDefinition(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); // 事物隔离级别,开启新事务 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        TransactionStatus transactionStatus = transactionManager.getTransaction(def); // 获得事务状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            followup = followUpDao.save(followup); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Long followupId = followup.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //删除原有记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            followupContentDao.deleteByFollowupId(followup.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //组装数据 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -813,4 +801,10 @@ public class JwPrescriptionService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new Exception("同步随访信息报错请求失败,无数据返回!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     *上传居民随访记录到基卫 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void uploadFollowUpRecordToJW() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |