Add asthma example variables and fix schema/test issues - #3
Merged
Conversation
diatomsRcool
commented
Aug 10, 2026
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
- 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>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.