changeset 5403:05cb668c5f3f

fix to keep backward behaviour when exporting a series archive
author Alain Mazy <am@osimis.io>
date Tue, 17 Oct 2023 06:46:32 +0200
parents bd3bae1525dd
children 7bae5f7ebe6a
files OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp OrthancServer/Sources/ServerJobs/ArchiveJob.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Mon Oct 16 17:31:50 2023 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Tue Oct 17 06:46:32 2023 +0200
@@ -627,7 +627,7 @@
       extended = false;
     }
 
-    std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, LEVEL));
+    std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, (LEVEL == ResourceType_Patient ? ResourceType_Patient : ResourceType_Study))); // use patient info from study except when exporting a patient
     job->AddResource(id, true, LEVEL);
 
     if (call.HasArgument(TRANSCODE))
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Mon Oct 16 17:31:50 2023 +0200
+++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp	Tue Oct 17 06:46:32 2023 +0200
@@ -1194,7 +1194,7 @@
                          bool enableExtendedSopClass,
                          ResourceType jobLevel) :
     context_(context),
-    archive_(new ArchiveIndex(GetArchiveResourceType(jobLevel))),  // root
+    archive_(new ArchiveIndex(GetArchiveResourceType(jobLevel))),  // get patient Info from this level
     isMedia_(isMedia),
     enableExtendedSopClass_(enableExtendedSopClass),
     currentStep_(0),