Skip to content

Add asthma example variables and fix schema/test issues - #3

Merged
diatomsRcool merged 4 commits into
mainfrom
thessen-kl-example
Aug 10, 2026
Merged

Add asthma example variables and fix schema/test issues#3
diatomsRcool merged 4 commits into
mainfrom
thessen-kl-example

Conversation

@diatomsRcool

Copy link
Copy Markdown
Collaborator
  • Expand schema: add unit to CompoundVariable and IntegratedVariable, add alert_values slot to SingleContinuousVariable, add inlining to coded_values and alert_value slots, add condition_concept and method_type to ClinicalMicroschemaEnum
  • Move DocumentationVariable rules from slot to class level (LinkML requires rules on classes, not slots)
  • Fix contr_vocab range (Any → string) and indentation YAML errors
  • Add SingleCategoricalVariable and SingleContinuousVariable asthma test data files; rename CompoundAsthma files to match class name
  • Fix duplicate data_type key and indicator_car typo in test data
  • Regenerate Python datamodel

diatomsRcool and others added 4 commits August 10, 2026 14:33
- Expand schema: add unit to CompoundVariable and IntegratedVariable,
  add alert_values slot to SingleContinuousVariable, add inlining to
  coded_values and alert_value slots, add condition_concept and
  method_type to ClinicalMicroschemaEnum
- Move DocumentationVariable rules from slot to class level (LinkML
  requires rules on classes, not slots)
- Fix contr_vocab range (Any → string) and indentation YAML errors
- Add SingleCategoricalVariable and SingleContinuousVariable asthma
  test data files; rename CompoundAsthma files to match class name
- Fix duplicate data_type key and indicator_car typo in test data
- Regenerate Python datamodel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace equals_string: InstrumentEnum/MethodEnum/ProvenanceEnum with
range: <EnumName> in slot_condition postconditions so the validator
correctly checks enum membership rather than literal string equality.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The LinkML docgen Jinja2 template uses |default({}) which only replaces
Undefined, not None. HumanBodyHeightRecord006 from clinical-microschemas
has a rule with no preconditions (None), causing a TypeError when
iterating. Fix by providing a custom template with |default({}, true)
and wiring it up in the Justfile via --template-directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire up the custom templates directory so gen-doc uses the fixed
class.md.jinja2 that handles None preconditions in class rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.6.2

🚀 View preview at
https://linkml.github.io/bdc-variable-library/pr-preview/pr-3/

Built to branch gh-pages at 2026-08-10 20:16 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@diatomsRcool
diatomsRcool merged commit ca18006 into main Aug 10, 2026
6 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.

1 participant