diff OrthancServer/IDatabaseWrapper.h @ 1729:54d78925cbb6 db-changes

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 17:39:58 +0200
parents 4941494b5dd8
children 38dda23c7d7d
line wrap: on
line diff
--- a/OrthancServer/IDatabaseWrapper.h	Tue Oct 20 15:03:52 2015 +0200
+++ b/OrthancServer/IDatabaseWrapper.h	Tue Oct 20 17:39:58 2015 +0200
@@ -151,6 +151,29 @@
                                        const DicomTag& tag,
                                        const std::string& value) = 0;
 
+    /**
+     * Primitive for wildcard matching, as defined in DICOM:
+     * http://dicom.nema.org/dicom/2013/output/chtml/part04/sect_C.2.html#sect_C.2.2.2.4
+     * 
+     * "Any occurrence of an "*" or a "?", then "*" shall match any
+     * sequence of characters (including a zero length value) and "?"
+     * shall match any single character. This matching is case
+     * sensitive, except for Attributes with an PN Value
+     * Representation (e.g., Patient Name (0010,0010))."
+     * 
+     * Pay attention to the fact that "*" (resp. "?") generally
+     * corresponds to "%" (resp. "_") in primitive LIKE of SQL. The
+     * values "%", "_", "\" should in the user request should
+     * respectively be escaped as "\%", "\_" and "\\".
+     * 
+     * This matching must be case sensitive: The special case of PN VR
+     * is taken into consideration by normalizing the query string in
+     * method "ServerIndex::LookupIdentifierWildcard()".
+     **/
+    virtual void LookupIdentifierWildcard(std::list<int64_t>& target,
+                                          const DicomTag& tag,
+                                          const std::string& value) = 0;
+
     virtual bool LookupMetadata(std::string& target,
                                 int64_t id,
                                 MetadataType type) = 0;