comparison OrthancServer/IDatabaseWrapper.h @ 1745:38dda23c7d7d db-changes

LookupIdentifierQuery
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 26 Oct 2015 13:47:50 +0100
parents 54d78925cbb6
children d143db00a794
comparison
equal deleted inserted replaced
1744:b3de74dec2d5 1745:38dda23c7d7d
42 #include <list> 42 #include <list>
43 #include <boost/noncopyable.hpp> 43 #include <boost/noncopyable.hpp>
44 44
45 namespace Orthanc 45 namespace Orthanc
46 { 46 {
47 class LookupIdentifierQuery;
48
47 class IDatabaseWrapper : public boost::noncopyable 49 class IDatabaseWrapper : public boost::noncopyable
48 { 50 {
49 public: 51 public:
50 virtual ~IDatabaseWrapper() 52 virtual ~IDatabaseWrapper()
51 { 53 {
149 virtual void LookupIdentifierExact(std::list<int64_t>& target, 151 virtual void LookupIdentifierExact(std::list<int64_t>& target,
150 ResourceType level, 152 ResourceType level,
151 const DicomTag& tag, 153 const DicomTag& tag,
152 const std::string& value) = 0; 154 const std::string& value) = 0;
153 155
154 /** 156 virtual void LookupIdentifier(const LookupIdentifierQuery& query) = 0;
155 * Primitive for wildcard matching, as defined in DICOM:
156 * http://dicom.nema.org/dicom/2013/output/chtml/part04/sect_C.2.html#sect_C.2.2.2.4
157 *
158 * "Any occurrence of an "*" or a "?", then "*" shall match any
159 * sequence of characters (including a zero length value) and "?"
160 * shall match any single character. This matching is case
161 * sensitive, except for Attributes with an PN Value
162 * Representation (e.g., Patient Name (0010,0010))."
163 *
164 * Pay attention to the fact that "*" (resp. "?") generally
165 * corresponds to "%" (resp. "_") in primitive LIKE of SQL. The
166 * values "%", "_", "\" should in the user request should
167 * respectively be escaped as "\%", "\_" and "\\".
168 *
169 * This matching must be case sensitive: The special case of PN VR
170 * is taken into consideration by normalizing the query string in
171 * method "ServerIndex::LookupIdentifierWildcard()".
172 **/
173 virtual void LookupIdentifierWildcard(std::list<int64_t>& target,
174 const DicomTag& tag,
175 const std::string& value) = 0;
176 157
177 virtual bool LookupMetadata(std::string& target, 158 virtual bool LookupMetadata(std::string& target,
178 int64_t id, 159 int64_t id,
179 MetadataType type) = 0; 160 MetadataType type) = 0;
180 161