diff OrthancServer/ServerIndex.cpp @ 2120:4b02ec79728a

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Nov 2016 11:19:19 +0100
parents 1824a02e0951
children 2ecc95a239f7
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Sun Nov 06 11:39:04 2016 +0100
+++ b/OrthancServer/ServerIndex.cpp	Mon Nov 07 11:19:19 2016 +0100
@@ -634,7 +634,7 @@
 
       // Create the instance
       int64_t instance = CreateResource(hasher.HashInstance(), ResourceType_Instance);
-      Toolbox::SetMainDicomTags(db_, instance, ResourceType_Instance, dicomSummary);
+      ServerToolbox::StoreMainDicomTags(db_, instance, ResourceType_Instance, dicomSummary);
 
       // Detect up to which level the patient/study/series/instance
       // hierarchy must be created
@@ -686,21 +686,21 @@
       if (isNewSeries)
       {
         series = CreateResource(hasher.HashSeries(), ResourceType_Series);
-        Toolbox::SetMainDicomTags(db_, series, ResourceType_Series, dicomSummary);
+        ServerToolbox::StoreMainDicomTags(db_, series, ResourceType_Series, dicomSummary);
       }
 
       // Create the study if needed
       if (isNewStudy)
       {
         study = CreateResource(hasher.HashStudy(), ResourceType_Study);
-        Toolbox::SetMainDicomTags(db_, study, ResourceType_Study, dicomSummary);
+        ServerToolbox::StoreMainDicomTags(db_, study, ResourceType_Study, dicomSummary);
       }
 
       // Create the patient if needed
       if (isNewPatient)
       {
         patient = CreateResource(hasher.HashPatient(), ResourceType_Patient);
-        Toolbox::SetMainDicomTags(db_, patient, ResourceType_Patient, dicomSummary);
+        ServerToolbox::StoreMainDicomTags(db_, patient, ResourceType_Patient, dicomSummary);
       }
 
       // Create the parent-to-child links
@@ -2180,7 +2180,7 @@
       assert(db_.GetResourceType(*it) == lookup.GetLevel());
       
       int64_t instance;
-      if (!Toolbox::FindOneChildInstance(instance, db_, *it, lookup.GetLevel()))
+      if (!ServerToolbox::FindOneChildInstance(instance, db_, *it, lookup.GetLevel()))
       {
         throw OrthancException(ErrorCode_InternalError);
       }