๐Ÿ“š Concepts and Metadata Guide ๐Ÿ“š

๐Ÿ“š Concepts and Metadata Guide ๐Ÿ“š

In this guide, we will walk you through how to use OCL for OpenMRS.

There are 2 main ways to manage your concepts: using Admin Legacy UI or using OpenConceptLab (OCL), an open-source terminology management system. We will delve into these 2 approaches but the use of the OCL tool is highly recommended.

image-20250219-052936.png

About this Guide

Introduction:

The Concept and Metadata Guide provides a structured approach to managing concepts within an OpenMRS instance. The guide provides a comprehensive overview of managing healthcare terminologies within OpenMRS, covering key aspects such as terminology application, concept creation, and metadata organization. It explores two primary approaches:

  • Using the Admin Legacy UI for concept management tasks like setting up concept classes, defining data types, adding mappings, and

  • Leveraging the Open Concept Lab (OCL) tool for advanced metadata management, including creating collections, versioning, and mapping concepts across repositories.

The guide also outlines the process of importing concepts into an OpenMRS instance, offering step-by-step instructions for versioning, exporting, and integrating concepts. Additionally, it provides troubleshooting tips, best practices, and resources to facilitate efficient metadata management.

๐ŸŸ  Terminology, Concepts, and Metadata

1. Terminologyย 


Terminology refers to the standardized set of medical terms and codes used to represent clinical information in a consistent and interoperable manner.

  • It provides a common language that healthcare systems and providers can use to ensure clear communication, accurate data capture, and seamless data exchange.

  • There are three main classes of terminology that are used differently within health information systems: Administrative, Reference, and Interface. It is important to know when to use each one.

    • Administrative terminologies are generally used to classify ideas and manage administrative tasks like generating bills, some form of reports, etc.ย 

      • Examples: ICD-10 or ICD-11 from the WHO, primarily used for diagnoses.ย 

    • Reference terminologies are usually based on ontologies and attempt to model the meaning of an idea. This allows for a sophisticated grouping of ideas based on relationships with other ideas.ย 

      • Examples:ย  SNOMED CT (which covers most domains), LOINC (primarily used for laboratories and clinical findings), and RxNORM (used for drugs).

    • Interface terminologies are primarily clinically friendly terms and phrases that users require for the documentation and treatment of patients and other healthcare activities. They make it easier for users to find target information.ย 

      • Examples: CIEL and IMOโ€™s Core terminology which provide user-friendly terms mapped to many reference and administrative code systems

โ†’ Terminology Application

  • Terminology standardizes the language used within clinical workflows, ensuring that all users, whether clinicians, administrators, or data entry staff, have a shared understanding of medical terms. It prevents ambiguity and errors by ensuring that terms like "hypertension" or "diabetes" mean the same across all systems.

  • Clinical decision support tools rely on accurate and standardized terminology to function effectively. Terminology defines groups of ideas that trigger alerts or reminders, such as drug interactions or critical lab results.

  • Terminology is essential for extracting meaningful insights from clinical data (Reporting/Analytics). Standardized terms enable the system to group and analyze data effectively, such as the number of patients diagnosed with "Type 2 diabetesโ€ (or any more granular forms of Type 2 diabetes).

  • A robust terminology foundation allows seamless exchange of not just codes, but also meaning between systems, such as electronic medical records (EMRs) and laboratory information management systems (LIMS). This is called semantic interoperability.

2. Concepts


Concepts are the building blocks of clinical data within healthcare systems, representing specific entities, conditions, or observations. Each concept captures the meaning or definition behind clinical data. The actual definition of a concept may require a paragraph of text, so this means that the definitions canโ€™t be used in EMRs.ย 

Terms, on the other hand, are the labels or names assigned to concepts to ensure they are clearly understood and easily referenced. Terms have different roles, so there is one FULLY SPECIFIED term that unambiguously identifies the concept in a particular locale. There can be other ones that are in preferred use, or synonyms which help find the concept, but the FULLY SPECIFIED name should always be confirmed as the correct concept.

It's important to note that while the concept is universal, the terms can be localized (i.e., translated into different languages).

  • The purpose of concepts is to provide structured and precise definitions for clinical items (e.g., "Body Temperature", "HIV Positive", "Blood Pressure").

    • A concept represents individual pieces of data collected from a patient โ†’ questions/answers, diagnoses, procedures, medications, laboratory tests, etc that need to be captured.

  • A concept may include a name, description, class, datatype (numeric, text, coded), and mappings to standardized terminologies (e.g., SNOMED or ICD codes).

  • Concepts often derive their definition, context, and structure from established terminologies or classification systems. For instance, a concept like "Hypertension" can be associated with a specific meaning and coding system such as the ICD-10 code This mapping to a standard code ensures a universal understanding of the concept, aligns with clinical standards, and supports interoperability, reporting, and accurate data exchange across healthcare systems.ย ย 

3. Metadata


Metadata refers to the descriptive information about concepts or terminology that provides context, structure, and rules for their use.

  • Metadata aims to manage how concepts and terminologies are implemented in a system, ensuring data integrity, interoperability, and usability.

  • Examples:

    • Data type (e.g., numeric, coded, text).

    • Validation rules (e.g., a temperature must be between 35โ€“42ยฐC).

    • Mappings to external terminologies.

    • Localization information (translations, regional adaptations).

Letโ€™s use the CIEL dictionary (the Columbia International eHealth Laboratory dictionary) to illustrate the relationship between terminology, concept, and metadata using "Body Temperature as an example."

Terminology refers to the standard codes and vocabulary used to describe "Body Temperature" in a consistent, interoperable way.

  • CIEL Code for Body Temperature: CIEL 5088

  • Mappings: CIEL maps this concept to external terminologies such as:

    • LOINC: 8310-5 Body temperature

    • SNOMED CT: 386725007 Body temperature (observable entity)

  • Purpose: These mappings ensure that "Body Temperature" is recognized consistently in external systems, supporting interoperability and standardization.

Concept Mapping Example

A concept represents the specific clinical entity of "Body Temperature" within OpenMRS, built on the terminology (these can be copied in from a trusted source like CIEL, or created carefully from scratch).

  • Concept ID in OpenMRS: CIEL 5088

    • Itโ€™s good to note that, in OpenMRS, the concept ID can vary across different installations. However, in the CIEL dictionary, the concept is referenced as "CIEL:5088," where 5088 is the unique concept ID within the Open Concept Lab (OCL) or the authoritative "golden" server where the concept dictionary is managed. Once the CIEL dictionary is installed in an OpenMRS system, the local concept ID assigned may differ from 5088.

  • Name:

    • Preferred: "Body Temperature (ยฐC)"

    • Synonyms: "Temperature," "Temp" (may include translations, such as French: "Tempรฉrature (ยฐC)".

  • Data Type: Numeric (to capture measurable values).

  • Class: Finding (indicating it is a result or observation from a test).

  • Units: Celsius (ยฐC) OR Fahrenheit (ยฐF), but not both. If the concept name has ยฐC, then units must match

  • Description (this is a definition in words):

    • Patient temperature in degrees centigrade (ยฐC).

  • UUID: Unique identifier for each concept which is maintained for every implementation.ย 

  • Mappings to Terminologies:

    • These are relationships between the concept and other codes or terms e.g. body temperature is mapped to LOINC 8310-5 (which ensures global compatibility).

    • LOINC is an example of a reference source or the origin or authority from which the terminology or concept is derived. Others include SNOMED CT, etc.

Body Temperature Concept in OpenMRS

โ†’ Common Mappings

  1. SAME-ASโˆž: Indicates a mapping relationship in which the concept is considered identical or synonymous to the concept specified. This is sometimes called โ€œSelf-mappingโ€ or โ€œGold Mappingโ€ โ€“ e.g. when CIEL:5088 is SAME-AS CIEL:5088. The reason these exist is to persist a sourceโ€™s official concept ID (the concept ID used in OCL) and also as a mapping for cases where local ID assignment is arbitrary (e.g., importing concepts into a database with auto-assign concept IDs), where the concept ID gets changed arbitrarily during import. In cases where OCLโ€™s concept ID is reliably preserved during imports to implementing systems, these self-mappings are unnecessary.

  2. same-as: A standard mapping relationship that identifies the concept as exactly equivalent to another concept in a different dictionary or terminology set. For example, the โ€œMalariaโ€ concept is the same as โ€œunspecified Malariaโ€ in ICD-10-WHO.

  3. NARROWER-THANThis mapping means that the concept is more specific than the referenced concept. For instance, โ€œMalaria caused by P. falciparumโ€ is narrower than the broader term โ€œMalariaโ€.

  4. BROADER-THAN: This mapping indicates that the concept is more general than the referenced concept. For example, โ€œMalariaโ€ is broader than the more specific concept โ€œMalaria caused by P. falciparum.โ€

๐Ÿ’ก Note:

It's important to note that SAME-AS mappings offer the most utility compared to Narrower-than and Broader-than mappings. Due to their broader established use, SAME-AS mappings are typically the preferred choice when creating mappings.

  1. q-and-a: Represent a Question-and-Answer relationship where a concept (e.g., โ€œMalariaโ€) is used as an answer to a predefined question (e.g., โ€œWhat was the medical cause of death?โ€, โ€œPrimary reason for referralโ€ etc).ย 

  2. concept-set: Refers to a specific collection of related concepts grouped for organizational purposes. Concept sets are often used to group similar medical terms or conditions for easier management and reference. Some examples include:

  • Vital Signs Concept Set โ†’ may include Temperature, Pulse, Respiratory Rate, Blood Pressure, and Oxygen Saturation.ย 

  • Cause of death Concept Set โ†’ may include Malaria, HIV/AIDS, Heart Failure, and Road Traffic Accidents.

  • Common examples of Concept sets include ConvSet, LabSet, and MedSet.

๐Ÿ“Œ Convenience Set (ConvSet):

  • A convenient set is designed to group commonly used concepts that are frequently referenced together for convenience.

    • Diagnoses easily accessible for clinicians during patient visits โ†’ may include concepts in the set like Malaria, Hypertension, Diabetes mellitus, Pneumonia, and Gastroenteritis.ย ย ย 

  • A convenient set is used to show or report on a subset of concepts.ย ย 

    • Examples of these sets โ†’ include oncology, pediatric, or NCD diagnosis.

  • They can also be used in forms to reference a group of answers or to filter a database query.

  • Used to group related concepts.

    • For example, intravenous fluids โ†’ include the name of the fluid, volume, and location of the IV.ย  In OpenMRS, these are stored in the database as an obsgroup with multiple obs.

๐Ÿ“Œ MedSet:

  • A concept set for a collection of drugs that are related โ†’ for example, Antiretroviral drugs or TB medication.

๐Ÿ“Œ LabSet:

  • A concept set for a collection of laboratory tests that are related โ†’ for example, Hematogram or Liver Function Panel lab tests.

OpenMRS Concept Tables Data Model

OpenMRS Concept Tables Data Model
OpenMRS Concept Examples

Metadata governs how the "Body Temperature" concept behaves within the system, providing structure, context, and validation rules.

i) Data Type Metadata:

  • Metadata establishes whether the concept value is a number (e.g., 37ยฐC), a range (e.g., 36โ€“38ยฐC), or a coded value (e.g., "Low," "Normal," "High").

  • Numeric Ranges:

    • Normal:ย  between 35.0ยฐC and 37.7ยฐC

    • Critical:ย  maximum: 39.0ยฐC

    • Absolute: between 25.0ยฐC and 47.0ยฐC

  • Units of measurement: Degrees Celsius (OpenMRS can support conversion to Fahrenheit units)

ii) Validation Rules:

  • Value Constraints: Metadata enforces rules for valid entries. For example:

  • Minimum and maximum values (e.g., 30ยฐC to 45ยฐC).

  • Disallowing text or invalid ranges (e.g., "400").

iii) Date and Time Context: Metadata can link the temperature reading to a specific encounter or time period for trend analysis.

iv) Error Handling: Metadata defines error messages or flags for invalid inputs, ensuring data integrity (e.g., "Entered value is out of the acceptable range").

v) Display Information:

  • Grouped under the "Vitals" section in forms.

    • Can be set as required in specific forms (e.g., "Vitals Signs Form").

vi) Data Capture Metadata:

  • Input method: Numeric entry.

vii) Behavior in Analytics:

  • Metadata provides the clinical context of "Body Temperature," such as its role in diagnosing conditions (e.g., fever detection or hypothermia monitoring).

    • Is Parent Of/Child Of: Ensures hierarchical relationships are maintained for clinical clarity and analytical inclusiveness.

    • Groupings and Hierarchies:

      • Parent-Child Relationships: Metadata determines if "Body Temperature" is part of a broader group like "Vital Signs" and includes descendant concepts like "Axillary Temperature" or "Oral Temperature."

      • Ancestor/Descendant Inclusion: When querying data, metadata ensures that selecting "Body Temperature" automatically includes relevant subcategories like "Rectal Temperature" or excludes unrelated data.

    • Query Behavior: When running a query for "Body Temperature," the metadata determines:

โ†’ Which related concepts (like "Axillary Temperature" or "Rectal Temperature") should be included based on relationships?

โ†’ Whether synonyms (e.g., "Temperature Measurement") are considered equivalent.

viii) Aggregation Rules: Metadata controls how data is grouped for analysis:

  • By unit (e.g., Celsius vs. Fahrenheit).

    • By time (e.g., daily averages).

    • By location (e.g., body site of measurement).

ix) Trend Analysis: Metadata ensures "Body Temperature" can be tracked over time and across patient populations for trends (e.g., identifying fever outbreaks).

x) Filtering and Sorting: Allows users to filter data by attributes (e.g., only oral temperature readings) or sort by values.

xi) Integration with Other Data: Metadata links "Body Temperature" to other vitals (e.g., blood pressure, pulse) to provide a comprehensive clinical picture.

xii) Decision Support: Metadata enables alerts, such as flagging a temperature of 39ยฐC as indicative of a possible fever, prompting further investigation.

๐Ÿ”ต Metadata Management in OpenMRS

In OpenMRS, metadata management is essential for structuring and standardizing medical and administrative data to ensure seamless system functionality and interoperability. Here are several types of metadata managed within OpenMRS:

1. Concepts

These are foundational elements in OpenMRS, representing clinical ideas like diagnoses, symptoms, drugs, laboratory tests, and procedures. Concepts must be carefully curated and managed, including their names, data classes, datatypes, and mappings to external vocabularies like ICD-10, ICD-11, SNOMED, RxNORM, or LOINC. Concepts can be shared between different OpenMRS installations through the OpenConceptLab (OCL).

2. Locations

Metadata for locations includes both physical and administrative locations within a healthcare system, which is crucial for patient tracking, reporting, and resource allocation. This involves managing names, descriptions, and hierarchies of locations. This could be a hospital (Kigali Central Hospital, Koidu Government Hospital, Wellbody Clinic) or a specialty within a health facility (Women's Health Clinic, Outpatient clinic, Oncology, Surgery, Laboratory, Emergency Department, Men's ward, etc)

3. Encounter Types

These categorize patient visits and or interactions, such as outpatient visits, inpatient admissions, emergency room visits, vitals, labs, immunizations, etc. Metadata management for encounter types includes defining the type, its description, and any associated forms or workflows.

4. Order Types

Metadata related to orders includes the types of orders that can be placed within the system, like lab orders, drug orders, radiology orders, or procedure orders. Managing these involves setting up order types with their attributes, handling units, and linking to concepts or drugs.

5. Patient Identifier Types

This includes metadata defining how patient identifiers are structured and validated within the system, such as medical record numbers, national IDs, or other unique identifiers. This involves specifying the format, validators like Luhn CheckDigit, and rules for uniqueness.

6. Programs

Metadata for programs helps in organizing patient care under specific health programs, like HIV care, Pregnancy, or diabetes management. This includes program names, enrollment dates, workflow/states, and outcomes.

7. Roles and Privileges

Administrative metadata that manages user access and permissions within OpenMRS, defining what users can do based on their roles. This is crucial for security and governance. Depending on roles, users are restricted from access to information that does not match their responsibilities. Roles also limit the actions and information displayed.

8. Forms

These are used for data entry and need management of form structure, associated concepts, and dependencies. Forms are used in various clinical areas e.g. vital signs, consultation, lab test/results, antenatal visit, HIV enrollment, etc)

9. Relationship Types

Metadata about how patients or users are related to each other or to the system, which is vital for family or caregiver information management.ย Relationships can include child-mother, patient-clinician, spouse, and siblings.

10. Drugs

Metadata for managing drugs, including brand drug names, strengths, and formulations. Also ensuring they link correctly with the related drug concept in the concept table.ย 

โถ The drug table exists to manage medication prescriptions more precisely by storing drug formulations including drug name, strength and form (e.g., tablet, syrup or capsule). This structure allows for accurate prescribing and dispensing of medications.ย ย 

โท Brand and generic drug names help differentiate between multiple products containing the same active ingredient.

โธ Strength defines the concentration of the active ingredient (e.g., 500 mg, 10 mg/mL).

โน Form specifies the physical presentation of the drug (e.g., tablet, capsule, syrup, injection).

11. Address Hierarchyย 

Metadata that matches the countryโ€™s home addresses for patients. A description of the format (street, village, state, country) along with every possible variation for the country.

Having well-defined concepts and metadata is essential for every OpenMRS installation because concepts form the foundation of how data is captured, stored, and interpreted in the system. While each organization is responsible for identifying and defining the concepts needed for their implementation, itโ€™s recommendable to seek guidance from the OpenMRS community due to the complexity of concept creation and the expertise and experience required.

โžœ It is best to contact the OpenMRS community and use some of the existing concept dictionaries like CIEL (Columbia International eHealth Laboratory)

โžœ To get help from the OpenMRS Community: om.rs/gethelp

๐ŸŸฃ Best Practices Examples

  • Organizations can either create a set of concepts manually (using Admin Legacy UI) or use tools like OpenConceptLab (OCL) which is an open-source terminology management system. The use of the OCL tool is highly recommended because:

    • OCL provides real-time electronic access to terminological resources and straightforward integration with independent software platforms.

    • OCL Online helps you to collaboratively manage, publish, and use terminology in the cloud alongside the global community.

    • OCL advantages include:

      • It allows you to quickly get startup concepts from CIEL or another trusted source.

      • Facilitates the establishment of a โ€œbaselineโ€ source using a trusted dictionary.

      • Minimizes duplication of effort both within and across organizations.

      • Allows content management independent of the OpenMRS version.

      • Promotes a transparent and accessible concept dictionary.

      • Enables public sharing of concepts.

  • Concepts naming conventions:

    • Use only alphanumeric characters (letters and numbers), with simple punctuation, such as commas (โ€œ,โ€), parentheses (โ€œ( )โ€), and forward slashes (โ€œ/โ€).

    • Descriptions may include non-alphanumeric characters, but sentence case is recommended โ€“ with the first letter capitalized unless acronym (e.g., HIV).

    • Collaborate with end users to ensure concept names are clear, meaningful, and aligned with their workflows.

    • Avoid renaming concepts that are already used for storing clinical data, as this may impact data consistency and reporting.

  • Concepts should include a clear and unambiguous description (at least in the system's default locale) that defines its meaning and, ideally, outlines its intended use.

  • Design for Re-use:

    • Avoid boolean datatype for symptom & diagnosis concepts โ†’ Use datatype N/A for these and use them as answers (not questions

๐ŸŸข Managing Concepts and Metadata using the Open Concept Lab (OCL) Tool

Open Concept Lab (OCL) is a terminology service that allows for the creation, editing, and management of medical concepts, including those from Columbia International eHealth Laboratory (CIEL). These concepts include diagnoses, procedures, medications, and other healthcare terminologies. Both OCL and CIEL aim to improve healthcare informatics by offering tools that make health data more standardized and accessible.

๐Ÿ“Œ The OCL tool provides an online repository that facilitates collaborative management of medical terminologies by providing tools for editing, mapping, and localizing concepts from CIEL to meet specific requirements. Multiple stakeholders contribute to the development, maintenance, and update of these concepts and vocabularies.ย 

๐Ÿ“Œ CIEL maintains a comprehensive concept dictionary relevant to health information systems in low and middle-income countries (LMICs). CIEL acts as a โ€œsingle source of truthโ€ for OpenMRS instances, enabling semantic interoperability and reducing redundancy across different instances.ย 

The CIEL concepts are available within OCL, allowing users to subscribe to, update, or customize these concepts for their specific needs. If an organization or an individual wants to create a dictionary using the Open Concept Lab (OCL) tool, there are several steps involved. Here's a step-by-step guide focusing on the OCL TermBrowser:

Steps for creating a new collection or repository for content

The steps for creating a dictionary using the Open Concept Lab (OCL) include:

1. Accessing OCL TermBrowser

You'll need an account to contribute to or manage terminologies. To access OCL:

i) Visit the OCL Website:
Navigate to the Open Concept Lab website at app.openconceptlab.org.

ii) Log In or Create an Account:

  • If you already have an account:

    • Click the "Sign In" button at the top right of the page.

    • Enter your login credentials and proceed.

  • If you're new to OCL:

    • Click the "Sign In" button.

    • Select "Register" to create a new account.

    • Enter your email address and set up your account by following the instructions.

    • Check your email inbox for a verification email, and click the link provided to confirm your email address.

iii) Access and Navigate OCL:

  • Once logged in, you'll have access to OCL's features.

2. Creating an Organization

i) Log in to OCL

ii) Navigate to Organizations

iii) Create a New Organization

  • Click the "Create Organization" button.

  • Fill out the necessary details:

  • Name: A unique name for the organization.

  • Description: A brief summary of the organizationโ€™s purpose.

  • Add organization website e.g., https://openmrs.org

  • Add company name e.g., OpenMRS

  • Add โ€œAbout Orgโ€ e.g., Learn more at https://openmrs.org

  • Click "Save" to create the organization.

Creating a New Organization

3. Adding Members to the Organization

i) Access the Organization

ii) From the Organizations page, click on the name of the organization you just created.

iii) Manage Members

iv) In the organizationโ€™s dashboard, locate and select the "Members" tab

v) Edit Membership

  • Add new membersย 

  • Once done, click UPDATE

Adding Members to an Organization

4. Creating Repositories (Sources and Collections)

๐Ÿ“Œ Sources serve as repositories for original content, storing the concepts you create as well as any concepts you adapt from other sources. In the case of adapting, what usually happens is that you come across a concept that closely aligns with your requirements but isnโ€™t an exact match. You can โ€˜Cloneโ€™ it โ†’ copy it into your source and modify it to better suit your needs. This process allows you to develop new concepts that may not be available in existing libraries.

๐Ÿ“Œ Collections are for organizing concepts from one or more sources, often for specific use cases or subsets of data.

ย 

1๏ธโƒฃ Creating a New Source (Optional) โžœ For New Concepts (Source):

i) Set up the source:

  • Navigate to "Sources" and click + Source.

  • Add the short code, short name, full name,ย  description, language, and source type, and then select OpenMRS Validation Schema under the schema type.

    • Ensure the short code is descriptive and unique as it cannot be changed later.

  • For OpenMRS users, additional steps under Advanced Settings are:

    • Enable ID auto-assignment: Set IDs to sequential numbers.

    • Use UUID for external IDs.

ii) Save the source:

  1. Create the source, although you may not use it immediately.

image-20250219-093530.png
Creating a New Source
image-20250219-093357.png
Advanced Settings

2๏ธโƒฃ Creating a New Collection โžœ For Organizing Existing Concepts (Collection):

i) Start a new collection:

  • Navigate to "User Collections" and click on the + Collection button.

ii) Configure collection details:

  • Short Code: Provide a unique short code (e.g., OpenMRS_Demo, mini-demo etc).

    • Ensure it is descriptive and unique as it cannot be changed later.

    • Name and Description: Add a descriptive name and an optional detailed description.

    • Languages: Select the default and supported languages for the collection.

    • Validation Schema: For OpenMRS users, select the OpenMRS Validation Schema to ensure compatibility.

    • Optional Settings: You may add custom attributes, FHIR settings, or an about page.

iii) Save the collection:

  • Click the Create Collection button. Your new collection will now appear in your profile.

ย 

5. Adding Concepts to the Collection

i) Search for concepts:

  • Use the Global Search feature to find concepts (e.g., โ€œRoutine Blood Panelโ€ or โ€œMalariaโ€ or โ€œHIV Test Performedโ€ etc).

  • Apply filters to narrow results by:

    • Source (e.g., CIEL, LOINC, PIH).

    • Class (e.g., Lab Test, Diagnosis, Procedure, Finding).

    • Data types (e.g. numeric, text, coded).

ii) Review and verify the concept:

  • Click on a concept to view details like mappings, associations, and usage (e.g., what questions it answers or sets it belongs to). This step is crucial to ensure that the concept fits your needs in terms of definition, scope, and applicability.

iii) Add to the collection:

  • Click Add to Collection and choose your target collection.

  • Use the OpenMRS Compatible Cascade option to include mappings and set members. This ensures that related metadata or mappings are also added in a way that's compatible with OpenMRS systems.

  • Confirm and wait for the references to be added (this might take a few seconds). Ensure there are no conflicts.

  • If successful, you'll see a gREEN MESSAGE indicating that "references added successfully", showing both concepts and mappings.

  • If there areRED MESSAGES, it means the concepts (or their mappings) are already in your collection.

iv) Verification of Addition:

  • Go back to your collection to verify that the concept, including any answers or mappings, has been added correctly. Check for the presence of the concept and any associated data like answers to questions (e.g., Yes/No for an HIV test Performed).

โถ Search the Concept
โท Add to Collection
โธ Apply OpenMRS-Compatible Cascade

ย 

โน Results Messages
โบ Verification of concepts and mappings added to a collection

โžœ Malaria Concept Diagnosis Example

  • Search malaria concept under global search

  • You can see what other organizations are using it for example, PIH has used the same concept

  • Check the CIEL concept since that is what you want to use to build your dictionary and on the right, you will find some mappings used i.e. SAME-AS, CONCEPT-SET-1, Q-AND-A-1

โบ Mappings Example โ†’ SAME-AS, CONCEPT-SET-1, Q-AND-A-1

6. Using OCL Bulk Importer

For cases where there are many concepts and mappings (i.e. hundreds or thousands), OCL does offer a bulk import interface where a formatted CSV or JSON file can be used to create many concepts, mappings, sources, collections, etc. โžœ Be warned that this method is very powerful but may take time to learn for the first time.ย 

7. Cloning to source

As stated earlier, when a concept is Close but Not Exact, you may need to tweak it to suit your needs. If for example, you find a concept in CIEL or another source that nearly fits your needs but requires some adjustments you can pick the option "Clone to Source" which will allow you to make a copy of this concept within your source.

๐Ÿ“Œ Cloning Process:

  • Copy with Mappings โ†’ "Clone to source" will not only copy the concept but also its mappings. This means all the connections or references to other terminologies or concepts are duplicated with the concept.

๐Ÿ“Œ Ownership and Independence:

  • Ownership โ†’ Once you clone a concept to your source, you become the owner of this new instance of the concept. This means:

    • Control โ†’ You can modify this concept without affecting the original in CIEL or wherever it came from.

    • Disconnection โ†’ By cloning, you break the link to the original CIEL concept. This concept in your source will no longer receive automatic updates or changes from the source.

Remember: Cloning should be done thoughtfully, especially in environments where standardization across different systems is crucial.

Example: Letโ€™s search the smoking status concept in the global search โ†’ Review the concept and its answers โ†’ Clone to source and select the source e.g Mini Demo Source

  • Select the source (e.g Mini Demo Source)

  • Then select ADD to add the concept selected

  • Preview to see the concepts and mappings that will be added

โถ Clone to Source

ย 

โท Preview Concepts & Mappings
โธ Details of Concepts being Cloned
โน Results of Concepts Cloned

Cross-check the mini-demo-source

  • Verify that the concept (e.g., "smoking status") and its associated answers have been added.

  • Note that these are no longer CIEL concepts; they are owned by the organization or source that created them.

  • The advantage now is that you can customize the concept to suit your needs

โบ Verification of Concepts Added

To modify the smoking status concept, click โ€œEdit Conceptโ€ action

ย 

โป Edit Concept

Click โ€œEdit Conceptโ€

ย 

โผ Edit Details
  • You can add another translation e.g. Swahili translation for Malaria.

    • Select the locale as sw.

    • Enter the description such as Hali ya kuvuta sigara.

    • Set the type to Fully Specified.

    • Mark it as Preferred.

    • Update the comment to indicate Add new locale concept name.

โฝ Adding Concept Translations
โพ Checking Translation Added

8. Tweaking the concept to add a new mapping

If you want to tweak a concept to add missing answers, the steps are:-

  • Click โ€œAdd Conceptโ€

โถ Add Concept
  • Add Concept Details

    • Concept Class: Finding

    • Datatype: Coded

    • Locale: English

    • Name: Smokes 33 cigs per day (missing answer)

    • Type: Fully Specified

    • Preferred: Checked

  • After adding the concept, verify it by selecting Action โ†’ Edit Concept. You will see the details of the concept you added, along with the automatically generated external ID.

โท Verify Added Details
  • Add this mapping as an answer to the concept of "Smoking Status".

    • Within the "Smoking Status" concept, there is currently no answer such as "Smokes 33 cigarettes per day"โ†’ which is what we want to be added as an answer.ย 

    • To include this as an answer, click on the "Smoking Status" concept.

    • Click โ€œAdd New Mappingโ€

โถ Select Smoking Status Concept
  • Click Add New Mappings

    • Set the relationship type to Q&A.

    • Select the source as Mini Demo Source.

    • For the concept, search for Smokes 33 cigarettes per day.

    • Click Save.

โท Add Details
โธUpdated Concept with the Newly Added

ย 

9. Creating a Similar Concept

If you already have a concept in your source and need to create a similar one, you can use the โ€œCreate Similarโ€ shortcut. For example, if you want to add a new concept for โ€œCongenital blindnessโ€ with the same class, datatype, and similar names as โ€œCongenital deafness:โ€

  • Select the concept (checkbox) you want to duplicate.

  • Click โ€œCreate Similarโ€ โ†’ This action automatically copies the class, datatype, and names, which you must update to ensure they are unique and meet validation requirements.

10. Versioning

i) Create a Version:ย 

  • Once you're satisfied with the initial dictionary setup, create a version of your source or collection.

  • This is crucial for maintaining historical data and ensuring you can reference specific states in your dictionary.

ii) Ensure Your Workspace is Ready:

  • Your "head version" or current workspace contains all the latest work such as the edits or additions to your dictionary or collection.

iii) Create a Version:

  • Click + (Manage content)

  • Select โ€œAdd Versionโ€

Add a Version

iv) Add a Version Number:

  • Assign a version ID. For example, if this is your first version, you could label it "Version 1" or simply "1". Subsequent versions would increment from there (e.g., 1.1, 2, etc.).

v) Add a Description:

  • Provide a brief description of what this version includes or what changes were made. For instance: โ€œAdded socio-demographic concepts."

vi) Check Release:

  • Before finalizing, review your changes or check if this version is ready to be 'released' or made available for use or review by others, if applicable.

vii) Click Create:

  • Once you've verified everything, click the "Create" button to save this state as an official version. This action will record this point in the history of your project, allowing you to revert to or reference it later if needed.

ย 

New Source Version Details

11. Adding the cloned concept to the collection

Add the newly cloned concept to your collection (e.g., mini-demo collection).

  • You will notice that the owner and source of the added concept (smoking status) are no longer attributed to CIEL.

  • Remember to select OpenMRS-compatible cascade

Add Cloned Concept to the Collection
Concept Owner and Source Attribution

12. Mapping to other Concepts (Optional)

Define Relationships โ†’ To enhance interoperability, you can map the new concept to others within your source or to external terminologies or standards like SNOMED CT or ICD-10:

  1. Open the newly created concept.

  2. Click the โ€œAdd New Mappingsโ€ option.

  3. Select existing concepts or input codes from external standards as needed.

  4. Click Save

Add a Mappings
Mapping Example for Smoking Status Concept

13. Dictionary Sharing or Subscription

  • If you want others to use your dictionary, you can share it by providing access or making it public.

  • You can subscribe to your OCL source or collection to automatically update your system with these concepts.

Ongoing Maintenance

  • Regularly update your dictionary with new concepts, mappings, or changes in medical terminology.

  • Engage with the community for feedback, which might lead to further refinement of your work.

โšซ๏ธ Importing Concepts to an OpenMRS Instance

The steps below explain how one can import concepts to an OpenNMS instance.

1. Version & Expansion

  • Click on "+ Add Version" in your concept source or collection.

    • Enter the next sequential version number (e.g., start with 1 for your first version and then move sequentially to 2, 3, etc for the subsequent versions).

    • Provide a brief description of what this version adds or changes (e.g., "Added Socio Demographic Concepts").

    • Check "Release" (by default this is unchecked)

    • Click "Create" to finalize the new version.

    • Refresh the page to check if the version and expansions match your input.

โถ Add Version
โท Version Description
โธ Version & Head Concepts Comparisons

2. Subscription URL Test QA (Optional)

  • Copy the subscription URL for the new version.

  • Navigate to the OpenMRS Admin page (in your instance).

  • Open the "Concept Lab" module in OpenMRS.

  • Paste the copied subscription URL for the new version number in the appropriate field.

    • Paste the token or authentication if required.

  • Save these changes.

  • Click the import tab and then click the "Import" action to begin importing the concepts.

  • Review any errors from previous imports in the โ€œPrevious Importsโ€ tab.

  • Refresh the page to ensure the import was successful.

โถ Subscription URL
image-20250219-145026.png
โท Subscription URL and Token

3. Export Version

  • Export the new version from the OCL to get a file format that the OpenMRS Initializer can process.

    • Click Export Version Icon

    • Select โ€œExport Versionโ€

    • OCL will create a Zipped file and it will show you when the export version is completed for you.ย 

Export Version

4. Upload the exported file to your repository

  • Go to your repository in your OpenMRS distribution's GitHub repository e.g.

  • Click the โ€œAdd fileโ€ and select the โ€œUpload fileโ€ option to upload the exported file from Step 3.

  • Choose the file to upload โ†’ The Export Version you downloaded.

  • Commit Changes

    • Add a commit name e.g., "Added HIV Metadata".

    • Describe changes e.g., "Added HIV TB Screening and WHO Staging concepts".

  • Create a new branch:

    • Select "Create a new branch for this commit and start a pull request".

    • Name the branch something descriptive like "/update-hiv-metadata" or "/update-BasicLabTests-metadata".

  • Propose Changes:ย 

    • Click โ€œpropose changesโ€ to propose changes.

Concepts File Upload
Propose Changes

5. Create a Pull Request (PR) for the changesย 

  • Navigate back to your repository's main page and switch the branch from "MAIN" to the newly created branch (e.g., "update-hiv-metadata").

  • Path:ย