Conversation
…ains) Implement the search features EHR apps actually send, rather than Lucene or _filter first: - Reverse chaining via _has:Type:ref:param (one nested _has) - uri SearchParameters with :below / :above, indexed as uri.* - _include / _revinclude wildcards (ResourceType:* and *:*) - Two-hop chained search (e.g. subject.organization.name) Recursive _include:iterate and chain depth > 2 stay unsupported. Co-authored-by: Adegoke Adewoye <[email protected]>
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.
Implement the search features EHR apps actually send, instead of Lucene or
_filterfirst. This is item 2 of the HAPI-inspired build list (REST table stakes is PR #50).What landed
_hasreverse chaining.Patient?_has:Observation:subject:code=8867-4uses the existing search parser/planner/executor. One extra nested_hasis allowed; deeper nesting is stillErrUnsupportedFeature.uriSearchParameters. Registryuriparams are indexed asuri.*(stored on the string tables). Exact match plus:below/:abovehierarchy modifiers.Include wildcards.
_include=Observation:*,_include=*:*,_revinclude=Observation:*, and_revinclude=*:*expand at resolve time to the matching reference SearchParameters. Source*on_includemeans the search type (*:general-practitioneron Patient →Patient:general-practitioner). Typed includes_include=Observation:subject:Patientwork. Recursive_include:iterateis still rejected.Two-hop chains.
Observation?subject.organization.name=Acmeparses as a nestedChainClause, walks the inner match first, then the outer reference. Depth > 2 stays unsupported.Execution notes
_hasand two-hop chains run onSearchQueryExecutor(SQLite/mem + Postgres)._include/_revincludestill needSearchAdvancedExecutor(Postgres-first), same as existing includes.Tests
pkg/search/ehr_search_test.gouri.urlfor Questionnaire_has, two-hop,url:below, andObservation:*(skipped without Postgres)