| 
					
				 | 
			
			
				@ -135,6 +135,18 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject findPatientById(String patientId,String isCapacity) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject res = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BasePatientDO patientDO = patientDao.findById(patientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(patientDO.getArchiveType()!=null&&patientDO.getArchiveType()==3){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //老人亲属 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String sql = "SELECT p.* from base_patient p, base_patient_family_member m " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "WHERE p.id = m.family_member  and m.patient = '"+patientId+"' and p.del = '1' " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "ORDER BY p.login_date desc LIMIT 1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<BasePatientDO> patientDOs = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(BasePatientDO.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            res.put("agentPatient",patientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            patientDO = patientDOs.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            patientId = patientDO.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            res.put("agentPatient",null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (patientDO.getArchiveStatus()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            patientDO.setArchiveStatusName(dictService.fingByNameAndCode(ConstantUtil.DICT_ARCHIVESTATUS,String.valueOf(patientDO.getArchiveStatus()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 |