diff OrthancServer/ServerIndex.cpp @ 1823:0ef4e6e66b56

"Origin" metadata for the instances
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Nov 2015 10:32:54 +0100
parents 9ed9458aa44f
children e018037d4d0e
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Wed Nov 25 10:06:50 2015 +0100
+++ b/OrthancServer/ServerIndex.cpp	Wed Nov 25 10:32:54 2015 +0100
@@ -771,6 +771,12 @@
       db_.SetMetadata(instance, MetadataType_Instance_RemoteAet, instanceToStore.GetRemoteAet());
       instanceMetadata[MetadataType_Instance_RemoteAet] = instanceToStore.GetRemoteAet();
 
+      {
+        std::string s = EnumerationToString(instanceToStore.GetRequestOrigin());
+        db_.SetMetadata(instance, MetadataType_Instance_Origin, s);
+        instanceMetadata[MetadataType_Instance_Origin] = s;
+      }
+
       const DicomValue* value;
       if ((value = dicomSummary.TestAndGetValue(DICOM_TAG_INSTANCE_NUMBER)) != NULL ||
           (value = dicomSummary.TestAndGetValue(DICOM_TAG_IMAGE_INDEX)) != NULL)