diff OrthancServer/Sources/Database/OrthancIdentifiers.cpp @ 5748:4bc650d88463 find-refactoring

WIP: started to implement IntegratedFind in SQLite
author Alain Mazy <am@orthanc.team>
date Fri, 30 Aug 2024 18:03:37 +0200
parents 359a8adb3802
children
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/OrthancIdentifiers.cpp	Mon Sep 02 17:17:22 2024 +0200
+++ b/OrthancServer/Sources/Database/OrthancIdentifiers.cpp	Fri Aug 30 18:03:37 2024 +0200
@@ -165,23 +165,23 @@
     {
       return ResourceType_Patient;
     }
-    else if (HasPatientId() &&
+    else if (// HasPatientId() &&
              HasStudyId() &&
              !HasSeriesId() &&
              !HasInstanceId())
     {
       return ResourceType_Study;
     }
-    else if (HasPatientId() &&
-             HasStudyId() &&
+    else if (// HasPatientId() &&
+             // HasStudyId() &&
              HasSeriesId() &&
              !HasInstanceId())
     {
       return ResourceType_Series;
     }
-    else if (HasPatientId() &&
-             HasStudyId() &&
-             HasSeriesId() &&
+    else if (// HasPatientId() &&
+             // HasStudyId() &&
+             // HasSeriesId() &&
              HasInstanceId())
     {
       return ResourceType_Instance;
@@ -240,4 +240,9 @@
         throw OrthancException(ErrorCode_ParameterOutOfRange);
     }
   }
+
+  bool OrthancIdentifiers::IsDefined() const
+  {
+    return HasPatientId() || HasStudyId() || HasSeriesId() || HasInstanceId();
+  }
 }