Clinical Reasoning Dev Server#1011
Open
JPercival wants to merge 12 commits into
Open
Conversation
Contributor
JPercival
commented
Apr 26, 2026
- Stripped down version of HAPI that shims in an InMemoryRepository behind the REST API
New module that mounts HAPI's RestfulServer on Spring Boot's embedded
Tomcat, registers the existing operation providers from cqf-fhir-cr-hapi,
and bridges plain CRUD + search + transactions to an in-memory IRepository.
- RepositoryResourceProvider<T>: HAPI @Read/@Create/@Update/@Delete/@Search
per resource type, delegating to IRepositoryFactory.create(rd).{op}.
One instance is registered for every concrete FHIR resource type.
- RepositorySystemProvider: @transaction at the base path, routing bundles
through IRepository.transaction.
- SearchParameterTranslator: raw URL params -> typed IQueryParameterType
using FhirContext's RuntimeSearchParam registry.
- ServerR4Config: standalone wiring (FhirContext, RestfulServer,
ServletRegistrationBean, IRepositoryFactory, MeasureOperationsProvider)
without importing CrR4Config — that class @imports the JPA-coupled
RepositoryConfig which requires DaoRegistry.
- @SpringBootApplication excludes JPA / Hibernate / Quartz auto-configs;
application.yml further excludes Elasticsearch + Thymeleaf surprise
auto-configs from HAPI's transitives.
- Dockerfile (eclipse-temurin:17-jre, ~531 MB) and Dockerfile.jlink
(jdeps + jlink + distroless, ~356 MB).
- gradle tasks: dockerBuild, dockerBuildJlink, bootBuildImage.
Boot ~2.4 s. Hibernate, Quartz, Elasticsearch all stay dormant. 9
integration tests exercise CRUD round-trips, search by id, transaction
bundles, conditional create header pass-through, and $evaluate-measure
end-to-end against the in-memory repository.
Known gaps: only the Measure operation chain is wired (other operations
need their bean trees mirrored from CrR4Config); conditional CRUD by URL
is rejected; FHIR validator pulls org.hl7.fhir.r5/r4b/dstu3/dstu2016may
model classes via reflection so non-R4 versions can't be excluded yet.
A Phase 2 split of cqf-fhir-cr-hapi to lift its JPA tail will shave the
remaining ~80 MB from the image.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
On a tag matching `v*` (e.g. `v4.7.0`): - Build cqf-fhir-cr-server's bootJar. - Build the jlink Docker image (Dockerfile.jlink: jdeps + jlink + distroless). - Push to ghcr.io/cqframework/clinical-reasoning/cqf-fhir-cr-server with tags `<semver>` and `<semver>-jlink`. - Tag :latest only for stable releases (no rc/alpha/beta suffix), so a pre-release won't move the floating tag. Uses the workflow-provided GITHUB_TOKEN with `packages: write`; no PAT or extra secret required. The non-jlink image is intentionally not published yet — jlink is the recommended runtime artifact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Formatting check succeeded! |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Application is a Spring @configuration class (via @SpringBootApplication) so Spring instantiates it as a CGLIB-proxied bean — a private constructor would break startup. Adding a no-op instance run() method makes it not look like a utility class to checkstyle's HideUtilityClassConstructor rule, and gives a testable seam without touching framework semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lukedegruchy
approved these changes
May 1, 2026
lukedegruchy
reviewed
May 1, 2026
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
Contributor
There was a problem hiding this comment.
Please add a README on how to use this.
lukedegruchy
reviewed
May 1, 2026
| */ | ||
| @ConfigurationProperties(prefix = "cqf.server") | ||
| public class ServerProperties { | ||
|
|
Contributor
There was a problem hiding this comment.
Please fix the sonar warning on this class and other classes.
barhodes
approved these changes
May 7, 2026
|
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.

