@Test public void primaryPhysical() { final List<Address> addresses = new ArrayList<>(); addresses.add( new Address().setType( Address.AddressType.PHYSICAL ).setUse( Address.AddressUse.HOME ) ); addresses.add( new Address().setType( Address.AddressType.POSTAL ).setUse( Address.AddressUse.HOME ) ); Assert.assertSame( addresses.get( 0 ), utils.getPrimaryAddress( addresses ) ); }
@Nullable @Override public ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ) { return getOptionalPrimaryAddress( addresses ).orElse( new Address() ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ) { return getOptionalPrimaryAddress( addresses ).orElse( new Address() ); } }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ) { return getOptionalPrimaryAddress( addresses ).orElse( new Address() ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ) { return getOptionalPrimaryAddress( addresses ).orElse( new Address() ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ); @Nullable @Override String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getConstructedText( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getText( @Nullable ICompositeType address ); }
Dstu3AddressFhirToDhisTransformerUtils extends AbstractAddressFhirToDhisTransformerUtils { @Nullable @Override public ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ) { return getOptionalPrimaryAddress( addresses ).orElse( new Address() ); } Dstu3AddressFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull Dstu3DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override ICompositeType getPrimaryAddress( @Nonnull List<? extends ICompositeType> addresses ); @Nullable @Override String getSingleLine( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getConstructedText( @Nullable ICompositeType address, @Nonnull String delimiter ); @Nullable @Override String getText( @Nullable ICompositeType address );  }