From 3b9f9e6cc39c3ca80a4e62029fb3ffaa042baeee Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 3 Aug 2020 21:35:12 -0700 Subject: [PATCH] Rename operation --- .../fhir/changelog/5_1_0/1984-batch-empi-job.yaml | 4 ++-- .../fhir/docs/server_jpa_empi/empi_operations.md | 12 ++++++------ .../uhn/fhir/jpa/empi/svc/EmpiBatchSvcImpl.java | 15 --------------- .../rest/server/provider/ProviderConstants.java | 2 +- 4 files changed, 9 insertions(+), 24 deletions(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_1_0/1984-batch-empi-job.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_1_0/1984-batch-empi-job.yaml index d944341ad9e..092bf7cd0eb 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_1_0/1984-batch-empi-job.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_1_0/1984-batch-empi-job.yaml @@ -1,5 +1,5 @@ --- type: add issue: 1984 -title: "Two new operations have been added for EMPI: `$empi-clear` and `$empi-batch-run`. `$empi-clear` will delete EMPI links, -and related Person objects. `$empi-batch-run` will submit all matching resources for EMPI processing." +title: "Two new operations have been added for EMPI: `$empi-clear` and `$empi-submit`. `$empi-clear` will delete EMPI links, +and related Person objects. `$empi-submit` will submit all matching resources for EMPI processing." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_empi/empi_operations.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_empi/empi_operations.md index 5a5111f0b85..25797393c55 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_empi/empi_operations.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_empi/empi_operations.md @@ -514,7 +514,7 @@ This operation returns the number of EMPI links that were cleared. The following ## Batch-creating EMPI Links -Call the `$empi-batch-run` operation to batch-process patients and practitioners. In the rules-tuning phase of your setup, you can use `$empi-batch-run` to apply EMPI rules across multiple Resources. +Call the `$empi-submit` operation to submit patients and practitioners for EMPI processing. In the rules-tuning phase of your setup, you can use `$empi-submit` to apply EMPI rules across multiple Resources. An important thing to note is that this operation only submits the resources for processing. Actual EMPI processing is run asynchronously, and depending on the size of the affected bundle of resources, may take some time to complete. @@ -549,9 +549,9 @@ This operation can be executed at the Server level, Resource level, or Instance Use an HTTP POST to the following URL to invoke this operation with matching criteria: ```url -http://example.com/$empi-batch-run -http://example.com/Patient/$empi-batch-run -http://example.com/Practitioner/$empi-batch-run +http://example.com/$empi-submit +http://example.com/Patient/$empi-submit +http://example.com/Practitioner/$empi-submit ``` The following request body could be used: @@ -581,7 +581,7 @@ This operation can also be done at the Instance level. When this is the case, th The following are examples of Instance level POSTs, which require no parameters. ```url -http://example.com/Patient/123/$empi-batch-run -http://example.com/Practitioner/456/$empi-batch-run +http://example.com/Patient/123/$empi-submit +http://example.com/Practitioner/456/$empi-submit ``` diff --git a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiBatchSvcImpl.java b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiBatchSvcImpl.java index 1d12c29e2a9..9b448c02051 100644 --- a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiBatchSvcImpl.java +++ b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiBatchSvcImpl.java @@ -93,21 +93,6 @@ public class EmpiBatchSvcImpl implements IEmpiBatchSvc { return total; } - /** - * Given an iterator, get a batch of max size BUFFER_SIZE. - * - * @param theQuery the iterator. - * - * @return a collection of ResourcePersistentId entities. - */ - public Collection getPidBatch(IResultIterator theQuery) { - Collection batch = new ArrayList<>(); - while (theQuery.hasNext() && batch.size() <= BUFFER_SIZE) { - batch.add(theQuery.next()); - } - return batch; - } - /** * Given a collection of ResourcePersistentId objects, and a search builder, load the IBaseResources and submit them to * the EMPI channel for processing. diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java index 17a93175992..474a1784621 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/provider/ProviderConstants.java @@ -84,7 +84,7 @@ public class ProviderConstants { public static final String EMPI_CLEAR = "$empi-clear"; public static final String EMPI_CLEAR_TARGET_TYPE = "targetType"; - public static final String OPERATION_EMPI_BATCH_RUN = "$empi-batch-run"; + public static final String OPERATION_EMPI_BATCH_RUN = "$empi-submit"; public static final String EMPI_BATCH_RUN_CRITERIA= "criteria" ; public static final String OPERATION_EMPI_BATCH_RUN_OUT_PARAM_SUBMIT_COUNT = "submitted" ; public static final String OPERATION_EMPI_CLEAR_OUT_PARAM_DELETED_COUNT = "deleted";