FHIR Chat · SearchParameters · hapi

Stream: hapi

Topic: SearchParameters


view this post on Zulip Andrew Broadbent (Jan 24 2017 at 14:34):

Hey all, sorry for being a bit of a broken record on searching lately. I think I'm trying to do something that's either wrong, or just at the edge of where fhir is right now:

So I have a bunch of profiles on Basic, and extensions which are used to add additional data to basic. I'm not trying to search for those resources by extension value. I've been informed that the way to do that is to create a SearchParameter for each extension I'd like to search on, and then register those in the conformance document, as discussed here:
http://stackoverflow.com/questions/40679422/how-for-i-search-fhir-resources-based-on-extension-values/40679772?noredirect=1#comment70692632_40679772

This morning I've created a SearchParameter which appears to be valid format (it's essentially just the example one), however trying to insert it into my out of the box hapi server, I get a 403 forbidden error. I posted the resource's xml to {{URL}}/SearchParameter

Is there some different way of adding SearchParameters? This might just be random rambling, but one thing I can't wrap my head around about the conformance document is - it defines what a server is capable of, so surely it must be immutable, otherwise it could be updated to say the server can do things that it cannot. In which case, I don't understand how to add SearchParameters to it.

view this post on Zulip Andrew Broadbent (Jan 24 2017 at 17:32):

Further to this, I've just had the response on the above SO post "Posting a SearchParameter doesn't automatically generate code support". I'm really confused about searching now. Am I supposed to recompile the server every time a new extension is created, or a new profile with a different xpath to the extension is created? Am I missing the point, or is the purpose of the SearchParameter resource to do this kind of thing?

I know this will be implementation specific, but I don't see the purpose on SearchParameters being a resource if you have to write code to support them.

If I do have to create code to support them, where do I start with hapi?

view this post on Zulip Grahame Grieve (Feb 06 2017 at 02:03):

I've been off the grid for 2 weeks, and I see no one else took that up

view this post on Zulip Grahame Grieve (Feb 06 2017 at 02:04):

there's 2 things you have to do: update your conformance statement and define search parameters. That's the bit I answered.

view this post on Zulip Grahame Grieve (Feb 06 2017 at 02:04):

the other thing is actually implement the search parameters. That's a HAPI thing that I've never investigated. @James Agnew will have to comment

view this post on Zulip James Agnew (Feb 07 2017 at 02:23):

Oops, we've been chatting about this by email so I didn't answer here... I suppose others would be interested though!

The HAPI JPA server has an active feature branch working on bringing custom search parameter support to the server. I'm expecting we'll merge this in the next few days, and this will definitely make the next release.


Last updated: Apr 12 2022 at 19:14 UTC