-
Notifications
You must be signed in to change notification settings - Fork 0
Description
While working with bindings in linkml-term-validator, we ran into a modeling question around whether structured LinkML content (classes or slot lists) could act as vocabularies, similar to enums or ontology-backed term sets.
This came up when trying to model rich “terms” (e.g. harmonized variables / CDE-like concepts) that carry substantially more metadata than fits comfortably in a permissible value.
Is it possible to support bindings where the vocabulary is derived from:
- a list of classes (e.g. all subclasses or instances of Term), or
- a declared slot list within the schema
Conceptually, something like:
bindings:
- binds_value_of: id
source: class
range: Term
Intended meaning:
Validate that the id of an inlined Term corresponds to one of the structured terms defined in the schema.
This would allow terms to be modeled as objects while still benefiting from controlled-vocabulary validation.
My notes that led me to this ticket for future memory:
Take a PV like, ALBUMIN_IN_BLOOD:
MeasurementObservationTypeEnum:
description: Values describing the types of MeasurementObservations.
permissible_values:
ALBUMIN_IN_BLOOD:
meaning: OBA:2050068 #Albumin in blood
and make it into a "term" subclass. (keep generic Term class in the model so we can use it as a Range for observation_type, but have more specific kinds of Terms, e.g., AlbuminInBloodTerm is_a Term to keep specificity. Term class would have slots equivalent to all columns in Anne's spreadsheet)
Then, in the BDCHM schema, observation_type definition becomes something like this:
observation_type:
description: The type of Observation being represented (e.g. 'diastolic blood pressure')
comments: This field holds the "key" in the core key-value pair comprised of the observation_type field and the relevant value(s) field.
range: Term
inlined: true
bindings:
- binds_value_of: id
range: MeasurementObservationTypeEnum
And easurementObservationTypeEnum becomes:
enums:
MeasurementObservationTypeEnum:
reachable_from:
then we slot in the ontology from the team in the reachable_from annotations? What is the best practice here?
If we could use the subclasses of Term in this example as the vocab, that would be sweet.