コード例 #1
0
  /** Updates the cached lists of the dietTreatment */
  private void reloadTreatmentData() {
    if (_dietTreatment == null) return;
    _dietTreatment.updateContactJournalsCache();
    _dietTreatment.updateDietParametersCache();
    _dietTreatment.updateDietPlansCache();
    _dietTreatment.updatePatientStatesCache();
    _dietTreatment.updateSystemUsersCache();

    // load nutritionprotocols
    NutritionProtocolDAO dao = DAOFactory.getInstance().getNutritionProtocolDAO();
    List<NutritionProtocol> nps = dao.findByDietTreatment(_dietTreatment.getModel());
    _nutritionProtocols = new ArrayList<NutritionProtocolBO>();
    for (NutritionProtocol nutritionProtocol : nps) {
      _nutritionProtocols.add(new NutritionProtocolBO(nutritionProtocol));
    }
  }
コード例 #2
0
 /** Refreshes the currently loaded diet treatment and it's data. */
 public void refresh() {
   LOG.trace("Refreshing DietTreatment");
   DietTreatmentDAO dao = DAOFactory.getInstance().getDietTreatmentDAO();
   dao.refresh(_dietTreatment.getModel());
   reloadTreatmentData();
 }