anchor.diff:      if guid then
       begin
         id := FhirGUIDToString(CreateGUID);
  -      key := FRepository.NextResourceKeySetId(aType, id);
  +      key := FRepository.NextResourceKeySetId(FConnection, aType, id);
       end
       else
       begin
  
positive.code:   result := iType > 0;
    if result then
    begin
      resourceKey := FRepository.NextResourceKeySetId(aType, id);
  
      FConnection.SQL := 'Select ResourceKey from Ids where ResourceTypeKey = :r and Id = :i';
      FConnection.Prepare;
  
negative.code:     function ProfilesAsOptionList: String; override;
      function NextVersionKey: integer;
      function NextSearchKey: 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;
  