DisplayName
DisplayName

Reputation: 87

how to GET 2 observations of 2 different codes of one patient in one request from FHIR server?

i tried this https://fhirtest.uhn.ca/baseDstu3/Observation?code=3141-9&code=20570-8&_count=1&patient=653528&_format=json&_pretty=true

but it returned

{ "resourceType": "Bundle", "id": "dcd5cd91-de96-4a3e-a0c9-0cbfccf584e1", "meta": { "lastUpdated": "2018-01-13T06:10:21.398-05:00" }, "type": "searchset", "total": 0, "link": [ { "relation": "self", "url": "https://fhirtest.uhn.ca/baseDstu3/Observation?_format=json&_pretty=true&code=3141-9&code=20570-8" } ] }

Upvotes: 0

Views: 100

Answers (1)

Mirjam Baltus
Mirjam Baltus

Reputation: 2299

You're performing an 'AND' search by using the '&'. In this case, you will want to search Observations with code x OR code y. You can do this with a ',':

https://fhirtest.uhn.ca/baseDstu3/Observation?code=3141-9,20570-8&_count=1&patient=653528&_format=json&_pretty=true

should give you the result you were looking for.

Upvotes: 0

Related Questions