Example #1
0
  /** programId is ignored for now as oscar doesn't support it yet. */
  public List<Prevention> getPreventionsByProgramProviderDemographicDate(
      LoggedInInfo loggedInInfo,
      Integer programId,
      String providerNo,
      Integer demographicId,
      Calendar updatedAfterThisDateExclusive,
      int itemsToReturn) {
    List<Prevention> results =
        preventionDao.findByProviderDemographicLastUpdateDate(
            providerNo, demographicId, updatedAfterThisDateExclusive.getTime(), itemsToReturn);

    LogAction.addLogSynchronous(
        loggedInInfo,
        "PreventionManager.getUpdatedAfterDate",
        "programId="
            + programId
            + ", providerNo="
            + providerNo
            + ", demographicId="
            + demographicId
            + ", updatedAfterThisDateExclusive="
            + updatedAfterThisDateExclusive.getTime());

    return (results);
  }
Example #2
0
  public List<EFormData> findByDemographicId(LoggedInInfo loggedInInfo, Integer demographicId) {
    List<EFormData> results = eFormDataDao.findByDemographicId(demographicId);
    if (results.size() > 0) {
      String resultIds = EForm.getIdsAsStringList(results);
      LogAction.addLogSynchronous(
          loggedInInfo, "FormsManager.findByDemographicId", "ids returned=" + resultIds);
    }

    return (results);
  }
Example #3
0
  /**
   * get eform in group by group name
   *
   * @param groupName
   * @return list of EForms
   */
  public List<EForm> getEfromInGroupByGroupName(LoggedInInfo loggedInInfo, String groupName) {
    List<EForm> results = eformDao.getEfromInGroupByGroupName(groupName);
    if (results.size() > 0) {
      String resultIds = EForm.getIdsAsStringList(results);
      LogAction.addLogSynchronous(
          loggedInInfo, "FormsManager.getEfromInGroupByGroupName", "ids returned=" + resultIds);
    }

    return (results);
  }
Example #4
0
  public Prevention getPrevention(LoggedInInfo loggedInInfo, Integer id) {
    Prevention result = preventionDao.find(id);

    // --- log action ---
    if (result != null) {
      LogAction.addLogSynchronous(loggedInInfo, "PreventionManager.getPrevention", "id=" + id);
    }

    return (result);
  }
Example #5
0
  public List<PreventionExt> getPreventionExtByPrevention(
      LoggedInInfo loggedInInfo, Integer preventionId) {
    List<PreventionExt> results = preventionExtDao.findByPreventionId(preventionId);

    LogAction.addLogSynchronous(
        loggedInInfo,
        "PreventionManager.getPreventionExtByPrevention",
        "preventionId=" + preventionId);

    return (results);
  }
Example #6
0
  public List<Prevention> getPreventionsByDemographicNo(
      LoggedInInfo loggedInInfo, Integer demographicNo) {
    List<Prevention> results = preventionDao.findUniqueByDemographicId(demographicNo);

    LogAction.addLogSynchronous(
        loggedInInfo,
        "PreventionManager.getPreventionsByDemographicNo",
        "demographicNo=" + demographicNo);

    return (results);
  }
Example #7
0
  /**
   * Finds all eforms based on the status.
   *
   * @param status Status to be used when looking up forms.
   * @param sortOrder Order how records should be sorted. Providing no sort order delegates to the
   *     default sorting order of the persistence provider
   * @return Returns the list of all forms with the specified status.
   */
  public List<EForm> findByStatus(
      LoggedInInfo loggedInInfo, boolean status, EFormSortOrder sortOrder) {
    List<EForm> results = eformDao.findByStatus(status, sortOrder);

    if (results.size() > 0) {
      String resultIds = EForm.getIdsAsStringList(results);
      LogAction.addLogSynchronous(
          loggedInInfo, "FormsManager.findByStatus", "ids returned=" + resultIds);
    }

    return (results);
  }
Example #8
0
  public List<Prevention> getUpdatedAfterDate(
      LoggedInInfo loggedInInfo, Date updatedAfterThisDateExclusive, int itemsToReturn) {
    List<Prevention> results =
        preventionDao.findByUpdateDate(updatedAfterThisDateExclusive, itemsToReturn);

    LogAction.addLogSynchronous(
        loggedInInfo,
        "PreventionManager.getUpdatedAfterDate",
        "updatedAfterThisDateExclusive=" + updatedAfterThisDateExclusive);

    return (results);
  }