Interface IGenericClient

All Superinterfaces:
IRestfulClient

public interface IGenericClient extends IRestfulClient
  • Method Details

    • capabilities

      Fetch the capability statement for the server
    • create

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

      Fluent method for the "delete" operation, which performs a logical delete on a server resource
    • fetchConformance

      Deprecated.
      As of HAPI 3.0.0 this method has been deprecated, as the operation is now called "capabilities". Use capabilities() instead
      Retrieves the server's conformance statement
    • forceConformanceCheck

      Force the client to fetch the server's conformance statement and validate that it is appropriate for this client.
      Throws:
      FhirClientConnectionException - if the conformance statement cannot be read, or if the client
      FhirClientInappropriateForServerException - If the conformance statement indicates that the server is inappropriate for this client (e.g. it implements the wrong version of FHIR)
    • history

      Implementation of the "history" method
    • 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

      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
    • operation

      Implementation of the FHIR "extended operations" action
    • patch

      Fluent method for the "patch" operation, which performs a logical patch on a server resource
    • 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.
      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 IBaseBundle> IUntypedQuery<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

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

      void unregisterInterceptor(Object theInterceptor)
      Remove an intercaptor that was previously registered using IRestfulClient.registerInterceptor(Object)
      Specified by:
      unregisterInterceptor in interface IRestfulClient
    • update

      Fluent method for the "update" operation, which updates a resource instance on the server
    • update

      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.
      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
    • validate

      Validate a resource
    • validate

      Deprecated.
      Use validate() fluent method instead (deprecated in HAPI FHIR 3.0.0)
      Implementation of the "type validate" method.
      Parameters:
      theResource - The resource to validate
      Returns:
      An outcome containing any validation issues
    • 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