Stream: genomics
Topic: R4 MolecularSequence composite search params
Michael Calderero (Nov 15 2018 at 08:31):
Hi,
I'm looking at MolecularSequence
composite search parameters i.e. referenceseqid-coordinate
and chromosome-coordinate
. Taking an example for chromosome-coordinate
(excerpt only):
<code value="chromosome-coordinate"/> <base value="MolecularSequence"/> <type value="composite"/> <expression value="MolecularSequence"/> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome"/> <expression value="referenceSeq.chromosome"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-start"/> <expression value="variant.start"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-end"/> <expression value="variant.end"/> </component>
Since MolecularSequence.variant
's cardinality allows it to appear more than once in the resource, I would think the aforementioned search parameter will allow the following search [baseurl]/MolecularSequence?chromosome-coordinate=X$0$3
to match the resource below:
MolecularSequence: referenceSeq: chromosome: system: whatever-system code: X variant: start: 0 end: 1 variant: start: 2 end: 3
i.e. start:0 is in the first variant
property while end:3 is in the second variant
property.
Is that the expected behavior or is my understanding of composite search parameters incorrect?
Michael Calderero (Nov 15 2018 at 08:40):
My assumption for this search parameter is that it would not match the resource above but would match this one instead (i.e. start:0 and end:3 are within the same variant property):
MolecularSequence: referenceSeq: chromosome: system: whatever-system code: X variant: start: 0 end: 3 variant: start: 5 end: 6
Kevin Power (Nov 15 2018 at 15:15):
I agree with your assessment. You can do range searches on start/end if needed.
Michael Calderero (Nov 16 2018 at 02:37):
Sorry I'm still confused. What's the expected behavior of this search parameter? Is it expected to match the first example or the second one?
If the second example, then I would think the search parameter definition needs to be changed to:
<code value="chromosome-coordinate"/> <base value="MolecularSequence"/> <type value="composite"/> <expression value="MolecularSequence.variant"/> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome"/> <expression value="%resource.referenceSeq.chromosome"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-start"/> <expression value="start"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-end"/> <expression value="end"/> </component>
i.e. which is what this definition was in STU3.
Kevin Power (Nov 16 2018 at 03:05):
When I said I agree with your assessment, the intention is to match when a variant instance matches both the start and end criteria. I do remember that when I was adding the second composite search param, I was getting some build issues. I need to do some research into how to structure this search param.
Kevin Power (Nov 16 2018 at 22:34):
I have created a pull request with a fix, and have asked if it is possible to get the fix merged in. While looking at the fix, I have made some additional changes as well.
See the pull request 286
I created some new search params, and tried to make it clear how to search for sequences for given "windows", and also for sequences with variants at given locations. I welcome comments/questions/concerns.
@Patrick Werner @James Jones @ Bob Milius @Gil Alterovitz @Michael Calderero
Jamie Jones (Nov 20 2018 at 14:57):
@Kevin Power The changes look right and good to me from how I understand the composite searches :thumbs_up:
Kevin Power (Nov 20 2018 at 14:58):
Many thanks @James Jones
Patrick Werner (Nov 20 2018 at 15:01):
looks good to me as well. I'm currently trying to get the Resources into hapi to be able to test it
Kevin Power (Nov 20 2018 at 15:18):
Thanks @Patrick Werner - Keep us updated on your progress with HAPI.
Kevin Power (Nov 26 2018 at 12:38):
FYI - Grahame merged the MolecularSequence search param changes. If anyone reviews the changes and has questions please respond here. @Michael Calderero
Michael Calderero (Nov 27 2018 at 06:42):
I checked the updated definitions from build.fhir.org and I see the following:
1. http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-window-coordinate composite
<expression value="MolecularSequence.referenceSeq"/> <xpathUsage value="normal"/> <multipleOr value="false"/> <multipleAnd value="true"/> <modifier value="missing"/> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome"/> <expression value="chromosome"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start"/> <expression value="start"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end"/> <expression value="end"/> </component>
but MolecularSequence.referenceSeq doesn't have start
and end
properties. Perhaps the windowStart
and windowEnd
should have been used instead?
2. http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-window-coordinate
<expression value="MolecularSequence.referenceSeq"/> <xpathUsage value="normal"/> <multipleOr value="false"/> <multipleAnd value="true"/> <modifier value="missing"/> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid"/> <expression value="referenceSeqId"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start"/> <expression value="start"/> </component> <component> <definition value="http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end"/> <expression value="end"/> </component>
Same as number 1 (i.e. I think windowStart
and windowEnd
should have been used instead).
@Kevin Power
Kevin Power (Nov 27 2018 at 12:45):
You are right, both should use window start and end. Let me take a look later today.
Kevin Power (Nov 27 2018 at 18:42):
https://github.com/HL7/fhir/pull/306
Michael Calderero (Nov 27 2018 at 21:10):
@Kevin Power the update looks fine to me now. Thank you.
Kevin Power (Nov 27 2018 at 21:14):
Great, thanks. Sorry for taking an extra step on it - I missed the issue.
Last updated: Apr 12 2022 at 19:14 UTC