Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: ConceptMapping.coding.code should be a CURIE #390

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

korikuzma
Copy link
Member

close #383

  • Use concept_id as the CURIE

close #383

* Use `concept_id` as the CURIE
@korikuzma korikuzma added bug Something isn't working priority:high High priority labels Dec 31, 2024
@korikuzma korikuzma self-assigned this Dec 31, 2024
Comment on lines -427 to +429
code_ = concept_id.upper() if source == NamespacePrefix.HGNC else source_id

return ConceptMapping(
coding=Coding(code=code(code_), system=system), relation=relation
coding=Coding(code=code(concept_id), system=system), relation=relation
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsstevenson is it fine to just use the concept_id as the CURIE? Technically, HGNC uses uppercase. I might be overthinking things with mappings

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, maybe we just need to look at updating our NamespacePrefix member values in the future?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that'd be simplest.

Realistically there is cannot be a "true" CURIE prefix for a given source (identifiers.org was supposed to be the solution, but then it has its own problems so people made the bioregistry, but it has problems and so on and so on), which is why Matt was talking about some kind of local prefix expansions document. Some sources obviously have their own personal opinions about what prefixes you use for them, but then it begs the question of what to do if there's a community standard which differs from that. We should definitely look at updating our own prefix mapping where it makes sense though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsstevenson Ah okay, maybe we wait for Matt (and others) to provide guidance then and update our NamespacePrefix values whenever that discussion happens?

@korikuzma korikuzma merged commit 82b75d3 into main Dec 31, 2024
24 checks passed
@korikuzma korikuzma deleted the issue-383-code-curie branch December 31, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use preferred formats for MappableConcept.mappings
2 participants