GSoC Project: Radiology Reporting Enhancements Continuation


(Ankit) #1

Hi everyone, this thread is for discussion and refinement of the project: Participant: @ivange94 Mentors: @arastogi @sunbiz @judywawira Proposal Draft:

(Ankit) #2

Hi @ivange94

Good luck on your internship defense! I’ve made some initial suggestions to your proposal and will continue to make some more as I go along

(Ivange94) #5

Hi @arastogi

Thanks. I already rounded up with my defense and started responding to your comments.

(Ivange94) #6

Update about fhir server setup.

I kept on having issues with making the radiology module a fhir server. After implementing all the classes in radiology as documented in the fhir docs, my builds kept failing. Also the tutorial does not explain much about the different parts of the example server code on github so I have to make guesses about some things. So I decided to build a fhir server from scratch out of radiology just so I can understand the differents parts of the fhir server architecture. The problem I’ve been having so far is knowing which dependencies I should declare in my pom. The code on github is a multi module maven project and some dependencies have nothing to do with setting up a fhir jpa. Also there are some dependencies that are declared in the pom that are not directly used in the code.

I joined the fhir mailing list and posted the problems I was having there and though my problem was not directly solved I was pointed to another sample code that sets up a fhir server. This is easier to work with as it’s not a multi module project hence all dependencies in the pom will probably be what’s necessary to setup a fhir server. And this has been helpful, I am beginning to understand why I kept have build failures and trying to resolve them. But still the same I still have to figure things out just by looking at the code.

Here is the link to fhir server I’m working on I used spring boot. I’ve just implemented the single class necessary to setup a fhir server(a class that extends one of the dstu base classes in this case dstu3). Now when I run the tests spring is unable to initialize the application context due to some missing dependencies. Currently working on that.

(Ivange94) #7

Was finally able to build a fhir server from scratch by following the examples on the jpa guide and also some other examples I found on github. Here is a link to my commit

Now when I do mvn jetty:run I can access my server at http://localhost:8181/fhirjpademoserver/ but I still see an error on the interface I’m trying to fix now. See snapshot below

If you look at the repo here you 'll notice I didn’t implement all the files that are in the example on github from the tutorial. This is because I could not understand how they are been used so I skipped them until I have more understanding of their purpose. These files includes all the xml files inside the WEB-INF/ except the web.xml file. For instance I didn’t see how this web-non-polling-subscription-dstu3.xml is been used and the files in the xsd/ and template/ directories. You can see the files I’m talking of here

Will be moving ahead now to do the same inside the radiology module.

(Ivange94) #8

@sunbiz, @judywawira pls I need clarification on something. The jpa example code is meant for a web application deployed to a web server. Amongst other things it needs it’s own web.xml. I don’t see how just copying those java classes into radiology and deploy on toolkit will make it work. Radiology module is not a web application like how the standard expects it to be, it’s an openmrs module and does not have it’s own configs like database connection settings.

Or do you need me to transform the radiology module to a web app by

  1. Add a web.xml file in the omod submodule
  2. Modify the build to generate a .war instead of .omod
  3. Add the configurations for fhir jpa server and deploy radiology to tomcat as web application on it’s own

(Saptarshi Purkayastha) #9

It has to be a module and not a separate web app. The web.xml parts can be part of the module config xml

(Ivange94) #10

Was able to save report as complex obs using this

public synchronized RadiologyReport saveRadiologyReport(RadiologyReport radiologyReport, String content) {
    final Obs obs = new Obs();
    final ConceptComplex concept = radiologyProperties.getConceptForReport();
    obs.setObsDatetime(new Date());
    File tmpFile = null;
    InputStream complexDataInputStream = null;
    try {
        tmpFile = File.createTempFile("report", ".html");
        FileUtils.writeStringToFile(tmpFile, content);
        complexDataInputStream = new FileInputStream(tmpFile);
    catch (IOException e) {
        throw new APIException(e.getMessage(), e);
    final ComplexData complexData = new ComplexData(tmpFile.getName(), complexDataInputStream);
            .saveObs(obs, "");
    return saveRadiologyReport(radiologyReport);

But when I visit thepatient dashboard under the obs section I don’t see any obs created but in the database there is an obs associated with the patient.

Screenshot of saved report

Screenshot of patient dashboard

But when I visit the database, there is an obs associated with the patient and the complex value has the name of the report file

(Ivange94) #11

(Ivange94) #12

(Ivange94) #13

I’ve completed my first evaluation, also written my report on my blog and I’ve updated my timeline to show exactly what I’ll be working on at all times. You can have a look here The timeline for the final coding phase will be modified. It still talks about template validation but we decided to turn of validation so for the final coding phase I’ll still be working on the UI for radiology. But I’ll update it on the timeline after seeing the progress of the second coding phase. @judywawira, @arastogi have a look and let me know if the timeline is in line with our goals.



(Ivange94) #14

(Ivange94) #15

(Ivange94) #16

(Ivange94) #17

(Ivange94) #18

(Robby O'Connor) #19

(Robby O'Connor) #20