diff OrthancServer/ServerJobs/SplitStudyJob.cpp @ 2847:2da68edacab6

unit testing of SplitStudyJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 28 Sep 2018 19:17:04 +0200
parents d386abc18133
children 8b00e4cb4a6b
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/SplitStudyJob.cpp	Fri Sep 28 18:36:20 2018 +0200
+++ b/OrthancServer/ServerJobs/SplitStudyJob.cpp	Fri Sep 28 19:17:04 2018 +0200
@@ -242,6 +242,23 @@
   }
 
 
+  bool SplitStudyJob::LookupTargetSeriesUid(std::string& uid,
+                                            const std::string& series) const
+  {
+    SeriesUidMap::const_iterator found = seriesUidMap_.find(series);
+
+    if (found == seriesUidMap_.end())
+    {
+      return false;
+    }
+    else
+    {
+      uid = found->second;
+      return true;
+    }
+  }
+
+
   void SplitStudyJob::Remove(const DicomTag& tag)
   {
     if (IsStarted())
@@ -265,6 +282,23 @@
     CheckAllowedTag(tag);
     replacements_[tag] = value;
   }
+
+
+  bool SplitStudyJob::LookupReplacement(std::string& value,
+                                        const DicomTag& tag) const
+  {
+    Replacements::const_iterator found = replacements_.find(tag);
+
+    if (found == replacements_.end())
+    {
+      return false;
+    }
+    else
+    {
+      value = found->second;
+      return true;
+    }
+  }
   
     
   void SplitStudyJob::GetPublicContent(Json::Value& value)