Source Mappings in the openconceptlab module

I’m looking into OCLOMRS-1000 where it is correctly noted that the current openconceptlab module doesn’t add a mapping to the source of a concept. For example, when I import a concept from my custom collection that I pulled from CIEL into OMRS, I end up with something like this:

Where we have mappings for many sources, but not a mapping to say that this is the SAME-AS the CIEL source it is from. This is because that mapping doesn’t exist in OCL, since this concept is taken directly form the CIEL source. This is clearly something that needs to be fixed and, fortunately, it should be easy to fix, since we have the information about what source this concept comes from in the information we get from OCL.

Once we get PIH’s dictionary is loaded into OCL, we will also need to ensure that PIH concepts have a SAME-AS PIH: mapping.

My question is: how far should we go with this? Should we create a SAME-AS mapping for the source the concept is derived from regardless of what source that is or should we limit this feature only to well-known sources, e.g., CIEL, PIH, MSF, etc. or should we provide some mechanism to allow the user to specify which sources they want to create SAME-AS mappings for?

Always creating a mapping to the source seems like a good idea, but we run into a namespacing issue. Specifically, in OCL, a source has it’s owner as part of its identity, e.g., the real CIEL source is the one that’s owned by the CIEL organisation in OCL. But, I can easily create a source under my user account that also has the name CIEL, which seems like an undesirable thing to allow.

Limiting this to well-known sources seems like a good compromise, but is obviously limiting implementers capabilities to add mappings for sources they care about but that are not widely used across the OMRS community.

The third option is clearly the most flexible. The only drawbacks I see are: 1) it creates yet another piece of metadata that needs to be managed and 2) to properly use this feature, it requires implementers to have both some understanding of how OCL structures data and how OMRS structures data to avoid falling back into the namespacing trap. (Concretely, the easiest way to do this would be to maintain a mapping between the OCL full source name, e.g. /org/CIEL/sources/CIEL and the OMRS source name, e.g. CIEL).

Does anyone have any opinions on the best way forward? Are there options I haven’t thought of here?

@akanter @grace @alaboso @ball @burke @suruchi and anyone else with thoughts on the matter!

1 Like

It is interesting since I do create the SAME-AS CIEL map in the dropbox files. It gets removed when imported into OCL, but doesn’t get put back by the subscription module. MDS did that automatically, I thought when creating exports.

1 Like

From a quick look, it seems like that was configurable, but the default setting was indeed to create a source mapping, though there also seems to be a feature to choose which external mappings get added.

Not sure where that gets us here though…

Thanks for bringing this up @ibacher. I hope that I am addressing your question(s). If not, please followup.

CIEL and PIH mappings are essential for the PIH EMR (for htmlforms, reports, and code).

Should we create a SAME-AS mapping for the source the concept is derived from regardless of what source that is or should we limit this feature only to well-known sources, e.g., CIEL, PIH, MSF, etc. or should we provide some mechanism to allow the user to specify which sources they want to create SAME-AS mappings for?

This would be useful – at least for CIEL and PIH. The PIH dictionary has a variety of these mappings and all need to stay intact since we might use any of the these SAME-AS mappings (ie. PIH:1065, PIH:YES, CIEL:1065). In recent years, we use the CIEL mappings so that others can use our code with the CIEL dictionary (and without the PIH dictionary).

As an example,

There are many situations where I would want to add a CIEL mapping to an existing concept. For example, I need a concept immediately (ie. Pharyngotonsillitis) and deploy the PIH EMR code. Then Andy creates the concept in CIEL 2 weeks later. I will update my local “Pharyngotonsillitis” concept with the CIEL mapping – also so it can be used by other implementations. I’d like to think that OCL will change this process, but guessing that I will still have reasons to create concepts which will later go into CIEL.

I can provide other examples if it’s helpful.

1 Like