A Component for Importing Concepts — GSoC 2022 Week 3

Piumal Rathnayake
2 min readJul 3, 2022
Vector created by fullvector — www.freepik.com

During this week, I was working on the Import Component of the OpenMRS OCL Subscription module. This component's main functionality is importing the concepts from Open to the OpenMRS instance. Previously I created a UI mockup for this component.

UI Mockup created for the Import Component

First, let’s see how the importing process is done in the OCL Subscription module. The importing process can be done using 2 methods.

  1. Using an OCL Subscription (Online)
  2. Using a zip file downloaded from OCL (Offline)

Import Concepts using an OCL Subscription

With this approach, the concepts in the OCL dictionary are taken using the saved subscription details. Since the subscription is managed directly through the Manage Subscription component, no additional details are required for this operation. The user can simply use the “Import from Subscription” button to start the importing operation.

Video: Importing concepts using the subscription

Import Concepts using a zip file

For this approach, the user doesn't have to save a subscription first. So, the user can directly download a zip file containing the concepts from OCL and then upload it to the module. Since it is not required to connect to the OCL collection in the cloud, this operation can be developed to work in the O3 Offline mode as well.

Video: Importing concepts using the zip file

Usually, after completing an import it should redirect to the Previous Imports component to display the results. Since it is not developed yet, I’ll just show you the HTTP responses which are retrieved after completing the import.

HTTP Request and the Response
The created import object is retrieved as the response

As shown in the above video previews, I was able to create the component UI and support the main functionality during this week. In the next week, my target is to complete this component and start working on the next component.

--

--

Piumal Rathnayake

I'm a Computer Engineering Undergraduate at University of Peradeniya, Sri Lanka. And I also work as a software engineer at Sustainable Education Foundation.