FHIR Chat · AIDBOX Vs HAPI · hapi

Stream: hapi

Topic: AIDBOX Vs HAPI


view this post on Zulip Kishore Karanam (Apr 05 2020 at 07:00):

Hi Team,

I am new to FHIR. I am evaluate frameworks which are FHIR implementations. I came across AIDBOX vs HAPI two frameworks. I know HAPI is more mature than AIDBOX. I have few queries related to this, would you please clarify if possible

o In case of AIDBOX they use PostgreSQL with JSONB to store resources and the whole JSON will be indexed. In case of HAPI, I would see its stored in encrypted format and not sure about the performance.

o In HAPI, if I wanted to query data from PostgreSQL console how do I do that? As the resource data is stored in hfj_resource table in encrypted format. Shall we store data in plain?

o Do you have any reference link related to custom query to fire i.e. joins etc ? Like below to find high risk patients ( this query from FHIREBASE)

SELECT DISTINCT(p.id), p.resource#>'{name,0}'
FROM patient p
JOIN observation o ON o.resource#>>'{subject,id}' = p.id
WHERE (o.resource @> '{"code": {"coding": [{"code": "72166-2"}]}}'::jsonb) -- LOINC: Smoking status
AND ((o.resource @> '{"value": {"CodeableConcept": { "coding": [{"code": "449868002"}]}}}') -- SNOMED: Current every day smoker
OR (o.resource @> '{"value": {"CodeableConcept": { "coding": [{"code": "8517006"}]}}}')) -- SNOMED: Former smoker
AND (extract(year from age(now(), (p.resource->>'birthDate')::date)) > 45) -- patient's age > 45
AND (p.resource->>'gender' = 'male'); -- patient gender is male

o If we go with Hapi, which database will be good in case of performance and reliability?

Regards,
Kishore

view this post on Zulip James Agnew (Apr 06 2020 at 11:21):

HAPI's database design isn't really intended for direct query, the idea is that you'd use the REST interface for queries.

I don't know how the syntax you quoted works exactly, but it looks like you could probably reproduce that query using a search on the Patient resoruce with a combination of _has parameters.

view this post on Zulip Igor Sirkovich (Apr 07 2020 at 03:27):

@Kishore Karanam Have a look at https://www.hl7.org/fhir/R4/search.html#has

view this post on Zulip David Hay (Apr 07 2020 at 18:24):

Would graphQl be an option for the queries you're after @Kishore Karanam ?


Last updated: Apr 12 2022 at 19:14 UTC