Stream: implementers
Topic: FHIR Database Structure
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
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.
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
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
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
nicola (RIO/SS) (Aug 20 2018 at 19:47):
As well you can take a look at https://github.com/fhirbase
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/
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
nicola (RIO/SS) (Aug 20 2018 at 19:51):
If you are going to next connectathon - join us.
Alex Neiva (Aug 20 2018 at 22:13):
Thank you very much. I will have a look.
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
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.
Kevin Mayfield (Aug 22 2018 at 08:25):
Screen-Shot-2018-08-22-at-09.25.07.png
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
Kevin Mayfield (Aug 22 2018 at 08:27):
https://nhsconnect.github.io/CareConnectAPI/
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.
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?
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
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.
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...
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.
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.
Alex Neiva (Aug 24 2018 at 19:00):
I'm using Postgres... already possible to store and query in JSON format.
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/
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
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
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.
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?
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.
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.
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.
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