Repository navigation
Conversation
…est carries, over OCL's own expansion - Dispatch (core.fhir.engine.operations): one rule decides which requests are the engine's: those that carry terminology resources (tx-resource, an inline valueSet), about a target the request carries, a FHIR built-in OCL stores no copy of, or one nobody has. Every other request goes to the stored path as before. An engine answer that finds its value set is a stored one hands the request back to the stored path, with the version its rules chose. Failures are OperationOutcomes with the IG's issue types and message ids, never a 5xx, and an operation runs within FHIR_TX_TIME_LIMIT_MS (within_search_timeout takes its deadline). - The definition (core.fhir.engine.definition): a carried value set's compose, read and checked as the IG has it, beside OCL's evaluation of it. - $expand (core.fhir.engine.expand) is an adapter over OCL's own evaluation: the request's workspace builds the value set's OCL expansion (includes, excludes and imports under the request's version parameters, two versions of a code system kept apart), and its members are the expansion's. The request's own narrowing (activeOnly, excludeNotForUI, filter), paging, nesting, designations, properties and the used-* parameters are presented from it. The answer is an R5-shaped ValueSet that core.fhir.adapters.r4 writes as R4. - Stored $expand: a request that carries terminology resources is the engine's unless the value set it names is a stored one. TerminologyCapabilities lists the inputs the engine reads too. A member is shown only where a release the base shows selected it, or HEAD did, and a recorded failed version check is shown by the version it used, so a 422 names nothing the base hides. - Tests: the workspace's own (loading, the guard, the deadline, the kill switch, resolution, the rollback), and the engine's $expand. 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
… into fhir-452-b-expand Takes #1096'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
…nerous time limit, so a busy machine can't fail it It proves each imported value set is built once, a count, but ran under the 10-second request limit and took about 9 seconds when the machine was busy. With FHIR_TX_TIME_LIMIT_MS at 120 seconds for this test, a value set built once for each of its routes still never finishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWUTom6BGgjQy6oehZ
… into fhir-452-b-expand Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qX3xher9sfoCLLKrTC
… (with fhir-452-b9-valueset and phase C's storage and core) into fhir-452-b-expand Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qWapJWFsFc1Xjopf9k
… into fhir-452-b-expand 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-b-expand 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-b-expand 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
… 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
paynejd
added a commit
that referenced
this pull request
Dec 2, 2026
…to fhir-452-b-validate Takes #1097'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-expand, basefhir-452-b-workspace(#1096).What it does
core/fhir/engine/operations.py): one rule decides which requests are the engine's.tx-resource, an inlinevalueSet) and are about a target the request carries, a FHIR built-in OCL stores no copy of, or one nobody has. Every other request goes to the stored path as before.FHIR_TX_TIME_LIMIT_MS(within_search_timeouttakes its deadline).core/fhir/engine/definition.py): a carried value set's compose, read and checked as the IG has it, beside OCL's evaluation of it.$expand(core/fhir/engine/expand.py) is an adapter over OCL's own evaluation.activeOnly,excludeNotForUI,filter), paging, nesting, designations, properties and theused-*parameters are presented from it.core/fhir/adapters/r4.py(engine_value_set).$expand(core/fhir/ops/expand.py):Reading order
core/fhir/engine/operations.py(the dispatch rule, and running an operation),definition.py,expand.py, thencore/fhir/ops/expand.py, then the tests:core/fhir/workspace/tests.py(loading, the guard, the deadline, the kill switch, resolution, the rollback),core/fhir/engine/tests_expand.py.What a reviewer checks
What changes for existing callers
ValueSet/$expandwith carried terminology resources is now answered for them. Before,tx-resourcewas ignored, and an inlinevalueSetwas refused as not supported.FHIR_WORKSPACE_TOGGLEoff (production's fixture), a request the engine would take is a 422not-supported.Size
About 1.8k lines of code and 1.5k of tests.
Rollback
Revert this PR and the ones after it, or turn
FHIR_WORKSPACE_TOGGLEoff. No migrations.How it was tested
core); the FHIR, CodeSystem and ValueSet tests with Elasticsearch: 1,176 OK, 2 skipped. The workspace's tests and the engine's$expandtests 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