lib/neutrino/gateway/service.rb
# Gets the base URI for NLP GI data
#
# @param [Hash] params specify what document to get, either `:id`, `:patient_document_id`
# Additionally need both ':service_class' and ':service_identifier'
# @param [Hash] options specify query values.
# @return [String] the base URI for derived works data
# @raise [Exceptions::BadRequestError] when `:id` and `:patient_document_id` are not specified
Gets the base URI for NLP GI data
Gets the base URI for NLP GI data
def base_uri(params, options)
          path = "#{api(options)}"
          if params[:service_class] && params[:service_identifier]
            if params[:id]
              path << "/patient_document/#{params[:id]}/service/#{params[:service_class]}/#{params[:service_identifier]}"
            elsif params[:patient_document_id]
              path << "/patient_document/#{params[:patient_document_id]}/service/#{params[:service_class]}/#{params[:service_identifier]}"
            else
              fail Neutrino::Gateway::Exceptions::BadRequestError, 'Must provide an id or a patient_document_id'
            end
          else
            fail Neutrino::Gateway::Exceptions::BadRequestError, 'Must provide an service_class and service_identifier'
          end
          path
        end
def base_uri ( params , options ) path = "#{api(options)}" if params [ :service_class ] && params [ :service_identifier ] if params [ :id ] path << "/patient_document/#{params[:id]}/service/#{params[:service_class]}/#{params[:service_identifier]}" elsif params [ :patient_document_id ] path << "/patient_document/#{params[:patient_document_id]}/service/#{params[:service_class]}/#{params[:service_identifier]}" else fail Neutrino :: Gateway :: Exceptions :: BadRequestError , 'Must provide an id or a patient_document_id' end else fail Neutrino :: Gateway :: Exceptions :: BadRequestError , 'Must provide an service_class and service_identifier' end path end
Gets the base URI for NLP GI data
Gets the base URI for NLP GI data
the base URI for derived works data
the base URI for derived works data
String
[Exceptions::BadRequestError] when `:id` and `:patient_document_id` are not specified
[ Exceptions :: BadRequestError ] when ` : id ` and ` : patient_document_id ` are not specified
params
<not_specific>
options
<not_specific>
<not_specific>
options specify query values.
options specify query values .