FHIR Chat · Snapshot reconciliation · conformance

Stream: conformance

Topic: Snapshot reconciliation


view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:30):

Hey @Michel Rutten I'm looking at your comments on the snapshot generation tests.

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:30):

===== T4a =====

ok fixed.

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:31):

  • Error: element Patient.extension should inherit constraints from DomainResource.extension

well, see this in the java code:

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:31):

  private boolean checkExtensionDoco(ElementDefinition base) {
    // see task GF#3970. For an extension, there's no point copying across all the underlying definitional stuff
    boolean isExtension = base.getPath().equals("Extension") || base.getPath().endsWith(".extension") || base.getPath().endsWith(".modifierExtension");
    if (isExtension) {
      base.setDefinition("An Extension");
      base.setShort("Extension");
      base.setCommentElement(null);
      base.setRequirementsElement(null);
      base.getAlias().clear();
      base.getMapping().clear();
    }
    return isExtension;
  }

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:33):

though that doesn't explain why the constraints are missing.

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:39):

and that is because I don't replicate ele-1 and ext-1 everywhere in the underlying definitions. I don't believe I've seen anything in the technical correction task list to change that either

view this post on Zulip Grahame Grieve (Sep 25 2019 at 04:39):

@Ewout Kramer @Lloyd McKenzie etc - have we ever talked about this?

view this post on Zulip Lloyd McKenzie (Sep 25 2019 at 05:26):

Not that I recall. I think the intention was to not spit out tons of useless verbiage, not to avoid inheriting constraints

view this post on Zulip Grahame Grieve (Sep 25 2019 at 07:19):

I was more asking about ele-1 and ext-1 not appearing everywhere in the base package

view this post on Zulip Ewout Kramer (Sep 25 2019 at 09:42):

We haven't talked about them, since why would they need special treatment? When you don't copy these into each element, how would a generic validator know to run these invariants? If we don't want them everywhere because it takes up too much space, we need to document them as special exceptions so validators could hard-wire their validation.

view this post on Zulip Grahame Grieve (Sep 25 2019 at 10:23):

Well, I did do that but I didn’t really think about. I wrote a big long explanation about why we shouldn’t reproduce this in the snapshot but of course, that’s what snapshots should do. But does that mean you’re running off a jacked base Package? What other differences are there?

view this post on Zulip Ewout Kramer (Sep 25 2019 at 12:30):

Sort of, we're using the base package, but our tools that need the snapshot (like the validator) will regenerate the snapshot before it runs. Simplifier also recreates the snapshot based on the packages available in its database. So, the differential is king for us - the snapshot is something we compute ourselves.

view this post on Zulip Ewout Kramer (Sep 25 2019 at 12:31):

Other differences.....the very useful exercise you and @Michel Rutten are now doing should surface those, I hope. Or maybe you mean other kinds of differences?

view this post on Zulip Grahame Grieve (Sep 25 2019 at 12:44):

no I came to the same conclusions... I don't regenerate base snapshots, but I will be regenerating snapshots for derived packages in the IG Publisher from now on (found bugs due to bad input snapshots yesterday)

view this post on Zulip Grahame Grieve (Sep 25 2019 at 12:45):

but this process will surface whatever

view this post on Zulip Michel Rutten (Sep 25 2019 at 14:47):

FYI The SnapshotGenerator class in the .NET API exposes a configuration setting SnapshotGeneratorSettings.ForceRegenerateSnapshots. Forge and Simplifier enable this setting. This forces re-generation of all externally referenced snapshots, including core resource & datatype profiles.

view this post on Zulip Michel Rutten (Sep 25 2019 at 14:48):

https://github.com/FirelyTeam/fhir-net-api/blob/462d7a0cfe45a2faaac85e6aa874c1b8f23999d9/src/Hl7.Fhir.Specification/Specification/Snapshot/SnapshotGeneratorSettings.cs#L65

view this post on Zulip Grahame Grieve (Sep 27 2019 at 07:10):

ok, well, @Michel Rutten I updated the generated snapshots in the current build. but I also found out how I was doing things.. the validator was validating by the element, then by the type. Now I have to change the validator not to raise repeated errors from the same invariant which is on both the element and the type

view this post on Zulip Grahame Grieve (Sep 27 2019 at 07:10):

anyway, can you check the generated snapshots in the current build

view this post on Zulip Grahame Grieve (Sep 29 2019 at 08:10):

@Michel Rutten changing the snapshot generation for your comments on T11 has completely changed all the other tests?

view this post on Zulip Grahame Grieve (Sep 29 2019 at 08:12):

e.g. T1 forward...

view this post on Zulip Grahame Grieve (Sep 30 2019 at 05:02):

T23 - yes, deliberately out of order; the generated snapshot has them in the correct order. Note sort=true in the manifest

view this post on Zulip Michel Rutten (Sep 30 2019 at 10:00):

changing the snapshot generation for your comments on T11 has completely changed all the other tests?

Yes, correcting the base of Extension will affect many snapshots, as expected. However this change shouldn't break any snapshot manifest tests - unless they specifically inspect (inherited) properties of extension elements below the root.

view this post on Zulip Michel Rutten (Sep 30 2019 at 10:03):

T23 - yes, deliberately out of order

Indeed, initially I didn't notice that this test is specifically to verify behavior for invalid element order.
The .NET Implementation is not (yet) capable of rectifying element order, although I would like to add such logic eventually.

view this post on Zulip Grahame Grieve (Sep 30 2019 at 10:45):

ok well, you could look at the updated tests then, though you can't pass the unless I give you updated definitions for the forthcoming technical correction

view this post on Zulip Michel Rutten (Sep 30 2019 at 10:54):

I guess I can "look" at the updated tests, but I cannot verify the results until we implement the technical correction.

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:08):

well, I can send you the updated diffs, but, yes, you'll have to deal with the changes to primitive types

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:08):

FYI I'm having a session with Ewout today to discuss the upcoming technical correction, try to assess the impact and schedule implementation.

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:09):

ok. I can send you whatever you want

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:09):

Can you send money?

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:10):

lol. ok. sure. I'll make up a big pdf for you to print out. What's your preferred currency?

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:11):

Do we have a FHIR crypto coin?

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:11):

;p

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:12):

I will try to work with the updated manifest tests in github. Maybe I will first create a new branch and implement the technical correction.

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:12):

Is there already a published overview of the technical correction details?

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:15):

ok. you can get the updated technical correction package from

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:17):

https://github.com/FHIR/packages/tree/master/hl7.fhir.rX/hl7.fhir.r4.core

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:17):

that's what matters from your pov, though there's a few changes not made in there yet

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:17):

Great, thanks!

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:19):

Does the technical correction introduce any other changes to Snapshot, apart from the system types?

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:19):

fixes a number of invariants

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:19):

populates the inherited invariants

view this post on Zulip Michel Rutten (Sep 30 2019 at 11:20):

OK, shouldn't take long to implement.

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:20):

some narrative definition fix ups

view this post on Zulip Grahame Grieve (Sep 30 2019 at 11:21):

that's what I said ;-). The changes to the primitive types were a gift that kept giving

view this post on Zulip Michel Rutten (Sep 30 2019 at 12:31):

I expect (hope...) that the impact of the new system type extensions on FHIR .NET API will be relatively small.


Last updated: Apr 12 2022 at 19:14 UTC