When a composite search parameter of type token-token (such as the standard code-value-concept and combo-code-value-concept, or the custom MII mii-provision-provision-code-type) is combined with another, more selective search parameter, the request fails with an AbstractMethodError.
The composite parameter is only affected when the query planner evaluates it as a secondary (seek) clause — i.e. when it is combined with a more selective clause. On its own, or as the leading (scan) clause, it works.
Reproduction
GET /fhir/Consent?category=2.16.840.1.113883.3.1937.777.24.2.184&mii-provision-provision-code-type=urn:oid:2.16.840.1.113883.3.1937.777.24.5.3|2.16.840.1.113883.3.1937.777.24.5.3.7$permit
returns:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "exception",
"diagnostics": "Method blaze/db/impl/search_param/composite/token_token/SearchParamCompositeTokenToken._single_version_id_matcher(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; is abstract"
}
]
}
The same error occurs with the standard code-value-concept parameter on Observation, for example Observation?patient=<id>&code-value-concept=<code>$<value> where the patient clause is more selective than the code-value-concept clause.
Cause
SearchParamCompositeTokenToken does not implement the -single-version-id-matcher method of the SearchParam protocol. That method is invoked whenever the parameter is filtered as a seek clause, so calling it on the unimplemented record raises the AbstractMethodError. The sibling SearchParamCompositeTokenQuantity (used by code-value-quantity) implements it, which is why token-quantity composites are unaffected.
Expected
The combined query returns the matching resources without error.
When a composite search parameter of type token-token (such as the standard
code-value-conceptandcombo-code-value-concept, or the custom MIImii-provision-provision-code-type) is combined with another, more selective search parameter, the request fails with anAbstractMethodError.The composite parameter is only affected when the query planner evaluates it as a secondary (seek) clause — i.e. when it is combined with a more selective clause. On its own, or as the leading (scan) clause, it works.
Reproduction
returns:
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "exception", "diagnostics": "Method blaze/db/impl/search_param/composite/token_token/SearchParamCompositeTokenToken._single_version_id_matcher(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; is abstract" } ] }The same error occurs with the standard
code-value-conceptparameter onObservation, for exampleObservation?patient=<id>&code-value-concept=<code>$<value>where thepatientclause is more selective than thecode-value-conceptclause.Cause
SearchParamCompositeTokenTokendoes not implement the-single-version-id-matchermethod of theSearchParamprotocol. That method is invoked whenever the parameter is filtered as a seek clause, so calling it on the unimplemented record raises theAbstractMethodError. The siblingSearchParamCompositeTokenQuantity(used bycode-value-quantity) implements it, which is why token-quantity composites are unaffected.Expected
The combined query returns the matching resources without error.