I am using Hapi FHIR Jpa Server implementation for R4. I was trying compartment search on this server. It is throwing error. I am using Generic Client to perform compartment search.
response = client.search()
.forResource(FamilyMemberHistory.class)
.withIdAndCompartment("b3126407-6d25-4fc1-a8b2-d0d6f629be92", "Patient")
.returnBundle(Bundle.class)
.execute();
I have registered LoggingInterceptor
to my GenericClient to see how request is getting formed. It looks like http://localhost:8090/fhir/FamilyMemberHistory/b3126407-6d25-4fc1-a8b2-d0d6f629be92/Patient
. When Hapi Fhir JPA Server receives this request, it is throwing following error.
2020-05-13 14:03:49.033 TRACE 52512 --- [io-8090-exec-10] c.u.f.r.s.method.SearchMethodBinding : Method public ca.uhn.fhir.rest.api.server.IBundleProvider ca.uhn.fhir.jpa.rp.r4.FamilyMemberHistoryResourceProvider.search(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,ca.uhn.fhir.rest.api.server.RequestDetails,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.HasAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.DateRangeParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.ReferenceAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.ReferenceAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,java.util.Map,java.util.Set,ca.uhn.fhir.rest.param.DateRangeParam,java.util.Set,ca.uhn.fhir.rest.api.SortSpec,java.lang.Integer,ca.uhn.fhir.rest.api.SummaryEnum,ca.uhn.fhir.rest.api.SearchTotalModeEnum) doesn't match because ID is not null: FamilyMemberHistory/b3126407-6d25-4fc1-a8b2-d0d6f629be92
2020-05-13 14:03:49.033 TRACE 52512 --- [io-8090-exec-10] ca.uhn.fhir.rest.server.ResourceBinding : Handler public ca.uhn.fhir.rest.api.server.IBundleProvider ca.uhn.fhir.jpa.rp.r4.FamilyMemberHistoryResourceProvider.search(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,ca.uhn.fhir.rest.api.server.RequestDetails,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.HasAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.StringAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.DateRangeParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.ReferenceAndListParam,ca.uhn.fhir.rest.param.UriAndListParam,ca.uhn.fhir.rest.param.ReferenceAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,ca.uhn.fhir.rest.param.TokenAndListParam,java.util.Map,java.util.Set,ca.uhn.fhir.rest.param.DateRangeParam,java.util.Set,ca.uhn.fhir.rest.api.SortSpec,java.lang.Integer,ca.uhn.fhir.rest.api.SummaryEnum,ca.uhn.fhir.rest.api.SearchTotalModeEnum) does not match
2020-05-13 14:03:49.033 DEBUG 52512 --- [io-8090-exec-10] ca.uhn.fhir.rest.server.ResourceBinding : Looking for a handler for ca.uhn.fhir.rest.server.servlet.ServletRequestDetails@25b24c89
2020-05-13 14:03:49.033 WARN 52512 --- [io-8090-exec-10] c.u.f.r.s.i.ExceptionHandlingInterceptor : Failure during REST processing: ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[FamilyMemberHistory/b3126407-6d25-4fc1-a8b2-d0d6f629be92/Patient] with parameters [[]]