GET
/
medical
/
v1
/
patient
/
{id}
/
consolidated
/
search
curl --request GET \
  --url https://api.sandbox.metriport.com/medical/v1/patient/{id}/consolidated/search \
  --header 'x-api-key: <api-key>'
{
  "url": "<string>",
  "resourceCount": 123
}

Searches through a Patient’s consolidated data and returns resources that match the query. This endpoint also includes CCDA documents.

The response contains a URL to a FHIR searchset bundle which contains the results of the search.

The URL will only be valid for 60 seconds before you need to request a new one.

How to use it

  • the search is case-insensitive
  • you can include multiple terms/words, separated by spaces
  • it will include keywords that are very similar to the search criteria, accounting for typos
  • it will return related resources

Example:

  • search term: “pain medication”
  • will include all resources with the words “pain” and “medication”

Path Params

id
string
required

The ID of the Patient.

Query Params

query
string

The search query to match against the Patient’s consolidated data resources. If not provided, all resources will be returned.

Response

Returns a URL to download the FHIR bundle with the search results.

url
string

The URL to download the FHIR searchset bundle. Not present if no results where found.

resourceCount
number
required

The amount of resources resulting from the search.

{
  "url": "https://<url-to-download-the-search-bundle>",
  "resourceCount": 5
}