firely-net-sdk icon indicating copy to clipboard operation
firely-net-sdk copied to clipboard

IStructureDefinitionSummary differs between PocoSDSP and StructureDefinitionSDSP

Open ewoutkramer opened this issue 5 years ago • 1 comments

Describe the bug We currently ship two implementations of IStructureDefinitionSummaryProvider: PocoStructureDefinitionSummaryProvider and StructureDefinitionSummaryProvider.

One would expect that the IStructureDefinitionSummary information provided by both for the same resource would yield the same results. This is however not the case.

To Reproduce Steps to reproduce the behavior:

  1. Retrieve an IStructureDefinitionSummary from both providers for Observation
  2. Compare the IsSummary property for the elements modifierExtension and id
  3. It will be true for the info returned by the PocoSDSP and false for the SDSP.
  4. Retrieve an IStructureDefinitionSummary from both provider for Observation.referenceRange
  5. The BackboneElement will be abstract for ISDSP and not abstract for the PocoSDSP.
  6. The same is true for Order in all elements.

Expected behavior The information should be the same, maybe except for Order, since that should just retain the same sequence.

Version used:

  • 2.0.1

Additional context The differences exist because the InSummary for 'id' (called ElementId in the POCO) is hardwired to be "true", while it is false in the StructureDefinition. The same is true for modifierExtension (which is surprising - shouldn't they indeed be in summary?).

ewoutkramer avatar Dec 22 '20 11:12 ewoutkramer

I discovered this while writing unit tests for the new CAR compiler. This shows we are not yet testing this logic fully in the SDK. I can donate the unit test code to compare two ISDS instances (it originates from Vonk) to turn this into a SDK unit-test.

ewoutkramer avatar Dec 22 '20 11:12 ewoutkramer