HAPI Chained Parameters Issue

300 views
Skip to first unread message

ndiv...@gmail.com

unread,
May 26, 2017, 12:14:49 PM5/26/17
to HAPI FHIR

Hello,
 

HAPI DSTU3 library returns an error when trying to request a DetectedIssue by a patient identifier using a chained request. 


The query with the Chained command is:
https://localhost:3001/fhir/v1/DetectedIssue?patient.identifier=ABC123ABC


Error returned by hapi library:


Invalid search parameter "patient.identifier".Parameter contains a chain(.identifier) and chains are not supported for this parameter(chaining is allowed only on reference parameters)


As per FHIR  search documentation below is allowed.(https://www.hl7.org/fhir/search.html)


 GET [base]/DiagnosticReport?subject.name=peter


So,


GET [base]/DetectedIssue?patient.identifier=ABC123ABC     should be allowed?

James Agnew

unread,
May 26, 2017, 2:37:41 PM5/26/17
to ndiv...@gmail.com, HAPI FHIR
Hi NDivvala,

What version of the library are you seeing this with? And is this with JPA or with your own custom server?

I'm not seeing the same behaviour on our public server, whcih is on the latest 2.5 snapshot ofg HAPI: http://fhirtest.uhn.ca/baseDstu3/DetectedIssue?patient.identifier=ABC123ABC

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/f6de8c92-6e86-4422-a6b5-19c3cd7e31fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ndiv...@gmail.com

unread,
May 26, 2017, 3:17:13 PM5/26/17
to HAPI FHIR, ndiv...@gmail.com
Hi James,

This is on our own custom server leveraging the HAPI JAX-RS Module with RestEasy.

I was using the latest version 2.3 (hapi-fhir-jaxrsserver-base). Even after bumping the version to latest 2.4 the behaviour is same.

Thanks


On Friday, May 26, 2017 at 2:37:41 PM UTC-4, James Agnew wrote:
Hi NDivvala,

What version of the library are you seeing this with? And is this with JPA or with your own custom server?

I'm not seeing the same behaviour on our public server, whcih is on the latest 2.5 snapshot ofg HAPI: http://fhirtest.uhn.ca/baseDstu3/DetectedIssue?patient.identifier=ABC123ABC

Cheers,
James
On Fri, May 26, 2017 at 12:14 PM, <ndiv...@gmail.com> wrote:

Hello,
 

HAPI DSTU3 library returns an error when trying to request a DetectedIssue by a patient identifier using a chained request. 


The query with the Chained command is:
https://localhost:3001/fhir/v1/DetectedIssue?patient.identifier=ABC123ABC


Error returned by hapi library:


Invalid search parameter "patient.identifier".Parameter contains a chain(.identifier) and chains are not supported for this parameter(chaining is allowed only on reference parameters)


As per FHIR  search documentation below is allowed.(https://www.hl7.org/fhir/search.html)


 GET [base]/DiagnosticReport?subject.name=peter


So,


GET [base]/DetectedIssue?patient.identifier=ABC123ABC     should be allowed?

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

James Agnew

unread,
May 26, 2017, 3:50:37 PM5/26/17
to ndiv...@gmail.com, HAPI FHIR
Ok..

Is your "patient" parameter on the resourceprovider of type ReferenceParam? If not, that would explain this as you can only chain on parameters of type ReferenceParam.

If it is, this might be a HAPI bug. In that case, would you be able to recreate the issue in the unit test ( https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jaxrsserver-example/src/test/java/ca/uhn/fhir/jaxrs/server/example/JaxRsPatientProviderDstu3Test.java ) and submit as a PR? That would help to get a fix in.

Cheers,
James

To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

ndiv...@gmail.com

unread,
May 26, 2017, 4:15:00 PM5/26/17
to HAPI FHIR, ndiv...@gmail.com
yes, the patient parameter is a reference type.

I will recreate the issue and submit PR,  will reach out if needed any help.

Thanks

ndiv...@gmail.com

unread,
Jun 1, 2017, 11:18:41 PM6/1/17
to HAPI FHIR, ndiv...@gmail.com
Hi James,

I have added the Unit Test and submitted the PR. 


Thanks
nagraj
Reply all
Reply to author
Forward
0 new messages