Open oleksii-donets opened 3 years ago
Hi @oleksii-donets - Are you able to reproduce this issue on our public server ( hapi.fhir.org )?
Hello @jamesagnew I've just checked it.
DSTU2 version doesn't work as expected. http://hapi.fhir.org/baseDstu2/Observation?patient=200033 - return 45 resources with a date greater than 2010-01-01 http://hapi.fhir.org/baseDstu2/Observation?patient=200033&date=gt2010-01-01 - return 0 resources
R4 version works as expected: http://hapi.fhir.org/baseR4/Observation?patient=593321&date=gt2010-01-01
I found a more precise cause of the error: Hapi server DSTU2 doesn't work with the following date format: 2018-11-04 But it works with the following date format: 2018-11-04T00:00:00
Both of these date formats are valid due to DSTU2 specification: http://www.hl7.org/fhir/DSTU2/search.html#date
Oh interesting.
Does that match what you see on the logica sandbox? (i.e. DSTU2 doesn't work, but R3+ does)
Yes, logica sandbox has the same wrong behavior.
By the way, logica sandbox under the hood uses Hapi Fhir server 5.2.0 | DSTU2. So it's a bug inside Hapi.
Describe the bug When I try to obtain FHIR resources with the following URL and specified Authentication token all works fine: https://api.logicahealth.org/dsdtest/data/Observation?patient=16852 After executing this request I get 22 resources.
But when I try to obtain FHIR resources with the following URL with date parameter and specified Authentication token then I found no resources: https://api.logicahealth.org/dsdtest/data/Observation?patient=16852&data=gt2010-01-01
The problem is all my resources were created after 2010-01-01. So data filter looks like works wrong. Also lt, ge, le doesn't work.
Environment (please complete the following information):