anchor.diff:      function ProfilesAsOptionList: String; override;
       function NextVersionKey: integer;
       function NextSearchKey: integer;
  -    function NextResourceKeySetId(aType: String; id: string) : integer;
  +    function NextResourceKeySetId(connection : TKDBConnection; aType: String; id: string) : integer;
       function NextResourceKeyGetId(connection : TKDBConnection; aType: String; var id: string): integer;
       function NextEntryKey: integer;
       function NextCompartmentKey: integer;
  
positive.code:     connection.ExecSQL('Update Types set LastId = '+inttostr(key)+' where ResourceTypeKey = '+inttostr(cfg.key));
  end;
  
  function TFHIRNativeStorageService.NextResourceKeySetId(aType: String; id: string): integer;
  var
    i: integer;
  begin
  
negative.code:   result := iType > 0;
    if result then
    begin
      resourceKey := FRepository.NextResourceKeySetId(FConnection, aType, id);
  
      FConnection.SQL := 'Select ResourceKey from Ids where ResourceTypeKey = :r and Id = :i';
      FConnection.Prepare;
  