FHIR Chat · The example requests not working · graphql

Stream: graphql

Topic: The example requests not working


view this post on Zulip Lin Zhang (Jan 18 2021 at 01:24):

The example requests provided by the spec (https://www.hl7.org/fhir/graphql.html) are not working (Error message: Connection to test.fhir.org failed. The system returned: (111) Connection refused. The remote host or network may be down. Please try the request again.)

For example:
http://test.fhir.org/r4/$graphql?query={Patient(id:example){id,name{given,family}}}

view this post on Zulip Chetan Jain (Jul 01 2021 at 08:45):

@Lloyd McKenzie ^^

view this post on Zulip Lloyd McKenzie (Jul 01 2021 at 14:41):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Jul 01 2021 at 19:20):

works for me

view this post on Zulip Chetan Jain (Jul 02 2021 at 13:41):

any working example with _filter parameter please?

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 15:39):

Can you post one you've tried that doesn't work @Chetan Jain ?

view this post on Zulip Chetan Jain (Jul 02 2021 at 16:31):

I tried this http://test.fhir.org/r4/$graphql?query={Patient(id:example){id,name{given,family}}} which resulted in invalid_response. @Lloyd McKenzie

Also we want to implement search on practitioner resource which is being referenced in practitioenrRole. How this can be implemented? Do we need to use _filter parameter.
Also wondering ifgraphQL search parameters names has to be exactly same as response FHIR schema ? like address object has city and state. And to search on city, should it be like address.city or can it be address_city ?

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 16:40):

That's not using _filter

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 16:40):

And it's not producing an invalid response now

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 16:41):

Search is limited to defined search parameters for the resource in question. Chaining should work as per regular search.

view this post on Zulip Chetan Jain (Jul 02 2021 at 16:47):

somehow this url still resulting in invalid response for me

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 16:52):

You've tried just pasting the URL into a browser?

view this post on Zulip Chetan Jain (Jul 05 2021 at 05:44):

Yes, copy and paste as it is in browser :)

view this post on Zulip Lloyd McKenzie (Jul 05 2021 at 14:53):

Then there may be an issue with your browser or your network. Hitting that URL gives me this:

{
  "data" :
{
    "Patient":{
      "id":"example",
      "name":[{
        "given":["Peter","James"],
        "family":"Chalmers"
      },{
        "given":["Jim"]
      },{
        "given":["Peter","James"],
        "family":"Windsor"
      }]
    }
  }}

view this post on Zulip Chetan Jain (Jul 14 2021 at 17:48):

Thanks @Lloyd McKenzie , Somehow able to get below url working instead of test.fhir.org -

http://hapi.fhir.org/baseR4/$graphql?query={Patient(id:example){id,name{given,family}}}

Apart from this, I am trying to find out all the PractitionerRole resources which has referenced to given Practitioner. Tried below url which is not giving any error but not pulling any attribute of PractitionerRole resource -

http://hapi.fhir.org/baseR4/$graphql?query={Practitioner(id:example){id,active,PractitionerRoleList(_reference:practitioner){id,active,period{start},telecom{value}}}}

Its gives below response -
{
"data": {
"Practitioner": {
"id": "Practitioner/example/_history/3",
"active": true
}
}
}

Could you point out whats the issue here? Is url correct? I am expecting list of all PractitionerRole resource for practitioner=example.

view this post on Zulip Lloyd McKenzie (Jul 14 2021 at 18:51):

You might ask on #hapi. It may be that HAPI doesn't support _reference, or at least not there.

view this post on Zulip Chetan Jain (Jul 15 2021 at 06:30):

Sure, will check on #hapi. Btw does url looks good. Is this the right way to use _reference?
Thanks @Lloyd McKenzie

view this post on Zulip Chetan Jain (Jul 15 2021 at 08:23):

Also test.fhir.org/r4 is showing down - image.png

https://stats.uptimerobot.com/9DArDu1Jo

view this post on Zulip Lloyd McKenzie (Jul 15 2021 at 14:20):

@Mark Iantorno do you have the power to kick test.fhir.org?

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:21):

I do

view this post on Zulip Lloyd McKenzie (Jul 15 2021 at 14:22):

@Chetan Jain On cursory look, I think it's ok, but GraphQL isn't my area of expertise, so it's possible I've missed something :) Hopefully when the test server's back up if there are problems, you'll get an appropriate error message.

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:26):

So, there are two fhir services on this box

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:26):

both of which were down?

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:26):

I have no clue which is which

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:26):

so I'll bring both back up

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:26):

see what happens

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:29):

Box has been restarted

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:29):

let me know in 10 min if it's not working

view this post on Zulip Chetan Jain (Jul 15 2021 at 14:37):

Thanks @Lloyd McKenzie
Let me check @Mark Iantorno

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:38):

it doesn't appear to be up

view this post on Zulip Chetan Jain (Jul 15 2021 at 14:39):

you are right..its not up yet

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:41):

I'm looking into it now

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:50):

Yeah, it's down and I have no idea how to get it to 'go'

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:50):

I have tried restarting the box

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:50):

and the service

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:50):

but it's just throwing exceptions

view this post on Zulip Mark Iantorno (Jul 15 2021 at 14:50):

@Grahame Grieve is the only one who can fix irt

view this post on Zulip Chetan Jain (Jul 16 2021 at 06:28):

Thanks @Mark Iantorno .

Hi @Grahame Grieve - Could you please get this test.fhir.org server up and runnings. Its been down down recently.

view this post on Zulip Rob Hausam (Jul 16 2021 at 13:02):

Yes, that would be helpful. @Jose Costa Teixeira were looking at using test.fhir.org 3 days ago for some testing with the terminology server code and we found that it was down then.

view this post on Zulip Lloyd McKenzie (Jul 16 2021 at 15:09):

@Chetan Jain Grahame is out of office for an extended period - with limited bandwidth. You may need to test using one of the other publicly available test servers listed here: https://confluence.hl7.org/display/FHIR/Public+Test+Servers

view this post on Zulip Chetan Jain (Jul 16 2021 at 15:40):

Thanks @Lloyd McKenzie , I tried few but could not figure out which one supports the graphQL functionality :-(

view this post on Zulip Lloyd McKenzie (Jul 16 2021 at 16:32):

Is anyone aware of any other test servers that support GraphQL? @James Agnew?

view this post on Zulip Mark Iantorno (Jul 16 2021 at 19:15):

Let me look at it again now and see if I have any better luck

view this post on Zulip Chetan Jain (Jul 20 2021 at 09:40):

Any luck?

view this post on Zulip Mark Iantorno (Jul 20 2021 at 12:08):

No luck sorry

view this post on Zulip Grahame Grieve (Aug 17 2021 at 04:45):

it's up now


Last updated: Apr 12 2022 at 19:14 UTC