
Package ca.uhn.fhir.jpa.dao
Class TransactionUtil
java.lang.Object
ca.uhn.fhir.jpa.dao.TransactionUtil
This class contains utility methods for working with HAPI FHIR Transactions (referring to the FHIR
"transaction" operation, as opposed to working with database transactions).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionparseTransactionResponse
(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IBaseBundle theTransactionRequestBundle, org.hl7.fhir.instance.model.api.IBaseBundle theTransactionResponseBundle) This method accepts a Bundle which was returned by a call to HAPI FHIR's transaction/batch processor.
-
Method Details
-
parseTransactionResponse
public static TransactionUtil.TransactionResponse parseTransactionResponse(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IBaseBundle theTransactionRequestBundle, org.hl7.fhir.instance.model.api.IBaseBundle theTransactionResponseBundle) This method accepts a Bundle which was returned by a call to HAPI FHIR's transaction/batch processor. HAPI FHIR has specific codes and extensions it will always put into the OperationOutcomes returned by the transaction processor, so this method parses these and returns a more machine-processable interpretation.This method only returns outcome details for standard write operations (create/update/patch) and will not include details for other kinds of operations (read/search/etc).
This method should only be called for Bundles returned by HAPI FHIR's transaction processor, results will have no meaning for any other input.
- Parameters:
theContext
- A FhirContext instance for the appropriate FHIR versiontheTransactionRequestBundle
- The transaction request bundle which was processed in order to produce theTransactionResponseBundletheTransactionResponseBundle
- The transaction response bundle. This bundle must be a transaction response produced by the same version of HAPI FHIR, as this code looks for elements it will expect to be present.- Since:
- 8.2.0
-