0

I am querying FHIR resources based on date range and using HL7.Fhir.Core C# library to parse and paginate the bundle.

Only for a query based on date range pagination fails and fhirClient.Continue throws exception 'Internal server error'(I don't know how can I trace actual exception).

I tried same queries with fiddler, it works fine, even the links in bundle.

Any help?

Note: Pagination with fhirClient works for other queries. It only fails for date range queries for any resource.

  • on which server? all servers? – Grahame Grieve Jul 26 '15 at 07:14
  • I have my own server with data repository which I'm querying over Fhir. – Geekmaniac Jul 26 '15 at 17:14
  • well, does an equivalent query work on one of the public servers? – Grahame Grieve Jul 26 '15 at 22:32
  • Honestly, I haven't tried on any of the public servers(I am a newbie. I have never used any.I would be happy if somebody help me what public server I can use and how?) since, the query looks fine with fiddler. I suspect, something to do with the Hl7.Fhir.Core library? I am not sure. – Geekmaniac Jul 27 '15 at 03:17
  • I just came across public servers page. Let me check [this](http://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing). – Geekmaniac Jul 27 '15 at 03:50
  • Hi Geekmaniac, this normally means that the C# library tries to follow a "next" link in the returned bundle, but the server subsequently returns a 500 (Internal server error), so I would be interested to see behaviour on other servers. You should see that 500 error as a return in your Fiddler too.... – Ewout Kramer Jul 27 '15 at 14:45
  • You are absolutely right @ewout-kramer. I tried with some of the public servers but, it seems those does not have paginated data. Few which I tried were having only single resource(e.g. DiagnosticOrder, I have tried very few resources). – Geekmaniac Jul 27 '15 at 15:59
  • Try this: http://fhir-dev.healthintersections.com.au/open/Communication?_lastUpdated=2015-01-01 – Ewout Kramer Jul 27 '15 at 20:12
  • I will check the query you have mentioned @EwoutKramer. After looking at this query I think this will work. Let me check. BTW, my query for date range is: "..\DiagnosticOrder?event-date=>=2010-01-01&event-date=<=2014-01-01" and this does not work. – Geekmaniac Jul 29 '15 at 05:06
  • @EwoutKramer I ran query you mentioned and I got following exception. However, same worked with Fiddler. **Exception Message:** "Exception while loading feed: Input data is not an Atom feed" **Stacktrace:** 'at Hl7.Fhir.Serialization.BundleXmlParser.Load(XmlReader reader) at Hl7.Fhir.Serialization.FhirParser.ParseBundle(XmlReader reader) at Hl7.Fhir.Serialization.FhirParser.ParseBundleFromXml(String xml)' – Geekmaniac Jul 29 '15 at 05:22
  • Ah, yes, sorry, the url I gave you is for a FHIR DSTU2 server. FHIR is still in development and we are currently working on version DSTU2, while DSTU1 is the version published in january 2014. Seeing the error, I am sure you are using the FHIR DSTU1 library. If you really need to use DSTU1, you need to use a DSTU1 server, but otherwise you should update to the DSTU2 version of the .NET library (http://www.nuget.org/packages/Hl7.Fhir.DSTU2/0.50.2-alpha3) – Ewout Kramer Jul 30 '15 at 09:10
  • Yes, I am using DSTU1 library. Does that mean pagination for my query "..\DiagnosticOrder?event-date=>=2010-01-01&event-date=<=2014-01-01" will not work in this version? – Geekmaniac Jul 30 '15 at 15:06
  • No, that has not changed (yet) between DSTU1 en DSTU2. But you cannot use the DSTU1 library with a DSTU2 server, so either try your search on a DSTU1 server, or upgrade your library to DSTU2! Here is the list of currently available DSTU1 en DSTU2 servers: http://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing – Ewout Kramer Aug 03 '15 at 12:38

0 Answers0