@Test public void getPreciseDateElementDate() { Assert.assertEquals( new DateType( new Date() ).getValueAsString(), Objects.requireNonNull( utils.getPreciseDateElement( new Date() ) ).getValueAsString() ); }
@Nullable @Override public IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ) { final LocalDate date = castDate( dateTime ); if ( date == null ) { return null; } return new DateType( Date.from( date.atStartOfDay( zoneId ).toInstant() ), TemporalPrecisionEnum.DAY ); }
Dstu3DateTimeDhisToFhirTransformerUtils extends AbstractDateTimeDhisToFhirTransformerUtils { @Nullable @Override public IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ) { final LocalDate date = castDate( dateTime ); if ( date == null ) { return null; } return new DateType( Date.from( date.atStartOfDay( zoneId ).toInstant() ), TemporalPrecisionEnum.DAY ); } }
Dstu3DateTimeDhisToFhirTransformerUtils extends AbstractDateTimeDhisToFhirTransformerUtils { @Nullable @Override public IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ) { final LocalDate date = castDate( dateTime ); if ( date == null ) { return null; } return new DateType( Date.from( date.atStartOfDay( zoneId ).toInstant() ), TemporalPrecisionEnum.DAY ); } Dstu3DateTimeDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); }
Dstu3DateTimeDhisToFhirTransformerUtils extends AbstractDateTimeDhisToFhirTransformerUtils { @Nullable @Override public IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ) { final LocalDate date = castDate( dateTime ); if ( date == null ) { return null; } return new DateType( Date.from( date.atStartOfDay( zoneId ).toInstant() ), TemporalPrecisionEnum.DAY ); } Dstu3DateTimeDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ); @Nullable @Override IPrimitiveType<Date> getDateTimeElement( @Nullable Object dateTime ); @Nullable @Override IPrimitiveType<Date> getDayDateTimeElement( @Nullable Object dateTime ); }
Dstu3DateTimeDhisToFhirTransformerUtils extends AbstractDateTimeDhisToFhirTransformerUtils { @Nullable @Override public IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ) { final LocalDate date = castDate( dateTime ); if ( date == null ) { return null; } return new DateType( Date.from( date.atStartOfDay( zoneId ).toInstant() ), TemporalPrecisionEnum.DAY ); } Dstu3DateTimeDhisToFhirTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nonnull @Override Set<FhirVersion> getFhirVersions(); @Nullable @Override IPrimitiveType<Date> getPreciseDateElement( @Nullable Object dateTime ); @Nullable @Override IPrimitiveType<Date> getDateTimeElement( @Nullable Object dateTime ); @Nullable @Override IPrimitiveType<Date> getDayDateTimeElement( @Nullable Object dateTime );  }