Working with OCL Subscriptions — GSoC 2022 Week 1

The coding period of GSoC 2022 started on the 13th of June. As I said in the previous blog post, my project is about creating a Microfrontend for the existing OpenMRS OCL Subscription module. When planning the project, I identified 3 main components of the module to be developed.

  1. Subscription (for managing an OCL subscription)
  2. Import (for importing using a subscription)
  3. Previous Imports (for viewing details of previous imports)

During the first week of the coding period, I started working on the first component; that is the Subscription component. With this component, users can save an Open Concept Lab subscription in their OpenMRS instance.

What is an OCL Subscription?

Open Concept Lab (OCL) is an Open Source terminology management system. It consists of dictionaries, collections, mappings and concepts.

Data dictionaries consist of data definitions, terminology or indicators, which are collectively referred to as concepts. Relationships between concepts are defined in OCL as mappings. OCL supports searching and editing concepts and mappings, building sources (a.k.a. data dictionaries), and logically grouping concepts and mappings into collections — OCL Wiki [1]

OCL is used by OpenMRS implementors to easily manage their medical terminologies(concepts). For that, their OpenMRS instance has to be connected with an OCL subscription.

OCL subscription is a reference to either a source or a collection in an OCL instance. Every source and collection have a unique URL, so it is used as the subscription URL as well. The concepts and mappings in the source/collection can be accessed through this URL. (Example:

Additionally, an auth token is required for authenticating when using the OCL API to retrieve the terminologies in the subscription.

Managing a Subscription

When it comes to managing a subscription, the OpenMRS users should be able to do the following things.

  1. Saving an OCL subscription in the OpenMRS database
  2. View the saved subscription
  3. Editing and updating the saved subscription
  4. Deleting the saved subscription (Unsubscribing)

I designed the subscription component using the carbon design system to address the above requirements.

This allows the user to configure the advanced options which can be used to set the validation type and the subscription type also.

So this week I was able to implement this component with the initial functionality using React and Typescript.

There are a few more things to be fixed in this component. In the next week, I hope to complete this component and send the pull request for review. That's all for today and thank you for reading.





Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store