FHIR Chat · Change DataSource · implementers

Stream: implementers

Topic: Change DataSource


view this post on Zulip Con McGourty (Nov 03 2016 at 13:51):

Anyone know where to start in regards changing the DataSource on FHIR Spark Server?

view this post on Zulip Geoff Low (Nov 03 2016 at 13:53):

I know nothing about the project itself - but https://github.com/furore-fhir/spark/blob/master/src/Spark/Web.Release.config looks interesting

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:46):

Con, is your goal to point to a different MongoDb server, or to implement a different kind of database (like SQL)?

view this post on Zulip Con McGourty (Nov 03 2016 at 14:47):

I'm looking to implement an SQL server specifically.

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:48):

There is a bit of documentation here:
https://github.com/furore-fhir/spark/wiki/Fitting-Spark-in-my-environment

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:48):

You basically have to implement your own Store.

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:48):

And if you want to implement your own search index, things get a lot more complicated.

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:49):

But search is a complicated topic ;)

view this post on Zulip Martijn Harthoorn (Nov 03 2016 at 14:50):

You can find the MongoFhirStore here:
https://github.com/furore-fhir/spark/blob/dstu2/develop/src/Spark.Mongo/Store/MongoFhirStore.cs

view this post on Zulip Con McGourty (Nov 03 2016 at 14:55):

is there anywhere I can get test data on my localhost to test out the api calls?

I have sql servers full of data but no MongoDb to work with

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:26):

There's a SimpleStore implementation here: https://github.com/cqframework/cds-on-fhir/tree/master/Src/net/CQF/GuidanceService/Store

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:27):

It's based on an older version of the Spark service, but I believe the Store implementation is still functional.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:27):

It's just file based, so you can just drop resource files in directories and it will serve them up.

view this post on Zulip Con McGourty (Nov 03 2016 at 17:28):

Would it be able to implement a SQL DB?

view this post on Zulip Con McGourty (Nov 03 2016 at 17:28):

Also Thank you

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:28):

What type of SQL DBMS?

view this post on Zulip Con McGourty (Nov 03 2016 at 17:29):

Microsoft Management Studio DB

view this post on Zulip Con McGourty (Nov 03 2016 at 17:29):

or either a service feeding form a MS Management Studio

view this post on Zulip Con McGourty (Nov 03 2016 at 17:30):

I'm completely new to all this

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:30):

So your tables are in an MS SQL Server, and I imagine they're things like Patient and Medication, etc. Right?

view this post on Zulip Con McGourty (Nov 03 2016 at 17:30):

YesYes

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:31):

Using just the Spark server, you'd have to implement a Store that transformed the content from the tables into FHIR resources.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:31):

That would be a lot of C# code.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:32):

There is a tech that could help, but it would also be a fairly heavy lift, including learning the tech involved:

view this post on Zulip Con McGourty (Nov 03 2016 at 17:33):

What would you recommend me do instead?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:34):

Let me back up, you're trying to stand up a FHIR server on top of your existing data that could expose your content as FHIR resources?

view this post on Zulip Con McGourty (Nov 03 2016 at 17:35):

yes

view this post on Zulip Con McGourty (Nov 03 2016 at 17:36):

I have it set up out of the box with MongoDB, or at least I think I do. There is no data to work with

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:36):

If you just want to set up a Spark test server that you can play with, you could stand one up with MongoDB and then load it with bundles.

view this post on Zulip Con McGourty (Nov 03 2016 at 17:37):

bundles?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:38):

A Bundle is a collection of FHIR resources, and a FHIR Server can accept a POST of a bundle at its root that will load all the resources in the Bundle.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:38):

e.g.: https://github.com/cqframework/payerextract/blob/master/resources/bundle-load-patient-12214.json

view this post on Zulip Con McGourty (Nov 03 2016 at 17:40):

Right and I post this though the API then?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:40):

Yes, and the Spark server should just push that into the MongoDB.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:40):

That directory has a bunch of bundles, they're STU3 (1.6) though.

view this post on Zulip Con McGourty (Nov 03 2016 at 17:41):

yeah thats loads of data to work with

view this post on Zulip Con McGourty (Nov 03 2016 at 17:41):

thank you

view this post on Zulip Con McGourty (Nov 03 2016 at 17:41):

I'll give you the full story, Ive given a task

view this post on Zulip Con McGourty (Nov 03 2016 at 17:43):

to create a FHIR server that will either call other services or read directly form our MS SQL server DB, Am I going down the right track with this Spark Server If im looking for an easy-ish tranisation to a new DataSource?

view this post on Zulip Con McGourty (Nov 03 2016 at 17:44):

Or what would you recoomend?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:45):

Well, yes, but it's a long road, there's a lot involved in that transformation from your local structures to the FHIR resources.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:45):

Spark can definitely provide the scaffolding, but the transformation logic, and supporting indexed read/write against the SQL Server as your data source is non-trivial.

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:48):

You could start by just doing a simple transform to support say a GET on Patient to get a feel for how much is involved.

view this post on Zulip Con McGourty (Nov 03 2016 at 17:49):

Okay, no other way of getting around this?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:49):

Here's an open source data federation tech that we've been extending to support this use case, but it's a work in progress:

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:49):

https://github.com/DBCG/Dataphor/tree/RESTfulCLI

view this post on Zulip Con McGourty (Nov 03 2016 at 17:56):

What is this software doing, parsing my current data in my MS SQl?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 17:58):

Providing access to current data in whatever source system it's in, yes. In your case, MSSQL.

view this post on Zulip Con McGourty (Nov 03 2016 at 18:01):

Thank you, this is a great starting point

view this post on Zulip Con McGourty (Nov 03 2016 at 18:02):

Would it be okay to contact you in the future if I run into issues?

view this post on Zulip Bryn Rhodes (Nov 03 2016 at 18:02):

Yes, please feel free to reach out.

view this post on Zulip Con McGourty (Nov 03 2016 at 18:03):

Thank you, Ill send you a mail now - bryn@databaseconsultinggroup.com


Last updated: Apr 12 2022 at 19:14 UTC