Describe the bug
Operation LastN not working when resource client strategy is set to DaoConfig.ClientIdStrategyEnum.ANY and server id strategy to DaoConfig.IdStrategyEnum.UUID
To Reproduce
Steps to reproduce the behavior:
1 Set the client id strategy to ANY
2 Create resource Observation
3 Call operation $lastN
4 See exception: ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: HTTP 404 : HAPI-2001: Resource Observation/2 is not known
This can be reproduced in hapi-fhir-jpaserver-starter with test ca.uhn.fhir.jpa.starter.ElasticsearchLastNR4IT when adding hapi.fhir.client_id_strategy=ANY
Expected behavior
Returned bundle with Observation
Additional context
I noticed that Observationin observation_index is now indexed with the resource PID but with the previous versions it was indexed with resource UUID.
This boils down to the same problem as described in my issue #3417, I have posted a patch that illustrates how it can (but probably not should) be solved.
Describe the bug Operation LastN not working when resource client strategy is set to DaoConfig.ClientIdStrategyEnum.ANY and server id strategy to DaoConfig.IdStrategyEnum.UUID
To Reproduce Steps to reproduce the behavior: 1 Set the client id strategy to ANY 2 Create resource Observation 3 Call operation $lastN 4 See exception: ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: HTTP 404 : HAPI-2001: Resource Observation/2 is not known
This can be reproduced in hapi-fhir-jpaserver-starter with test ca.uhn.fhir.jpa.starter.ElasticsearchLastNR4IT when adding hapi.fhir.client_id_strategy=ANY
Expected behavior Returned bundle with Observation
Environment :
Additional context I noticed that Observationin observation_index is now indexed with the resource PID but with the previous versions it was indexed with resource UUID.