Search code examples
hl7-fhirhapi-fhir

How to search birthData in fhir using _content?


When I search with only birthData in fhir I am getting results.

For example: http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient?_pretty=true&birthdate=2020-03-16 will return patient who has birthdate as 2020-03-16.

When I am searching with _content I am not getting any results. Something like this:

http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient?_content=2019-09-05

Solution

  • _content is for searching text content.

    If you want to search for dates you need to use a date search parameter. E.g.:

    http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient?birthDate=2019-09-05