Reputation: 21
Is use of search parameters limited to the common search parameters (ie. _id, _text) and those defined at the bottom of each resource definition? For instance, family, that's defined on the Patient resource @ https://www.hl7.org/fhir/patient.html#search.
I'd like to know if it's possible to use any element of a resource directly as a search parameter? For example:
Following added on 2015-11-28:
Our server is a read-only service that aggregates data from various source systems and implements an API based on FHIR. Here are some interesting facts and challenges about the infrastructure:
As an example, we have a requirement to implement string searching against ImagingStudy.procedure.code.coding[].display.
It is nice to know that server has the ability to define extra search parameters in the conformance statement; however, for our scenario, the search parameters are mostly driven by the clients needs. Any change or update to this needs could trigger a change to the server's conformance. This makes the conformance/contract vulnerable to changes.
This is the motivation that prompted my question, that since FHIR client and server already have a well defined contract defined via FHIR resources, would it be possible to extend this contract for search parameters, where the client and server will be able to leverage the existing object graph of the FHIR resource as the search parameters without having to define a separate list.
Upvotes: 2
Views: 883
Reputation: 3586
The search parameters are defined separately and mapped to actual paths within the resources to allow servers to maintain indexes via something like map/reduce rather than execute the queries long hand against unindexed content. You cannot simply query against arbitrary paths in the resources. Note: This includes the _filter search parameter.
Servers are allowed, however, to define their own search parameters and map these to arbitrary paths in the resources. If the server exposes a search parameter, it should declare it in the conformance statement, and then you'll know whether you can use it or not.
(btw, Servers are also allowed to choose not to use map/reduce, and to execute the queries long hand, and therefore to allow any path to be used as a parameter, if that is an effective strategy for their technology base - though I don't know of one that does this.)
Upvotes: 2