@Test public void getComponentTextNull() { final Observation observation = new Observation(); Assert.assertNull( utils.getComponentText( observation ) ); }
@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(); }
Dstu3ObservationFhirToDhisTransformerUtils 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(); } }
Dstu3ObservationFhirToDhisTransformerUtils 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(); } Dstu3ObservationFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3FhirClientFhirToDhisTransformerUtils clientTransformUtils,
        @Nonnull Dstu3CodeFhirToDhisTransformerUtils codeTransformerUtils ); }
Dstu3ObservationFhirToDhisTransformerUtils 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(); } Dstu3ObservationFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3FhirClientFhirToDhisTransformerUtils clientTransformUtils,
        @Nonnull Dstu3CodeFhirToDhisTransformerUtils codeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override String getResourceName(); @Nullable @Override ICompositeType getCodes( @Nullable IBaseResource resource ); @Nullable @Override String getComponentText( @Nullable IBaseResource resource ); @Override @Nullable IBaseBackboneElement getBackboneElement( @Nullable List<? extends IBaseBackboneElement> backboneElements, @Nonnull String system, @Nonnull String code ); }
Dstu3ObservationFhirToDhisTransformerUtils 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(); } Dstu3ObservationFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3FhirClientFhirToDhisTransformerUtils clientTransformUtils,
        @Nonnull Dstu3CodeFhirToDhisTransformerUtils codeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nonnull @Override String getResourceName(); @Nullable @Override ICompositeType getCodes( @Nullable IBaseResource resource ); @Nullable @Override String getComponentText( @Nullable IBaseResource resource ); @Override @Nullable IBaseBackboneElement getBackboneElement( @Nullable List<? extends IBaseBackboneElement> backboneElements, @Nonnull String system, @Nonnull String code );  }