Class FHIRPersistenceUtil


  • public class FHIRPersistenceUtil
    extends java.lang.Object
    • Method Detail

      • parseSystemHistoryParameters

        public static FHIRSystemHistoryContext parseSystemHistoryParameters​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> queryParameters,
                                                                            boolean lenient,
                                                                            ResourcesConfigAdapter resourcesConfig)
                                                                     throws FHIRPersistenceException
        Parse history parameters into a FHIRHistoryContext using the passed ResourcesConfigAdapter
        Parameters:
        queryParameters -
        lenient -
        resourcesConfig -
        Returns:
        Throws:
        FHIRPersistenceException
      • createDeletedResourceResultMarker

        public static ResourceResult<Resource> createDeletedResourceResultMarker​(java.lang.String resourceType,
                                                                                 java.lang.String logicalId,
                                                                                 int version,
                                                                                 java.time.Instant lastUpdated)
        Create a new ResourceResult instance to represent a deleted or partially erased resource
        Parameters:
        resourceType -
        logicalId -
        version -
        lastUpdated -
        Returns:
      • 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,
                                                                          java.lang.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