feat(hts): synthesise parent/child/inactive properties + definition i…#97
Merged
Merged
Conversation
…n $lookup The HL7 tx-ecosystem `simple-cases/simple-lookup-1` and `simple-lookup-2` fixtures send `property=*` and expect $lookup to surface several "well-known" concept properties that aren't stored directly in `concept_properties`: * `parent` — derived from `concept_hierarchy.parent_code WHERE child_code = req.code` * `child` — derived from `concept_hierarchy.child_code WHERE parent_code = req.code` * `inactive` — boolean derived from a `status` property in the FHIR inactive set (retired/deprecated/withdrawn/inactive); skipped when the concept already has an explicit `inactive` row to avoid duplicates * `definition` — top-level Parameters entry sourced from `concepts.definition` Each synthesised parent/child entry carries the related concept's display in `description`, matching the IG fixtures' optional `description` parts. The wildcard handling and explicit-property filter both honour synthesised entries: `property=*` includes them all alongside stored properties; `property=parent` returns only the synthesised parent. Both SQLite and PostgreSQL backends are updated. `LookupResponse` gains a `definition: Option<String>` field, surfaced by `process_lookup` as a top-level `definition` parameter. Adds 8 unit tests (parent/child/inactive synthesis, no-status fallback, explicit-inactive non-duplication, definition echo, filtered selection, wildcard inclusion) and 1 HTTP-level integration test asserting the IG response shape end-to-end. All 499 helios-hts lib 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.
…n $lookup
The HL7 tx-ecosystem
simple-cases/simple-lookup-1andsimple-lookup-2fixtures sendproperty=*and expect $lookup to surface several "well-known" concept properties that aren't stored directly inconcept_properties:parent— derived fromconcept_hierarchy.parent_code WHERE child_code = req.codechild— derived fromconcept_hierarchy.child_code WHERE parent_code = req.codeinactive— boolean derived from astatusproperty in the FHIR inactive set (retired/deprecated/withdrawn/inactive); skipped when the concept already has an explicitinactiverow to avoid duplicatesdefinition— top-level Parameters entry sourced fromconcepts.definitionEach synthesised parent/child entry carries the related concept's display in
description, matching the IG fixtures' optionaldescriptionparts.The wildcard handling and explicit-property filter both honour synthesised entries:
property=*includes them all alongside stored properties;property=parentreturns only the synthesised parent.Both SQLite and PostgreSQL backends are updated.
LookupResponsegains adefinition: Option<String>field, surfaced byprocess_lookupas a top-leveldefinitionparameter.Adds 8 unit tests (parent/child/inactive synthesis, no-status fallback, explicit-inactive non-duplication, definition echo, filtered selection, wildcard inclusion) and 1 HTTP-level integration test asserting the IG response shape end-to-end. All 499 helios-hts lib tests pass.