anchor.diff:    context := TOperationContext.create;
     try
       context.upload := upload;
  -    Connection.StartTransact;
  +    // cut us off from the external request
  +    request := TFHIRRequest.create(ServerContext.ValidatorContext.Link, origin, FIndexer.Definitions.Compartments.Link);
  +    response := TFHIRResponse.create;
       try
  -      // cut us off from the external request
  -      request := TFHIRRequest.create(ServerContext.ValidatorContext.Link, origin, FIndexer.Definitions.Compartments.Link);
  -      response := TFHIRResponse.create;
  -      try
  -        for i := 0 to list.count - 1 do
  +      for i := 0 to list.count - 1 do
  +      begin
  +        request.ResourceName := list[i].FhirType;
  +        request.CommandType := fcmdCreate;
  +        request.Resource := list[i].link;
  +
  +        if (list[i] is TFHIRBundle) and (list[i].Tags['process'] = 'true') then
           begin
  -          request.ResourceName := list[i].FhirType;
  -          request.CommandType := fcmdCreate;
  -          request.Resource := list[i].link;
  -
  -          if (list[i] is TFHIRBundle) and (list[i].Tags['process'] = 'true') then
  -          begin
  -            request.CommandType := fcmdTransaction;
  -          end
  -          else if (list[i].id <> '') then
  -          begin
  -            request.id := list[i].id;
  -            request.CommandType := fcmdUpdate;
  -          end;
  -
  -          if TFhirResource(list[i]).Tag <> nil then
  -            request.lastModifiedDate := TDateTimeExWrapper(TFhirResource(list[i]).Tag).Value.DateTime;
  -          request.Session := nil;
  -          Execute(context, request, response);
  +          request.CommandType := fcmdTransaction;
  +        end
  +        else if (list[i].id <> '') then
  +        begin
  +          request.id := list[i].id;
  +          request.CommandType := fcmdUpdate;
           end;
  -      finally
  -        response.Free;
  -        request.free;
  -      end;
  -      Connection.Commit;
  -    except
  -      on e : Exception do
  -      begin
  -        Connection.Rollback;
  -        recordStack(e);
  -        raise;
  -      end;
  +
  +        if TFhirResource(list[i]).Tag <> nil then
  +          request.lastModifiedDate := TDateTimeExWrapper(TFhirResource(list[i]).Tag).Value.DateTime;
  +        request.Session := nil;
  +        Execute(context, request, response);
  +      end;
  +    finally
  +      response.Free;
  +      request.free;
       end;
     finally
       context.Free;
  
positive.code: begin
    conn := DB.GetConnection('oauth2');
    try
      conn.ExecSQL('insert into OAuthLogins (Id, Client, Scope, Redirect, ClientState, Status, DateAdded) values ('''+id+''', '''+client_id+''', '''+SQLWrapString(scope)+''', '''+SQLWrapString(redirect_uri)+''', '''+SQLWrapString(state)+''', 1, '+DBGetDate(conn.Owner.Platform)+')');
      conn.release;
    except
      on e:exception do
  
negative.code:       client_id := conn.ColStringByName['Client'];
        name := conn.ColStringByName['Name'];
        redirect := conn.ColStringByName['Redirect'];
        scope := conn.ColStringByName['Scope'];
        state := conn.ColStringByName['ClientState'];
      end;
      conn.Terminate;
      conn.release;
  