FHIR Chat · HTTP Get Queries · implementers

Stream: implementers

Topic: HTTP Get Queries


view this post on Zulip MarenG (Mar 01 2017 at 20:01):

After researching the basics of FHIR, I wanted to try out some HTTP Get queries, but am unable to find a test server/client that uses those. Most of those mentioned in the HL7 Wiki have a drag&drop/select interface which are of no use for me. Does anyone know where or how I can play around with queries?

view this post on Zulip James Agnew (Mar 01 2017 at 20:26):

It's not drag and drop, but you could use the HAPI web UI to build search queries... http://fhirtest.uhn.ca/resource?serverId=home_21&pretty=true&resource=Patient

view this post on Zulip MarenG (Mar 01 2017 at 20:30):

I did find the HAPI FHIR website as well, but it would be best if I could just try out those raw queries

view this post on Zulip James Agnew (Mar 01 2017 at 20:39):

i'm not sure i follow... if you click "search" you'll try out the query

view this post on Zulip MarenG (Mar 01 2017 at 20:44):

Query.jpg I know that the website's UI converts the input to this query (pic) for example. However, I am searching for some endpoint where I can work with those queries only, by just writing them down

view this post on Zulip James Agnew (Mar 01 2017 at 20:45):

Yeah, that is the query URL, and the results of executing that URL are below. Is that what you're looking for?

view this post on Zulip Grahame Grieve (Mar 01 2017 at 20:59):

I think you need POSTman or equivalent

view this post on Zulip Grahame Grieve (Mar 01 2017 at 20:59):

you need a client tool - (or maybe cURL)

view this post on Zulip MarenG (Mar 01 2017 at 21:14):

I will look at those, thanks for now

view this post on Zulip Conrad Chmara (Mar 02 2017 at 14:42):

You can test out GET queries using a browser. For the HAPI FHIR test servers the base url depends on the dstu you wish to target.
DSTU2:
http://fhirtest.uhn.ca/baseDstu2/
DSTU3:
http://fhirtest.uhn.ca/baseDstu3/

Beyond the base add your queries such as:
Get all patients:
http://fhirtest.uhn.ca/baseDstu3/Patient
Get Patients with a name of test:
http://fhirtest.uhn.ca/baseDstu3/Patient?name=test

So on and so forth. The tester overlay is a good resource to use if you are trying to determine which fields a resource has, it will also show you the responses, URL, and client code. If you want to upload bundles or perform any of the other http operations you will need something like Postman (chrome), ARC (chrome), or Rest client (Firefox), there are also a lot of 3rd party products you could use like Soapui, in order to modify headers and create the bodies you wish to post.

The best reference to use to understand searching is: https://www.hl7.org/fhir/search.html


Last updated: Apr 12 2022 at 19:14 UTC