comparison OrthancServer/OrthancFindRequestHandler.cpp @ 1752:c3d8ec63a179 db-changes

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Oct 2015 17:45:05 +0100
parents fb569ee09a69
children faf2ecab3472
comparison
equal deleted inserted replaced
1751:fb569ee09a69 1752:c3d8ec63a179
305 // An empty string corresponds to a "*" wildcard constraint, so we ignore it 305 // An empty string corresponds to a "*" wildcard constraint, so we ignore it
306 continue; 306 continue;
307 } 307 }
308 308
309 #if USE_LOOKUP_RESOURCE == 1 309 #if USE_LOOKUP_RESOURCE == 1
310 // TODO SetModalitiesInStudy(value); 310 if (tag == DICOM_TAG_MODALITIES_IN_STUDY)
311 311 {
312 finder.Add(tag, value, caseSensitivePN); 312 // TODO SetModalitiesInStudy(value);
313 313 // findQuery.SetModalitiesInStudy(value);
314 printf("ICI\n");
315 throw OrthancException(ErrorCode_NotImplemented);
316 }
317 else
318 {
319 finder.Add(tag, value, caseSensitivePN);
320 }
314 #else 321 #else
315 322
316 if (tag == DICOM_TAG_MODALITIES_IN_STUDY) 323 if (tag == DICOM_TAG_MODALITIES_IN_STUDY)
317 { 324 {
318 findQuery.SetModalitiesInStudy(value); 325 findQuery.SetModalitiesInStudy(value);
351 358
352 std::list<std::string> tmp; 359 std::list<std::string> tmp;
353 360
354 #if USE_LOOKUP_RESOURCE == 1 361 #if USE_LOOKUP_RESOURCE == 1
355 bool finished = context_.Apply(tmp, finder); 362 bool finished = context_.Apply(tmp, finder);
363
364 for (std::list<std::string>::const_iterator
365 it = tmp.begin(); it != tmp.end(); ++it)
366 {
367 // TODO
368 Json::Value resource;
369 context_.ReadJson(resource, *it);
370 AddAnswer(answers, resource, query);
371 }
372
356 #else 373 #else
357 bool finished = finder.Apply(tmp, findQuery); 374 bool finished = finder.Apply(tmp, findQuery);
358 #endif 375 #endif
359 376
360 LOG(INFO) << "Number of matching resources: " << tmp.size(); 377 LOG(INFO) << "Number of matching resources: " << tmp.size();