# HG changeset patch # User Alain Mazy # Date 1737037150 -3600 # Node ID db4bae3749687d5a34826ea266a6c71ef908bb73 # Parent 34ba0344f24083dd9c2d40f195cf1692a1a63d83 fix diff -r 34ba0344f240 -r db4bae374968 OrthancServer/Sources/ServerJobs/ArchiveJob.cpp --- a/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp Thu Jan 16 12:16:35 2025 +0100 +++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp Thu Jan 16 15:19:10 2025 +0100 @@ -31,6 +31,7 @@ #include "../../../OrthancFramework/Sources/Logging.h" #include "../../../OrthancFramework/Sources/OrthancException.h" #include "../../../OrthancFramework/Sources/MultiThreading/Semaphore.h" +#include "../../../OrthancFramework/Sources/SerializationToolbox.h" #include "../OrthancConfiguration.h" #include "../ServerContext.h" #include "../SimpleInstanceOrdering.h" @@ -586,7 +587,20 @@ if (level_ == ArchiveResourceType_Instance) { - AddResourceToExpand(id); + std::string strIndexInSeries; + uint32_t indexInSeries = 0; + FileInfo fileInfo; + int64_t revisionNotUsed; + + if (index.LookupMetadata(strIndexInSeries, id, ResourceType_Instance, MetadataType_Instance_IndexInSeries)) + { + SerializationToolbox::ParseUnsignedInteger32(indexInSeries, strIndexInSeries); + } + + if (index.LookupAttachment(fileInfo, revisionNotUsed, ResourceType_Instance, id, FileContentType_Dicom)) + { + AddInstance(id, indexInSeries, fileInfo); + } } else if (resource.GetLevel() == GetResourceLevel(level_)) {