Interface FHIRResourceHelpers

  • All Known Implementing Classes:
    FHIRRestHelper

    public interface FHIRResourceHelpers
    This interface describes the set of helper methods from the FHIR REST layer that are used by custom operation implementations.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> buildPersistenceEventProperties​(java.lang.String type, java.lang.String id, java.lang.String version, FHIRSearchContext searchContext, FHIRSystemHistoryContext systemHistoryContext)
      Builds a collection of properties that will be passed to the persistence interceptors.
      Bundle doBundle​(Bundle bundle, boolean skippableUpdates)
      Processes a bundled request (batch or transaction type).
      default FHIRRestOperationResponse doCreate​(java.lang.String type, Resource resource, java.lang.String ifNoneExist)
      Performs the heavy lifting associated with a 'create' interaction.
      FHIRRestOperationResponse doCreate​(java.lang.String type, Resource resource, java.lang.String ifNoneExist, boolean doValidation)
      Performs the heavy lifting associated with a 'create' interaction.
      FHIRRestOperationResponse doCreateMeta​(FHIRPersistenceEvent event, java.util.List<OperationOutcome.Issue> warnings, java.lang.String type, Resource resource, java.lang.String ifNoneExist)
      1st phase of CREATE.
      FHIRRestOperationResponse doCreatePersist​(FHIRPersistenceEvent event, java.util.List<OperationOutcome.Issue> warnings, Resource resource, PayloadPersistenceResponse offloadResponse)
      3rd phase of resource create.
      FHIRRestOperationResponse doDelete​(java.lang.String type, java.lang.String id, java.lang.String searchQueryString)
      Performs a 'delete' operation on the specified resource.
      default ResourceEraseRecord doErase​(FHIROperationContext operationContext, EraseDTO eraseDto)
      Invoke the FHIR Persistence erase operation for a specific instance of the erase.
      Bundle doHistory​(java.lang.String type, java.lang.String id, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri)
      Performs the work of retrieving versions of a Resource.
      default Bundle doHistory​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri)
      Implement the system level history operation to obtain a list of changes to resources
      Bundle doHistory​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri, java.lang.String resourceType)
      Implement the system level history operation to obtain a list of changes to resources with an optional resourceType which supports for example [base]/Patient/_history requests to return the complete history of changes filtered to a specific resource type.
      Resource doInvoke​(FHIROperationContext operationContext, java.lang.String resourceTypeName, java.lang.String logicalId, java.lang.String versionId, Resource resource, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
      Helper method which invokes a custom operation.
      FHIRRestOperationResponse doPatch​(java.lang.String type, java.lang.String id, FHIRPatch patch, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate)
      Performs a patch operation (a new version of the Resource will be stored).
      FHIRRestOperationResponse doPatchOrUpdatePersist​(FHIRPersistenceEvent event, java.lang.String type, java.lang.String id, boolean isPatch, Resource newResource, Resource prevResource, java.util.List<OperationOutcome.Issue> warnings, boolean isDeleted, java.lang.Integer ifNoneMatch, PayloadPersistenceResponse offloadResponse)
      Persist the newResource value for patch or update interactions
      default SingleResourceResult<? extends Resource> doRead​(java.lang.String type, java.lang.String id)
      Performs a 'read' operation to retrieve a Resource.
      SingleResourceResult<? extends Resource> doRead​(java.lang.String type, java.lang.String id, boolean throwExcOnNull, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
      Performs a 'read' operation to retrieve a Resource with select query parameters.
      int doReindex​(FHIROperationContext operationContext, OperationOutcome.Builder operationOutcomeResult, java.time.Instant tstamp, java.util.List<java.lang.Long> indexIds, java.lang.String resourceLogicalId, boolean force)
      Invoke the FHIR persistence reindex operation for either a specified list of indexIds, or a randomly chosen resource, last reindexed before the given timestamp.
      java.util.List<java.lang.Long> doRetrieveIndex​(FHIROperationContext operationContext, java.lang.String resourceTypeName, int count, java.time.Instant notModifiedAfter, java.lang.Long afterIndexId)
      Invoke the FHIR persistence retrieve index operation to retrieve a list of indexIds available for reindexing.
      Bundle doSearch​(java.lang.String type, java.lang.String compartment, java.lang.String compartmentId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri)
      Performs heavy lifting associated with a 'search' operation.
      Bundle doSearch​(java.lang.String type, java.lang.String compartment, java.lang.String compartmentId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri, boolean checkIfInteractionAllowed, boolean alwaysIncludeResources)
      Performs heavy lifting associated with a 'search' operation.
      FHIRRestOperationResponse doUpdate​(java.lang.String type, java.lang.String id, Resource newResource, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate, boolean doValidation, java.lang.Integer ifNoneMatch)
      Performs an update operation (a new version of the Resource will be stored).
      default FHIRRestOperationResponse doUpdate​(java.lang.String type, java.lang.String id, Resource newResource, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate, java.lang.Integer ifNoneMatch)
      Performs an update operation (a new version of the Resource will be stored).
      FHIRRestOperationResponse doUpdateMeta​(FHIRPersistenceEvent event, java.lang.String type, java.lang.String id, FHIRPatch patch, Resource newResource, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate, java.lang.Integer ifNoneMatch, boolean doValidation, java.util.List<OperationOutcome.Issue> warnings)
      1st phase of update interaction.
      default SingleResourceResult<? extends Resource> doVRead​(java.lang.String type, java.lang.String id, java.lang.String versionId)
      Performs a 'vread' operation by retrieving the specified version of a Resource with no query parameters
      SingleResourceResult<? extends Resource> doVRead​(java.lang.String type, java.lang.String id, java.lang.String versionId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
      Performs a 'vread' operation by retrieving the specified version of a Resource.
      java.lang.String generateResourceId()
      Generate a new resource id.
      FHIRPersistenceTransaction getTransaction()  
      PayloadPersistenceResponse storePayload​(Resource resource, java.lang.String logicalId, int newVersionNumber, java.lang.String resourcePayloadKey)
      If the underlying persistence layer supports offloading payload storage, initiate the request here.
      void validateInteraction​(FHIRResourceHelpers.Interaction interaction, java.lang.String resourceType)
      Validate an interaction for a specified resource type.
      java.util.List<OperationOutcome.Issue> validateResource​(Resource resource)
      Validate a resource.
    • Field Detail

      • IF_NOT_MATCH_NULL

        static final java.lang.Integer IF_NOT_MATCH_NULL
    • Method Detail

      • validateInteraction

        void validateInteraction​(FHIRResourceHelpers.Interaction interaction,
                                 java.lang.String resourceType)
                          throws FHIROperationException
        Validate an interaction for a specified resource type.
        Parameters:
        interaction - the interaction to be performed
        resourceType - the resource type against which the interaction is to be performed; use "Resource" for whole-system interactions
        Throws:
        FHIROperationException
      • doCreate

        FHIRRestOperationResponse doCreate​(java.lang.String type,
                                           Resource resource,
                                           java.lang.String ifNoneExist,
                                           boolean doValidation)
                                    throws java.lang.Exception
        Performs the heavy lifting associated with a 'create' interaction.
        Parameters:
        type - the resource type specified as part of the request URL
        resource - the Resource to be stored.
        ifNoneExist - whether to create the resource if none exists
        doValidation - if true, validate the resource; if false, assume the resource has already been validated
        Returns:
        a FHIRRestOperationResponse object containing the results of the operation
        Throws:
        java.lang.Exception
      • doCreate

        default FHIRRestOperationResponse doCreate​(java.lang.String type,
                                                   Resource resource,
                                                   java.lang.String ifNoneExist)
                                            throws java.lang.Exception
        Performs the heavy lifting associated with a 'create' interaction. Validates the resource.
        Parameters:
        type - the resource type specified as part of the request URL
        resource - the Resource to be stored.
        ifNoneExist - whether to create the resource if none exists
        Returns:
        a FHIRRestOperationResponse object containing the results of the operation
        Throws:
        java.lang.Exception
      • doCreateMeta

        FHIRRestOperationResponse doCreateMeta​(FHIRPersistenceEvent event,
                                               java.util.List<OperationOutcome.Issue> warnings,
                                               java.lang.String type,
                                               Resource resource,
                                               java.lang.String ifNoneExist)
                                        throws java.lang.Exception
        1st phase of CREATE. Perform the search for conditional create (ifNoneExist) interactions. Any validation (if required) should be performed before this call.
        Parameters:
        event -
        warnings -
        type -
        resource -
        ifNoneExist -
        Returns:
        Throws:
        java.lang.Exception
      • doUpdateMeta

        FHIRRestOperationResponse doUpdateMeta​(FHIRPersistenceEvent event,
                                               java.lang.String type,
                                               java.lang.String id,
                                               FHIRPatch patch,
                                               Resource newResource,
                                               java.lang.String ifMatchValue,
                                               java.lang.String searchQueryString,
                                               boolean skippableUpdate,
                                               java.lang.Integer ifNoneMatch,
                                               boolean doValidation,
                                               java.util.List<OperationOutcome.Issue> warnings)
                                        throws java.lang.Exception
        1st phase of update interaction.
        Parameters:
        event -
        type -
        id -
        patch -
        newResource -
        ifMatchValue -
        searchQueryString -
        skippableUpdate -
        ifNoneMatch -
        doValidation -
        warnings -
        Returns:
        Throws:
        java.lang.Exception
      • doPatchOrUpdatePersist

        FHIRRestOperationResponse doPatchOrUpdatePersist​(FHIRPersistenceEvent event,
                                                         java.lang.String type,
                                                         java.lang.String id,
                                                         boolean isPatch,
                                                         Resource newResource,
                                                         Resource prevResource,
                                                         java.util.List<OperationOutcome.Issue> warnings,
                                                         boolean isDeleted,
                                                         java.lang.Integer ifNoneMatch,
                                                         PayloadPersistenceResponse offloadResponse)
                                                  throws java.lang.Exception
        Persist the newResource value for patch or update interactions
        Parameters:
        event -
        type -
        id -
        isPatch -
        newResource -
        prevResource -
        warnings -
        isDeleted -
        ifNoneMatch -
        offloadResponse -
        Returns:
        Throws:
        java.lang.Exception
      • buildPersistenceEventProperties

        java.util.Map<java.lang.String,​java.lang.Object> buildPersistenceEventProperties​(java.lang.String type,
                                                                                               java.lang.String id,
                                                                                               java.lang.String version,
                                                                                               FHIRSearchContext searchContext,
                                                                                               FHIRSystemHistoryContext systemHistoryContext)
                                                                                        throws FHIRPersistenceException
        Builds a collection of properties that will be passed to the persistence interceptors.
        Parameters:
        type - the resource type
        id - the resource logical ID
        version - the resource version
        searchContext - the request search context
        systemHistoryContext - the request system history context
        Returns:
        a map of persistence event properties
        Throws:
        FHIRPersistenceException
      • doUpdate

        default FHIRRestOperationResponse doUpdate​(java.lang.String type,
                                                   java.lang.String id,
                                                   Resource newResource,
                                                   java.lang.String ifMatchValue,
                                                   java.lang.String searchQueryString,
                                                   boolean skippableUpdate,
                                                   java.lang.Integer ifNoneMatch)
                                            throws java.lang.Exception
        Performs an update operation (a new version of the Resource will be stored). Validates the resource.
        Parameters:
        type - the type of the resource to be updated
        id - the id of the Resource being updated
        newResource - the new resource to be stored
        ifMatchValue - an optional "If-Match" header value to request a version-aware update
        searchQueryString - an optional search query string to request a conditional update
        skippableUpdate - if true, and the resource content in the update matches the existing resource on the server, then skip the update; if false, then always attempt the update
        ifNoneMatch - for conditional create-on-update, set to 0; otherwise leave null
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doUpdate

        FHIRRestOperationResponse doUpdate​(java.lang.String type,
                                           java.lang.String id,
                                           Resource newResource,
                                           java.lang.String ifMatchValue,
                                           java.lang.String searchQueryString,
                                           boolean skippableUpdate,
                                           boolean doValidation,
                                           java.lang.Integer ifNoneMatch)
                                    throws java.lang.Exception
        Performs an update operation (a new version of the Resource will be stored).
        Parameters:
        type - the type of the resource to be updated
        id - the id of the Resource being updated
        newResource - the new resource to be stored
        ifMatchValue - an optional "If-Match" header value to request a version-aware update
        searchQueryString - an optional search query string to request a conditional update
        skippableUpdate - if true, and the resource content in the update matches the existing resource on the server, then skip the update; if false, then always attempt the update
        doValidation - if true, validate the resource; if false, assume the resource has already been validated
        ifNoneMatch - for conditional create-on-update, set to 0; otherwise leave null
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doPatch

        FHIRRestOperationResponse doPatch​(java.lang.String type,
                                          java.lang.String id,
                                          FHIRPatch patch,
                                          java.lang.String ifMatchValue,
                                          java.lang.String searchQueryString,
                                          boolean skippableUpdate)
                                   throws java.lang.Exception
        Performs a patch operation (a new version of the Resource will be stored).
        Parameters:
        type - the type of the resource to be updated
        id - the id of the Resource being updated
        patch - the patch to apply
        ifMatchValue - an optional "If-Match" header value to request a version-aware update
        searchQueryString - an optional search query string to request a conditional update
        skippableUpdate - if true, and the result of the patch matches the existing resource on the server, then skip the update; if false, then always attempt the update
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doDelete

        FHIRRestOperationResponse doDelete​(java.lang.String type,
                                           java.lang.String id,
                                           java.lang.String searchQueryString)
                                    throws java.lang.Exception
        Performs a 'delete' operation on the specified resource.
        Parameters:
        type - the resource type associated with the Resource to be deleted
        id - the id of the Resource to be deleted
        searchQueryString - a search query associated with a conditional delete request (mutually exclusive with id)
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doRead

        default SingleResourceResult<? extends Resource> doRead​(java.lang.String type,
                                                                java.lang.String id)
                                                         throws java.lang.Exception
        Performs a 'read' operation to retrieve a Resource.
        Parameters:
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        Returns:
        a SingleResourceResult thats wraps a ResourceResult which contains the possibly-null resource that was read from the datastore
        Throws:
        java.lang.Exception
      • doRead

        SingleResourceResult<? extends Resource> doRead​(java.lang.String type,
                                                        java.lang.String id,
                                                        boolean throwExcOnNull,
                                                        javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
                                                 throws java.lang.Exception
        Performs a 'read' operation to retrieve a Resource with select query parameters.
        Parameters:
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        throwExcOnNull - whether to throw an exception on null
        queryParameters - for supporting _elements and _summary for resource read; allows null
        Returns:
        a SingleResourceResult wrapping the resource and including its deletion status
        Throws:
        java.lang.Exception
      • doVRead

        default SingleResourceResult<? extends Resource> doVRead​(java.lang.String type,
                                                                 java.lang.String id,
                                                                 java.lang.String versionId)
                                                          throws java.lang.Exception
        Performs a 'vread' operation by retrieving the specified version of a Resource with no query parameters
        Parameters:
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        versionId - the version id of the Resource to be retrieved
        Returns:
        the Resource
        Throws:
        java.lang.Exception
      • doVRead

        SingleResourceResult<? extends Resource> doVRead​(java.lang.String type,
                                                         java.lang.String id,
                                                         java.lang.String versionId,
                                                         javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
                                                  throws java.lang.Exception
        Performs a 'vread' operation by retrieving the specified version of a Resource.
        Parameters:
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        versionId - the version id of the Resource to be retrieved
        queryParameters - for supporting _elements and _summary for resource vread
        Returns:
        the Resource
        Throws:
        java.lang.Exception
      • doHistory

        Bundle doHistory​(java.lang.String type,
                         java.lang.String id,
                         javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                         java.lang.String requestUri)
                  throws java.lang.Exception
        Performs the work of retrieving versions of a Resource.
        Parameters:
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        queryParameters - a Map containing the query parameters from the request URL
        requestUri -
        Returns:
        a Bundle containing the history of the specified Resource
        Throws:
        java.lang.Exception
      • doHistory

        default Bundle doHistory​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                                 java.lang.String requestUri)
                          throws java.lang.Exception
        Implement the system level history operation to obtain a list of changes to resources
        Parameters:
        queryParameters - a Map containing the query parameters from the request URL
        requestUri - the request URI
        Returns:
        a Bundle containing the history of the specified Resource
        Throws:
        java.lang.Exception
      • doHistory

        Bundle doHistory​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                         java.lang.String requestUri,
                         java.lang.String resourceType)
                  throws java.lang.Exception
        Implement the system level history operation to obtain a list of changes to resources with an optional resourceType which supports for example [base]/Patient/_history requests to return the complete history of changes filtered to a specific resource type. Because the resource type is included in the path, this variant allows only a single resource type to be specified. To obtain history for more than one resource type, the [base]/_history whole system history endpoint should be used instead with a list of resource types specified using the _type query parameter.
        Parameters:
        queryParameters - a Map containing the query parameters from the request URL
        requestUri - the request URI
        resourceType - optional resourceType to filter the history
        Returns:
        a Bundle containing the history of the specified Resource
        Throws:
        java.lang.Exception
      • doSearch

        Bundle doSearch​(java.lang.String type,
                        java.lang.String compartment,
                        java.lang.String compartmentId,
                        javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                        java.lang.String requestUri)
                 throws java.lang.Exception
        Performs heavy lifting associated with a 'search' operation.
        Parameters:
        type - the resource type associated with the search
        compartment - the compartment type to search in, or null if not a compartment search
        compartmentId - the specific compartment to search in, or null if not a compartment search
        queryParameters - a Map containing the query parameters from the request URL
        requestUri - the request URI
        Returns:
        a Bundle containing the search result set
        Throws:
        java.lang.Exception
      • doSearch

        Bundle doSearch​(java.lang.String type,
                        java.lang.String compartment,
                        java.lang.String compartmentId,
                        javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                        java.lang.String requestUri,
                        boolean checkIfInteractionAllowed,
                        boolean alwaysIncludeResources)
                 throws java.lang.Exception
        Performs heavy lifting associated with a 'search' operation.
        Parameters:
        type - the resource type associated with the search
        compartment - the compartment type to search in, or null if not a compartment search
        compartmentId - the specific compartment to search in, or null if not a compartment search
        queryParameters - a Map containing the query parameters from the request URL
        requestUri - the request URI
        checkIfInteractionAllowed - if true, check that the search interaction is permitted
        alwaysIncludeResources - if true, ignore any return preference and always include the resource in the search result bundle
        Returns:
        a Bundle containing the search result set
        Throws:
        java.lang.Exception
      • doInvoke

        Resource doInvoke​(FHIROperationContext operationContext,
                          java.lang.String resourceTypeName,
                          java.lang.String logicalId,
                          java.lang.String versionId,
                          Resource resource,
                          javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
                   throws java.lang.Exception
        Helper method which invokes a custom operation.
        Parameters:
        operationContext - the FHIROperationContext associated with the request
        resourceTypeName - the resource type associated with the request
        logicalId - the resource logical id associated with the request
        versionId - the resource version id associated with the request
        resource - the input resource associated with the custom operation to be invoked
        queryParameters - query parameters may be passed instead of a Parameters resource for certain custom operations invoked via GET
        Returns:
        a Resource that represents the response to the custom operation
        Throws:
        java.lang.Exception
      • doBundle

        Bundle doBundle​(Bundle bundle,
                        boolean skippableUpdates)
                 throws java.lang.Exception
        Processes a bundled request (batch or transaction type).
        Parameters:
        bundle - the request Bundle
        skippableUpdates - if true, and the bundle contains an update for which the resource content in the update matches the existing resource on the server, then skip the update; if false, then always attempt the updates specified in the bundle
        Returns:
        the response Bundle
        Throws:
        java.lang.Exception
      • doReindex

        int doReindex​(FHIROperationContext operationContext,
                      OperationOutcome.Builder operationOutcomeResult,
                      java.time.Instant tstamp,
                      java.util.List<java.lang.Long> indexIds,
                      java.lang.String resourceLogicalId,
                      boolean force)
               throws java.lang.Exception
        Invoke the FHIR persistence reindex operation for either a specified list of indexIds, or a randomly chosen resource, last reindexed before the given timestamp.
        Parameters:
        operationContext - the operation context
        operationOutcomeResult - accumulate issues in this OperationOutcome.Builder
        tstamp - only reindex resources with a reindex_tstamp less than this
        indexIds - list of index IDs of resources to reindex, or null
        resourceLogicalId - resourceType (e.g. "Patient"), or resourceType/logicalId a specific resource (e.g. "Patient/abc123"), to reindex, or null; this parameter is ignored if the indexIds parameter value is non-null
        force - if true, ignore parameter hash and always replace the parameters
        Returns:
        count of the number of resources reindexed by this call
        Throws:
        java.lang.Exception
      • doRetrieveIndex

        java.util.List<java.lang.Long> doRetrieveIndex​(FHIROperationContext operationContext,
                                                       java.lang.String resourceTypeName,
                                                       int count,
                                                       java.time.Instant notModifiedAfter,
                                                       java.lang.Long afterIndexId)
                                                throws java.lang.Exception
        Invoke the FHIR persistence retrieve index operation to retrieve a list of indexIds available for reindexing.
        Parameters:
        operationContext - the operation context
        resourceTypeName - the resource type of index IDs to return, or null
        count - the maximum nuber of index IDs to retrieve
        notModifiedAfter - only retrieve index IDs for resources not last updated after the specified timestamp
        afterIndexId - retrieve index IDs starting after this specified ID, or null to start with first ID
        Returns:
        list of index IDs available for reindexing
        Throws:
        java.lang.Exception
      • generateResourceId

        java.lang.String generateResourceId()
        Generate a new resource id. This is typically delegated to the persistence layer, which may want to create FHIR-compliant ids optimized for a certain type of storage.
        Returns:
      • storePayload

        PayloadPersistenceResponse storePayload​(Resource resource,
                                                java.lang.String logicalId,
                                                int newVersionNumber,
                                                java.lang.String resourcePayloadKey)
                                         throws java.lang.Exception
        If the underlying persistence layer supports offloading payload storage, initiate the request here.
        Parameters:
        resource - the resource to store (with correct Meta fields)
        logicalId - the logical id of the resource
        newVersionNumber - the version number to use
        resourcePayloadKey - the key used to tie the RDBMS record with the offload record
        Returns:
        a response to the payload store operation, or null if it is not supported
        Throws:
        java.lang.Exception
      • validateResource

        java.util.List<OperationOutcome.Issue> validateResource​(Resource resource)
                                                         throws FHIROperationException
        Validate a resource. First validate profile assertions for the resource if configured to do so, then validate the resource itself.
        Parameters:
        resource - the resource to be validated
        Returns:
        A list of validation errors and warnings
        Throws:
        FHIROperationException