Mercurial > hg > orthanc
diff Plugins/Engine/OrthancPluginDatabase.cpp @ 1713:4db9200c7f46 db-changes
SetIdentifierTag
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Oct 2015 18:17:22 +0200 |
parents | 5ebd6cbb3da8 |
children | 2b812969e136 |
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPluginDatabase.cpp Fri Oct 16 17:36:59 2015 +0200 +++ b/Plugins/Engine/OrthancPluginDatabase.cpp Fri Oct 16 18:17:22 2015 +0200 @@ -711,18 +711,20 @@ tmp.element = tag.GetElement(); tmp.value = value.c_str(); - OrthancPluginErrorCode code; + CheckSuccess(backend_.setMainDicomTag(payload_, id, &tmp)); + } + - if (tag.IsIdentifier()) - { - code = backend_.setIdentifierTag(payload_, id, &tmp); - } - else - { - code = backend_.setMainDicomTag(payload_, id, &tmp); - } + void OrthancPluginDatabase::SetIdentifierTag(int64_t id, + const DicomTag& tag, + const std::string& value) + { + OrthancPluginDicomTag tmp; + tmp.group = tag.GetGroup(); + tmp.element = tag.GetElement(); + tmp.value = value.c_str(); - CheckSuccess(code); + CheckSuccess(backend_.setIdentifierTag(payload_, id, &tmp)); }