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

Adding enum bindings #193

Merged
merged 6 commits into from
Jun 6, 2024
Merged

Adding enum bindings #193

merged 6 commits into from
Jun 6, 2024

Conversation

cmungall
Copy link
Member

@cmungall cmungall commented Apr 13, 2024

In LinkML enums are a special kind of element, distinct from TypeDefinition, ClassDefinition (even they are rendered as strings).

Sometimes it can be useful to bind an existing slot value to an enum.

One use case is when we have a generic Concept class that is typically non-lined, and referred to by id. We may want to have a slot usage that restricts the id to ne PVs in some contexts; e.g.

classes:

  Concept:
    attributes:
      id:
        identifier: true
      name:

  Biosample:
    attributes:
      name:
      sample_material_type:
        range: Concept
        bindings:
          - binds_value_of: id
            range: ENVOMaterialEnum
            strength: RECOMMENDED
            description: Material type from the ENVO ontology

enums:
  ENVOMaterialEnum:
    description: Material type from the ENVO ontology
    reachable_from:
      source_ontology: obo:envo
      source_nodes:
        - ENVO:00010483  ## environmental material
      is_direct: false
      relationship_types:
        - rdfs:subClassOf

See also https://build.fhir.org/terminologies-binding-examples.html

@cmungall cmungall merged commit 52dd79e into main Jun 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant