feat(hts): IG Publisher $validate-code compatibility#194
Open
sandhums wants to merge 2 commits into
Open
Conversation
Accept Publisher parameter shapes (system/url, valueCoding, valueCodeableConcept), SNOMED version=current, LOINC version labeling, BCP-13/mimetypes, inline ValueSet validation, cache policy, and UCUM composed units.
70f7295 to
4adf120
Compare
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.
Pull request: HTS IG Publisher
$validate-codecompatibilitySummary
HL7 FHIR IG Publisher (2.2.x) validates Implementation Guides against a terminology
server via
-tx. HTS previously reported dozens of false-positive validation errorseven when terminology was loaded and manual
$validate-codeprobes succeeded.This PR aligns HTS with Publisher request shapes and tx.fhir.org behaviour for:
valueCoding,valueCodeableConcept, andsystemfor CodeSystem URL)version=currentresolutionmimetypesValueSet validationcodeableConcept(Composition bindings)result=true)mg, etc.) via structural validationValidated against Atrius IG: Publisher errors 64 → 0 after rebuild, TX cache clear,
and HTS kept up through validation.
Full design notes: ig-publisher-compatibility.md
CodeSystem
systemparameter (spec vs Publisher)FHIR spec: CodeSystem
$validate-codebare-code form uses in-parameterurlfor theCodeSystem canonical.
IG Publisher: Often sends
system+code(e.g. LibrarydataRequirement/ LOINCvalidation), not
url+code.HTS behaviour: On CodeSystem Path 1 (bare
code), acceptsystemas an alias forurl. Preferurlwhen both are present. Return400only when neither is supplied.Test change: Replaced
system_param_rejected_with_400(asserted spec-only rejection)with
system_param_alias_validates_code(asserts200andresult=truefor Publishershape). This documents the intentional compatibility choice for upstream review.
Test plan
cargo fmt --checkcargo clippy -p helios-hts -- -D warningscargo test -p helios-hts:9091):system+code(LOINC85354-9)mgonhttp://unitsofmeasure.orgmimetypes+code=text/cql(nourl)valueCodeableConcept(nourl)-tx http://127.0.0.1:9091and clearedinput-cache/txcacheKey automated tests:
systemaliassystem_param_alias_validates_codeextract_coding_accepts_value_coding_alias, etc.vs_inline_mimetypes_publisher_shape_validates_text_cqlvs_inline_codeable_concept_publisher_shape_validatescs_ucum_composed_mg_validates_when_not_in_essence_table,ucum_validate::tests::*currentvalidate_code_version_current_resolves_loaded_editionFiles touched (high level)
See ig-publisher-compatibility.md § Files touched.
Exclude from PR (formatting-only, no behaviour change):
ecl/*,sqlite/mod.rsifpresent as unrelated diffs.
Breaking changes
None for production API consumers. Test expectation change only: integration test
system_param_rejected_with_400removed in favour ofsystem_param_alias_validates_codebecause Publisher compatibility requires accepting
systemon the bare-code path.