-
Notifications
You must be signed in to change notification settings - Fork 64
OpenMRS to OCL Mapping
This page illustrates how all fields in the OpenMRS v1.9 Concept Data Model map to OCL fields. This model is used during the import of the CIEL dictionary into OCL. It can also be used as a guide for OpenMRS implementers that are connecting to the OCL API.
OpenMRS Wiki on the Concept Data Model
- Lookup tables
- Lookup fields are stored in full text rather than by identifier (e.g. OCL.concept.concept_class = 'Diagnosis')
- Lookup tables from OMRS include: Concept Classes, Concept Datatypes, Map Types, Name Types, Locales
- Lookup tables added by OCL include: Description Types, Source Types, Collection Types
- OCL does not store OMRS audit data (date_changed, date_created, date_retired, creator, changed_by, retired_by)
- Record identifiers
- OCL stores UUIDs for all resources (excluding lookup tables) in an
external_id
field - OCL does not store "*_id" fields with the exception of
concept.concept_id
- OCL stores UUIDs for all resources (excluding lookup tables) in an
- Questions, Answers, Concept Sets
- To OCL, all of these are different types of relationships between concepts, which are stored as mappings with specific map types
- Extras
- OCL has the ability to store any additional fields as "extras" - some of the non-core fields from OMRS have already been imported as extras
- Mappings
- Data in
concept_reference_term_map
would be stored directly in the reference sources so is not imported
- Data in
- OCL does not store any information from these OMRS tables:
- Drug Tables: drug, drug_ingredient
- Concept Name Tags: concept_name_tag, concept_name_tag_map
- Concept Proposal Tables: concept_proposal, concept_proposal_tag_map,
- Other: concept_word, concept_complex, concept_stop_word
NOTE:
- Bolded fields are directly copied from OpenMRS
- Italicized fields are derived from the corresponding field in OpenMRS and are not directly copied
- Bolded and italicized fields are linked to the specified OpenMRS field via foreign key relationship
-
ALL CAPS CODE
represent the planned behavior but not yet implemented
OpenMRS Table | OpenMRS Field | OCL Field | Notes |
---|
| concept | id | concept.id | |
| concept | uuid | concept.external_id | |
| concept | retired | concept.retired | |
| concept | datatype_id | concept.datatype | |
| concept | class_id | concept.concept_class | |
| concept | is_set | concept.extras.is_set | |
| concept_name | uuid | concept.name.external_id | |
| concept_name | name | concept.concept_name.name | |
| concept_name | locale | concept.name.locale | |
| concept_name | concept_name_type | concept.name.name_type | |
| concept_name | locale_preferred | concept.name.locale_preferred | |
| concept_description | uuid | concept.description.external_id | |
| concept_description | description | concept.description.description | |
| concept_description | locale | concept.description.locale | |
| concept_description | locale_preferred | concept.description.locale_preferred | |
| concept_datatype | name | concept.datatype | NOTE: Full datatype metadata will be stored in its own OCL source entitled OCL:Datatypes that in the future will populate datatype dropdowns |
| concept_class | name | concept.concept_class | NOTE: Full concept class metadata will be stored in its own OCL source entitled OCL:Classes that in the future will populate concept class dropdowns |
| concept_map_type | name | mapping.map_type | NOTE: Full map type metadata will be stored in its own OCL source entitled OCL:MapTypes that in the future will populate map type dropdowns |
| concept_reference_source | uuid | source.external_id | |
| concept_reference_source | name | source.full_name
source.id
source.short_code
source.name | |
| concept_reference_source | description | source.description | |
| concept_reference_source | hl7_code | SOURCE.EXTRAS.HL7_CODE
| Will be added |
| concept_reference_map | uuid | MAPPING.EXTERNAL_ID
| Will be fixed in next import |
| concept_reference_map | concept_id | from_concept_code
from_source_owner
from_source_owner_type
from_source_name
from_source_url
from_concept_name
from_concept_url | |
| concept_reference_map | concept_reference_term_id | to_source_owner
to_source_owner_type
to_source_name
to_source_url
to_concept_code
to_concept_name
to_concept_url | |
| concept_reference_map | concept_map_type_id | mapping.map_type | |
| concept_reference_term | uuid | MAPPING.EXTERNAL_ID
| This will be removed |
| concept_reference_term | name | mapping.to_concept_name | |
| concept_reference_term | code | mapping.to_concept_code | |
| concept_reference_term | retired | MAPPING.RETIRED
| This is the current behavior, but look at discussion question below |
| concept_set | concept_set | mapping.from_concept | map_type=concept_set
|
| concept_set | concept_id | mapping.to_concept | map_type=concept_set
|
| concept_answer | concept_id | mapping.from_concept | map_type=q_and_a
|
| concept_answer | answer_concept | mapping.to_concept | map_type=q_and_a
|
| concept_numeric | hi_absolute | concept.extras.hi_absolute | |
| concept_numeric | hi_critical | concept.extras.hi_critical | |
| concept_numeric | hi_normal | concept.extras.hi_normal | |
| concept_numeric | low_absolute | concept.extras.low_absolute | |
| concept_numeric | low_critical | concept.extras.low_critical | |
| concept_numeric | low_normal | concept.extras.low_normal | |
| concept_numeric | units | concept.extras.units | |
| concept_numeric | precise | concept.extras.precise | |
OCL Field | OpenMRS Field | Notes |
---|---|---|
user | No corresponding fields in OpenMRS | |
org | No corresponding fields in OpenMRS | |
source | ||
source.id, source.name, source.short_code | ~concept_reference_source.name | Derived from this field |
source.description | ||
source.external_id | ||
source.full_name | ||
mapping.external_id | concept_reference_term.uuid | Probably switching to concept_reference_map.uuid |
For Discussion:
- OCL.mapping.retired points to OMRS.concept_reference_term.retired, but it should point to OMRS.concept_reference_map.retired even though that field doesn't exist. Retiring the term would be the equivalent of retiring the concept in the external source.
- OMRS.concept.short_name, description, and form_text are not used in OCL
- OMRS.concept_name_tag and OMRS.concept_name_tag_map do not appear to be in use by CIEL -- what's the plan for these?
Change:
- OCL.mapping.retired points to OMRS.concept_reference_term.retired, but it should point to OMRS.concept_reference_map.retired even though that field doesn't exist. Retiring the term would be the equivalent of retiring the concept in the external source.
Missing in OCL:
- OMRS.concept_reference_source.hl7_code --> OCL.source.extras.hl7_code
- OMRS.concept_reference_map.description --> ? OCL.mapping.extras.description ?
- OMRS.concept_reference_map.version --> ? OCL.mapping.extras.version ?
Overview
Resources
Import / Export
- CSV Import
- Bulk Import
- Org/Source Import
- Export API
- Subscriptions
- Subscription Client Testing Process
- OpenMRS to OCL Mapping
Troubleshooting & Operations
- Data integrity checks
- Maintaining OCLAPI's Docker containers
- Maintaining MongoDB and Solr
- How to check logs
- NewRelic monitoring setup
- Configuration changes to make tests and import job run faster
- Accessing Solr UI Remotely
- Data Backup and Restore
- SSL Configuration
- Flower
- Switching to Maintenance Mode on Production Server
- Docker networking and Security
Other