Stream: conformance
Topic: Forge differential output
Jonny Rylands (Oct 10 2016 at 22:55):
@Michel Rutten Hi Michel, I've noticed a variation in the output of the differential section when changing the snapshot generation on and off. When snapshot generation is off, element definitions in the differential section only have individual fields which have changed, when turned on the element definitions have all fields. Is this intentional? Which version is "correct"?
Michel Rutten (Oct 11 2016 at 10:59):
Hi @Jonny Rylands this sounds like a bug. The differential component should only contain actual constraints (sparse tree). The snapshot component represents the fully expanded profile.
Recently I've been working on a complete re-implementation of snapshot generation, as part of our open source FHIR .NET API library. The next Forge release will be based on this new logic. Also I am now reimplementing Forge change tracking logic, which is crucial for filtering the diffential. It's quite a bit of work, but this will improve the quality and stability of the generated output.
Jonny Rylands (Oct 11 2016 at 11:04):
@Michel Rutten Just to be clear - it's not that the differential output contains unchanged elements in snapshot mode - it's that the individual fields within the changed elements vary.
Michel Rutten (Oct 11 2016 at 11:07):
@Jonny Rylands So you are referring to element properties? Forge should also try to exclude unconstrained properties from the differential, but apparently you have discovered that this is currently not reliable.
Michel Rutten (Oct 11 2016 at 11:08):
Anyway, the current change tracking logic is in dire need of refactoring. So we decided to focus on fully reimplementing this layer, instead of trying to keep fixing bugs (and introducing new regressions).
Jonny Rylands (Oct 11 2016 at 11:10):
@Michel Rutten Yes that's right. So for example if you change cardinality from 0..* to 0..1. With snapshot generation turned OFF, the differential for this element will contain only MAX. With snapshot generation turned ON, the differential for this element with contain both MIN and MAX (along with all other unchanged properties).
Jonny Rylands (Oct 11 2016 at 11:11):
I understand that snapshot generation is supposed to output everything, but I believe this shouldn't affect the differential output - only the snapshot output.
Michel Rutten (Oct 11 2016 at 11:53):
@Jonny Rylands correct, so the Forge behavior is indeed a bug.
Jonny Rylands (Oct 11 2016 at 11:56):
@Michel Rutten OK, so the correct differential output is that made when snapshot generation is turned off?
Michel Rutten (Oct 11 2016 at 12:03):
@Jonny Rylands that is correct. According to FHIR spec, the differential component should only contain actual constraints (on elements & element properties) with respect to the base profile.
Jonny Rylands (Oct 11 2016 at 12:04):
OK thanks.
Last updated: Apr 12 2022 at 19:14 UTC