FHIR Chat · fixing haplotype · genomics/committers

Stream: genomics/committers

Topic: fixing haplotype


view this post on Zulip 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.

view this post on Zulip Kevin Power (Apr 21 2020 at 19:13):

Did you commit your the change? Which example is this error coming from?

view this post on Zulip Patrick Werner (Apr 21 2020 at 19:31):

not yet. Didn't want to break the build of the branch

view this post on Zulip 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?

view this post on Zulip Kevin Power (Apr 23 2020 at 16:19):

@Patrick Werner -- any luck?

view this post on Zulip Patrick Werner (Apr 27 2020 at 12:32):

not yet. Currently the whole build doesn't work:

view this post on Zulip Patrick Werner (Apr 27 2020 at 12:32):

https://chat.fhir.org/#narrow/stream/179297-committers.2Fnotification/topic/Builds.20failing.20on.20pubpack

view this post on Zulip 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

view this post on Zulip Patrick Werner (Apr 27 2020 at 15:00):

i'm in the debugger right now.

view this post on Zulip Patrick Werner (Apr 27 2020 at 15:01):

IG publisher throws an NPE when using two discriminators

view this post on Zulip Grahame Grieve (Apr 28 2020 at 00:09):

can I reproduce that?

view this post on Zulip Patrick Werner (Apr 28 2020 at 06:28):

yes: https://github.com/HL7/genomics-reporting/tree/hoploFix

view this post on Zulip 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)

view this post on Zulip Patrick Werner (Apr 28 2020 at 06:30):

Problem is: type = ((TypeRefComponent)criteriaElement.getType().get(0)).getWorkingCode();
and type is null in the InstanceValidator

view this post on Zulip Patrick Werner (Apr 28 2020 at 06:31):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Apr 28 2020 at 07:12):

so it's not really the 2 discriminators thing.

view this post on Zulip 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.

view this post on Zulip Patrick Werner (Apr 28 2020 at 07:22):

glad it didn't :-)

view this post on Zulip Patrick Werner (Apr 28 2020 at 07:26):

i think i fixed it

view this post on Zulip Patrick Werner (Apr 28 2020 at 07:27):

the discriminator was: resolve().code.@patterni 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

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Apr 28 2020 at 07:28):

what's the @?

view this post on Zulip Grahame Grieve (Apr 28 2020 at 07:28):

oh that's the spreadsheet format... right

view this post on Zulip Patrick Werner (Apr 28 2020 at 10:52):

Ok i fixed the issue, also fixed element order issues in implication and sequ-phase

view this post on Zulip Patrick Werner (Apr 28 2020 at 10:53):

builds well locally. (edit): online as well

view this post on Zulip Patrick Werner (Apr 28 2020 at 10:54):

will continue fixing build errors.

view this post on Zulip Patrick Werner (Apr 28 2020 at 10:54):

Did we already define a merging point in timer for the implications branch?

view this post on Zulip Patrick Werner (Apr 28 2020 at 11:07):

aaaand its not working. The last dot is needed before the @

view this post on Zulip Grahame Grieve (Apr 28 2020 at 11:11):

that doesn't make sense, really

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Patrick Werner (Apr 28 2020 at 11:15):

no difference (in the stacktrace)

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Apr 28 2020 at 11:19):

I think there's something wrong with the string processing

view this post on Zulip 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)

view this post on Zulip 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() or resolve() on Observation.derivedFrom? (still unclear when i need $this)
  • do you think the discriminator $this.resolve().code.@pattern,$this.resolve().@typeis correct?

view this post on Zulip 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

view this post on Zulip Jamie Jones (Apr 28 2020 at 16:22):

I think it can go in, the TC doesn't need to be voted on

view this post on Zulip 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)

view this post on Zulip Patrick Werner (Apr 28 2020 at 16:26):

I think we can merge (now or when the build error is resolved)

view this post on Zulip 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.

view this post on Zulip Jamie Jones (Apr 28 2020 at 16:27):

Yes. Best to do a clean one from stu1.0

view this post on Zulip 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??)

view this post on Zulip Jamie Jones (Apr 28 2020 at 16:28):

Can use text editor for that, hopefully

view this post on Zulip Kevin Power (Apr 28 2020 at 16:28):

Oh, OK. Will plan to remove the complex extension, then merge that branch into master.

view this post on Zulip 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.

view this post on Zulip Bob Milius (May 04 2020 at 16:11):

fyi, I started a thread in the terminology track about genomics codesystems and valuesets

view this post on Zulip 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:

view this post on Zulip Bret H (May 10 2020 at 00:04):

Hey what happened with O and O observation profiles removing the bad genomics examples?

view this post on Zulip 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