FHIR Chat · error validation stu3 contained references · IG creation

Stream: IG creation

Topic: error validation stu3 contained references


view this post on Zulip Roeland Luykx (Jun 29 2021 at 20:16):

If I make a DocumentManifest with a contained resouce DocumentReference with referenced (also contained - in DocumentManifest) i.e. author and patient, i receive errors with the validator and/or publisher:

Error @ DocumentManifest.contained[0].ofType(DocumentReference).subject (line 16, col25) : ref-1: SHALL have a contained resource if a local reference is provided ( (url: 2; ids: )) [(reference = '#') or reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))]
Error @ DocumentManifest.contained[0].ofType(DocumentReference).author[0] (line 20, col18) : ref-1: SHALL have a contained resource if a local reference is provided ( (url: 3; ids: )) [(reference = '#') or reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))]

should the actual version of publisher (1.1.76) handle this also correctly or should an older version of publisher be used for stu3? docmanifest.json

view this post on Zulip Lloyd McKenzie (Jun 29 2021 at 20:38):

STU3 had a bug in one of the invariants that didn't handle certain contained references properly. This was fixed in R4. You may need to live with ignoring the error in STU3. @Grahame Grieve thoughts?

view this post on Zulip Grahame Grieve (Jun 30 2021 at 02:26):

I don't know. is the invariant in error?

view this post on Zulip Roeland Luykx (Jun 30 2021 at 04:20):

does it have to do with the content.p[x] 1..1 stuff in stu3 in difference to R4 where content is a Reference?
the difference of the definitions in picture (left R4, right stu3)
image.png

view this post on Zulip Lloyd McKenzie (Jun 30 2021 at 13:29):

R4 uses %rootResource. STU3 only used %resource.

view this post on Zulip Roeland Luykx (Jun 30 2021 at 13:38):

Lloyd McKenzie said:

R4 uses %rootResource. STU3 only used %resource.

so it is a definition problem in the STU3 and not in the validator functionality?

view this post on Zulip Lloyd McKenzie (Jun 30 2021 at 14:39):

Correct

view this post on Zulip Lloyd McKenzie (Jun 30 2021 at 14:39):

Though we could theoretically put a patch in the validator to work around the STU3 issue. (Not sure what the likelihood of getting a technical correction out on STU3 is at this point.)

view this post on Zulip Grahame Grieve (Jun 30 2021 at 19:43):

there's a spot in the validator where it corrects some old invariants, so a patch for this could be added to the java code

view this post on Zulip Lloyd McKenzie (Jul 01 2021 at 02:19):

Added https://github.com/hapifhir/org.hl7.fhir.core/issues/552

view this post on Zulip Grahame Grieve (Aug 26 2021 at 22:03):

@Roeland Luykx please attach the example you were working with that demonstrated this problem to the github task that Lloyd created.

view this post on Zulip Roeland Luykx (Aug 27 2021 at 05:44):

@Grahame Grieve yes, i will attach the example to the issue https://github.com/hapifhir/org.hl7.fhir.core/issues/552

view this post on Zulip Roeland Luykx (Sep 09 2021 at 08:03):

@Grahame Grieve thanks for the fix. it seems to work now.


Last updated: Apr 12 2022 at 19:14 UTC