public ArrayList get(long drugID) throws IOException { load(); if (LOAD_INTO_MEMORY) return (ArrayList) doseMap.get(drugID); RcopiaDb db = user.getDb(DOSE_CHECK); String cond = DRUG_ID + "=" + drugID + " AND " + IS_MAINTENANCE_DOSE + "=" + Str.quote(Y); return db.getByConditions(cond); }
private static ArrayList getTestDescriptions(RcopiaUser user) throws IOException { RcopiaDb db = user.getDb(DRUG_HISTORY_ITEM); String cond = CREATEDDATE + "> sysdate-7"; db.setResultMax(100); ArrayList list = db.getByConditions(cond); ArrayList descriptions = new ArrayList(); if (list == null) return descriptions; Iterator iter = list.iterator(); while (iter.hasNext()) { RcopiaInfo info = (RcopiaInfo) iter.next(); String desc = info.getString(DRUG_NAME) + " " + info.getString("drug_strength_num") + " " + info.getString("drug_strength_unit_code"); descriptions.add(desc); } return descriptions; }