FHIR Chat · FHIR Database Structure · implementers

Stream: implementers

Topic: FHIR Database Structure


view this post on Zulip Alex Neiva (Aug 20 2018 at 15:14):

Hello,
I'm creating a FHIR server and I'm on the phase where i need to create a DB to store the received messages. My question is, is there any "standard" or guideline to create the DB structure or everyone can create its own? I saw examples where DB is a unique table where everything is stored and every search is under that same DB also. I'm worry that specially on search query the performance will not be the best since DB could grow a lot and there is a unique table for all resources.
Can some one please advise?
Thank you

view this post on Zulip Tim Berezny (Aug 20 2018 at 16:23):

Have you looked at FHIR servers like HAPI?
http://hapifhir.io/doc_jpa.html

This might help give you a jumpstart.

view this post on Zulip Alex Neiva (Aug 20 2018 at 16:28):

Yes i already have looked into that link but for what i need it not does help me a lot. I would like to know if we have the "liberty" to create our database structure like, for each resource we have one table or just one table for all resources for example.
Thanks

view this post on Zulip Michele Mottini (Aug 20 2018 at 18:54):

There are no constraints or standards for the database structure - you can do whatever fits your needs

view this post on Zulip nicola (RIO/SS) (Aug 20 2018 at 19:46):

Here is our track from prev connectathon - https://github.com/fhir-fuel/fhir-storage-and-analytics-track

view this post on Zulip nicola (RIO/SS) (Aug 20 2018 at 19:47):

As well you can take a look at https://github.com/fhirbase

view this post on Zulip nicola (RIO/SS) (Aug 20 2018 at 19:49):

Here is new version fhirbase docs - which is under active development now - https://fhirbase.gitbook.io/project/

view this post on Zulip nicola (RIO/SS) (Aug 20 2018 at 19:50):

We have couple of streams for this https://chat.fhir.org/#narrow/stream/73-analytics-on.20FHIR & https://chat.fhir.org/#narrow/stream/134-storage-for.20FHIR

view this post on Zulip nicola (RIO/SS) (Aug 20 2018 at 19:51):

If you are going to next connectathon - join us.

view this post on Zulip Alex Neiva (Aug 20 2018 at 22:13):

Thank you very much. I will have a look.

view this post on Zulip Malgorzata Schwab (Aug 21 2018 at 03:40):

A database with an Object Abstraction (Oracle Objects) is an interesting choice, because it is easy to convey elements of complex types, and a part-whole relationships native to FHIR

view this post on Zulip Clark (Aug 21 2018 at 07:01):

Hi guys,

Is there any resource could define Image Tag? It could be use to annotate the tumor site.

view this post on Zulip Kevin Mayfield (Aug 22 2018 at 08:25):

Screen-Shot-2018-08-22-at-09.25.07.png

view this post on Zulip Kevin Mayfield (Aug 22 2018 at 08:27):

https://github.com/nhsconnect/careconnect-reference-implementation

This is the code behind the reference implementation for UK Care Connect API

view this post on Zulip Kevin Mayfield (Aug 22 2018 at 08:27):

https://nhsconnect.github.io/CareConnectAPI/

view this post on Zulip Kevin Mayfield (Aug 22 2018 at 08:28):

Screen shot is from Postgres like HAPI Reference Implementation it's usingJPA so database can be switched.

view this post on Zulip awalin (Aug 22 2018 at 09:59):

Is it possible to test the FHIR server by querying with GET/POST or even PUT client side requests? I have a use case where an ECG observation resource has to be uploaded for a patient profile and later queried. Are there any APIs to enable this? There could be authorization required, is the server open in public domain to test their apps?

view this post on Zulip Kevin Mayfield (Aug 22 2018 at 13:45):

The public facing API doesn't support POST, the internal FHIR server does. You can install your own FHIR server using these instructions: https://nhsconnect.github.io/CareConnectAPI/build_ri_install.html

view this post on Zulip Elliot Silver (Aug 22 2018 at 18:57):

@Clark , can you expand on your use case? This may be already covered by Observation, by the BodySite extension, by a planned ImageReference extension, or it may be more appropriately handled by DICOM, not by FHIR.

view this post on Zulip Alex Neiva (Aug 24 2018 at 15:42):

What is the best approach to store the FHIR resources? a NoSQL DataBase or a Relational DataBase? As mentioned we have the freedom to do whatever fit our needs. In my case i create DB that i store the FHIR message (xml/json) and had some columns to be faster perform the search, like PID, ACCN, etc...

view this post on Zulip Lloyd McKenzie (Aug 24 2018 at 16:22):

"Best" is entirely dependent on what you're wanting to do. Different types of searches are easier with different persistence layers. We have production systems using both approaches.

view this post on Zulip Calvin (Aug 24 2018 at 17:20):

What is the best approach to store the FHIR resources? a NoSQL DataBase or a Relational DataBase? As mentioned we have the freedom to do whatever fit our needs. In my case i create DB that i store the FHIR message (xml/json) and had some columns to be faster perform the search, like PID, ACCN, etc...

I use saving in a RDBMS... atleast that works with our current system in place. Also, newer version of SQlserver provides native support to query JSON objects.

view this post on Zulip Alex Neiva (Aug 24 2018 at 19:00):

I'm using Postgres... already possible to store and query in JSON format.

view this post on Zulip John Silva (Aug 24 2018 at 19:48):

And Postgres allows the ability to index on JSON properties: https://blog.codeship.com/unleash-the-power-of-storing-json-in-postgres/

view this post on Zulip Grahame Grieve (Aug 26 2018 at 22:02):

some discussion of this: http://www.healthintersections.com.au/?p=2776. In general, I'm inclined to think that the best practice is to store everything as resources, and with a set of relational tables storing the data you really care about in a form that suits your application. The degree to which you do that is variable.

of course, this is highly determined by your context. So in principle best practice is often irrelvant

view this post on Zulip Lars Ebert (Nov 27 2018 at 16:54):

Hi,
we developed a generic data model:
pasted image
In "Event" all different Events such as Therapy, Diagnosis, Sampling Event and so on can be stored - just the basic data: Id, keys to other tables, start and end date. Details are stored in 1:1 linked tables.
Similar "Group": a generic table for all different groups or contexts, such as biobank collection, study, case etc.

We would like to be FHIR conform.
But how to deal with these two generic tables??
We use RDBMS (e.g. Postgres)

Thanks a lot in advance
Lars

view this post on Zulip Lloyd McKenzie (Nov 27 2018 at 16:57):

You might be able to map some of this to Provenance or AuditEvent. However, if you want to expose the data in a clinically useful way, you'll have to expose details in other resources - observations in Observation, procedures in Procedure, etc.

view this post on Zulip Lars Ebert (Nov 28 2018 at 14:58):

Thanks a lot Lloyd!
We just started with FHIR. Our first approach was, that a FHIR resource corresponds to a table.
In this sense, our table "Group" corresponts to Provenance and our table "Event" corresponds to AuditEvent?

view this post on Zulip Suresh Kumar Mukhiya (Dec 06 2018 at 09:58):

How do we use FHIR for sending continous data. Something like getting patients heartbeat every after 1 second. I was planning to use OVERSATION but it seem overkill.

view this post on Zulip John Moehrke (Dec 06 2018 at 18:01):

That is not a use-case that has been addressed by FHIR at this time. We are in early days of FHIR, so not all use-cases are addressed.

view this post on Zulip René Spronk (Dec 10 2018 at 12:58):

You'd have to break up the continuous signal in chunks, e.g. one Observation for a full hours worth of measurements. See Observation.valueSampledData - Not ideal, but I'll work.

view this post on Zulip Lloyd McKenzie (Dec 11 2018 at 00:07):

@Lars Ebert - You won't necessarily always find a direct mapping of Resource = Table, though it's a good first approximation
@Suresh Kumar Mukhiya - you have a few options. You can certainly generate a separate Observation for each measurement and just send a lot of them. You can also use the SequencedData data type to gather a set of samples (whether 1 seconds wort or 10 minutes worth) and transmit all of those as a single Observation. In either case, you do need to send all of the information for the Observation - patient, performer, time, observation type, etc.


Last updated: Apr 12 2022 at 19:14 UTC