Stream: graphql
Topic: The example requests not working
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}}}
Chetan Jain (Jul 01 2021 at 08:45):
@Lloyd McKenzie ^^
Lloyd McKenzie (Jul 01 2021 at 14:41):
@Grahame Grieve
Grahame Grieve (Jul 01 2021 at 19:20):
works for me
Chetan Jain (Jul 02 2021 at 13:41):
any working example with _filter parameter please?
Lloyd McKenzie (Jul 02 2021 at 15:39):
Can you post one you've tried that doesn't work @Chetan Jain ?
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 ?
Lloyd McKenzie (Jul 02 2021 at 16:40):
That's not using _filter
Lloyd McKenzie (Jul 02 2021 at 16:40):
And it's not producing an invalid response now
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.
Chetan Jain (Jul 02 2021 at 16:47):
somehow this url still resulting in invalid response for me
Lloyd McKenzie (Jul 02 2021 at 16:52):
You've tried just pasting the URL into a browser?
Chetan Jain (Jul 05 2021 at 05:44):
Yes, copy and paste as it is in browser :)
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"
}]
}
}}
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 -
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.
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.
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
Chetan Jain (Jul 15 2021 at 08:23):
Also test.fhir.org/r4 is showing down - image.png
https://stats.uptimerobot.com/9DArDu1Jo
Lloyd McKenzie (Jul 15 2021 at 14:20):
@Mark Iantorno do you have the power to kick test.fhir.org?
Mark Iantorno (Jul 15 2021 at 14:21):
I do
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.
Mark Iantorno (Jul 15 2021 at 14:26):
So, there are two fhir services on this box
Mark Iantorno (Jul 15 2021 at 14:26):
both of which were down?
Mark Iantorno (Jul 15 2021 at 14:26):
I have no clue which is which
Mark Iantorno (Jul 15 2021 at 14:26):
so I'll bring both back up
Mark Iantorno (Jul 15 2021 at 14:26):
see what happens
Mark Iantorno (Jul 15 2021 at 14:29):
Box has been restarted
Mark Iantorno (Jul 15 2021 at 14:29):
let me know in 10 min if it's not working
Chetan Jain (Jul 15 2021 at 14:37):
Thanks @Lloyd McKenzie
Let me check @Mark Iantorno
Mark Iantorno (Jul 15 2021 at 14:38):
it doesn't appear to be up
Chetan Jain (Jul 15 2021 at 14:39):
you are right..its not up yet
Mark Iantorno (Jul 15 2021 at 14:41):
I'm looking into it now
Mark Iantorno (Jul 15 2021 at 14:50):
Yeah, it's down and I have no idea how to get it to 'go'
Mark Iantorno (Jul 15 2021 at 14:50):
I have tried restarting the box
Mark Iantorno (Jul 15 2021 at 14:50):
and the service
Mark Iantorno (Jul 15 2021 at 14:50):
but it's just throwing exceptions
Mark Iantorno (Jul 15 2021 at 14:50):
@Grahame Grieve is the only one who can fix irt
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.
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.
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
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 :-(
Lloyd McKenzie (Jul 16 2021 at 16:32):
Is anyone aware of any other test servers that support GraphQL? @James Agnew?
Mark Iantorno (Jul 16 2021 at 19:15):
Let me look at it again now and see if I have any better luck
Chetan Jain (Jul 20 2021 at 09:40):
Any luck?
Mark Iantorno (Jul 20 2021 at 12:08):
No luck sorry
Grahame Grieve (Aug 17 2021 at 04:45):
it's up now
Last updated: Apr 12 2022 at 19:14 UTC