Mercurial > hg > orthanc
diff OrthancServer/ServerToolbox.cpp @ 1669:a412ad57f0f9 db-changes
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 01 Oct 2015 11:55:25 +0200 |
parents | de1413733c97 |
children | 0bbcfd9695e5 |
line wrap: on
line diff
--- a/OrthancServer/ServerToolbox.cpp Wed Sep 30 17:18:39 2015 +0200 +++ b/OrthancServer/ServerToolbox.cpp Thu Oct 01 11:55:25 2015 +0200 @@ -235,6 +235,32 @@ { // WARNING: The database should be locked with a transaction! + const char* plural = NULL; + + switch (level) + { + case ResourceType_Patient: + plural = "patients"; + break; + + case ResourceType_Study: + plural = "studies"; + break; + + case ResourceType_Series: + plural = "series"; + break; + + case ResourceType_Instance: + plural = "instances"; + break; + + default: + throw OrthancException(ErrorCode_InternalError); + } + + LOG(WARNING) << "Upgrade: Reconstructing the main DICOM tags of all the " << plural << "..."; + std::list<std::string> resources; database.GetAllPublicIds(resources, level);