Repository navigation
Generate Loom FHIR code from pinned R5 definitions - #214
Merged
Merged
Conversation
Remove the BMEG schema modules and generic ingestion fallback. Generate the model, validators, extractors, and compiler metadata from the pinned HL7 R5 package and Loom-owned edge and validation rules. Preserve the configured resource allowlist and existing publication schema identity. Verified generation is reproducible. The generated model, validators, and edge extractors match main byte for byte. Across 70,000 META_SMALL records, accept/reject counts and canonical edge document digests match. The Go suite, Go comment lint, and isolated locked-cohort Docker and Chrome acceptance passed. Acceptance run f39518fab9172bd5 was cleaned up. Same-model adversarial reviews covered runtime schema membership, publication and uploads, and generator metadata. Regression tests cover the local and absolute JSON Pointer references and nested anyOf rules found in review. The repeated-reference metadata fix passed the existing Explorer negative test and an independent regeneration. Reviewed runtime diff SHA-256: bbf96193e229bb18630dde707901c52469997564056e43171e86aed9f70db6a4 Reviewed generated metadata SHA-256: 3bf5a764c523a323af0b91f10595d96c343349aae789712e92eed5c819055adf
Check in the official JSON Schema and selected StructureDefinitions. Derive supported models and forward reference edges from those files. Remove the legacy graph schema, compatibility snapshot, and runtime schema settings. Compile the pinned primitive patterns into direct lexical checks. Five single-core runs over 48,000 shared accepted records measured 7.67 us per record median for direct checks versus 16.70 us for regex checks. Both variants emitted 96,557 edges and matched canonical edge digests. The full 70,000-record fixture rejects 20,000 DocumentReferences with numeric Attachment.size and 2,000 ImagingStudies with whitespace in Coding.system. New publications record the official input digest. Cross-schema partial updates require a reload so old edges cannot be copied into a new generation. Validated with the Go suite, direct pattern tests, compiler conformance, Go comment lint, and isolated Docker and Chrome acceptance run 6e428a0ee3da3756. Same-model adversarial review covered primitive pattern equivalence, FHIR edges and metadata, and schema identity migration. Final metadata SHA-256: 485fbfd84469f7777414eed51ece8f41687458bc054f3bcf16b2af1711fc8156
Check calendar dates, base64 content, and signed integer64 strings. Normalize legacy numeric integer64 values at ingest while preserving strict Coding.system validation and the conforming decode path. Verification: generator, model, FHIR schema, and ingest tests; Go comment lint; read-only primitive and compatibility reviews.
Update Sonic to v1.15.3 and its loader to v0.5.2 for native Go 1.27 support. Keep the existing error coverage under Go 1.27 vet and apply the new gofmt indentation. Verification: root and client Go suites passed on Go 1.27.4, including formatting and vet gates. Native Sonic decode verified on Darwin arm64.
Go 1.27 changes the DEFLATE output embedded by oapi-codegen. Verified both blobs decode to identical OpenAPI JSON. FHIR and OpenAPI regeneration, route ownership checks, and API tests pass.
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.
Why
Keep Loom’s fast generated FHIR ingest path and use official HL7 R5 assets as the source for resource definitions and reference targets.
Changes
edge-policy.json,graph-fhir.json, the generic loader, and both BMEG schema modules. OpenAPI retains its independent indirect JSON Schema dependency.--schemaandserver.schema. New publications record the source digest. Existing publications retain their schema identity. Cross-schema partial updates require a full reload.Verification
Attachment.sizeand 2,000 ImagingStudies with whitespace inCoding.system.