# HG changeset patch # User Sebastien Jodogne # Date 1478515900 -3600 # Node ID 1cf093cbdad8f5dc78cb4c01f7c16ed1a6259dcc # Parent 2ecc95a239f70a5fde84183291bb3c90982beaca cleaning up diff -r 2ecc95a239f7 -r 1cf093cbdad8 OrthancServer/ServerToolbox.cpp --- a/OrthancServer/ServerToolbox.cpp Mon Nov 07 11:33:18 2016 +0100 +++ b/OrthancServer/ServerToolbox.cpp Mon Nov 07 11:51:40 2016 +0100 @@ -237,6 +237,30 @@ } + static void StoreIdentifiers(IDatabaseWrapper& database, + int64_t resource, + ResourceType level, + const DicomMap& map) + { + const DicomTag* tags; + size_t size; + + LoadIdentifiers(tags, size, level); + + for (size_t i = 0; i < size; i++) + { + const DicomValue* value = map.TestAndGetValue(tags[i]); + if (value != NULL && + !value->IsNull() && + !value->IsBinary()) + { + std::string s = NormalizeIdentifier(value->GetContent()); + database.SetIdentifierTag(resource, tags[i], s); + } + } + } + + void StoreMainDicomTags(IDatabaseWrapper& database, int64_t resource, ResourceType level, @@ -466,29 +490,5 @@ return false; } - - - void StoreIdentifiers(IDatabaseWrapper& database, - int64_t resource, - ResourceType level, - const DicomMap& map) - { - const DicomTag* tags; - size_t size; - - LoadIdentifiers(tags, size, level); - - for (size_t i = 0; i < size; i++) - { - const DicomValue* value = map.TestAndGetValue(tags[i]); - if (value != NULL && - !value->IsNull() && - !value->IsBinary()) - { - std::string s = NormalizeIdentifier(value->GetContent()); - database.SetIdentifierTag(resource, tags[i], s); - } - } - } } } diff -r 2ecc95a239f7 -r 1cf093cbdad8 OrthancServer/ServerToolbox.h --- a/OrthancServer/ServerToolbox.h Mon Nov 07 11:33:18 2016 +0100 +++ b/OrthancServer/ServerToolbox.h Mon Nov 07 11:51:40 2016 +0100 @@ -68,11 +68,6 @@ bool IsIdentifier(const DicomTag& tag, ResourceType level); - void StoreIdentifiers(IDatabaseWrapper& database, - int64_t resource, - ResourceType level, - const DicomMap& map); - std::string NormalizeIdentifier(const std::string& value); } }