class R4CodeFhirToDhisTransformerUtils extends AbstractCodeFhirToDhisTransformerUtils {

    @Override
    @Nullable
    public String getCode( @Nullable ICompositeType codeableConcept, @Nullable String system )
    {
        if ( system == null )
        {
            throw new IllegalArgumentException( "System must be specified." );
        }

        if ( codeableConcept == null )
        {
            return null;
        }
        for ( final Coding coding : ((CodeableConcept) codeableConcept).getCoding() )
        {
            if ( system.equals( coding.getSystem() ) )
            {
                return coding.getCode();
            }
        }
        return null;
    }

    public  R4CodeFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext,
        @Nonnull CodeRepository codeRepository,
        @Nonnull SystemCodeRepository systemCodeRepository );

}