FHIR Chat · Observation $stats in hapi · hapi

Stream: hapi

Topic: Observation $stats in hapi


view this post on Zulip Nils Benning (Feb 18 2021 at 09:07):

Hi! I'm using hapi as a facade to a system with a proprietary API and have to deliver some basic statistics about measurements of a group of patients. I think the $stats operation on Observation resource with a Group as Subject would be a nice representation in FHIR. I'm wondering if hapi supports $stats operations for Observation at all. I tried to GET on the public R4 test server with this request: http://hapi.fhir.org/baseR4/Observation/$stats?subject=Patient/123&code=55284-4&system=http://loinc.org&duration=1&statistic=average&statistic=min&statistic=max and hapi returns an error, bc the endpoint does not know how to handle GET operations [Observation/$stats] with given parameters. Is this not implemented in hapi, yet?

view this post on Zulip René Spronk (Feb 18 2021 at 09:33):

Have you inspected the server's CapabilityStatement to see if the operation is supported ?

view this post on Zulip Nils Benning (Feb 18 2021 at 19:54):

Hi René, thanks for the hint. Had a look at the CapabilityStatement - HAPI public test server seems not to support $stats operation on Observations. Anyhow, this must not mean that HAPI doesn't implement the operation, does it? It would be quite helpful to have any test server which supports it, to implement it on my side in a compliant way.

view this post on Zulip René Spronk (Feb 19 2021 at 07:39):

test.fhir.org tends to support the most (more exotic/new) features of the FHIR spec, so you could give that one a try.. on HAPI it'd just be a matter of developing a plugin.

view this post on Zulip Nils Benning (Feb 19 2021 at 10:46):

test.fhir.org reports an "Invalid class typecast" for the above-mentioned request -- seems like I am working on a rather exotic feature. From a development perspective in HAPI you are right, however it would be helpful to have a 'established' server which supports the operation, in order to be "compliant". But I start to believe this might be meaningless for such an exotic feature. Thanks once again!


Last updated: Apr 12 2022 at 19:14 UTC