Boolean search param combination for fhir_search

43 views
Skip to first unread message

Subhrajyoti Moitra

unread,
May 4, 2016, 2:24:04 AM5/4/16
to FHIRbase
Hello Team,

I have been using the latest fhirbase from github and able to create/update/search resources.
I am unable to combine queryString params something like, "give me all observations for a particular patient which belongs to a particular category"

SELECT fhir_search('{"resourceType":"Observation","queryString":"category=vital-signs and subject=Patient/65352c58-3260-453d-867f-fc8da03916f6"}');

This yields not results. How do I combine 2 different params in AND or OR clauses?

Please guide. Any pointers to how to solve this?

Thanks,
Subhro.

Николай Рыжиков

unread,
May 4, 2016, 2:53:08 AM5/4/16
to Subhrajyoti Moitra, FHIRbase

Hi

You have to pass HTTP query string as described in FHIR spec - https://www.hl7.org/fhir/search.html. In your case replace " and " with "&". And you can search only by SearchParameters, which you can find in concrete ResourceType specification or by looking up searchparameter table.

73's Nicola

--
You received this message because you are subscribed to the Google Groups "FHIRbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fhirbase+u...@googlegroups.com.
To post to this group, send email to fhir...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fhirbase/74699e16-62b8-4257-85b5-8b58b8f2989c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Subhrajyoti Moitra

unread,
May 4, 2016, 2:57:42 AM5/4/16
to FHIRbase, subhra...@gmail.com
Hello Nicola,

Yes, I managed to make it work,

SELECT fhir_search('{"resourceType":"Observation","queryString":"category=vital-signs & subject=Patient/65352c58-3260-453d-867f-fc8da03916f6"}');

https://github.com/fhirbase/fhirbase-demo-app/blob/master/src/views/gentle-tutor.md#searching-resources

The above link has some hints on how to solve it.

Thanks again for your time,
Cheers,
Subhro.
Reply all
Reply to author
Forward
0 new messages