
Package ca.uhn.fhir.jpa.provider.merge
Class ResourceMergeService
java.lang.Object
ca.uhn.fhir.jpa.provider.merge.ResourceMergeService
Service for the FHIR $merge operation. Currently only supports Patient/$merge. The plan is to expand to other resource types.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceMergeService
(JpaStorageSettings theStorageSettings, DaoRegistry theDaoRegistry, IReplaceReferencesSvc theReplaceReferencesSvc, IHapiTransactionService theHapiTransactionService, IRequestPartitionHelperSvc theRequestPartitionHelperSvc, IJobCoordinator theJobCoordinator, Batch2TaskHelper theBatch2TaskHelper) -
Method Summary
Modifier and TypeMethodDescriptionmerge
(BaseMergeOperationInputParameters theMergeOperationParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Perform the $merge operation.
-
Constructor Details
-
ResourceMergeService
public ResourceMergeService(JpaStorageSettings theStorageSettings, DaoRegistry theDaoRegistry, IReplaceReferencesSvc theReplaceReferencesSvc, IHapiTransactionService theHapiTransactionService, IRequestPartitionHelperSvc theRequestPartitionHelperSvc, IJobCoordinator theJobCoordinator, Batch2TaskHelper theBatch2TaskHelper)
-
-
Method Details
-
merge
public MergeOperationOutcome merge(BaseMergeOperationInputParameters theMergeOperationParameters, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) Perform the $merge operation. Operation can be performed synchronously or asynchronously depending on the prefer-async request header. If the operation is requested to be performed synchronously and the number of resources to be changed exceeds the provided batch size, and error is returned indicating that operation needs to be performed asynchronously. See the Patient $merge spec for details on what the difference is between synchronous and asynchronous mode.- Parameters:
theMergeOperationParameters
- the merge operation parameterstheRequestDetails
- the request details- Returns:
- the merge outcome containing OperationOutcome and HTTP status code
-