I am trying to get a list of partients that are active and whose entry in the fhir server was updated after a given timestamp.
The documentation unfortunately doesn't mention how to use the meta data in the search queries, but, I looked at the tests the creator of the library wrote - https://github.com/smart-on-fhir/client-py/blob/master/fhir-parser-resources/fhirsearch_tests.py#L22
And thus the following code -
import fhirclient.models.patient as p
search_patients = p.Patient.where(
struct={
"active": "True",
"meta.lastUpdated": {"$gt": "2020-07-15T02:52:00"},
}
)
patients = search_patients.perform_resources(client.server)
The above mentioned code gives me requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.logicahealth.org/{sandbox_indentifier}/open/Patient?active=True&meta.lastUpdated=%3E2020-07-15T02%3A52%3A00.
I am using fhirclient v4.1.0.
I am trying to get a list of partients that are active and whose entry in the fhir server was updated after a given timestamp. The documentation unfortunately doesn't mention how to use the meta data in the search queries, but, I looked at the tests the creator of the library wrote - https://github.com/smart-on-fhir/client-py/blob/master/fhir-parser-resources/fhirsearch_tests.py#L22 And thus the following code -
The above mentioned code gives me
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.logicahealth.org/{sandbox_indentifier}/open/Patient?active=True&meta.lastUpdated=%3E2020-07-15T02%3A52%3A00
.Any idea what I am missing ?
Thank you in advance.