@Test public void primaryUsual() { final List<HumanName> humanNames = new ArrayList<>(); humanNames.add( new HumanName().setUse( HumanName.NameUse.USUAL ) ); humanNames.add( new HumanName().setUse( HumanName.NameUse.ANONYMOUS ) ); Assert.assertEquals( humanNames.get( 0 ), utils.getPrimaryName( humanNames ) ); }
@Override @Nullable public HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ) { return getOptionalPrimaryName( names ).orElse( new HumanName() ); }
R4HumanNameFhirToDhisTransformerUtils extends AbstractHumanNameFhirToDhisTransformerUtils { @Override @Nullable public HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ) { return getOptionalPrimaryName( names ).orElse( new HumanName() ); } }
R4HumanNameFhirToDhisTransformerUtils extends AbstractHumanNameFhirToDhisTransformerUtils { @Override @Nullable public HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ) { return getOptionalPrimaryName( names ).orElse( new HumanName() ); } R4HumanNameFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull R4DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); }
R4HumanNameFhirToDhisTransformerUtils extends AbstractHumanNameFhirToDhisTransformerUtils { @Override @Nullable public HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ) { return getOptionalPrimaryName( names ).orElse( new HumanName() ); } R4HumanNameFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull R4DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Override @Nullable String getSingleGiven( @Nullable ICompositeType humanName ); @Override @Nullable String getFirstGiven( @Nullable ICompositeType humanName ); @Nullable @Override String getSecondGiven( @Nullable ICompositeType humanName ); @Override @Nullable HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ); }
R4HumanNameFhirToDhisTransformerUtils extends AbstractHumanNameFhirToDhisTransformerUtils { @Override @Nullable public HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names ) { return getOptionalPrimaryName( names ).orElse( new HumanName() ); } R4HumanNameFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext, @Nonnull R4DateTimeFhirToDhisTransformerUtils dateTimeTransformerUtils ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Override @Nullable String getSingleGiven( @Nullable ICompositeType humanName ); @Override @Nullable String getFirstGiven( @Nullable ICompositeType humanName ); @Nullable @Override String getSecondGiven( @Nullable ICompositeType humanName ); @Override @Nullable HumanName getPrimaryName( @Nonnull List<? extends ICompositeType> names );  }