Class FhirOperation
java.lang.Object
org.apache.camel.component.fhir.api.FhirOperation
API for extended FHIR operations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.hl7.fhir.instance.model.api.IBaseParameters>
org.hl7.fhir.instance.model.api.IBaseResourceonInstance(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.IBaseResourceonInstanceVersion(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.IBaseResourceonServer(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.IBaseResourceonType(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>
TprocessMessage(String respondToUri, org.hl7.fhir.instance.model.api.IBaseBundle msgBundle, boolean asynchronous, Class<T> responseClass, Map<ExtraParameters, Object> extraParameters)
-
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- extendsIBaseParameters- Parameters:
resourceType- The resource type to operate onname- Operation nameparameters- The parameters to use as input. May also benullif the operation does not require any input parameters.outputParameterType- The type to use for the output parameters (this should be set toParameters.classdrawn from the version of the FHIR structures you are using), may be NULLuseHttpGet- use HTTP GET verbreturnType- If this operation returns a single resource body as its return type instead of aParametersresource, 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 NULLextraParameters- seeExtraParametersfor 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- extendsIBaseParameters- Parameters:
name- Operation nameparameters- The parameters to use as input. May also benullif the operation does not require any input parameters.outputParameterType- The type to use for the output parameters (this should be set toParameters.classdrawn from the version of the FHIR structures you are using), may be NULLuseHttpGet- use HTTP GET verbreturnType- If this operation returns a single resource body as its return type instead of aParametersresource, 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 NULLextraParameters- seeExtraParametersfor 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 thattheIdmust be populated with both a resource type and a resource ID at a minimum.- Type Parameters:
T- extendsIBaseParameters- Parameters:
id- Resource (version will be stripped)name- Operation nameparameters- The parameters to use as input. May also benullif the operation does not require any input parameters.outputParameterType- The type to use for the output parameters (this should be set toParameters.classdrawn from the version of the FHIR structures you are using), may be NULLuseHttpGet- use HTTP GET verbreturnType- If this operation returns a single resource body as its return type instead of aParametersresource, 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 NULLextraParameters- seeExtraParametersfor a full list of parameters that can be passed, may be NULL- Returns:
- the
IBaseResource - Throws:
IllegalArgumentException- IftheIddoes 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- extendsIBaseParameters- Parameters:
id- Resource versionname- Operation nameparameters- The parameters to use as input. May also benullif the operation does not require any input parameters.outputParameterType- The type to use for the output parameters (this should be set toParameters.classdrawn from the version of the FHIR structures you are using), may be NULLuseHttpGet- use HTTP GET verbreturnType- If this operation returns a single resource body as its return type instead of aParametersresource, 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 NULLextraParameters- seeExtraParametersfor 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) - Type Parameters:
T- extendsIBaseBundle- Parameters:
respondToUri- An optional query parameter indicating that responses from the receiving server should be sent to this URI, may be NULLmsgBundle- Set the Message Bundle to POST to the messaging serverasynchronous- Whether to process the message asynchronously or synchronously, defaults to synchronous.responseClass- the response classextraParameters- seeExtraParametersfor a full list of parameters that can be passed, may be NULL- Returns:
- the
IBaseBundle
-