Improve FHIR Search

Hello everyone

@ibacher @reagan I am interested in the above project and have started drafting a proposal for this. But i have some blockers and worries. I have gone through the fhir source code at for a while now and have not clearly understood how it works. I will need to get some understanding of the source in order to draft a good proposal. I am wondering whether someone could spare some time to explain this to me or even a screencast could be helpful.

Also, i am currently reading up on Hibernate and HAPI FHIR as i am not familiar with them. Taking this project will help me to acquire new skills and i am ready to learn a lot and carry out the project. I will just need a good guide on the steps to take so i do not get mixed up. @ibacher @reagan please what do you think?

1 Like

Hi @kangbreder,

So some quick pointers on how the FHIR module works. We use the HAPI FHIR Plain Server / Facade which provides a simple servlet which handles all the HTTP applications. This servlet depends on Resource Providers, which implement the various FHIR operations. Inside the OMOD sub-project of the FHIR2 module, you will find the definitions for the ResourceProviders we use. The Resource Providers, in turn rely on Service classes, which in turn use the DAO objects and Translators. The DAOs query the OpenMRS database for the relevant data. The translators convert OpenMRS objects into FHIR representations and vice-versa. All of these dependencies are managed and wired together via Spring (mostly using annotation-based configuration).

The easiest way to trace things out is to pick one of the ResourceProviders and follow the calls being made from there. You can also look through the extensive test cases to see what piece of code provides what behaviour, but hopefully that’s enough to get you started.

1 Like

Thank you @ibacher for that explanation. It has helped me get a little understanding about the FHIR codebase. I have some queries concerning the listed objectives at here.

  1. From the OMOD sub-project, I see the search operation has already been implemented in the Resource Providers as seen in the search area of HAPI FHIR . So does this objective aim only at implementing features for sorting results and chaining queries? I am asking because reading the objective looked as though the Search API has not yet been implemented at all which gets me a little mixed up.

  2. Please across which resources should the search operations be implemented. Is it only on the resoiurces; Encounter, Observation, Patient, Person, Practioner, Location and DiagnosticReport?

  3. Do i include the part of tasks under Extra and Extra Extra objectives on my proposal and while drawing my timeline? Will it be possible to implement all the tasks within the time frame. I am asking because i do not yet clearly know the complexity of each task. I just have a pointer from the links you shared on the page for each task and I am reading up on them.

@kangbreder

  1. So sorting and chained queries have been implemented for many resources. The aim of the first objective is to complete this coverage (Practitioner, DiagnosticReport, and Task all lack coverage of those sort of details). This is the first objective because it seems an easy on-ramp to familiarize yourself iwth the project.

  2. The target should really be all of the resource that we have, though the core resources (Patient, Encounter, Observation, Practitioner, Person, and Location) are higher priority than the others.

  3. No, you don’t need to include the Extra of Extra Extra Credit. Those are really stretch goal for if everything gets completed too quickly :slight_smile:. Realisitically, most of them could probably be separate GSoC projects in and of themselves.

Just to add a note: the real meat of the GSoC project is the 2-4th objectives, i.e., the paging provider, the default parameters and the advanced features.

Okay. Thank you @ibacher

1 Like

Hello Everyone

I have shared my draft proposal for the project on the GSoC Website. Please I will like to get some reviews from the GSoC mentors especially concerning the approach i have described for implementing the objectives, the schedule and milestones.

Thank you

cc: @ibacher @reagan

@kangbreder Thanks for submitting a draft proposal. I’ve left you some comments, but it looks well thought through.

1 Like

Thank you @ibacher :smile: I will go through the comments on the document.

1 Like

@ibacher Please I will like to pick up a project related ticket but it seems all tickets are picked up already here. Could please help me find or create some project related intro tickets for me to work on and familiarize myself with the FHIR codebase?

Also I am wondering how to exploit the FHIR search features on the reference application standalone :thinking:

@kangbreder So you what you can do is have a look here and then

  1. Run a server with fhir2 module in it
  2. Use postman to see the response

Hope this helps!

Thank you for replying @sidvaish97

Please where do i find the fhir2.omod file which i will need to deploy fhir2 in the appdata/module directory of the reference application? I seem not to find under the omod/target directory :thinking:

It should be generated after compiling the module, i.e, after running mvn clean install from the root of the project.

Thank you @captaindavinci. I have done that and i can see the file generated now. :smile: