Skip to content

Unify FHIR package patching via preprocessPackage hook#84

Merged
ryukzak merged 4 commits intomainfrom
unify-fhir-package-hacks
Mar 3, 2026
Merged

Unify FHIR package patching via preprocessPackage hook#84
ryukzak merged 4 commits intomainfrom
unify-fhir-package-hacks

Conversation

@ryukzak
Copy link
Collaborator

@ryukzak ryukzak commented Mar 3, 2026

Summary

  • Wire the canonical manager's unified preprocessPackage hook (discriminated union with kind: "package" | "resource") through APIBuilder, allowing users to preprocess both package.json and individual resources from a single callback
  • Remove patchSd from Register — resource patching now happens at the canonical manager level via preprocessPackage
  • Rewrite nodge-r4 and typescript-ccda examples to use the new unified hook instead of direct CanonicalManager construction / patchSd

Depends on: atomic-ehr/fhir-canonical-manager#7

Test plan

  • bun run typecheck passes
  • bun run lint passes
  • bun test passes (194 tests)
  • make all passes (all example pipelines generate successfully)

🤖 Generated with Claude Code

ryukzak added 3 commits March 3, 2026 12:47
- Add preprocessPackage option to APIBuilder constructor, passed to
  CanonicalManager config for unified resource/package preprocessing
- Remove patchSd from Register type and implementation, replaced by
  the preprocessPackage hook at the canonical manager level
- Update @atomic-ehr/fhir-canonical-manager to ^0.0.21
- nodge-r4: Replace direct CanonicalManager construction with APIBuilder,
  using preprocessPackage for package name fixes and dependency injection
- typescript-ccda: Replace registerFromPackageMetas + patchSd with shared
  CanonicalManager using preprocessPackage for IVL_TS URL fix
Top-level example files were not covered by the existing
examples/*/*.ts glob pattern.
@ryukzak ryukzak force-pushed the unify-fhir-package-hacks branch from cb40ba5 to d2fb590 Compare March 3, 2026 11:48
@ryukzak ryukzak merged commit 6f26994 into main Mar 3, 2026
29 checks passed
@ryukzak ryukzak deleted the unify-fhir-package-hacks branch March 3, 2026 11:52
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