コード例 #1
0
  /** The Role is used to determine which providers to report on. */
  public ProviderDataGrid getProviderDataGrid(Integer secRoleId) {

    long startTime = System.currentTimeMillis();

    ProviderDataGrid providerDataGrid = new ProviderDataGrid();

    SecRole secRole = secRoleDao.find(secRoleId);
    List<SecUserRole> secUserRoles = secUserRoleDao.getSecUserRolesByRoleName(secRole.getName());
    HashSet<String> providerNos = new HashSet<String>();
    for (SecUserRole secUserRole : secUserRoles) providerNos.add(secUserRole.getProviderNo());

    for (String providerNo : providerNos) {
      Provider provider = providerDao.getProvider(providerNo);
      if (provider != null) providerDataGrid.put(provider, getEncounterTypeDataGrid(provider));
      else
        logger.warn(
            "Provider doesn't exist but a secUserRole record does. providerNo=" + providerNo);
    }

    long totalTime = System.currentTimeMillis() - startTime;
    logger.debug("report generation in seconds : " + (totalTime / 1000));

    return (providerDataGrid);
  }
コード例 #2
0
  public List<SecRole> getSecRoles() {

    if (allRoles == null) allRoles = secRoleDao.findAll();
    return (allRoles);
  }