diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/SearchParamExtractorDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/SearchParamExtractorDstu3.java index 9b8d637f4b0..b70317997eb 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/SearchParamExtractorDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/SearchParamExtractorDstu3.java @@ -195,6 +195,9 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen } nextEntity = new ResourceIndexedSearchParamDate(nextSpDef.getName(), dates.first(), dates.last()); + } else if (nextObject instanceof StringType) { + // CarePlan.activitydate can be a string + continue; } else { if (!multiType) { throw new ConfigurationException("Search param " + nextSpDef.getName() + " is of unexpected datatype: " + nextObject.getClass()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java index 944cdac795d..3dcf2d9b726 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java @@ -573,7 +573,6 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } @Test - @Ignore public void testTimingSearchParams() throws Exception { Date before = new DateTimeType("2011-01-01T10:00:00Z").getValue(); Date middle = new DateTimeType("2011-01-02T10:00:00Z").getValue(); diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorDstu3Test.java index 743c817d5bd..8d6ec769c70 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorDstu3Test.java @@ -122,7 +122,7 @@ public class FhirInstanceValidatorDstu3Test { List fpOutput; BooleanType bool; - fpOutput = fp.evaluate(bundle.getEntry().get(0), "component.where(code = %resource.code).empty()"); + fpOutput = fp.evaluate(bundle.getEntry().get(0).getResource(), "component.where(code = %resource.code).empty()"); assertEquals(1, fpOutput.size()); bool = (BooleanType) fpOutput.get(0); assertTrue(bool.getValue()); diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 9f3b5ff000b..732c0be9243 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -154,6 +154,10 @@ JPA server transactions containing a bundle that has multiple entries trying to delete the same resource caused a 500 internal error + + JPA module failed to index search parameters that mapped to a Timing datatype, + e.g. CarePlan:activitydate +