lib/fhir_client/sections/crud.rb
#
# Conditionally create a new resource with a server assigned id.
#
Conditionally create a new resource with a server assigned id.
Conditionally create a new resource with a server assigned id .
def conditional_create(resource, if_none_exist_parameters, format = @default_format)
        query = ''
        if_none_exist_parameters.each do |key, value|
          query += "#{key}=#{value}&"
        end
        query = query[0..-2] 
        options = {}
        options['If-None-Exist'] = query
        base_create(resource, options, format)
      end
def conditional_create ( resource , if_none_exist_parameters , format = @default_format ) query = '' if_none_exist_parameters . each do | key , value | query += "#{key}=#{value}&" end query = query [ 0 .. - 2 ] options = { } options [ 'If-None-Exist' ] = query base_create ( resource , options , format ) end
Conditionally create a new resource with a server assigned id.
Conditionally create a new resource with a server assigned id .
# strip off the trailing ampersand
resource
if_none_exist_parameters
format