In the FHIR REST API, there are some standard parameters for all resources that can be used in the 'search' endpoints.
I need to use the '_profile' parameter on a search operation: https://www.hl7.org/fhir/search.html#profile
The HAPI FHIR documentation on implementing search operations (https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_search.html) has a lot of examples, none mention the parameters that apply to all the resources, like '_profile'.
I also checked their test server online (http://hapi.fhir.org/resource?serverId=home_r4&pretty=true&resource=Observation) and I can't find a way to specify the '_profile' there, to see how it works.
At the code level, what I'm trying to do is this:
@Search
public List<Observation> getObservationsByProfile(??? profile)
{
...
if (profile == '...')
{
...
}
else
{
...
}
...
}
I don't know how to specify the annotations and type of the parameter so it binds to the value provided in the '_profile' param un the requested URL.
Is there any sample code or documentation I can refere to? Thanks.