Interface IGenericClient

    • Method Detail

      • create

        ICreate create()
        Fluent method for the "create" operation, which creates a new resource instance on the server
      • delete

        IDelete delete()
        Fluent method for the "delete" operation, which performs a logical delete on a server resource
      • loadPage

        IGetPage loadPage()
        Loads the previous/next bundle of resources from a paged set, using the link specified in the "link type=next" tag within the atom bundle.
      • meta

        IMeta meta()
        Fluent method for the "meta" operations, which can be used to get, add and remove tags and other Meta elements from a resource or across the server.
        Since:
        1.1
      • patch

        IPatch patch()
        Fluent method for the "patch" operation, which performs a logical patch on a server resource
      • read

        IRead read()
        Fluent method for "read" and "vread" methods.
      • read

        @Deprecated
        <T extends IBaseResource> T read​(Class<T> theType,
                                         String theId)
        Deprecated.
        Use read() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Implementation of the "instance read" method.
        Parameters:
        theType - The type of resource to load
        theId - The ID to load
        Returns:
        The resource
      • read

        @Deprecated
        <T extends IBaseResource> T read​(Class<T> theType,
                                         UriDt theUrl)
        Deprecated.
        Use read() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.
        Parameters:
        theType - The resource type that is being retrieved
        theUrl - The absolute URL, e.g. "http://example.com/fhir/Patient/123"
        Returns:
        The returned resource from the server
      • read

        @Deprecated
        IBaseResource read​(UriDt theUrl)
        Deprecated.
        Use read() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Perform the "read" operation (retrieve the latest version of a resource instance by ID) using an absolute URL.
        Parameters:
        theUrl - The absolute URL, e.g. "http://example.com/fhir/Patient/123"
        Returns:
        The returned resource from the server
      • registerInterceptor

        void registerInterceptor​(Object theInterceptor)
        Register a new interceptor for this client. An interceptor can be used to add additional logging, or add security headers, or pre-process responses, etc.
        Specified by:
        registerInterceptor in interface IRestfulClient
      • search

        <T extends IBaseBundleIUntypedQuery<T> search()
        Search for resources matching a given set of criteria. Searching is a very powerful feature in FHIR with many features for specifying exactly what should be seaerched for and how it should be returned. See the specification on search for more information.
      • setLogRequestAndResponse

        @Deprecated
        void setLogRequestAndResponse​(boolean theLogRequestAndResponse)
        Deprecated.
        Use LoggingInterceptor as a client interceptor registered to your client instead, as this provides much more fine-grained control over what is logged. This method will be removed at some point (deprecated in HAPI 1.6 - 2016-06-16)
        If set to true, the client will log all requests and all responses. This is probably not a good production setting since it will result in a lot of extra logging, but it can be useful for troubleshooting.
        Parameters:
        theLogRequestAndResponse - Should requests and responses be logged
      • transaction

        ITransaction transaction()
        Send a transaction (collection of resources) to the server to be executed as a single unit
      • update

        IUpdate update()
        Fluent method for the "update" operation, which performs a logical delete on a server resource
      • update

        @Deprecated
        MethodOutcome update​(IdDt theId,
                             IBaseResource theResource)
        Deprecated.
        Use update() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Implementation of the "instance update" method.
        Parameters:
        theId - The ID to update
        theResource - The new resource body
        Returns:
        An outcome containing the results and possibly the new version ID
      • update

        @Deprecated
        MethodOutcome update​(String theId,
                             IBaseResource theResource)
        Deprecated.
        Use update() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Implementation of the "instance update" method.
        Parameters:
        theId - The ID to update
        theResource - The new resource body
        Returns:
        An outcome containing the results and possibly the new version ID
      • vread

        @Deprecated
        <T extends IBaseResource> T vread​(Class<T> theType,
                                          IdDt theId)
        Deprecated.
        Use read() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Implementation of the "instance vread" method. Note that this method expects theId to contain a resource ID as well as a version ID, and will fail if it does not.

        Note that if an absolute resource ID is passed in (i.e. a URL containing a protocol and host as well as the resource type and ID) the server base for the client will be ignored, and the URL passed in will be queried.

        Parameters:
        theType - The type of resource to load
        theId - The ID to load, including the resource ID and the resource version ID. Valid values include "Patient/123/_history/222", or "http://example.com/fhir/Patient/123/_history/222"
        Returns:
        The resource
      • vread

        @Deprecated
        <T extends IBaseResource> T vread​(Class<T> theType,
                                          String theId,
                                          String theVersionId)
        Deprecated.
        Use read() fluent method instead (deprecated in HAPI FHIR 3.0.0)
        Implementation of the "instance vread" method.
        Parameters:
        theType - The type of resource to load
        theId - The ID to load
        theVersionId - The version ID
        Returns:
        The resource