I’m thinking of the PIH crew when I ask this, but sharing publicly as others may have further wisdom to share.
@ball mentioned to me in the past that there are times where 1 concept is referenced in a report query, but multiple concepts are actually drawn from for the data, because of Same-As mappings.
@mseaton - how does this technically work? e.g. is there some kind of script in PETL that runs through Same-As mappings behind-the-scenes?
(CC @ssmusoke @mayanja @eudson @amugume)
I’m not sure what examples this refers to - we pretty much always treat SAME-AS mappings as 1:1 in our queries, and assume only one concept matches a given SAME-AS mapping. Although this is not technically enforced, we tend to use either PIH or CIEL sources and their numeric mappings, which are unique in practice (in OCL, they are treated as such).
As far as how we do it, we just query through SQL, and return a single result. We have SQL functions and views that facilitate this, so that in our SQL reports and PETL extracts, we can write queries like:
from obs o
where o.concept_id = concept_from_mapping('CIEL', '1234');
I would have thought that only 1 SAME-AS mapping should exist, but there are a few strange instances in SNOMED where they actually have two different SNOMED codes that both describe the same concept. In general, I want to hear about any issues with the mapping type to concepts as some might have been impacted during migration and should be fixed. Also, in many cases having narrower-than mappings are also acceptable. Where there may be several CIEL diagnoses mapped narrower-than to an ICD-10 code for example, you would want all of them to be counted when reporting on that ICD-10.