diff OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp @ 5401:fc604681e6be

When exporting a study archive, make sure to use the PatientName from the study and not from the patient in case of PatientID collision
author Alain Mazy <am@osimis.io>
date Mon, 16 Oct 2023 17:30:40 +0200
parents 0ea402b4d901
children 05cb668c5f3f
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Mon Oct 16 11:14:11 2023 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp	Mon Oct 16 17:30:40 2023 +0200
@@ -556,7 +556,7 @@
       GetJobParameters(synchronous, extended, transcode, transferSyntax,
                        priority, loaderThreads, body, DEFAULT_IS_EXTENDED);
       
-      std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended));
+      std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, ResourceType_Patient));
       AddResourcesOfInterest(*job, body);
 
       if (transcode)
@@ -627,7 +627,7 @@
       extended = false;
     }
 
-    std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended));
+    std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, LEVEL));
     job->AddResource(id, true, LEVEL);
 
     if (call.HasArgument(TRANSCODE))
@@ -679,7 +679,7 @@
       GetJobParameters(synchronous, extended, transcode, transferSyntax,
                        priority, loaderThreads, body, false /* by default, not extented */);
       
-      std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended));
+      std::unique_ptr<ArchiveJob> job(new ArchiveJob(context, IS_MEDIA, extended, LEVEL));
       job->AddResource(id, true, LEVEL);
 
       if (transcode)