Closed mbrush closed 3 months ago
On recent modeling call, Larry expressed concern that ‘id’ vs ‘identifiers’ still confuses developers/users – despite increasingly widespread use of this distinction in community models like FHIR.
For now, we decided to move ahead with not defining an Entity.identifiers
property, and instead broaden the scope of the Mappings object to accommodate instance identifier equivalency declarations, and concept level code/term mappings.
Changes Larry made here to accommodate this include:
MappableEntity
mapping
into Entity (assumes it is ok for anything to have a mapping . . . if others not ok with this, we can make a Mappable Entity mixin that any class that needs mappings can inherit from)This PR was already merged by the time I worte this - and I noted a couple fixes needed:
ConceptMapping
back to Mapping
(since the proposal here is that Mappings will cover instance-level identifier equivalency declarations)Mapping
class and mapping
property to fit their broadened useIn thinking about how the revised model would be used to capture an instance identifier equivalency (e.g. from a primary pmid for a publication to a pmcid or doi) - issues arise as the Mapping class and its properties are explicitly defined to support concept level terminology/code mappings, not instance level identifier/accession mappings.
Entity.identifers
property . . . or maybe use an xref
property to capture equivalent identifiers, if this is less confusing?
The PR implements changes based on Larry's proposal for refactoring how we represent concept mappings in Discussion # 14
Changes are made to three classes:
Mappable entity:
mappings
) into Domain entity)Mapping:
ConceptMapping
- makes it clear that these being used for concept mappings and not instance identifier equivalencies)DomainEntity
mappings
property (as formerly defined on MappableEntity) to this class - added clarifying text to the definitionNote that if there are other concept-like things we end up defining in our model that we end up wanting to capture "mappings" for - we can add this mapping property yo them as well. But at present, and in foreseeable future, this will exclusively be DomainEntities.
Again, capturing other identifiers for more instance-like things in our data (Publications, Documents) will be handled by something like the
identifiers
property proposed in PR #18. This approach to distinguishing / capturing concept mappings vs instance identifier equivalencies is similar to how many other models work, including FHIR.IMPORTANT: If we do make the Mapping -> ConceptMapping name change, update this in downstream dependencies.