Skip to content

Directory: NDH STU2 CapabilityStatement, directory options first, IG options on a switch - #47

Merged
JoeShook merged 2 commits into
mainfrom
directory-capability-parse
Dec 1, 2026
Merged

JoeShook merged 2 commits into
mainfrom
directory-capability-parse

Conversation

@JoeShook

@JoeShook JoeShook commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Fixes the National Directory page on the deployed site and makes the directory's own CapabilityStatement the authority.

  • Crash on load: in the published WebAssembly build, the Firely parser threw IndexOutOfRangeException (FhirJsonNode.deriveMainName) on the IG CapabilityStatement. That took /ndh down. The IG statement is now read with System.Text.Json; the page only needs resource types, search parameter names and includes.
  • NDH STU2: ships the STU2 ndh-server CapabilityStatement (2.0.0-ballot) in place of the 1.0.0-ballot national-directory-api-server one. Its location is named once in UdapEdConstants.NationalDirectory and shared by the WASM and MAUI lookups and the tests.
  • Directory first: the pickers come from the directory's /metadata alone. Show NDH STU2 options adds the IG options it does not list, greyed and tagged, for testing what a directory should support. Turning it off drops any checked IG-only include. The IG is the full fallback when /metadata cannot be read.

Tests: DirectorySearchTests, 16 passing, including reading the shipped STU2 file. Checked on a local Release publish: no console errors; with the switch off CMS offers Organization:partof, with it on Organization:endpoint (NDH STU2) is added.

🤖 Generated with Claude Code

JoeShook and others added 2 commits December 1, 2026 07:49
…ing it

The page fell back on the NDH 1.0.0-ballot (2022) CapabilityStatement, which
offers the parameters STU2 removed (access-control-mechanism,
dynamic-registration-trust-profile). It now ships STU2's ndh-server statement
(2.0.0-ballot, CI build of 2026-11-16) as
wwwroot/ndh/CapabilityStatement-ndh-server-2.0.0-ballot.json, tags IG-only
options "(NDH STU2)", and names the file in one place,
UdapEdConstants.NationalDirectory, for the WebAssembly and MAUI loaders.

In the published WebAssembly build the Firely parser throws
IndexOutOfRangeException (FhirJsonNode.deriveMainName) on the statement's
_searchInclude/_searchRevInclude/_supportedProfile members, so the deployed
page failed on load; Debug builds parse it fine. The loader drops the
_-prefixed members first (nothing reads those extensions) and carries on
without the IG fallback if loading still fails.

UtilityTests copies the file into its output and checks it is STU2 without
the removed parameters; FhirUtilityTests reads it instead of a path in the
local FHIR package cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ptions" is on

The pickers now come from the directory's /metadata alone. The switch adds
the NDH STU2 IG options it does not list, greyed, for testing what a
directory should support; turning it off drops any checked IG-only include.
The IG stays the full fallback when /metadata cannot be read.

Read the IG CapabilityStatement with System.Text.Json. The Firely parser
still threw IndexOutOfRangeException on it in the published WebAssembly
build after the primitive extensions were stripped, so the IG options never
loaded on the deployed site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoeShook
JoeShook merged commit 3353cfe into main Dec 1, 2026
2 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