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.
- Subscription (for managing an OCL subscription)
- Import (for importing using a subscription)
- 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: https://app.openconceptlab.org/#/orgs/WHO/sources/ICD-10-WHO/)
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.
- Saving an OCL subscription in the OpenMRS database
- View the saved subscription
- Editing and updating the saved subscription
- 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.