Repository navigation
Conversation
…bles for one request, and the stored provider So carried and stored content take the same code paths, a code system or value set a request carries is evaluated by OCL's own expansion model: CollectionReference, Expansion.add_references, $cascade and the reference filters. - The workspace (core.fhir.workspace): a carried CodeSystem is loaded as a Source with its versions and concepts, a carried ValueSet as a Collection with its references, only when resolution first asks for its canonical. Everything is loaded inside one transaction that is always rolled back (ExpansionEvaluation.at_request_time), with search index writes, tasks, cache writes and on_commit hooks refused while it's open, and one deadline from the request's time limit. - Resolution: what references and the version parameters name resolves to what the request carries, then to OCL's stored content as the request's base shows it to its caller (FhirResolver, with FHIR's version rules), then to FHIR's built-ins. - FHIR_WORKSPACE_TOGGLE turns it off; a request that carries content is then answered not-supported. - The stored provider (core.fhir.stored): a concept of a code system version OCL stores, and a value set OCL stores, read through OCL's own capabilities, as the stored operations read them. - FhirResolver: the version rules for a canonical's releases, and which rows and memberships the base shows the caller (shown_concepts, selected_shown, selected_at_head). - core.fhir.ops.concepts gains code_system and stored_member, which stored $expand used privately, so an expansion over carried content writes a stored member the same way. Nothing is routed to the workspace yet. Its own tests drive it through the operations, so they come with them; the stored provider's tests are here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qV2gzsF5GhF5BwTJ6x
This was referenced Nov 30, 2026
Draft
…to fhir-452-b-workspace Takes #1095'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
…to fhir-452-b-workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qX3xher9sfoCLLKrTC
…ith fhir-452-b9-valueset and phase C's storage and core) into fhir-452-b-workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
…to fhir-452-b-workspace 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
…to fhir-452-b-workspace 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
…to fhir-452-b-workspace 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
…to fhir-452-b-workspace Takes #1095'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
… into fhir-452-b-expand Takes #1096'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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch
fhir-452-b-workspace, basefhir-452-b-engine(#1095).What it does
So carried and stored content take the same code paths, a code system or value set a request carries is evaluated by OCL's own expansion model:
CollectionReference,Expansion.add_references,$cascadeand the reference filters.core/fhir/workspace/):ExpansionEvaluation.at_request_time). While it's open, search index writes, tasks, cache writes andon_commithooks are refused. One deadline, from the request's time limit, covers it.FHIR_WORKSPACE_TOGGLE(a new toggle: on in dev, QA and staging, off in production) turns it off. A request the engine would take is then answerednot-supported.core/fhir/stored.py): a concept of a code system version OCL stores, and a value set OCL stores, read through OCL's own capabilities, as the stored operations read them. It installs the context's hooks from OpenConceptLab/ocl_online#452 | FHIR: the request-scoped terminology engine's foundations #1095.FhirResolver: FHIR's version rules for a canonical's releases, and which rows and memberships the base shows the caller (shown_concepts,selected_shown,selected_at_head).core/fhir/ops/concepts.pygainscode_systemandstored_member, which stored$expandused privately, so an expansion over carried content writes a member the same way.Nothing is routed to the workspace yet. Its own tests drive it through the operations, so they come with #1097. This PR carries the stored provider's tests.
Reading order
core/fhir/workspace/__init__.py,loader.py,workspace.py(the guard, the deadline, the kill switch, resolution),readers.py,requests.py, thencore/fhir/resolve.py,core/fhir/stored.pyandcore/fhir/tests_stored.py.What a reviewer checks
What changes for existing callers
Nothing is routed here yet. Stored
$expandwrites its members throughstored_member, unchanged.Size
About 1.9k lines of code and 0.9k of tests.
Rollback
Revert this PR and the ones after it. No migrations. The toggle row is fixture data.
How it was tested
core); the FHIR, CodeSystem and ValueSet tests with Elasticsearch: 1,043 OK, 2 skipped. The stored provider's tests are among them.The series
The FHIR layer for OpenConceptLab/ocl_online#452. It is one linear series, and each PR is based on the one before:
$lookup,$subsumes$expandon carried content, and dispatch$validate-codeand$batch-validate-code$lookup,$subsumesand$translateon carried contentEach 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-ecosystem1.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_01AaZ4qV2gzsF5GhF5BwTJ6x