Reputation: 23
I'm looking into FHIR and stumbling over the search query for resources containing resources. I'm using the HAPI JPA Examples server and have some DiagnosticReports stored there. Some of them containing a Organization with a certain name. I really can't figure out how to query this. I tried to follow the HL7 FHIR Search docs, but it isn't working.
http://example.com/hapi-fhir-jpaserver-example/baseDstu2/DiagnosticReport?organization.name=XYZ
The server's answer:
Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[DiagnosticReport] with parameters [[organization.name]]
What am I doing wring? Thanks in advance!
Upvotes: 2
Views: 1129
Reputation: 701
Unfortunately at this point HAPI's JPA module does not allow you to search with matches in contained resources. FHIR does have a query format to allow this, but we haven't implemented it yet.
However, that's not even the issue here: DiagnosticReport does not have a search parameter called "organization", since there is no field called "organization" on the DR resource. Presumably you're after something like DiagnosticReport?patient.organization.name=XYZ
or DiagnosticReport.performer.name=XYZ
Upvotes: 1