From 5e17625a1bd8cc3032abefdc41cd36aa10ab25fb Mon Sep 17 00:00:00 2001 From: Frank Tao Date: Mon, 7 Sep 2020 18:09:01 -0400 Subject: [PATCH] Fixed NullPointerException for reverse $translate operation. --- .../dao/r4/FhirResourceDaoConceptMapR4.java | 9 ++- .../dao/r5/FhirResourceDaoConceptMapR5.java | 38 +++++---- .../ResourceProviderDstu3ConceptMapTest.java | 79 +++++++++++++++++++ .../r5/ResourceProviderR5ConceptMapTest.java | 79 +++++++++++++++++++ 4 files changed, 188 insertions(+), 17 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoConceptMapR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoConceptMapR4.java index d63074086db..67b518089f6 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoConceptMapR4.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoConceptMapR4.java @@ -32,6 +32,8 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.rest.api.server.storage.TransactionDetails; import ca.uhn.fhir.jpa.term.api.ITermReadSvc; import ca.uhn.fhir.rest.api.server.RequestDetails; + +import org.hl7.fhir.convertors.VersionConvertor_40_50; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.CodeType; @@ -39,6 +41,7 @@ import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.UriType; +import org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence; import org.springframework.beans.factory.annotation.Autowired; import java.util.Date; @@ -152,7 +155,11 @@ public class FhirResourceDaoConceptMapR4 extends BaseHapiFhirResourceDao implements IFhirResourceDaoConceptMap { @Autowired @@ -153,7 +155,11 @@ public class FhirResourceDaoConceptMapR5 extends BaseHapiFhirResourceDao