<aside> 💡 In this page we will learn how to search for resources in a FHIR server.

</aside>

Search Functionality

HTTP GET

Searching may use HTTP GET call to the URL base URL/resource type/optional parameter. In response, the server will return a FHIR Bundle resource, a container resource containing the matching result.

Command using CURL

curl -v GET @address

address is the URL of your search.

Sample CURL commands:

curl -v GET <http://172.104.170.172:8080/fhir/Patient/>
curl -v GET <http://172.104.170.172:8080/fhir/Patient?name=Timogan>

The first example returns a list of all the patients saved in the server, while the second, using a parameter, finds any patient with family name Timogan.

The subsequent sample searches will only provide the needed URL/address. To use with CURL, just follow the curl command above and just replace the URL.

Response Format

For any search query the response will have a header and body that will look like the following sample:

Sample Response Header