lib/fhir_client/sections/crud.rb
#
# Update an existing resource by its id or create it if it is a new resource, not present on the server
#
Update an existing resource by its id or create it if it is a new resource, not present on the server
Update an existing resource by its id or create it if it is a new resource not present on the server
def base_update(resource, id, options, format)
        options = {} if options.nil?
        options[:resource] = resource.class
        options[:format] = format
        options[:id] = id
        reply = put resource_url(options), resource, fhir_headers(options)
        reply.resource = parse_reply(resource.class, format, reply) if reply.body.present?
        reply.resource_class = resource.class
        reply
      end
def base_update ( resource , id , options , format ) options = { } if options . nil? options [ :resource ] = resource . class options [ :format ] = format options [ :id ] = id reply = put resource_url ( options ) , resource , fhir_headers ( options ) reply . resource = parse_reply ( resource . class , format , reply ) if reply . body . present? reply . resource_class = resource . class reply end
Update an existing resource by its id or create it if it is a new resource, not present on the server
Update an existing resource by its id or create it if it is a new resource not present on the server
resource
id
options
format