Class FHIRPersistenceUtil


  • public class FHIRPersistenceUtil
    extends Object
    • Method Detail

      • createDeletedResourceMarker

        public static Resource createDeletedResourceMarker​(Resource deletedResource)
        Create a minimal deleted resource marker from the given resource
        Parameters:
        deletedResource -
        Returns:
        deletedResourceMarker
      • getUpdateTime

        public static Instant getUpdateTime()
        Get the current UTC timestamp which can be used as a lastUpdated time when ingesting resources.
        Returns:
      • copyAndSetResourceMetaFields

        public static <T extends Resource> T copyAndSetResourceMetaFields​(T resource,
                                                                          String logicalId,
                                                                          int newVersionNumber,
                                                                          Instant lastUpdated)
        Creates and returns a copy of the passed resource with the Resource.id Resource.meta.versionId, and Resource.meta.lastUpdated elements replaced.
        Parameters:
        resource -
        logicalId -
        newVersionNumber -
        lastUpdated -
        Returns:
        the updated resource