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.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/server/src/pracrodaotest.cc b/server/src/pracrodaotest.cc
index 7e77eb5..45cafc7 100644
--- a/server/src/pracrodaotest.cc
+++ b/server/src/pracrodaotest.cc
@@ -45,16 +45,18 @@ PracroDAOTest::~PracroDAOTest()
DEBUG(db, "Delete test (memory only) database\n");
}
-void PracroDAOTest::commitTransaction(std::string user, std::string patientid,
- Macro &_macro, Fields &fields, time_t now)
+void PracroDAOTest::commitTransaction(Transaction &transaction,
+ Commit &commit,
+ Macro &_macro,
+ time_t now)
{
DEBUG(db, "(%s, %s, %s, <%u fields>, %ld)\n",
- user.c_str(),
- patientid.c_str(),
+ transaction.user.c_str(),
+ transaction.cpr.c_str(),
_macro.attributes["name"].c_str(),
- fields.size(),
+ commit.fields.size(),
now);
- if(fields.size() == 0) return;
+ if(commit.fields.size() == 0) return;
std::string version = _macro.attributes["version"];
std::string macro = _macro.attributes["name"];
@@ -62,16 +64,17 @@ void PracroDAOTest::commitTransaction(std::string user, std::string patientid,
dbrow_t t;
t["uid"] = data.trseq.nextval();
- t["patientid"] = patientid;
+ t["patientid"] = transaction.cpr;
+ t["template"] = commit.templ;
t["macro"] = macro;
t["version"] = version;
t["timestamp"] = timestamp.str();
- t["user"] = user;
+ t["user"] = transaction.user;
data.transactions.push_back(t);
// Iterate fields...
- Fields::iterator fi = fields.begin();
- while(fi != fields.end()) {
+ Fields::iterator fi = commit.fields.begin();
+ while(fi != commit.fields.end()) {
if(ignore_fieldnames == false) {
// Search for it in fieldnames table