| 
					
				 | 
			
			
				@ -827,6 +827,50 @@ public class SignPatientLabelInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return labels; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 查询某个患者的某个类型的标签 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient   患者code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param labelType 标签类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONArray getPatientLabelByLabelTypeAndTeamCode(String patient, String labelType,Long teamCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<SignPatientLabelInfo> labels = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray result =  new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isEmpty(labelType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            labels = labelInfoDao.findByPatientAndStatus(patient, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            labels = labelInfoDao.findByPatientAndLabelTypeAndStatus(patient, labelType, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(labels != null && labels.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (SignPatientLabelInfo label : labels) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject json = new JSONObject(label); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (label.getLabelType().equals("4") && !label.getLabel().equals("1") && !label.getLabel().equals("2")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (teamCode != null && teamCode > 0 && teamCode != lb.getTeamCode()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    AdminTeam team = adminTeamService.getTeam(lb.getTeamCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Doctor doc = doctorDao.findByCode(lb.getCreator()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("teamCode", team.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("teamName", team.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("creator", lb.getCreator()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("creatorName", doc.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                result.put(json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 根据患者姓名或标签名称查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 |