class FhirRepositoryImpl implements FhirRepository {

    @Nonnull
    protected String createDhisFhirResourceId( @Nonnull FhirToDhisTransformOutcome<? extends DhisResource> outcome, @Nonnull DhisResource persistedDhisResource )
    {
        if ( outcome.getRule().isSimpleFhirId() )
        {
            return DhisFhirResourceId.toString( null, persistedDhisResource.getId(), null );
        }
        else
        {
            return DhisFhirResourceId.toString( persistedDhisResource.getResourceType(), persistedDhisResource.getId(), outcome.getRule().getId() );
        }
    }

    public  FhirRepositoryImpl( @Nonnull AuthorizationContext authorizationContext,
        @Nonnull LockManager lockManager, @Nonnull RequestCacheService requestCacheService,
        @Nonnull FhirClientSystemRepository fhirClientSystemRepository,
        @Nonnull FhirClientResourceRepository fhirClientResourceRepository,
        @Nonnull SubscriptionFhirResourceRepository subscriptionFhirResourceRepository,
        @Nonnull StoredFhirResourceService storedItemService,
        @Nonnull FhirResourceRepository fhirResourceRepository,
        @Nonnull FhirToDhisTransformerService fhirToDhisTransformerService,
        @Nonnull DhisResourceRepository dhisResourceRepository,
        @Nonnull FhirDhisAssignmentRepository fhirDhisAssignmentRepository );

}