class R4ObservationFhirToDhisTransformerUtils extends AbstractObservationFhirToDhisTransformerUtils {

    @Nullable
    @Override
    public String getComponentText( @Nullable IBaseResource resource )
    {
        final Observation observation = (Observation) resource;
        if ( (observation == null) || !observation.hasComponent() )
        {
            return null;
        }

        final StringBuilder text = new StringBuilder();
        for ( final ObservationComponentComponent component : observation.getComponent() )
        {
            if ( component.hasValueStringType() )
            {
                if ( text.length() > 0 )
                {
                    text.append( COMPONENT_SEPARATOR );
                }
                text.append( component.getValue().toString() );
            }
        }
        return (text.length() == 0) ? null : text.toString();
    }

    public  R4ObservationFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull R4FhirClientFhirToDhisTransformerUtils clientTransformUtils,
        @Nonnull R4CodeFhirToDhisTransformerUtils codeTransformerUtils );

}