Class FhirOperation

java.lang.Object
org.apache.camel.component.fhir.api.FhirOperation

public class FhirOperation extends Object
API for extended FHIR operations
  • Constructor Summary

    Constructors
    Constructor
    Description
    FhirOperation(ca.uhn.fhir.rest.client.api.IGenericClient client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.hl7.fhir.instance.model.api.IBaseParameters>
    org.hl7.fhir.instance.model.api.IBaseResource
    onInstance(org.hl7.fhir.instance.model.api.IIdType id, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
    Perform the operation across all versions of a specific resource (by ID and type) on the server.
    <T extends org.hl7.fhir.instance.model.api.IBaseParameters>
    org.hl7.fhir.instance.model.api.IBaseResource
    onInstanceVersion(org.hl7.fhir.instance.model.api.IIdType id, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
    This operation operates on a specific version of a resource
    <T extends org.hl7.fhir.instance.model.api.IBaseParameters>
    org.hl7.fhir.instance.model.api.IBaseResource
    onServer(String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
    Perform the operation across all versions of all resources of all types on the server
    <T extends org.hl7.fhir.instance.model.api.IBaseParameters>
    org.hl7.fhir.instance.model.api.IBaseResource
    onType(Class<org.hl7.fhir.instance.model.api.IBaseResource> resourceType, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
    Perform the operation across all versions of all resources of the given type on the server
    <T extends org.hl7.fhir.instance.model.api.IBaseBundle>
    T
    processMessage(String respondToUri, org.hl7.fhir.instance.model.api.IBaseBundle msgBundle, boolean asynchronous, Class<T> responseClass, Map<ExtraParameters,Object> extraParameters)
    This operation is called $process-message as defined by the FHIR specification.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FhirOperation

      public FhirOperation(ca.uhn.fhir.rest.client.api.IGenericClient client)
  • Method Details

    • onType

      public <T extends org.hl7.fhir.instance.model.api.IBaseParameters> org.hl7.fhir.instance.model.api.IBaseResource onType(Class<org.hl7.fhir.instance.model.api.IBaseResource> resourceType, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
      Perform the operation across all versions of all resources of the given type on the server
      Type Parameters:
      T - extends IBaseParameters
      Parameters:
      resourceType - The resource type to operate on
      name - Operation name
      parameters - The parameters to use as input. May also be null if the operation does not require any input parameters.
      outputParameterType - The type to use for the output parameters (this should be set to Parameters.class drawn from the version of the FHIR structures you are using), may be NULL
      useHttpGet - use HTTP GET verb
      returnType - If this operation returns a single resource body as its return type instead of a Parameters resource, use this method to specify that resource type. This is useful for certain operations (e.g. Patient/NNN/$everything) which return a bundle instead of a Parameters resource, may be NULL
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the IBaseResource
    • onServer

      public <T extends org.hl7.fhir.instance.model.api.IBaseParameters> org.hl7.fhir.instance.model.api.IBaseResource onServer(String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
      Perform the operation across all versions of all resources of all types on the server
      Type Parameters:
      T - extends IBaseParameters
      Parameters:
      name - Operation name
      parameters - The parameters to use as input. May also be null if the operation does not require any input parameters.
      outputParameterType - The type to use for the output parameters (this should be set to Parameters.class drawn from the version of the FHIR structures you are using), may be NULL
      useHttpGet - use HTTP GET verb
      returnType - If this operation returns a single resource body as its return type instead of a Parameters resource, use this method to specify that resource type. This is useful for certain operations (e.g. Patient/NNN/$everything) which return a bundle instead of a Parameters resource, may be NULL
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the IBaseResource
    • onInstance

      public <T extends org.hl7.fhir.instance.model.api.IBaseParameters> org.hl7.fhir.instance.model.api.IBaseResource onInstance(org.hl7.fhir.instance.model.api.IIdType id, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
      Perform the operation across all versions of a specific resource (by ID and type) on the server. Note that theId must be populated with both a resource type and a resource ID at a minimum.
      Type Parameters:
      T - extends IBaseParameters
      Parameters:
      id - Resource (version will be stripped)
      name - Operation name
      parameters - The parameters to use as input. May also be null if the operation does not require any input parameters.
      outputParameterType - The type to use for the output parameters (this should be set to Parameters.class drawn from the version of the FHIR structures you are using), may be NULL
      useHttpGet - use HTTP GET verb
      returnType - If this operation returns a single resource body as its return type instead of a Parameters resource, use this method to specify that resource type. This is useful for certain operations (e.g. Patient/NNN/$everything) which return a bundle instead of a Parameters resource, may be NULL
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the IBaseResource
      Throws:
      IllegalArgumentException - If theId does not contain at least a resource type and ID
    • onInstanceVersion

      public <T extends org.hl7.fhir.instance.model.api.IBaseParameters> org.hl7.fhir.instance.model.api.IBaseResource onInstanceVersion(org.hl7.fhir.instance.model.api.IIdType id, String name, T parameters, Class<T> outputParameterType, boolean useHttpGet, Class<org.hl7.fhir.instance.model.api.IBaseResource> returnType, Map<ExtraParameters,Object> extraParameters)
      This operation operates on a specific version of a resource
      Type Parameters:
      T - extends IBaseParameters
      Parameters:
      id - Resource version
      name - Operation name
      parameters - The parameters to use as input. May also be null if the operation does not require any input parameters.
      outputParameterType - The type to use for the output parameters (this should be set to Parameters.class drawn from the version of the FHIR structures you are using), may be NULL
      useHttpGet - use HTTP GET verb
      returnType - If this operation returns a single resource body as its return type instead of a Parameters resource, use this method to specify that resource type. This is useful for certain operations (e.g. Patient/NNN/$everything) which return a bundle instead of a Parameters resource, may be NULL
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the IBaseResource
    • processMessage

      public <T extends org.hl7.fhir.instance.model.api.IBaseBundle> T processMessage(String respondToUri, org.hl7.fhir.instance.model.api.IBaseBundle msgBundle, boolean asynchronous, Class<T> responseClass, Map<ExtraParameters,Object> extraParameters)
      This operation is called $process-message as defined by the FHIR specification.

      Type Parameters:
      T - extends IBaseBundle
      Parameters:
      respondToUri - An optional query parameter indicating that responses from the receiving server should be sent to this URI, may be NULL
      msgBundle - Set the Message Bundle to POST to the messaging server
      asynchronous - Whether to process the message asynchronously or synchronously, defaults to synchronous.
      responseClass - the response class
      extraParameters - see ExtraParameters for a full list of parameters that can be passed, may be NULL
      Returns:
      the IBaseBundle