Stream: genomics/committers
Topic: fixing haplotype
Patrick Werner (Apr 21 2020 at 16:50):
Patrick Werner: Fixed the discriminator, added a MolSeq slice and pattern matching for the Obs slices.
Patrick Werner: Tried to build:
[java] java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
[java] at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
[java] at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
[java] at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
[java] at java.base/java.util.Objects.checkIndex(Objects.java:372)
[java] at java.base/java.util.ArrayList.get(ArrayList.java:458)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.sliceMatches(InstanceValidator.java:3122)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.matchSlice(InstanceValidator.java:5140)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.assignChildren(InstanceValidator.java:5066)
Patrick Werner: Will have a look at the Validator later this week to fix this in our spreadsheet, and/or fix the Java Validator.
Kevin Power (Apr 21 2020 at 19:13):
Did you commit your the change? Which example is this error coming from?
Patrick Werner (Apr 21 2020 at 19:31):
not yet. Didn't want to break the build of the branch
Kevin Power (Apr 21 2020 at 19:34):
I ask about the example that was breaking this, as I think there are some derivedFrom's in our examples that are not the best. And I am assuming it is an example being validated that is generating that error?
Kevin Power (Apr 23 2020 at 16:19):
@Patrick Werner -- any luck?
Patrick Werner (Apr 27 2020 at 12:32):
not yet. Currently the whole build doesn't work:
Patrick Werner (Apr 27 2020 at 12:32):
Jamie Jones (Apr 27 2020 at 14:19):
We really need to fix the slicing issues... anything I can do to help? build seems working now
Patrick Werner (Apr 27 2020 at 15:00):
i'm in the debugger right now.
Patrick Werner (Apr 27 2020 at 15:01):
IG publisher throws an NPE when using two discriminators
Grahame Grieve (Apr 28 2020 at 00:09):
can I reproduce that?
Patrick Werner (Apr 28 2020 at 06:28):
yes: https://github.com/HL7/genomics-reporting/tree/hoploFix
Patrick Werner (Apr 28 2020 at 06:28):
[java] java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
[java] at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
[java] at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
[java] at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
[java] at java.base/java.util.Objects.checkIndex(Objects.java:372)
[java] at java.base/java.util.ArrayList.get(ArrayList.java:458)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.sliceMatches(InstanceValidator.java:3104)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.matchSlice(InstanceValidator.java:4465)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.assignChildren(InstanceValidator.java:4391)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.validateElement(InstanceValidator.java:3984)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.startInner(InstanceValidator.java:3451)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.start(InstanceValidator.java:3363)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.validateResource(InstanceValidator.java:4683)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:702)
[java] at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:684)
[java] at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:4444)
[java] at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:4316)
[java] at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:824)
[java] at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:680)
[java] at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7141)
[java] Unhandled Exception: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 (00:51.0976)
Patrick Werner (Apr 28 2020 at 06:30):
Problem is: type = ((TypeRefComponent)criteriaElement.getType().get(0)).getWorkingCode();
and type is null
in the InstanceValidator
Patrick Werner (Apr 28 2020 at 06:31):
@Grahame Grieve
Grahame Grieve (Apr 28 2020 at 07:12):
so it's not really the 2 discriminators thing.
Patrick Werner (Apr 28 2020 at 07:20):
nope. Just saw that the spreadsheet got an empty row in it. Checking if this fixes the issue.
Patrick Werner (Apr 28 2020 at 07:22):
glad it didn't :-)
Patrick Werner (Apr 28 2020 at 07:26):
i think i fixed it
Patrick Werner (Apr 28 2020 at 07:27):
the discriminator was: resolve().code.@pattern
i was confused by the point behind code and assumed thats the correct way to do it and went with resolve().code.@pattern,$this.resolve().@type
Patrick Werner (Apr 28 2020 at 07:28):
removing the trailing dots fixes the build (wondering where there were comming from in the first place
Grahame Grieve (Apr 28 2020 at 07:28):
what's the @?
Grahame Grieve (Apr 28 2020 at 07:28):
oh that's the spreadsheet format... right
Patrick Werner (Apr 28 2020 at 10:52):
Ok i fixed the issue, also fixed element order issues in implication and sequ-phase
Patrick Werner (Apr 28 2020 at 10:53):
builds well locally. (edit): online as well
Patrick Werner (Apr 28 2020 at 10:54):
will continue fixing build errors.
Patrick Werner (Apr 28 2020 at 10:54):
Did we already define a merging point in timer for the implications branch?
Patrick Werner (Apr 28 2020 at 11:07):
aaaand its not working. The last dot is needed before the @
Grahame Grieve (Apr 28 2020 at 11:11):
that doesn't make sense, really
Patrick Werner (Apr 28 2020 at 11:12):
@Grahame Grieve with the wrong discriminators the build worked. I fixed it again to: $this.resolve().code.@pattern,$this.resolve().@type
Patrick Werner (Apr 28 2020 at 11:15):
(still don't really understand if i need $this before the resolve or not.) trying without them now
Patrick Werner (Apr 28 2020 at 11:15):
no difference (in the stacktrace)
Patrick Werner (Apr 28 2020 at 11:17):
If i remove the .
before the @
the build works, but the discriminators are missing the last char --> resolve().cod
Grahame Grieve (Apr 28 2020 at 11:19):
I think there's something wrong with the string processing
Grahame Grieve (Apr 28 2020 at 11:20):
can you commit it wrong to a fork and I'll look at it? (though possibly not tonight)
Patrick Werner (Apr 28 2020 at 11:32):
sure: https://github.com/HL7/genomics-reporting/tree/discriminatorProb
for my own bug-hunting:
.@
is used everywhere in the discriminators of our IG. So i left it like this.- do i need
$this.resolve()
orresolve()
on Observation.derivedFrom? (still unclear when i need $this) - do you think the discriminator
$this.resolve().code.@pattern,$this.resolve().@type
is correct?
Kevin Power (Apr 28 2020 at 16:20):
@Patrick Werner - Did you apply a fix of some sort to the 'implications' branch for this? If so, do we need to back that out before we merge to master?
https://github.com/HL7/genomics-reporting/commit/c85eb1c932d373b3fa2f594395e0472a79e8698b
Jamie Jones (Apr 28 2020 at 16:22):
I think it can go in, the TC doesn't need to be voted on
Kevin Power (Apr 28 2020 at 16:24):
I don't think what is in the implication branch is the full fix (but wanted to confirm)
Patrick Werner (Apr 28 2020 at 16:26):
I think we can merge (now or when the build error is resolved)
Patrick Werner (Apr 28 2020 at 16:27):
For the TC (STU1, 1.0.1) i would then apply the fix to the STU1 version. Leaving all other modifications out.
Jamie Jones (Apr 28 2020 at 16:27):
Yes. Best to do a clean one from stu1.0
Jamie Jones (Apr 28 2020 at 16:28):
Can make the diff as small as possible to show just what is changed (should be 1 cell in the obs spreadsheet??)
Jamie Jones (Apr 28 2020 at 16:28):
Can use text editor for that, hopefully
Kevin Power (Apr 28 2020 at 16:28):
Oh, OK. Will plan to remove the complex extension, then merge that branch into master.
Kevin Power (Apr 28 2020 at 16:29):
And yes, if we do a TC, would likely be easier reapply the fix to our STU1 tag.
Bob Milius (May 04 2020 at 16:11):
fyi, I started a thread in the terminology track about genomics codesystems and valuesets
Kevin Power (May 06 2020 at 14:01):
Hey btw - I was searching through some JIRAs, and stumbled over this: J#19966 "Fix slicings in obs profiles"
So when (if?) we can completely fix the slicing issues, we have a tracker :slight_smile:
Bret H (May 10 2020 at 00:04):
Hey what happened with O and O observation profiles removing the bad genomics examples?
Kevin Power (May 11 2020 at 15:21):
@Patrick Werner - Is this branch ready to merge, or are there still outstanding questions? https://github.com/HL7/genomics-reporting/tree/discriminatorProb
Last updated: Apr 12 2022 at 19:14 UTC