Skip to content

Add profile class enhancements: getters, validation, and BP support#90

Merged
ryukzak merged 10 commits intomainfrom
feat/profile-enhancements
Mar 4, 2026
Merged

Add profile class enhancements: getters, validation, and BP support#90
ryukzak merged 10 commits intomainfrom
feat/profile-enhancements

Conversation

@ryukzak
Copy link
Copy Markdown
Collaborator

@ryukzak ryukzak commented Mar 4, 2026

Summary

  • Add getters/setters for choice type fields and slice/extension values in profile classes
  • Replace as any casts with Object.assign in profile setters
  • Add static canonicalUrl property and meta.profile auto-population in constructors
  • Improve slice discriminator match extraction in field-builder
  • Add blood pressure profile to R4 example generation
  • Add validate() method to generated profile classes
  • Split profile tests into bodyweight and BP files with snapshot coverage

Test plan

  • Snapshot tests for bodyweight and BP profile generation
  • Separate test files for bodyweight and BP profiles
  • Validate method tested for required field detection
  • bun run typecheck && bun run lint && bun test
  • make all

🤖 Generated with Claude Code

ryukzak added 10 commits March 4, 2026 13:46
Generate accessor methods for choice instance fields (e.g.
effectiveDateTime, effectivePeriod, valueQuantity) that were previously
skipped. Single-choice required fields remain constructor params.
Includes tests for the new accessors.
Add helpers to extract and build match objects from slice discriminators,
supporting nested paths and pattern/fixed value types.
Generate validation helpers (validateRequired, validateExcluded,
validateFixedValue, validateSliceCardinality, validateEnum,
validateReference) and a validate() method on each profile class
that checks required fields, excluded fields, fixed values, slice
cardinality, closed enum bindings, and reference types.
@ryukzak ryukzak merged commit 2035b20 into main Mar 4, 2026
29 checks passed
@ryukzak ryukzak deleted the feat/profile-enhancements branch March 4, 2026 12:57
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.

2 participants