Stream: terminology
Topic: Qeuestion about filter in $expand
Yunwei Wang (Dec 09 2017 at 20:27):
According to the standard, filter in expansion is "A text filter that is applied to restrict the codes that are returned (this is useful in a UI context). The interpretation of this is delegated to the server in order to allow to determine the most optimal search approach for the context".
Yunwei Wang (Dec 09 2017 at 20:31):
So the server can design some customized expression in filters to support special expansion request. For example, I can design my server to support "filter=http://snomed.info/sct" for expansion on SCT code only.
Yunwei Wang (Dec 09 2017 at 20:32):
Is my understanding correct?
Peter Jordan (Dec 09 2017 at 20:50):
As a text filter on the $expand operation is performed on a Value Set, that usage would only make sense if a Value Set contains concepts from more than one code system. A more typical usage of that filter, particularly when related to UI interactions, is to return concepts based on matching descriptions.
Yunwei Wang (Dec 09 2017 at 20:59):
Definitely. I am just wondering if a server developer can push the usage of filter beyond description matching. The target value set has codes from multiple code system. I used to use includedCodeSystem in ExpansionFilter to expand on certain code system. Since that property is removed, I have to find some other ways to do the same. Other than introduce an extension, I think I can (and I should) use filter parameter since this is a server interpretation of optimal search approach.
Peter Jordan (Dec 10 2017 at 02:06):
As an alternative, you might design your server to use the context input parameter (uri) for this use case. Not it's stated purpose in the spec, but possibly a better fit than the text filter property?
Grahame Grieve (Dec 10 2017 at 02:18):
@Yunwei Wang: " I used to use includedCodeSystem in ExpansionFilter to expand on certain code system" - why not us the value set machinery, since that's what it's supposed to do
Yunwei Wang (Dec 10 2017 at 03:21):
@Grahame Grieve what is "value set machinery"?
Grahame Grieve (Dec 10 2017 at 06:14):
define a value set on the code system, then expand it... what do you need profile for?
Yunwei Wang (Dec 10 2017 at 18:52):
I have a value set definition which need to expand to two different code systems. Each expansion contains codes from one code system. In another works there are two different expansions from the same definition. Is this one value set or two value sets?
Yunwei Wang (Dec 10 2017 at 18:53):
@Peter Jordan I think context is a better choice than filter
Grahame Grieve (Dec 10 2017 at 19:34):
I don't understand ' value set definition which need to expand to two different code systems' - what's the definition?
Rob Hausam (Dec 10 2017 at 20:22):
I think the way you would do this is using ExpansionProfile.excludedSystem. Maybe what you are wanting is more like "includedSystem", which we don't have, but in any reasonable real-world case I expect that excludedSystem should be workable for what you need. The alternative, which I think Grahame is suggesting, and you may have alluded to, would be to create separate value sets that are defined specifically to include the codes from the particular code system that you need in each case.
Michael Lawley (Dec 12 2017 at 02:38):
@Yunwei Wang are you able to share the value set definition? I think it would help us to provide better guidance.
Using the filter parameter the way you're describing seems unnecessary
Last updated: Apr 12 2022 at 19:14 UTC