# HG changeset patch # User Sebastien Jodogne # Date 1403799438 -7200 # Node ID cc7a4ae474c1eb729d82f02e310e475870e3eeba # Parent 81134ea872ff8326ef47df7a5fe38a1da8ec3876 simplify has a GET argument diff -r 81134ea872ff -r cc7a4ae474c1 OrthancServer/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Thu Jun 26 16:42:05 2014 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Thu Jun 26 18:17:18 2014 +0200 @@ -153,6 +153,21 @@ } } + + static void GetInstanceTagsBis(RestApi::GetCall& call) + { + bool simplify = call.HasArgument("simplify"); + + if (simplify) + { + GetInstanceTags(call); + } + else + { + GetInstanceTags(call); + } + } + static void ListFrames(RestApi::GetCall& call) { @@ -666,12 +681,11 @@ } - - template static void GetSharedTags(RestApi::GetCall& call) { ServerContext& context = OrthancRestApi::GetContext(call); std::string publicId = call.GetUriComponent("id", ""); + bool simplify = call.HasArgument("simplify"); Json::Value sharedTags; if (ExtractSharedTags(sharedTags, context, publicId)) @@ -691,11 +705,12 @@ } - template + template static void GetModule(RestApi::GetCall& call) { ServerContext& context = OrthancRestApi::GetContext(call); std::string publicId = call.GetUriComponent("id", ""); + bool simplify = call.HasArgument("simplify"); typedef std::set Module; Module module; @@ -766,25 +781,18 @@ Register("/studies/{id}/statistics", GetResourceStatistics); Register("/series/{id}/statistics", GetResourceStatistics); - Register("/patients/{id}/shared-tags", GetSharedTags); - Register("/patients/{id}/simplified-shared-tags", GetSharedTags); - Register("/series/{id}/shared-tags", GetSharedTags); - Register("/series/{id}/simplified-shared-tags", GetSharedTags); - Register("/studies/{id}/shared-tags", GetSharedTags); - Register("/studies/{id}/simplified-shared-tags", GetSharedTags); + Register("/patients/{id}/shared-tags", GetSharedTags); + Register("/series/{id}/shared-tags", GetSharedTags); + Register("/studies/{id}/shared-tags", GetSharedTags); - Register("/instances/{id}/module", GetModule); - Register("/patients/{id}/module", GetModule); - Register("/series/{id}/module", GetModule); - Register("/studies/{id}/module", GetModule); - Register("/instances/{id}/simplified-module", GetModule); - Register("/patients/{id}/simplified-module", GetModule); - Register("/series/{id}/simplified-module", GetModule); - Register("/studies/{id}/simplified-module", GetModule); + Register("/instances/{id}/module", GetModule); + Register("/patients/{id}/module", GetModule); + Register("/series/{id}/module", GetModule); + Register("/studies/{id}/module", GetModule); Register("/instances/{id}/file", GetInstanceFile); Register("/instances/{id}/export", ExportInstanceFile); - Register("/instances/{id}/tags", GetInstanceTags); + Register("/instances/{id}/tags", GetInstanceTagsBis); Register("/instances/{id}/simplified-tags", GetInstanceTags); Register("/instances/{id}/frames", ListFrames);