comparison OrthancServer/DatabaseWrapper.cpp @ 1173:3b372ab992ec db-changes

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Sep 2014 13:53:21 +0200
parents 1ea4094d077c
children 5b2d8c280ac2
comparison
equal deleted inserted replaced
1172:059391d3f8df 1173:3b372ab992ec
558 DicomArray flattened(tags); 558 DicomArray flattened(tags);
559 for (size_t i = 0; i < flattened.GetSize(); i++) 559 for (size_t i = 0; i < flattened.GetSize(); i++)
560 { 560 {
561 if (flattened.GetElement(i).GetTag().IsIdentifier()) 561 if (flattened.GetElement(i).GetTag().IsIdentifier())
562 { 562 {
563 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO DicomIdentifiers VALUES(?, ?, ?, ?)");
564 SetMainDicomTagsInternal(s, id, flattened.GetElement(i));
565 }
566 else
567 {
563 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO MainDicomTags VALUES(?, ?, ?, ?)"); 568 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO MainDicomTags VALUES(?, ?, ?, ?)");
564 SetMainDicomTagsInternal(s, id, flattened.GetElement(i));
565 }
566 else
567 {
568 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO DicomIdentifier VALUES(?, ?, ?, ?)");
569 SetMainDicomTagsInternal(s, id, flattened.GetElement(i)); 569 SetMainDicomTagsInternal(s, id, flattened.GetElement(i));
570 } 570 }
571 } 571 }
572 } 572 }
573 573