Skip to content

feat(validator,ui): R4B core extension catalogue; the editor follows the request version - #618

Open
angela-helios wants to merge 3 commits into
mainfrom
feat/488-extension-catalogue
Open

feat(validator,ui): R4B core extension catalogue; the editor follows the request version#618
angela-helios wants to merge 3 commits into
mainfrom
feat/488-extension-catalogue

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

Closes #488 — the R4B and editor-plumbing halves; the R5/R6 sourcing decision (deferral, with rationale) is recorded on the issue.

  • R4B catalogue: extension-definitions.json vendored from the R4B spec (398 extension SDs, all with contexts) and the pack regenerated — 645 schemas, up from 247. Zero code changes, exactly as feat(validator,ui): profiled extensions in the Guided form #432 predicted: the generator already looped every version and skipped the absent file. Registry test extended to R4B.
  • Editor version plumbing: the Guided editor resolved its schema pack and terminology with FhirVersion::default(), so a populated non-R4 pack could never reach it. render_body now takes the request version — the sidebar's FHIR version picks the pack, the extension catalogue, and the embedded terminology. Same threading pattern as ui: make the conformance-backed resource-type lists FHIR-version aware #562.

Note for review: touches crates/ui/src/editor.rs like #614 does, but disjoint regions (handler signatures here, schema resolution there) — merge order should not matter.

Validation: cargo test -p helios-fhir-validator --features R4B and -p helios-ui green; converter warnings on the R4B regen are the same class the R4 pack already carries.

…the request version

The catalogue from #363/#432 was R4-only in data, not in code. Two of
the three halves of #488:

- crates/fhir-gen/resources/R4B/extension-definitions.json is vendored
  from the R4B spec (398 extension StructureDefinitions, every one with
  contexts) and the R4B schema pack regenerated: 645 schemas, up from
  247. No code change — the generator already looped all versions and
  skipped the absent file. The registry test now covers R4B.
- The Guided editor resolved its schema pack and terminology with
  FhirVersion::default(), so a populated non-R4 pack could never reach
  it. render_body now takes the request version: the sidebar's FHIR
  version picks the pack, the extension catalogue, and the terminology.

R5/R6 stay empty deliberately: HL7 moved extensions out of the core
spec into the cross-version Extensions Pack IG (different filename,
package shape, and per-version context expressions), so sourcing them
is its own piece of work — the decision and options are recorded on the
issue.

Closes #488
questionnaire-cqf-example.json validates clean now that the R4B pack
carries the core extension definitions — the issue it was pinned for
came from validating the cqf extension against the bare base shape. The
ratchet holds: one entry out, nothing in.
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Extension catalogue is R4-only: extend profiled-extension picker to R4B/R5/R6

2 participants