Project: Implement Spring Data to LibreHealth Toolkit

toolkit
gsoc2018-project
gsoc2018

(Prashadi) #21

@lehone it will be a completely new application. I think we are going to expose the standard FHIR endpoints. But if there is a need, we will require to implement radiology REST APIs. @sunbiz should have more information on this.


(Lenya Hope Nembi) #22

Okay Thanks. Please can you give me the link to the repository if you have already started working on it. I think we might need to do something similar for radiology in case the new application wouldn’t include the radiology REST APIs but lets wait for @sunbiz to clarify this.


(Yash D. Saraf) #23

@lehone We haven’t started working on the new app yet. We’re currently working on migrating HAPI JPA example to spring data with cassandra. We will start working on the new app after this is done.


(Judy Gichoya) #24

@lehone we expect for you to set up your spring app to handle the Radiology workflow and we would merger the work with what is being done after the midterm evaluations — I would use these few days of community bonding to clearly describe what you will do


(Lenya Hope Nembi) #25

Okay, will be waiting to hear from you soon @judywawira


(Judy Gichoya) #26

@lehone what do you need to hear from me ?


(Lenya Hope Nembi) #27

You said in your last post, “— I would use these few days of community bonding to clearly describe what you will do”


(Judy Gichoya) #28

It’s missing “if I were Lehone … I would use these few days to describe what I will do …”


(Prashadi) #29

@sunbiz @namratanehete @judywawira I had looked at the spark and the bunsen library during these days. Bunsen and Spark provides ways to load data from file system or JSON/XML representation of FHIR resources. Then on top of that we can query the using spark SQL So do we need the capability to load the data from Cassandra as well?


(Saptarshi Purkayastha) #30

Yes @prashadi, I thought you were trying out if data can be taken from Cassandra and used in Bunsen. Please tell us how easy/difficult that work is, by trying to see if it works well. Just using from the file system too, are the FHIR bundle loading well into Bunsen? Can you blog about your findings and let us read it?


(Emmanuel Nyachoke) #31

Hi guys .Am not sure if this the right place to post but I have been trying to move the openmrs data layer to spring data. To save me a lot of time on boilerplate code I use jhipster and https://www.jhipster.tech/jdl. You can find the JDL here https://github.com/enyachoke/openmrs-jdl. It is not complete yet but is a good starting point.


(Judy Gichoya) #32

Just for context I worked with @enyachoke this month and invited him to the forum since we are doing the same thing of sorts

@enyachoke May benefit from reading old posts on the same


(Emmanuel Nyachoke) #33

@judywawira Thanks for guidance . After reading through the older posts I understand that the plan is to use spring,hapi fhir pojos with cassandra for storage to build some sort of a data layer that can then be used to either build a rest api or be consumed by other projects. Is this correct?


(Prashadi) #34

@sunbiz Yes I was looking at option of integrating the spark and cassandra. This option is present with the datastax driver. So next challenge is loading the data from cassandra use Bunsen. FHIR bundles can load through file system and JSON/XML format to Bunsen with the provided APIs. I also will work on writing a blog post after I further investigate on this.


(Yash D. Saraf) #35

@sunbiz @namratanehete @prashadi
I’m defining my own resource providers which would in turn call the spring data repository interfaces. These resource providers can be directly plugged in HAPI JPA example here.
But when I use the HAPI FHIR structures in the repository interface, I get an IllegalArgumentException saying it isn’t a managed type.
I also tried porting the app to spring boot and using spring boot’s EntityScan but that threw the same error as well.
Any ideas?
I am currently trying to get a barebone spring boot app to work with HAPI FHIR DSTU3 structures. I’ll report back if I find anything new.


(Yash D. Saraf) #36

I was able to get rid of the Bean isn’t a managed type error by adding a hibernate mapping file (I presume similar results can be achieved using JPA’s orm xml as well) for the model (for now I’m working with just the Patient).
The app now uses my custom resource provider which in turn call the spring data repository for the model. For now all the Patients are returned on each query, I’ll work on fixing this after I get the app running on Cassandra.


(Prashadi) #37

@yashdsaraf when we moving to spring data we will store the resources in following table format? Will there be separate table per resource?

TABLE PATIENT

(

key INT PRIMARY KEY,

content TEXT

)

@sunbiz I was able to try out cassandra sample. I’m looking at the possibility to load spark via cassandra with above type of table. Will blog this as soon as possible.


(Yash D. Saraf) #38

Yes, since spring data repositories treat each model as a table, we will be treating each resource (at least all those which are exposed via the api) as a table.


(Prashadi) #39

Great thanks for the information.


(Prashadi) #40

@sunbiz @namratanehete @judywawira I have written a blogpost about my current findings in https://medium.com/@prkpbandara/gsoc-librehealth-working-with-bunsen-for-fhir-analytics-using-spark-5d198057e5c5. I got simple spark cassandra sample to work. Now I’m looking at the possibility of integrating it to Bunsen.