GSoC 2018 Attachments Module Enhancements

Hi all, members interested in this project are welcome for this thread :slight_smile:

1 Like

@mksd I would like to know the project objectives in detail and the skills required for completion for this project in detail. Are skills related to AngularJs and React required?

@madushan did you see this page https://wiki.openmrs.org/display/projects/Attachments+Module+Enhancements?

@ivange94 Thanks, I read it. It says some of the objectives are not yet confirmed. I would like to know more about the objectives and more about the tasks related to AngularJs and React.

TBH I think you have enough information on that wiki to get started.

The Attachments module brings to the OpenMRS Reference Application a central place to view & manage file attachments. 
Additionally it encompasses files uploaded elsewhere within OpenMRS as long as they are saved as complex obs.

The aim of this project is to get v2.0 of the module ready for release. This will consist of working on a subset of tickets for the v2.0 release.

That paragraph says it all. There are bunch of open issues that need to be tackled to get this module ready for 2.0 so your gsoc project will be these issues. Also this adds a lot of information

Objectives
(plus) To be confirmed - the objectives for this project will be to complete a subset of tickets for the v2.0 release.
Attachments to become 100% RESTful.
Attachments UI to be
Segregated to an Open Web App.
Converted from Angular to React.

Are you saying the wiki does not answer this question?

First thing you should be doing is download and install the attachment module. Find the documentation of this module and play with the module a bit. Then look at open issues for this module and start tackling them to understand the codebase.

1 Like

Thank you very much for the guidance. I would try them to get started

1 Like

@ivange94 I am not an expert in angularJs. I just needed to know the skill level required. Sorry for the inconvenience.

Hi @madushan,

Glad to see that you’d be interested to jump in and work on Attachments.

The current open tickets might not reflect this properly, but what should really be done with Attachments is to repackage its UI as an OWA. And while doing so redo it in React, if possible.

However currently the UI side is written in Angular, and it might also stay that way depending on time and resources.

As @ivange94 said the best and first thing to do would be to play around with the module. See and understand what it does, where it brings changes to the Ref App UI (as in: see where its UI components are hooked in… etc).

2 Likes

Having said all this, there’s a bunch of possible backend tasks on it. If you’re more comfortable with Java programming than with UI-related technologies there’s stuff to do there too.

1 Like

@mksd Yes I am more comfortable with Java Programming than UI-related technologies. Thank you very much for your kind advices.I will follow them to get started.

@mksd I checked out the code of the module from github and added the .omod into my reference application. But I could not find out a link to use the attachment module . Are there anyway that I can try the module.

The README file hints at the fact that a new dashboard widget comes up:

image

The above image dates from when this module was named ‘Visit Documents’, you should see an ‘Attachments’ widget now. Anyway, click on the curved arrow.

By default you will need a patient with an active visit.

@mksd Thank you very much for help. I found the interface and tried to upload a image and it was successful. I guess the following code takes care of uploading the file.

Creating a new attachment happens through the upload method.

The save method that you pointed to can only be used to update attachments. And by the way while doing so, you can update everything except the underlying file.

@zouchine what do you think of this?

@mksd Thank you very much. I have worked in other modules and most of them had only 1 omod version. But this module consists of few omod versions and they contains different code bases. Screenshot from 2018-03-12 17-10-53 What could be the reason for this ?

Wait until you see that one: https://github.com/openmrs/openmrs-module-webservices.rest

:slight_smile:

You should first read this one in details: ‘Supporting different OpenMRS versions’. Then feel free to ask further questions.

1 Like

@mksd What I understood from the resources was that It is done to deal with different versions of Openmrs version.(Please correct me If I am wrong).

@mksd I viewed the previously uploaded image and the I that fetched me the image is http://localhost:8081/openmrs-standalone/coreapps/clinicianfacing/patient.page?patientId=107

I guess this GET request is not served by the attachment module but by any other module?

The GET side is only partially supported via REST. @zouchine is currently working on ATT-4 addressing this.

In the meantime you can use the non-REST controller, see here.