Compare commits

...

3 Commits

Author SHA1 Message Date
Ahmet Melih Aydoğdu 6e2228816d
Merge d42546b24b into 3f6d1eb29b 2024-09-26 02:08:10 +00:00
Melih Aydogdu d42546b24b resource meta params updated 2024-07-22 16:24:16 +02:00
Melih Aydogdu 3d352582a2 string param changed to token param 2024-07-22 13:51:29 +02:00
2 changed files with 4 additions and 7 deletions

View File

@ -24,8 +24,6 @@ import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.param.HasAndListParam;
import ca.uhn.fhir.rest.param.HasParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringParam;
import ca.uhn.fhir.rest.param.TokenAndListParam;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.param.UriAndListParam;
@ -49,8 +47,8 @@ public class ResourceMetaParams {
static {
Map<String, Class<? extends IQueryParameterType>> resourceMetaParams = new HashMap<>();
Map<String, Class<? extends IQueryParameterAnd<?>>> resourceMetaAndParams = new HashMap<>();
resourceMetaParams.put(IAnyResource.SP_RES_ID, StringParam.class);
resourceMetaAndParams.put(IAnyResource.SP_RES_ID, StringAndListParam.class);
resourceMetaParams.put(IAnyResource.SP_RES_ID, TokenParam.class);
resourceMetaAndParams.put(IAnyResource.SP_RES_ID, TokenAndListParam.class);
resourceMetaParams.put(Constants.PARAM_PID, TokenParam.class);
resourceMetaAndParams.put(Constants.PARAM_PID, TokenAndListParam.class);
resourceMetaParams.put(Constants.PARAM_TAG, TokenParam.class);

View File

@ -42,7 +42,6 @@ import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.param.BaseParamWithPrefix;
import ca.uhn.fhir.rest.param.ParamPrefixEnum;
import ca.uhn.fhir.rest.param.ReferenceParam;
import ca.uhn.fhir.rest.param.StringParam;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.param.TokenParamModifier;
import ca.uhn.fhir.rest.param.UriParam;
@ -452,8 +451,8 @@ public class InMemoryResourceMatcher {
private boolean matchIdsOr(List<IQueryParameterType> theOrParams, IBaseResource theResource) {
return theOrParams.stream()
.anyMatch(param -> param instanceof StringParam
&& matchId(((StringParam) param).getValue(), theResource.getIdElement()));
.anyMatch(param -> param instanceof TokenParam
&& matchId(((TokenParam) param).getValue(), theResource.getIdElement()));
}
private boolean matchId(String theValue, IIdType theId) {