summaryrefslogtreecommitdiff
path: root/server/src/pracrodaotest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/pracrodaotest.cc')
-rw-r--r--server/src/pracrodaotest.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/server/src/pracrodaotest.cc b/server/src/pracrodaotest.cc
index 86e5941..7e77eb5 100644
--- a/server/src/pracrodaotest.cc
+++ b/server/src/pracrodaotest.cc
@@ -37,23 +37,23 @@ PracroDAOTest::PracroDAOTest(Data &data, bool ignore_fieldnames)
{
this->data = data;
this->ignore_fieldnames = ignore_fieldnames;
- PRACRO_DEBUG(db, "New test (memory only) database\n");
+ DEBUG(db, "New test (memory only) database\n");
}
PracroDAOTest::~PracroDAOTest()
{
- PRACRO_DEBUG(db, "Delete test (memory only) database\n");
+ DEBUG(db, "Delete test (memory only) database\n");
}
void PracroDAOTest::commitTransaction(std::string user, std::string patientid,
Macro &_macro, Fields &fields, time_t now)
{
- PRACRO_DEBUG(db, "(%s, %s, %s, <%u fields>, %ld)\n",
- user.c_str(),
- patientid.c_str(),
- _macro.attributes["name"].c_str(),
- fields.size(),
- now);
+ DEBUG(db, "(%s, %s, %s, <%u fields>, %ld)\n",
+ user.c_str(),
+ patientid.c_str(),
+ _macro.attributes["name"].c_str(),
+ fields.size(),
+ now);
if(fields.size() == 0) return;
std::string version = _macro.attributes["version"];
@@ -107,10 +107,10 @@ Values PracroDAOTest::getLatestValues(std::string patientid, Macro *macro,
Fieldnames &fieldnames, time_t oldest)
{
std::string macro_name = macro ? macro->attributes["name"].c_str() : "(null)";
- PRACRO_DEBUG(db, "(%s, %s, <%u fieldnames>, %ld)\n",
- patientid.c_str(),
- macro_name.c_str(), fieldnames.size(),
- oldest);
+ DEBUG(db, "(%s, %s, <%u fieldnames>, %ld)\n",
+ patientid.c_str(),
+ macro_name.c_str(), fieldnames.size(),
+ oldest);
Values values;
// TODO: Take Macro* into account. If supplied (not NULL) the macro name, and
@@ -190,11 +190,11 @@ void PracroDAOTest::addFieldname(std::string name, std::string description)
" '" + W.esc(timestamp.str()) + "' "
")"
;
- PRACRO_DEBUG(sql, "Query: %s\n", ts.c_str());
+ DEBUG(sql, "Query: %s\n", ts.c_str());
pqxx::result R = W.exec(ts);
W.commit();
} catch (std::exception &e) {
- PRACRO_ERR_LOG(db, "Query failed: %s: %s\n", e.what(), ts.c_str());
+ ERR_LOG(db, "Query failed: %s: %s\n", e.what(), ts.c_str());
}
*/
}
@@ -209,11 +209,11 @@ void PracroDAOTest::delFieldname(std::string name)
pqxx::work W(*conn);
ts = "DELETE FROM fieldnames WHERE name="
"'" + W.esc(name) + "' ";
- PRACRO_DEBUG(sql, "Query: %s\n", ts.c_str());
+ DEBUG(sql, "Query: %s\n", ts.c_str());
pqxx::result R = W.exec(ts);
W.commit();
} catch (std::exception &e) {
- PRACRO_ERR_LOG(db, "Query failed: %s: %s\n", e.what(), ts.c_str());
+ ERR_LOG(db, "Query failed: %s: %s\n", e.what(), ts.c_str());
}
*/
}
@@ -228,7 +228,7 @@ std::vector<Fieldname> PracroDAOTest::getFieldnames()
try {
pqxx::work W(*conn);
query = "SELECT * FROM fieldnames";
- PRACRO_DEBUG(sql, "Query: %s\n", query.c_str());
+ DEBUG(sql, "Query: %s\n", query.c_str());
pqxx::result R = W.exec(query);
pqxx::result::const_iterator ri = R.begin();
while(ri != R.end()) {
@@ -240,7 +240,7 @@ std::vector<Fieldname> PracroDAOTest::getFieldnames()
ri++;
}
} catch (std::exception &e) {
- PRACRO_ERR_LOG(db, "Query failed: %s: %s\n", e.what(), query.c_str());
+ ERR_LOG(db, "Query failed: %s: %s\n", e.what(), query.c_str());
}
*/
return fieldnames;