From dffc02a12600ff670d4278e1e9fe94f481516586 Mon Sep 17 00:00:00 2001 From: ianmarshall Date: Wed, 23 Sep 2020 16:51:18 -0400 Subject: [PATCH] Missing fixes for DSTU3 and R5. --- .../provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java | 3 +++ .../jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java index 9c54199e262..9c522e5cd81 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderCodeSystemDstu3.java @@ -64,6 +64,9 @@ public class BaseJpaResourceProviderCodeSystemDstu3 extends JpaResourceProviderD IValidationSupport.LookupCodeResult result; if (theVersion != null) { result = dao.lookupCode(theCode, new UriType(theSystem.getValue() + "|" + theVersion), theCoding, theRequestDetails); + } else if (theCoding != null && theCoding.hasVersion()) { + Coding codingWithVersion = new Coding(theCoding.getSystem() + "|" + theCoding.getVersion(), theCoding.getCode(), theCoding.getDisplay()); + result = dao.lookupCode(theCode, theSystem, codingWithVersion, theRequestDetails); } else { result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java index 126c44a3b80..693ab7f1c69 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderCodeSystemR5.java @@ -66,6 +66,9 @@ public class BaseJpaResourceProviderCodeSystemR5 extends JpaResourceProviderR5