Skip to content

OpenConceptLab/ocl_online#452 | FHIR metadata: CapabilityStatement and TerminologyCapabilities for the Terminology Ecosystem IG - #1083

Draft
paynejd wants to merge 9 commits into
fhir-452-b9-valuesetfrom
fhir-452-capabilities
Draft

paynejd wants to merge 9 commits into
fhir-452-b9-valuesetfrom
fhir-452-capabilities

Conversation

@paynejd

@paynejd paynejd commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Updated Dec 1: the series now sits on #1102 (which holds #1104 and #1103 below it), so this branch merges fhir-452-b9-valueset's head and its base moved to it. One conflict came up further up the series, in #1084's merge (CodeSystemDetailSerializer.to_internal_value), resolved by keeping both sides. This PR's diff is unchanged. The series now ends in #1105.

Branch fhir-452-capabilities, base fhir-452-b-codes (#1094). The first FHIR PR of the series for OpenConceptLab/ocl_online#452.

Updated Nov 30: the series now sits on all of the OCL API PRs, which end in #1094. So this branch merges that one (27f74d89, no conflicts), and its base moved from master to it. The diff is unchanged.

What it does

/fhir/metadata and /fhir/metadata?mode=terminology now state what the HL7 Terminology Ecosystem IG asks a terminology server to state:

  • CapabilityStatement
    • url (where the base serves it) and version (the software's).
    • software.releaseDate: when the image was built. set_build_version.sh stamps it into core/__init__.py as API_BUILD_DATE; in a checkout it falls back to the version file's time.
    • instantiates lists FHIR's terminology-server as well as SVCM's Terminology Repository.
    • rest.security: the OCL API token, and OAuth where single sign-on is set up. cors comes from django-cors-headers' settings, and is true only when every listed route is covered.
    • The IG's CodeSystemAsParameter feature extension, false here (OpenConceptLab/ocl_online#452 | FHIR: $lookup, $subsumes and $translate on content the request carries #1099 turns it on, when the engine uses CodeSystems passed in tx-resource).
  • TerminologyCapabilities: url, version, and expansion.parameter, read from $expand's own list of the inputs it reads (core/fhir/ops/expand.py PARAMETERS), so the statement follows the operation.

Access is unchanged: an owner base lists what its caller may see, and /fhir/ lists public repositories only.

Why

The IG's metadata and term-caps tests (HL7's txTests runner, general mode) read these fields. Every server is tested in general mode before HL7 approves it.

How it was tested

  • pylint 10.00; the FHIR, code-system and CodeSystem integration tests on this branch alone: 809 OK (core.fhir, core.code_systems, core.integration_tests.tests_code_systems); CI runs the full suite once it's pushed. The whole stack's full gate is in the last PR of the series.
  • HL7 txTests (validator 7.0.8, test cases hl7.fhir.uv.tx-ecosystem 1.11.0, general mode, empty database): 4 of 708 in scope, as on master. term-caps passes once the engine reads the $expand inputs it lists (OpenConceptLab/ocl_online#452 | FHIR: $expand of a value set the request carries, over OCL's own expansion #1097); metadata gets $subsumes from the next PR in the series and still fails at the stack's head on the test-cases-version feature, which stays undeclared by choice until a whole release of the test cases passes (counted out of scope).
  • The OpenConceptLab/ocl_online#451 FHIR parity suite: no case changes status (see the last PR of the series for the whole stack).
  • Reviewed before opening: three Codex defect passes and a simplification review on the integrated work, all findings answered.

What changes for existing callers

  • /fhir/metadata gains fields; none is removed or renamed.
  • The Docker build stamps the build date (set_build_version.sh). Worth a look: it is the only change outside core/.

Risks

  • The sed in set_build_version.sh matches only the exact line API_BUILD_DATE = None. If that line changes, the date is not stamped and releaseDate falls back to the version file's time.

Rollback

Revert this PR. No migrations, no data, no settings.

Rechecked on the updated branch (Nov 30)

On 05033d24: pylint 10.00 (core); the FHIR, CodeSystem, ValueSet, concept and their integration tests with Elasticsearch: 1,327 OK, 2 skipped.

The series

The FHIR layer for OpenConceptLab/ocl_online#452. It is one linear series, and each PR is based on the one before:

  1. OpenConceptLab/ocl_online#452 | An expansion evaluation narrowed to some codes; an import's codes matched as a code reference matches them #1094: the end of the OCL API PRs (core changes, reviewed first)
  2. OpenConceptLab/ocl_online#452 | FHIR metadata: CapabilityStatement and TerminologyCapabilities for the Terminology Ecosystem IG #1083: capabilities
  3. OpenConceptLab/ocl_online#452 | FHIR on stored content: CodeSystem properties and filters, full $lookup, CodeSystem $subsumes #1084: stored CodeSystem properties and filters, $lookup, $subsumes
  4. OpenConceptLab/ocl_online#452 | FHIR: the request-scoped terminology engine's foundations #1095: the engine's foundations
  5. OpenConceptLab/ocl_online#452 | FHIR: carried content in OCL's own tables for one request, and the stored provider #1096: the workspace and the stored provider
  6. OpenConceptLab/ocl_online#452 | FHIR: $expand of a value set the request carries, over OCL's own expansion #1097: $expand on carried content, and dispatch
  7. OpenConceptLab/ocl_online#452 | FHIR: $validate-code and $batch-validate-code on content the request carries #1098: $validate-code and $batch-validate-code
  8. OpenConceptLab/ocl_online#452 | FHIR: $lookup, $subsumes and $translate on content the request carries #1099: $lookup, $subsumes and $translate on carried content

Each diff is its own. The last one's tree is the whole that was tested: 707 of the HL7 Terminology Ecosystem IG's 707 in-scope test cases pass (hl7.fhir.uv.tx-ecosystem 1.11.0, general mode; supplements are out of scope). The series stays in draft until the whole ships, after the OCL API PRs. As those land on master, each PR here is retargeted, never force-pushed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AaZ4qTFRu4tcrkh4W8bA4T
https://claude.ai/code/session_01AaZ4qV2gzsF5GhF5BwTJ6x

…d TerminologyCapabilities for the Terminology Ecosystem IG

The HL7 Terminology Ecosystem IG's metadata and term-caps tests read these.

- CapabilityStatement: url (where the base serves it) and version; software.releaseDate,
  stamped into core/__init__.py (API_BUILD_DATE) by set_build_version.sh as the image is
  built, and the version file's time in a checkout; instantiates FHIR's terminology-server
  as well as SVCM's Terminology Repository; rest.security naming the OCL API token, OAuth
  where single sign-on is set up, and cors when django-cors-headers covers every listed
  route; the IG's CodeSystemAsParameter feature extension, false until the engine reads
  CodeSystems passed in tx-resource.
- TerminologyCapabilities: url, version, and expansion.parameter, read from $expand's own
  list of the inputs it reads (core.fhir.ops.expand.PARAMETERS).

Access is unchanged: an owner base lists what its caller may see, /fhir/ public
repositories only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qXmZjc3rGYio3yCj6V
…es), which the FHIR series builds on

fhir-452-b-codes ends the queue of OCL API PRs, so the FHIR series sits on all of them:
#1085, #1086, #1089,
#1088, #1087, #1090,
#1091, #1092 and #1093, and
the core changes that need them together. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV2gzsF5GhF5BwTJ6x
@paynejd
paynejd changed the base branch from master to fhir-452-b-codes November 30, 2026 14:12
paynejd added a commit that referenced this pull request Nov 30, 2026
…I PRs

Two conflicts:
- core/concepts/models.py: the API PRs' version. It holds this PR's two changes there
  (Concept.get_property_value, and the hierarchy step reading an annotated latest version), which
  now come with the API PRs, beside #1088's level-at-a-time hierarchy step.
- core/settings.py: both sides' settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV2gzsF5GhF5BwTJ6x
paynejd and others added 6 commits December 1, 2026 00:39
…o fhir-452-capabilities

Takes #1094's new head, which brings in master's
#1085, #1086 and
#1082. No change to this branch's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWUTom6BGgjQy6oehZ
…o fhir-452-capabilities

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qX3xher9sfoCLLKrTC
…e C's storage and core) into fhir-452-capabilities

The series now sits on the end of the API chain: fhir-452-b9-valueset, which holds fhir-452-c-core, fhir-452-b-codes
and fhir-452-c-storage. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
… into fhir-452-capabilities

Phase C's storage migrations and collections/0081 bound their lock waits; an import's stored expansion isn't read as
it is when a supplement may apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
… into fhir-452-capabilities

An import is evaluated again only when a supplement applies to a version it used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
… into fhir-452-capabilities

The migrations bound their lock waits before their first DDL, both ways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
@paynejd
paynejd changed the base branch from fhir-452-b-codes to fhir-452-b9-valueset December 1, 2026 16:20
… into fhir-452-capabilities

Takes #1102's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…d into fhir-452-stored-ops

Takes #1083's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed

This branch has not been deployed

No deployments
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