private void addNodeResult(PatientSearchResults patientSearchResults) {

    NodeTableWrapper foundWrapper = null;

    for (NodeTableWrapper wrapperIter : nodeTableWrappers) {
      if (wrapperIter.getNBIANode().getURL().equals(patientSearchResults.getNode().getURL())) {
        foundWrapper = wrapperIter;
        break;
      }
    }

    foundWrapper.setPatientSearchResults(patientSearchResults);
  }
  /**
   * Sets the patient results. This is really an important method.... it is called by the bean that
   * initiates the search.... it is set here so the results can ultimately be displayed.
   *
   * <p>This is only for synchronous searches (ispy and dynamic search)
   */
  public void setPatientResults(List<PatientSearchResult> results) {
    // set text to false so solr search does not interfere with anything else
    isTextResult = false;
    if (results != null) {
      List<PatientResultWrapper> patientResultsWrapperList = new ArrayList<PatientResultWrapper>();
      for (PatientSearchResult result : results) {
        patientResultsWrapperList.add(new PatientResultWrapper(result));
      }

      nodeTableWrappers = new ArrayList<NodeTableWrapper>(1);
      NodeTableWrapper nodeTableWrapper = new NodeTableWrapper(LocalNode.getLocalNode(), this);
      PatientSearchResults psr =
          new PatientSearchResults(
              LocalNode.getLocalNode(), results.toArray(new PatientSearchResult[] {}));
      nodeTableWrapper.setPatientSearchResults(psr);
      nodeTableWrappers.add(nodeTableWrapper);
    } else {
      nodeTableWrappers = null;
    }
  }