diff OrthancServer/ServerIndex.cpp @ 1717:3926e6317a43 db-changes

SetIdentifierTagInternal
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Oct 2015 17:45:34 +0200
parents 2ca7888f8600
children 2b812969e136
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Sat Oct 17 12:16:27 2015 +0200
+++ b/OrthancServer/ServerIndex.cpp	Mon Oct 19 17:45:34 2015 +0200
@@ -873,29 +873,6 @@
   }
 
 
-  static std::string GetPatientIdOfStudy(IDatabaseWrapper& db,
-                                         int64_t resourceId)
-  {
-    int64_t patient;
-    if (!db.LookupParent(patient, resourceId))
-    {
-      throw OrthancException(ErrorCode_InternalError);
-    }
-
-    DicomMap tags;
-    db.GetMainDicomTags(tags, patient);
-
-    if (tags.HasTag(DICOM_TAG_PATIENT_ID))
-    {
-      return tags.GetValue(DICOM_TAG_PATIENT_ID).AsString();
-    }
-    else
-    {
-      return "";
-    }
-  }
-
-
   void ServerIndex::MainDicomTagsToJson(Json::Value& target,
                                         int64_t resourceId,
                                         ResourceType resourceType)
@@ -914,8 +891,6 @@
 
       target["PatientMainDicomTags"] = Json::objectValue;
       FromDcmtkBridge::ToJson(target["PatientMainDicomTags"], t2, true);
-
-      target["PatientMainDicomTags"]["PatientID"] = GetPatientIdOfStudy(db_, resourceId);
     }
     else
     {
@@ -2136,7 +2111,6 @@
       {
         case ResourceType_Patient:
           tmp.ExtractPatientInformation(result);
-          result.SetValue(DICOM_TAG_PATIENT_ID, GetPatientIdOfStudy(db_, id));
           return true;
 
         case ResourceType_Study: