class Dstu3PatientFhirToDhisTransformerUtils extends AbstractPatientFhirToDhisTransformerUtils {

    @Nullable
    @Override
    public ICompositeType getBirthPlaceAddress( @Nullable IDomainResource patient )
    {
        if ( patient == null )
        {
            return null;
        }

        final Patient p = (Patient) patient;
        final List<Extension> birthPlaceExtensions = p.getExtensionsByUrl( BIRTH_PLACE_URI );
        if ( birthPlaceExtensions.isEmpty() )
        {
            return null;
        }
        if ( birthPlaceExtensions.size() > 1 )
        {
            throw new TransformerMappingException( "Patient contains " + birthPlaceExtensions.size() + " birth places." );
        }

        final Type value = birthPlaceExtensions.get( 0 ).getValue();
        if ( (value == null) || value.isEmpty() )
        {
            return null;
        }

        if ( !(value instanceof Address) )
        {
            throw new TransformerMappingException( "Patient contains birth place that is no address: " + value.fhirType() );
        }
        return (Address) value;
    }

    public  Dstu3PatientFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext );

}