Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support token modifiers ':above' and ':below' #1733

Closed
lmsurpre opened this issue Nov 19, 2020 · 2 comments
Closed

Support token modifiers ':above' and ':below' #1733

lmsurpre opened this issue Nov 19, 2020 · 2 comments

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Nov 19, 2020

from https://www.hl7.org/fhir/R4/search.html#token

modifier description
:above The search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource subsumes the specified search code. For example, the search concept has an is-a relationship with the coding in the resource, and this includes the coding itself.
:below the search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource is subsumed by the specified search code. For example, the coding in the resource has an is-a relationship with the search concept, and this includes the coding itself.

example:

Search for any condition in the SNOMED CT value set "http://snomed.info/sct?fhir_vs=isa/126851005" that includes all descendants of "Neoplasm of liver"
GET [base]/Condition?code:below=126851005

Note: I don't think that sample is actually right. I think they need to include the system in there. Should be:

GET [base]/Condition?code:below=http://snomed.info/sct|126851005

Also note: If we can support the modifier :in (#1734) then I think this one becomes less important because searching for anything in a valueset could be used for the same use cases and more.

@lmsurpre
Copy link
Member Author

To support, we'd need to create and maintain a closure table within the database and make that closure table part of the query mechanism.
Open questions on how to efficiently generate and maintain the table.

Getting it to work for a subset of scenarios with lots of assumptions/limitations might be a little easier...

@JohnTimm
Copy link
Collaborator

A "lightweight" version of this feature could work as follows:

  1. ask the terminology service for the closure of a given concept (the selection of whether the concept is coming from the search parameter or whether it is coming from the instance determines which concept to take)
  2. convert the closure of the specified to a SQL IN clause with a literal enumeration IN ('a', 'b', c')

@prb112 prb112 added the search label Feb 1, 2021
JohnTimm added a commit that referenced this issue Mar 26, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Mar 27, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Mar 27, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Mar 27, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Mar 27, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Mar 29, 2021
Issue #2092, Issue #1733, Issue #1980 - miscellaneous updates
@lmsurpre lmsurpre added this to the Sprint 2021-05 milestone Mar 29, 2021
@michaelwschroeder michaelwschroeder self-assigned this Mar 30, 2021
JohnTimm added a commit that referenced this issue Apr 5, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Apr 5, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue Apr 5, 2021
Issue #1733 - changed behavior when hierarchy meaning is undefined
michaelwschroeder added a commit that referenced this issue Apr 6, 2021
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
michaelwschroeder added a commit that referenced this issue Apr 7, 2021
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
michaelwschroeder added a commit that referenced this issue Apr 7, 2021
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
michaelwschroeder added a commit that referenced this issue Apr 7, 2021
Issue #1733 - implement TOKEN :above and :below modifiers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants