From cfa6c13262e94419d5600e18642419065d8c176a Mon Sep 17 00:00:00 2001
From: karneet1212 <112980019+karneet1212@users.noreply.github.com>
Date: Thu, 22 Dec 2022 09:54:32 -0500
Subject: [PATCH] Add resource type as a parameter for $mdm-query-links (#4372)
* Added Solution + test
* Removed old methods
* fixed issues
* Added refactoring
* Deprecated methods on the interfaces
* Remove todo
* Documentation
* Changelog
* Changelog
* Changelog
* Changes made based on comments
* Changes made based on comments
* Clean up
* hapi bumping to version 6.3.6-SNAPSHOT
* hapi bumping to version 6.3.6-SNAPSHOT
---
hapi-deployable-pom/pom.xml | 2 +-
hapi-fhir-android/pom.xml | 2 +-
hapi-fhir-base/pom.xml | 2 +-
hapi-fhir-bom/pom.xml | 4 +-
hapi-fhir-checkstyle/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +-
hapi-fhir-cli/pom.xml | 2 +-
hapi-fhir-client-okhttp/pom.xml | 2 +-
hapi-fhir-client/pom.xml | 2 +-
hapi-fhir-converter/pom.xml | 2 +-
hapi-fhir-dist/pom.xml | 2 +-
hapi-fhir-docs/pom.xml | 2 +-
...pe-as-a-parameter-for-mdm-query-links.yaml | 5 +
.../docs/server_jpa_mdm/mdm_operations.md | 8 +
hapi-fhir-jacoco/pom.xml | 2 +-
hapi-fhir-jaxrsserver-base/pom.xml | 2 +-
hapi-fhir-jpa/pom.xml | 2 +-
hapi-fhir-jpaserver-base/pom.xml | 2 +-
.../fhir/jpa/dao/mdm/MdmLinkDaoJpaImpl.java | 39 +++--
hapi-fhir-jpaserver-cql/pom.xml | 2 +-
.../pom.xml | 2 +-
hapi-fhir-jpaserver-mdm/pom.xml | 2 +-
.../uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java | 15 +-
.../jpa/mdm/svc/MdmControllerSvcImpl.java | 36 +++--
.../jpa/mdm/svc/MdmLinkQuerySvcImplSvc.java | 21 ++-
.../provider/MdmProviderQueryLinkR4Test.java | 42 +++--
.../jpa/mdm/svc/MdmControllerSvcImplTest.java | 7 +-
hapi-fhir-jpaserver-model/pom.xml | 2 +-
hapi-fhir-jpaserver-searchparam/pom.xml | 2 +-
hapi-fhir-jpaserver-subscription/pom.xml | 2 +-
hapi-fhir-jpaserver-test-dstu2/pom.xml | 2 +-
hapi-fhir-jpaserver-test-dstu3/pom.xml | 2 +-
hapi-fhir-jpaserver-test-r4/pom.xml | 2 +-
hapi-fhir-jpaserver-test-r4b/pom.xml | 2 +-
hapi-fhir-jpaserver-test-r5/pom.xml | 2 +-
hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +-
hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +-
hapi-fhir-server-mdm/pom.xml | 2 +-
.../uhn/fhir/mdm/api/IMdmControllerSvc.java | 8 +-
.../ca/uhn/fhir/mdm/api/IMdmLinkQuerySvc.java | 3 +
.../mdm/api/MdmQuerySearchParameters.java | 152 ++++++++++++++++++
.../java/ca/uhn/fhir/mdm/dao/IMdmLinkDao.java | 3 +
.../mdm/provider/MdmProviderDstu3Plus.java | 24 ++-
.../mdm/api/MdmQuerySearchParametersTest.java | 39 +++++
hapi-fhir-server-openapi/pom.xml | 2 +-
hapi-fhir-server/pom.xml | 2 +-
.../hapi-fhir-caching-api/pom.xml | 2 +-
.../hapi-fhir-caching-caffeine/pom.xml | 4 +-
.../hapi-fhir-caching-guava/pom.xml | 2 +-
.../hapi-fhir-caching-testing/pom.xml | 2 +-
hapi-fhir-serviceloaders/pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../hapi-fhir-spring-boot-samples/pom.xml | 2 +-
.../hapi-fhir-spring-boot-starter/pom.xml | 2 +-
hapi-fhir-spring-boot/pom.xml | 2 +-
hapi-fhir-sql-migrate/pom.xml | 2 +-
hapi-fhir-storage-batch2-jobs/pom.xml | 2 +-
hapi-fhir-storage-batch2/pom.xml | 2 +-
hapi-fhir-storage-mdm/pom.xml | 2 +-
hapi-fhir-storage-test-utilities/pom.xml | 2 +-
hapi-fhir-storage/pom.xml | 2 +-
hapi-fhir-structures-dstu2.1/pom.xml | 2 +-
hapi-fhir-structures-dstu2/pom.xml | 2 +-
hapi-fhir-structures-dstu3/pom.xml | 2 +-
hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +-
hapi-fhir-structures-r4/pom.xml | 2 +-
hapi-fhir-structures-r4b/pom.xml | 2 +-
hapi-fhir-structures-r5/pom.xml | 2 +-
hapi-fhir-test-utilities/pom.xml | 2 +-
hapi-fhir-testpage-overlay/pom.xml | 2 +-
.../pom.xml | 2 +-
hapi-fhir-validation-resources-dstu2/pom.xml | 2 +-
hapi-fhir-validation-resources-dstu3/pom.xml | 2 +-
hapi-fhir-validation-resources-r4/pom.xml | 2 +-
hapi-fhir-validation-resources-r5/pom.xml | 2 +-
hapi-fhir-validation/pom.xml | 2 +-
hapi-tinder-plugin/pom.xml | 2 +-
hapi-tinder-test/pom.xml | 2 +-
pom.xml | 4 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
87 files changed, 416 insertions(+), 138 deletions(-)
create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/4371-add-resource-type-as-a-parameter-for-mdm-query-links.yaml
create mode 100644 hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParameters.java
create mode 100644 hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/api/MdmQuerySearchParametersTest.java
diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 087363e9dc7..62207eb2ff1 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
executeTypedQuery(IIdType theGoldenResourceId, IIdType theSourceId, MdmMatchResultEnum theMatchResult, MdmLinkSourceEnum theLinkSource, MdmPageRequest thePageRequest, List search(IIdType theGoldenResourceId, IIdType theSourceId, MdmMatchResultEnum theMatchResult, MdmLinkSourceEnum theLinkSource, MdmPageRequest thePageRequest, List theResourcePersistentIds);
diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java
index 82f527a8c27..1b0d147777a 100644
--- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java
+++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/provider/MdmProviderDstu3Plus.java
@@ -27,6 +27,7 @@ import ca.uhn.fhir.mdm.api.IMdmSettings;
import ca.uhn.fhir.mdm.api.IMdmSubmitSvc;
import ca.uhn.fhir.mdm.api.MdmConstants;
import ca.uhn.fhir.mdm.api.MdmLinkJson;
+import ca.uhn.fhir.mdm.api.MdmQuerySearchParameters;
import ca.uhn.fhir.mdm.api.paging.MdmPageRequest;
import ca.uhn.fhir.mdm.model.MdmTransactionContext;
import ca.uhn.fhir.model.api.annotation.Description;
@@ -187,14 +188,21 @@ public class MdmProviderDstu3Plus extends BaseMdmProvider {
@Description(formalDefinition = "Results from this method are returned across multiple pages. This parameter controls the size of those pages.")
@OperationParam(name = Constants.PARAM_COUNT, min = 0, max = 1, typeName = "integer")
IPrimitiveType