| 
					
				 | 
			
			
				@ -8,6 +8,7 @@ import com.yihu.jw.dict.dao.DictHospitalDeptDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorRoleDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.BaseJobCategoryDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.DictHospitalDeptDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.DictIcd10DO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorDO; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -79,6 +80,8 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private final static String jdbcUrl="http://192.168.33.197:10023/ykyy/jdbcSQLQuery"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private final static String updateJdxx="http://192.168.33.197:10023/ykyy/updateJdxx"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private final static String orgCode ="350211A5004"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private final static String orgName ="厦门大学附属厦门眼科中心"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -131,8 +134,6 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private JdbcTemplate jdbcTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DictDoctorDutyDao dictDoctorDutyDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BasePatientMedicareCardDao patientMedicareCardDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private WlyyInspectionDao wlyyInspectionDao; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3027,6 +3028,55 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String selectByAddress(String cardNo) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String address = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray array = new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "SELECT brid as \"brid\",lxdz as \"lxdz\" from portal_his.V_ZKSG_BRCX@xec_link where jzkh = '"+cardNo+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("sql",sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        HttpResponse response = HttpUtils.doGet(url,params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String content = response.getContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("response:"+content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject rs = JSON.parseObject(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer status = rs.getInteger("status"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (status==200){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            array = rs.getJSONArray("detailModelList"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (array!=null&&array.size()!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject object = array.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                address=object.getString("lxdz"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return  address; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 通过卡号更新患者信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void updatePatientJd(String patient,String address,String phone,Float zy, boolean demoFlag) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BasePatientDO basePatientDO = basePatientDao.findById(patient); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patient,"1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray jsonArray = findHisPatient(patientMedicareCardDO.getCode(),demoFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(jsonArray!=null&&jsonArray.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //获取居民信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject json = jsonArray.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String brid = json.getString("brid"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Float id = Float.parseFloat(brid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("brid",id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("sfzh",basePatientDO.getIdcard()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("lxdh",phone); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("lxdz",address); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("zy",zy); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            HttpResponse response = HttpUtils.doGet(updateJdxx,params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("更新患者信息"+response); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String saveJdxx(String brxm,String csny,Float brxb,String czgh,String sfzh,Float sjhm,String ybkh,String lxdz,Float zy){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return  hibenateUtils.saveJdxx(brxm,DateUtil.strToDateShort(csny),brxb,czgh,sfzh,sjhm,ybkh,lxdz,zy); 
			 |