FHIR Chat · Unable to resolve discriminator in definitions · conformance

Stream: conformance

Topic: Unable to resolve discriminator in definitions


view this post on Zulip Patrick Werner (May 14 2020 at 10:45):

In the CG IG we have the following discriminator on Observation.derivedFrom: Slice: Unordered, Open by type:resolve(), pattern:resolve().code

view this post on Zulip Patrick Werner (May 14 2020 at 10:46):

(http://build.fhir.org/ig/HL7/genomics-reporting/haplotype.html)

view this post on Zulip Patrick Werner (May 14 2020 at 10:47):

We want to discriminate by type as derivedFrom can be an Observation or a MolecularSequence, pattern:resolve().code is used to discriminate the different Observations

view this post on Zulip Patrick Werner (May 14 2020 at 10:48):

When trying to validate examples against the profile we are getting: Error @ Bundle.entry[9].resource.ofType(Observation).derivedFrom[0] (line 428, col14) : Unable to resolve discriminator in definitions: code

view this post on Zulip Patrick Werner (May 14 2020 at 10:53):

For the slices we added Pattern like: {"coding":[{"system":"http://loinc.org","code":"69548-6"}]}
image.png

view this post on Zulip Patrick Werner (May 14 2020 at 10:53):

But these patterns aren't applied to the slices by the IG publisher.

view this post on Zulip Grahame Grieve (May 14 2020 at 11:09):

do you want to make a validator test case? (valid and invalid examples, and profile)

view this post on Zulip Patrick Werner (May 14 2020 at 11:20):

will do

view this post on Zulip Patrick Werner (May 14 2020 at 11:21):

Grahame Grieve said:

do you want to make a validator test case? (valid and invalid examples, and profile)

do you think the content in the pattern column is correct? Was not sure if can do a pattern like this on a reference.

view this post on Zulip Grahame Grieve (May 14 2020 at 11:31):

looks ok to me

view this post on Zulip Rob Hausam (May 14 2020 at 13:51):

@Grahame Grieve @Patrick Werner Is Open by type:resolve() somehow valid (or is that just a typo)? As far as I know, slicing.discriminator.type must be "value | exists | pattern | type | profile".

view this post on Zulip Patrick Werner (May 14 2020 at 13:55):

thats how it is rendered, in JSON:

    "slicing" : {
          "discriminator" : [
            {
              "type" : "type",
              "path" : "resolve()"
            },
            {
              "type" : "pattern",
              "path" : "resolve().code"
            }
          ],
          "rules" : "open"
        }

view this post on Zulip Rob Hausam (May 14 2020 at 13:58):

OK, yeah. Never mind. It looked strange to me for some reason when you posted that - but I have the same in my IG - except that I use $this.resolve() as the path. :)

view this post on Zulip Rob Hausam (May 14 2020 at 14:01):

Sometimes the double use of 'type' can be confusing (particularly if you read it wrong!).

view this post on Zulip Patrick Werner (May 14 2020 at 15:19):

oh yes!


Last updated: Apr 12 2022 at 19:14 UTC